Template:Card: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<div style="border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden;">[[{{{1}}}|< | <div style="position: relative; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; padding: 18px; text-align: center;"> | ||
<span class="hwgh-card-overlay">[[{{{1}}}| ]]</span>{{#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><noinclude> | |||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
| Line 6: | Line 8: | ||
{{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 | Requires a rule in [[MediaWiki:Common.css]] — see template talk page. | ||
</noinclude> | </noinclude> | ||
Revision as of 03:13, 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 rule in MediaWiki:Common.css — see template talk page.