Template
Interface template

Card2

From Dogcraft Wiki

Revision as of 00:58, 29 June 2023 by Domino (talk | contribs) (Undo revision 31020 by Domino)

This template has no relation to Template:Card.

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



Guides Cog.svg

Using overflow mode

Using cover mode


DC Courthouse Logo.png

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

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Filefile

The name of the image to be displayed

Example
Guides Cog.svg or DC Courthouse Logo.png
Filerequired
Linklink

Target page

Default
#
Example
Main Page
Page namerequired
Titletitle

The text to be displayed

Example
Projects
Stringsuggested
Widthwidth

Card width

Default
120px
Stringoptional
Trigger: Overflowoverflow

Decides whether the title can wrap to multiple lines

Default
false
Example
true or false
Booleanoptional
Trigger: Covercover

Decides whether the image covers the entire available area (useful for screenshots) or remains in the center (useful for icons)

Default
false
Example
true or false
Booleanoptional
Trigger: Dynamic Imagedynamic-img

If set to false, image height will always be 80px or is using cover mode, whatever is specified for image-height.

Default
true
Example
true or false
Booleanoptional
Image height (requires cover mode)image-height

Sets the height of the image, in pixels (only has effect on cover mode!)

Default
80
Example
200
Numberoptional


This page was last modified on 29 June 2023, at 00:58. (16 months ago)
Background Takeshi by Edo