Template:Infobox website: Difference between revisions
Template page
More actions
m Fix duplicate website link, strip https:// robustly via titleparts, add years-ago note under launched date |
m Replace reader-visible prose double hyphens with a proper em dash entity |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
|name={{{name|{{PAGENAME}}}}} | |name={{{name|{{PAGENAME}}}}} | ||
|image={{{logo|}}} | |image={{{logo|}}} | ||
|type={{{type|Website}}} | |type={{#ifeq:{{lc:{{{developer|}}}}}|loka|LOKA OFFICIAL {{{type|Website}}}|{{{type|Website}}}}} | ||
|content={{#if:{{{url|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">URL</span><span class="loka-infobox-row-value">[https://{{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}} {{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}}]</span></div>}}{{#if:{{{developer|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Developer</span><span class="loka-infobox-row-value">{{{developer|}}}</span></div>}}{{#if:{{{platform|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Platform</span><span class="loka-infobox-row-value">{{{platform|}}}</span></div>}}{{#if:{{{launched|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Launched</span><span class="loka-infobox-row-value">{{{launched|}}}{{#iferror:{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/ | |content={{#if:{{{screenshot|}}}|{{#ifexist:File:{{{screenshot|}}}|<div class="loka-website-screenshot">[[File:{{{screenshot|}}}|220px|frameless|link=|alt={{{name|{{PAGENAME}}}}}]]<div class="loka-website-screenshot-caption">{{#if:{{{screenshotdate|}}}|Screenshot as of {{#time:F Y|{{{screenshotdate|}}}}}|Screenshot}}</div></div>}}}}{{#if:{{{url|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">URL</span><span class="loka-infobox-row-value">[https://{{#if:{{#titleparts:{{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}}|1|-1}}|{{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}}|{{#titleparts:0/{{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}}|-1|2}}}} {{#if:{{#titleparts:{{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}}|1|-1}}|{{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}}|{{#titleparts:0/{{#if:{{#titleparts:{{{url|}}}|10|3}}|{{#titleparts:{{{url|}}}|10|3}}|{{{url|}}}}}|-1|2}}}}]</span></div>}}{{#if:{{{developer|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Developer</span><span class="loka-infobox-row-value">{{#ifeq:{{lc:{{{developer|}}}}}|loka|<span class="loka-website-developer-loka"><span class="loka-website-developer-loka-icon">[[File:Loka icon.png|14px|link=|alt=Loka]]</span> '''Loka'''</span>|{{{developer|}}}}}</span></div>}}{{#if:{{{platform|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Platform</span><span class="loka-infobox-row-value">{{{platform|}}}</span></div>}}{{#if:{{{launched|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Launched</span><span class="loka-infobox-row-value">{{{launched|}}}{{#iferror:{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}||<span class="loka-website-launched-ago">({{#ifexpr:{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}<1|today|{{#ifexpr:{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}<7|{{#ifeq:{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}|1|1 day ago|{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}} days ago}}|{{#ifexpr:{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}<31|{{#ifeq:{{#expr:floor({{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}/7)}}|1|1 week ago|{{#expr:floor({{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}/7)}} weeks ago}}|{{#ifexpr:{{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}<366|{{#ifeq:{{#expr:floor({{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}/30.44)}}|1|1 month ago|{{#expr:floor({{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}/30.44)}} months ago}}|{{#ifeq:{{#expr:floor({{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}/365.2425)}}|1|1 year ago|{{#expr:floor({{#expr:floor(({{#time:U}}-{{#time:U|{{{launched|}}}}})/86400)}}/365.2425)}} years ago}}}}}}}}}})</span>}}</span></div>}}{{#if:{{{status|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Status</span><span class="loka-infobox-row-value"><span class="loka-website-status loka-website-status--{{lc:{{{status|}}}}}">{{{status|}}}</span></span></div>}}{{#if:{{{discord|}}}{{{github|}}}|<div class="loka-website-links">{{#if:{{{discord|}}}|<span class="loka-website-link">[[File:Discord logo.svg|22px|link={{{discord|}}}|alt=Discord]]</span>}}{{#if:{{{github|}}}|<span class="loka-website-link">[{{{github|}}} GitHub]</span>}}</div>}} | ||
}}</includeonly><noinclude> | }}[[Category:Websites]]</includeonly><noinclude> | ||
== Usage == | == Usage == | ||
| Line 24: | Line 24: | ||
</pre> | </pre> | ||
Only <code>name</code> is required (it otherwise defaults to the page name); every other row is hidden when omitted. Built on [[Template:Infobox]] for the shared name/image/row chrome | Only <code>name</code> is required (it otherwise defaults to the page name); every other row is hidden when omitted. Built on [[Template:Infobox]] for the shared name/image/row chrome — see there for the wiki's common infobox look. For documenting Loka-related websites, bots, and tools such as EldritchBot or StromgardeBot; article prose (what it does, how to use it) belongs below the infobox as normal, the same way it does for every other infobox type. Automatically adds the page to [[:Category:Websites]]. | ||
== Parameters == | == Parameters == | ||
| Line 42: | Line 42: | ||
|- | |- | ||
| <code>url</code> | | <code>url</code> | ||
| The site's URL, with or without the <code>https://</code> prefix | | The site's URL, with or without the <code>https://</code> prefix or a trailing slash — all forms display and link identically, always as the bare URL with neither. Shown as a "URL" row. | ||
|- | |- | ||
| <code>developer</code> | | <code>developer</code> | ||
| Who made/maintains it. | | Who made/maintains it. Set to exactly <code>Loka</code> (case-insensitive) for official Loka projects — this bolds it in gold with the Loka icon next to it, and prepends "LOKA OFFICIAL " to the ribbon under the name. | ||
|- | |- | ||
| <code>platform</code> | | <code>platform</code> | ||
| Line 51: | Line 51: | ||
|- | |- | ||
| <code>status</code> | | <code>status</code> | ||
| Current state | | Current state — e.g. <code>Active</code>, <code>Beta</code>, <code>Inactive</code>, <code>Discontinued</code>. Case-insensitive; unrecognised values still display, just without special colouring. For something no longer active but historically notable, pair this with [[Template:Deprecated]] at the top of the article rather than relying on this field alone. | ||
|- | |- | ||
| <code>launched</code> | | <code>launched</code> | ||
| Date it went live/was first released. Shown with a | | Date it went live/was first released. Shown with a relative-time note underneath in small grey text, computed automatically — no need to update it by hand. Scales to fit: "(3 days ago)", "(2 weeks ago)", "(4 months ago)", or "(14 years ago)" depending on how long ago it was. | ||
|- | |- | ||
| <code>screenshot</code> | | <code>screenshot</code> | ||
Latest revision as of 14:17, 23 August 2026
Usage
{{Infobox website
|name=EldritchBot
|logo=EldritchBot.png
|type=Discord Bot
|url=eldritchbot.com
|developer=ExampleDev
|platform=Discord
|status=Active
|launched=March 26, 2026
|screenshot=EldritchBot screenshot.png
|screenshotdate=August 2026
|discord=https://discord.gg/example
|github=https://github.com/example/eldritchbot
}}
Only name is required (it otherwise defaults to the page name); every other row is hidden when omitted. Built on Template:Infobox for the shared name/image/row chrome — see there for the wiki's common infobox look. For documenting Loka-related websites, bots, and tools such as EldritchBot or StromgardeBot; article prose (what it does, how to use it) belongs below the infobox as normal, the same way it does for every other infobox type. Automatically adds the page to Category:Websites.
Parameters
| Parameter | Description |
|---|---|
name
|
Site/bot name. Defaults to the page name. |
logo
|
Filename of a logo/icon image uploaded to the wiki (no File: prefix).
|
type
|
Short badge shown under the name (e.g. Discord Bot, Web Tool, Companion App). Defaults to "Website".
|
url
|
The site's URL, with or without the https:// prefix or a trailing slash — all forms display and link identically, always as the bare URL with neither. Shown as a "URL" row.
|
developer
|
Who made/maintains it. Set to exactly Loka (case-insensitive) for official Loka projects — this bolds it in gold with the Loka icon next to it, and prepends "LOKA OFFICIAL " to the ribbon under the name.
|
platform
|
Where it runs or is accessed (e.g. Discord, Web, Discord & Web).
|
status
|
Current state — e.g. Active, Beta, Inactive, Discontinued. Case-insensitive; unrecognised values still display, just without special colouring. For something no longer active but historically notable, pair this with Template:Deprecated at the top of the article rather than relying on this field alone.
|
launched
|
Date it went live/was first released. Shown with a relative-time note underneath in small grey text, computed automatically — no need to update it by hand. Scales to fit: "(3 days ago)", "(2 weeks ago)", "(4 months ago)", or "(14 years ago)" depending on how long ago it was. |
screenshot
|
Filename of a screenshot uploaded to the wiki (no File: prefix). Shown as its own panel with a caption, only if the file actually exists.
|
screenshotdate
|
Date the screenshot was taken. Drives the panel's caption: "Screenshot as of <Month> <Year>". Without it, the caption just reads "Screenshot". |
discord
|
Discord server invite link. Shown as an icon in the bottom links row. |
github
|
Source code repository link. Shown as a plain "GitHub" link in the bottom links row. |