Template:Infobox website: Difference between revisions
Template page
More actions
Create Infobox website template for Loka-related sites/bots |
m Add logo, screenshot/screenshotdate fields; show bare URL as link text |
||
| Line 1: | Line 1: | ||
<includeonly><templatestyles src="Template:Infobox website/styles.css" />{{Infobox | <includeonly><templatestyles src="Template:Infobox website/styles.css" />{{Infobox | ||
|name={{{name|{{PAGENAME}}}}} | |name={{{name|{{PAGENAME}}}}} | ||
|image={{{ | |image={{{logo|}}} | ||
|type={{{type|Website}}} | |type={{{type|Website}}} | ||
|content={{#if:{{{url|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Website</span><span class="loka-infobox-row-value">[{{{url|}}} | |content={{#if:{{{url|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Website</span><span class="loka-infobox-row-value">[https://{{{url|}}} {{{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|}}}</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:{{{screenshot|}}}|{{#ifexist:File:{{{screenshot|}}}|<div class="loka-website-screenshot">[[File:{{{screenshot|}}}|300px|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|}}}{{{discord|}}}{{{github|}}}|<div class="loka-website-links">{{#if:{{{url|}}}|<span class="loka-website-link">[https://{{{url|}}} {{{url|}}}]</span>}}{{#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> | }}</includeonly><noinclude> | ||
== Usage == | == Usage == | ||
| Line 10: | Line 10: | ||
{{Infobox website | {{Infobox website | ||
|name=EldritchBot | |name=EldritchBot | ||
| | |logo=EldritchBot.png | ||
|type=Discord Bot | |type=Discord Bot | ||
|url= | |url=eldritchbot.com | ||
|developer=ExampleDev | |developer=ExampleDev | ||
|platform=Discord | |platform=Discord | ||
|status=Active | |status=Active | ||
|launched=March 26, 2026 | |launched=March 26, 2026 | ||
|screenshot=EldritchBot screenshot.png | |||
|screenshotdate=August 2026 | |||
|discord=https://discord.gg/example | |discord=https://discord.gg/example | ||
|github=https://github.com/example/eldritchbot | |github=https://github.com/example/eldritchbot | ||
| Line 33: | Line 35: | ||
| Site/bot name. Defaults to the page name. | | Site/bot name. Defaults to the page name. | ||
|- | |- | ||
| <code> | | <code>logo</code> | ||
| Filename of a logo/icon image uploaded to the wiki (no <code>File:</code> prefix). | | Filename of a logo/icon image uploaded to the wiki (no <code>File:</code> prefix). | ||
|- | |- | ||
| Line 40: | Line 42: | ||
|- | |- | ||
| <code>url</code> | | <code>url</code> | ||
| The site's | | The site's URL '''without''' the <code>https://</code> prefix (e.g. <code>eldritchbot.com</code>, not <code>https://eldritchbot.com</code>) -- there's no <code>#replace</code> parser function on this install to strip a scheme back out, so it has to go in bare. The template adds <code>https://</code> for the actual link and displays exactly what you typed, so the link text is always the URL itself. Shown as a "Website" row and repeated as a link at the bottom. | ||
|- | |- | ||
| <code>developer</code> | | <code>developer</code> | ||
| Line 53: | Line 55: | ||
| <code>launched</code> | | <code>launched</code> | ||
| Date it went live/was first released. | | Date it went live/was first released. | ||
|- | |||
| <code>screenshot</code> | |||
| Filename of a screenshot uploaded to the wiki (no <code>File:</code> prefix). Shown as its own panel with a caption, only if the file actually exists. | |||
|- | |||
| <code>screenshotdate</code> | |||
| Date the screenshot was taken. Drives the panel's caption: "Screenshot as of <Month> <Year>". Without it, the caption just reads "Screenshot". | |||
|- | |- | ||
| <code>discord</code> | | <code>discord</code> | ||
Revision as of 21:06, 19 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.
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 without the https:// prefix (e.g. eldritchbot.com, not https://eldritchbot.com) -- there's no #replace parser function on this install to strip a scheme back out, so it has to go in bare. The template adds https:// for the actual link and displays exactly what you typed, so the link text is always the URL itself. Shown as a "Website" row and repeated as a link at the bottom.
|
developer
|
Who made/maintains it. |
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. |
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. |