Template
Card2
From Dogcraft Wiki
(Created a lightweight linking card in the style of the main dogcraft.net website. Inspired by the cards used on Template:Main_Page_Navigation) |
m (Documentation) |
||
Line 21: | Line 21: | ||
===Examples=== | ===Examples=== | ||
====Default==== | |||
{{Card2 | {{Card2 | ||
|file=Guides Cog.svg | |file=Guides Cog.svg | ||
|title= | |title=Guides | ||
}} | |||
{{Card2 | |||
|file=Guides Cog.svg | |||
|title=Lorem ipsum dolor sit | |||
}} | |||
{{Card2 | |||
|file=Guides Cog.svg | |||
}} | |||
====Using overflow mode==== | |||
{{Card2 | |||
|file=Guides Cog.svg | |||
|title=Lorem ipsum dolor sit | |||
|overflow=true | |overflow=true | ||
}} | }} | ||
====Using cover mode==== | |||
{{Card2 | |||
|file=DC Courthouse Logo.png | |||
|title=Courthouse | |||
|cover=true | |||
}} | |||
{{Card2 | |||
|file=DC Courthouse Logo.png | |||
|cover=true | |||
}} | |||
====In a flexbox, using cover mode==== | |||
<div style="display:flex; gap:10px; justify-content:center;" class="flex-mobile-wrap"> | |||
{{Card2 | |||
|width=180px | |||
|link=SRN | |||
|file=GCS_Shepherd.png | |||
|title=Builds | |||
|cover=1 | |||
}} | |||
{{Card2 | |||
|width=180px | |||
|link=SRN | |||
|file=Lotus Images6.png | |||
|title=Settlements | |||
|cover=1 | |||
}} | |||
{{Card2 | |||
|width=180px | |||
|link=SRN | |||
|file=Akkara Opening day Itineary.png | |||
|title=Events | |||
|cover=1 | |||
}} | |||
{{Card2 | |||
|width=180px | |||
|link=SRN | |||
|file=Machair Station Opening.png | |||
|title=Groups | |||
|cover=1 | |||
}} | |||
{{Card2 | {{Card2 | ||
|width=180px | |||
|link=SRN | |||
|file=DC Courthouse Logo.png | |file=DC Courthouse Logo.png | ||
|title=Projects | |||
|cover=1 | |||
}} | }} | ||
</div> | |||
Revision as of 00:10, 29 June 2023
Card template (dogcraft.net styled)
This is an interface template for creating a link card in the style of the main dogcraft.net website. Please check the template parameters before use!
Examples
Default
Using overflow mode
Using cover mode
In a flexbox, using cover mode
Template data
Note: The image-height parameter uses a CSS hack, check implementation comments.
A lightweight link card in the style of the main dogcraft.net website
Parameter | Description | Type | Status | |
---|---|---|---|---|
File | file | The name of the image to be displayed
| File | required |
Link | link | Target page
| Page name | required |
Title | title | The text to be displayed
| String | suggested |
Width | width | Card width
| String | optional |
Trigger: Overflow | overflow | Decides whether the title can wrap to multiple lines
| Boolean | optional |
Trigger: Cover | cover | Decides whether the image covers the entire available area (useful for screenshots) or remains in the center (useful for icons)
| Boolean | optional |
Image height (requires cover mode) | image-height | Sets the height of the image, in pixels (only has effect on cover mode!)
| Number | optional |