Template:ContentGrid/doc: Difference between revisions

From DFI Library
Jump to navigation Jump to search
m (1 revision imported)
No edit summary
 
Line 1: Line 1:
{{Documentation subpage}}
<div class="wiki-template-contentgrid" style="margin-{{dir|{{pagelang}}|left|right}}: 1em; grid-template-columns: repeat(auto-fit, minmax({{{grid-columns-min-max|300px}}}, 1fr)); grid-gap: {{{grid-gap|10px}}}; grid-auto-rows: minmax({{{grid-rows-min-max|100px}}}, auto); width: {{{width|auto}}};">{{{content}}}</div>
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{Uses TemplateStyles|Template:ContentGrid/styles.css}}
 
== Usage ==
 
A responsive grid of page elements. Populate the <code>content</code> parameter with grid elements separated by a new line.
 
For example:
 
<pre><nowiki>{{ContentGrid
|content=
 
Text A
 
Text B
 
Text C
}}</nowiki></pre>
 
Produces:
 
{{ContentGrid
|content=
 
Text A
 
Text B
 
Text C
 
}}
 
 
This template works well with other templates, like [[Template:Colored box]].
 
For example:
 
<pre><nowiki>{{ContentGrid
|content=
 
{{Colored box
|title = Title
|content = Content
}}
 
{{Colored box
|title =
|content =
}}
 
}}
</nowiki></pre>
 
Produces:
 
{{ContentGrid
|content=
 
{{Colored box
|title = Title
|content = Content
}}
 
{{Colored box
|title = Title
|content = Content
}}
 
}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
 
}}</includeonly>

Latest revision as of 21:29, 27 September 2022

{{{content}}}