Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Resource: Difference between revisions

Template page
m Create Template:Resource for reusable resource chips
m Create Template:Resource for reusable resource chips
Line 1: Line 1:
<includeonly>{{#ifeq:{{{theme|dark}}}|light
<includeonly>{{#ifeq:{{{theme|dark}}}|light
|<span style="display:inline-flex;align-items:flex-start;gap:.25em;max-width:100%;background:#fff;border:1px solid #e0d8c3;border-radius:10px;color:#2b2620;padding:.2em .6em;font-size:.8em;line-height:1.4;white-space:normal;overflow-wrap:break-word;">{{#if:{{{icon1|}}}|[[File:{{{icon1}}}|16x16px|link=]]}}{{#if:{{{icon2|}}}|[[File:{{{icon2}}}|16x16px|link=]]}}{{#if:{{{icon3|}}}|[[File:{{{icon3}}}|16x16px|link=]]}}{{{term}}}</span>
|<span style="display:inline-flex;align-items:flex-start;gap:.25em;max-width:100%;background:#fff;border:1px solid #e0d8c3;border-radius:10px;color:#2b2620;padding:.2em .6em;font-size:.8em;line-height:1.4;white-space:normal;overflow-wrap:break-word;"><span style="display:inline-flex;flex-shrink:0;gap:.15em;">{{#if:{{{icon1|}}}|[[File:{{{icon1}}}|16x16px|link=]]}}{{#if:{{{icon2|}}}|[[File:{{{icon2}}}|16x16px|link=]]}}{{#if:{{{icon3|}}}|[[File:{{{icon3}}}|16x16px|link=]]}}</span><span style="flex:1 1 auto;min-width:0;">{{{term}}}</span></span>
|<span style="display:inline-flex;align-items:flex-start;gap:.25em;max-width:100%;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.35);border-radius:10px;color:#ffffff;padding:.2em .6em;font-size:.8em;line-height:1.4;white-space:normal;overflow-wrap:break-word;">{{#if:{{{icon1|}}}|[[File:{{{icon1}}}|16x16px|link=]]}}{{#if:{{{icon2|}}}|[[File:{{{icon2}}}|16x16px|link=]]}}{{#if:{{{icon3|}}}|[[File:{{{icon3}}}|16x16px|link=]]}}{{{term}}}</span>
|<span style="display:inline-flex;align-items:flex-start;gap:.25em;max-width:100%;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.35);border-radius:10px;color:#ffffff;padding:.2em .6em;font-size:.8em;line-height:1.4;white-space:normal;overflow-wrap:break-word;"><span style="display:inline-flex;flex-shrink:0;gap:.15em;">{{#if:{{{icon1|}}}|[[File:{{{icon1}}}|16x16px|link=]]}}{{#if:{{{icon2|}}}|[[File:{{{icon2}}}|16x16px|link=]]}}{{#if:{{{icon3|}}}|[[File:{{{icon3}}}|16x16px|link=]]}}</span><span style="flex:1 1 auto;min-width:0;">{{{term}}}</span></span>
}}</includeonly><noinclude>
}}</includeonly><noinclude>
== Usage ==
== Usage ==

Revision as of 18:59, 17 August 2026

Usage

{{Resource
|term=Apples
|icon1=Apple.png
|theme=dark
}}

Renders a single pill-shaped resource chip, for use inside Template:Biome's protected/other parameters (or anywhere else a small icon-tagged resource label is useful).

Only term is required. Up to three icons can be shown (some resources cover multiple items, e.g. "Mushroom Blocks (Red/Brown/Stem)"). theme selects the pill's colour scheme to match its surroundings.

Parameters

Parameter Description
term The resource's display text.
icon1 / icon2 / icon3 Filenames (no File: prefix) of up to three 16px icons shown before the text.
theme dark (default) for use on a dark/photo-backdrop panel, or light for a flat light card.