Template:Card: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<div style=" | <div style="border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden;">[[{{{1}}}|<div class="hwgh-card-link" style="padding: 18px; text-align: center;">{{#if:{{{image|}}}|<div style="width: 100%; height: 120px; background-image: url('{{filepath:{{{image}}}}}'); background-size: cover; background-position: center; border-radius: 4px; margin-bottom: 10px;"></div>|{{#if:{{{icon|}}}|<div style="font-size: 1.4em; margin-bottom: 6px;">{{{icon}}}</div>}}}}'''{{{1}}}'''{{#if:{{{desc|}}}|<div style="color: #666; font-size: 0.9em; margin-top: 4px;">{{{desc}}}</div>}}</div>]]</div><noinclude> | ||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
| Line 6: | Line 6: | ||
{{Card|Page Name|image=some-file.jpg|desc=Short description of the page.}} | {{Card|Page Name|image=some-file.jpg|desc=Short description of the page.}} | ||
</pre> | </pre> | ||
Requires a small CSS rule in [[MediaWiki:Common.css]] to remove the default link underline/color from the card — see the template's talk page or ask before removing. | |||
</noinclude> | </noinclude> | ||
Revision as of 03:11, 14 September 2026
Usage
{{Card|Page Name}}
{{Card|Page Name|icon=🌾|desc=Short description of the page.}}
{{Card|Page Name|image=some-file.jpg|desc=Short description of the page.}}
Requires a small CSS rule in MediaWiki:Common.css to remove the default link underline/color from the card — see the template's talk page or ask before removing.