Template:Card

From LinuxizeNet

Template:Card[edit]

One entry in a card grid. Used on index pages such as Useful howtos.

Kept on a single line on purpose — a newline inside the div makes the parser insert <p> tags and breaks the flex layout.

Parameters[edit]

Parameter Required Description
page (or 1) yes Target page title. Also used as the visible label unless title is given.
title no Override the visible label.
desc (or 2) no One line on what the page covers. Aim for under 90 characters.
cmd (or 3) no The single most representative command. Shown in the accent colour.

Empty desc and cmd slots are hidden by :empty rules in MediaWiki:Common.css, so omitting them is safe.

Usage[edit]

Wrap a run of cards in a grid container:

<div class="lz-cardgrid">
{{Card|page=Self-Signed CA|desc=Issue a wildcard cert with mkcert and get every box on the LAN to trust it.|cmd=mkcert -install}}
{{Card|page=Sudo nopasswd|desc=Dropping the password prompt for a user or a group.|cmd=NOPASSWD: ALL}}
</div>

Without the template[edit]

To get title-only cards from an existing bullet list with no other edits, add the lz-cards class to the list:

<ul class="lz-cards">
<li>[[Clean Linux DNS cache]]</li>
<li>[[Clean MAC DNS cache]]</li>
</ul>