Template:Chip container: Difference between revisions

From stencil.wiki
(Created page with "<div class="color-palette">{{#arraymaptemplate:{{{1}}}|Color chip|,|}}</div>")
 
No edit summary
 
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="color-palette">{{#arraymaptemplate:{{{1}}}|Color chip|,|}}</div>
<includeonly><div class="chip-container"> {{#if:{{{title|}}}| <h2 class="chip-container-label"> {{#if:{{{icon|}}}| <span class="icon" style="color:{{{icon-color|black}}}">{{#fas:{{{icon}}}}}</span> }} {{{title}}} </h2> }} <div class="chips">{{#arraymaptemplate:{{{1|}}}|{{{template}}}|,|{{#if:{{{hide-icon|}}}hide-icon=true}}}}</div> {{#if:{{{footer|}}}|<div class="chip-container-footer">{{{footer}}}</div>}} </div> </includeonly><noinclude>
The '''Chip container''' template is an optional wrapper for chip templates, designed to group multiple chips together within a styled container.
==Usage==
 
Use this template to organize multiple chips with a common theme or title. Each chip is rendered using a specified sub-template, and the list of items is processed in sequence.
 
===Syntax===
====Ink chips====
<pre>{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container|icon=droplet|icon-color=#00FF00}}</pre>
{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container|icon=droplet|icon-color=#00FF00}}
<pre>{{Chip container|{{#ask:[[Category:Riso compatible inks]]|format=plainlist|headers=hide|link=none|limit=100}}|template=Ink chip|title=Riso Compatible Inks}}</pre>{{Chip container|{{#ask:[[Category:Riso compatible inks]]|format=plainlist|headers=hide|link=none|limit=100}}|template=Ink chip|title=Riso Compatible Inks}}
====Machine chips====
<pre>{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}</pre>
{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}
===Parameters===
<pre>{{Chip container|<items>|template=<sub-template>|title=<container title>}}</pre>
* <code>1</code> (required): A comma-separated list of items to display as chips. You can provide these items:
**Directly, e.g., <code>Yellow, Cornflower, Burgundy</code>
**From a comma-separated array.
* <code>template</code> (required): A valid sub-template to format the chips. Accepted values include:
**<code>[[:template:Ink chip | Ink chip]]</code>
**<code>[[:template:Machine chip | Machine chip]]</code>
**<code>[[:template:Brand chip | Brand chip]]</code>
* <code>title</code> (optional): A title for the container, displayed as a header. If omitted, no header will appear, but the chips will still be rendered.</noinclude>

Latest revision as of 14:33, 18 December 2024

The Chip container template is an optional wrapper for chip templates, designed to group multiple chips together within a styled container.

Usage

Use this template to organize multiple chips with a common theme or title. Each chip is rendered using a specified sub-template, and the list of items is processed in sequence.

Syntax

Ink chips

{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container|icon=droplet|icon-color=#00FF00}}
{{Chip container|{{#ask:[[Category:Riso compatible inks]]|format=plainlist|headers=hide|link=none|limit=100}}|template=Ink chip|title=Riso Compatible Inks}}

Riso Compatible Inks

Machine chips

{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}

Parameters

{{Chip container|<items>|template=<sub-template>|title=<container title>}}
  • 1 (required): A comma-separated list of items to display as chips. You can provide these items:
    • Directly, e.g., Yellow, Cornflower, Burgundy
    • From a comma-separated array.
  • template (required): A valid sub-template to format the chips. Accepted values include:
  • title (optional): A title for the container, displayed as a header. If omitted, no header will appear, but the chips will still be rendered.