Template:Card horizontal/doc

From The Museum of Human Achievement

A tweak-able colorful element featuring a text block with an image and, optionally, with a clickable button and a highlighted text.

Template parameters

ParameterDescriptionTypeStatus
Titletitle

Block heading.

Stringoptional
Contentcontent

Arbitrary content. Usually a text message.

Unbalanced wikitextoptional
Imageimage

The name of a block image.

Stringoptional
Background colorbgcolor

A HEX code or a name of CSS variable / web color for the block background.

Default
var(--moha-green)
Stringoptional
Foreground colorfgcolor

A HEX code or a name of CSS variable / web color for the block text.

Default
var(--white)
Stringoptional
Link colorlinkcolor

A HEX code or a name of CSS variable / web color to override the default link color.

Default
var(--white)
Stringoptional
Highlighted texthighlight-text

The highlighted text that follows the main block content.

Unbalanced wikitextoptional
Highlight background colorhighlight-bgcolor

A HEX code or a name of CSS variable / web color for the highlighted text background.

Default
var(--primary)
Stringoptional
Highlighted text colorhighlight-fgcolor

A HEX code or a name of CSS variable / web color for the highlighted text color.

Default
var(--white)
Stringoptional
Button targetbutton-target

The valid URL or the name of a page to load when the button is clicked.

Stringoptional
Button textbutton-text

A text to display on the button.

Stringoptional
Button text colorbutton-fgcolor

A HEX code or a name of CSS variable / web color to override the button text color.

Stringoptional
Notes
  • This is a horizontal / vertical card with two areas. They do not have exact widths and adapt themselves to the screen. This behavior was created intentionally. The image part is a kind of squared/rectangular, so aspect ratios 4:3 or 1:1 would work better than 16:9 ones. The images for this template are for mood, not for information.
  • For images, avoid too prominent objects (portraits, people that can get their heads or legs off canvas). Prefer images with dispersed details.
Usage
{{Card horizontal
|image=MoHA-Fancy-adventure.jpg
|title=Title
|content=This will prevent runtime errors even when expected elements are missing from the DOM. Let me know if you want to make this more dynamic or loop over multiple walls.
|highlight-text=I am highlighted!
|button-target=Main Page
|button-text=Click Me!
|bgcolor=#986188;
}}
Result
Title
This will prevent runtime errors even when expected elements are missing from the DOM. Let me know if you want to make this more dynamic or loop over multiple walls.