Template:CD: Difference between revisions

From Looney Pyramid Games Wiki
Content added Content deleted
(Creating template for Cards-and-Dice-2024 font)
 
No edit summary
Line 14: Line 14:
The only required parameter is the text; the other two are optional.
The only required parameter is the text; the other two are optional.


The text will be rendered with the Cards-and-Dice font, which uses ligatures starting with <code>:</code> to refer to the different images that are available. For instance <code>:d20-20</code> will be interpreted as a "twenty-sided die, face 20". See [[:File:How to Use Pyramid Love.pdf|How to Use Pyramid Love.pdf]] for more details.
The text will be rendered with the Cards-and-Dice font, which uses ligatures starting with <code>:</code> to refer to the different images that are available. For instance <code>:d20-20</code> will be interpreted as a "twenty-sided die, face 20". See page [[How_to_use_the_Cards_and_Dice_font|How to Use Cards and Dice font]] for more details.


The color is any CSS color, which will be applied to the pyramid. For instance, <code>red</code>, <code>green</code>, <code>blue</code>, etc. The default if unspecified is black.
The color is any CSS color, which will be applied to the pyramid. For instance, <code>red</code>, <code>green</code>, <code>blue</code>, <code>#FFD22A</code>, etc. The default if unspecified is black.


The size is a CSS font size, such as <code>3em</code> to make it three times the font height of the surrounding text, or <code>25px</code> to make it exactly 25 CSS pixels high. The default is 2em, which makes it twice the height of surrounding text, which is about right to be visible without affecting line spacing within text. In diagrams you may want to increase this for extra visibility.
The size is a CSS font size, such as <code>3em</code> to make it three times the font height of the surrounding text, or <code>25px</code> to make it exactly 25 CSS pixels high. The default is 2em, which makes it twice the height of surrounding text, which is about right to be visible without affecting line spacing within text. In diagrams you may want to increase this for extra visibility.
Line 22: Line 22:
=== Examples ===
=== Examples ===


{| class="wikitable"
{|class="wikitable" style="text-align:center"
|{{CD|:d4-4|coral|3em}}
|{{CD|:d6-6|goldenrod|3em}}
|{{CD|:d6n-6|gold|3em}}
|-
|-
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d4-4<nowiki>|</nowiki>coral<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
! Markup !! Result
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d6-6<nowiki>|</nowiki>goldenrod<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d6n-6<nowiki>|</nowiki>gold<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|-
|-
|{{CD|:d8-8|teal|3em}}
| <code><nowiki>{{PL|:LPE}}</nowiki></code> || {{PL|:LPE}}
|{{CD|:d10-10|seagreen|3em}}
|{{CD|:d10p-70|green|3em}}
|-
|-
| <code><nowiki>{{PL|:MPU|red}}</nowiki></code> || {{PL|:MPU|red}}
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d8-8<nowiki>|</nowiki>teal<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d10-10<nowiki>|</nowiki>seagreen<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d10p-70<nowiki>|</nowiki>green<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|-
|-
|{{CD|:d12-12|cornflowerblue|3em}}
| <code><nowiki>{{PL|:LPL:SLL:SPR}}</nowiki></code> || {{PL|:LPL:SLL:SPR}}
|{{CD|:d20-17|royalblue|3em}}
|{{CD|:d20-20|navy|3em}}
|-
|-
| <code><nowiki>{{PL|::LMSE||3em}}</nowiki></code> || {{PL|::LMSE||3em}}
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d12-12<nowiki>|</nowiki>cornflowerblue<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d20-17<nowiki>|</nowiki>royalblue<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|<nowiki>{{</nowiki>CD<nowiki>|</nowiki>:d20-20<nowiki>|</nowiki>navy<nowiki>|</nowiki>3em<nowiki>}}</nowiki>
|}
|}
</noinclude>
</noinclude>

Revision as of 11:49, 21 April 2024

This template allows you to easily use the Cards and Dice font to include simple diagrams of pyramids and other components in pages.

Usage

{{CD
| Text Cards-and-Dice format
| color
| size
}}

The only required parameter is the text; the other two are optional.

The text will be rendered with the Cards-and-Dice font, which uses ligatures starting with : to refer to the different images that are available. For instance :d20-20 will be interpreted as a "twenty-sided die, face 20". See page How to Use Cards and Dice font for more details.

The color is any CSS color, which will be applied to the pyramid. For instance, red, green, blue, #FFD22A, etc. The default if unspecified is black.

The size is a CSS font size, such as 3em to make it three times the font height of the surrounding text, or 25px to make it exactly 25 CSS pixels high. The default is 2em, which makes it twice the height of surrounding text, which is about right to be visible without affecting line spacing within text. In diagrams you may want to increase this for extra visibility.

Examples

:d4-4 :d6-6 :d6n-6
{{CD|:d4-4|coral|3em}} {{CD|:d6-6|goldenrod|3em}} {{CD|:d6n-6|gold|3em}}
:d8-8 :d10-10 :d10p-70
{{CD|:d8-8|teal|3em}} {{CD|:d10-10|seagreen|3em}} {{CD|:d10p-70|green|3em}}
:d12-12 :d20-17 :d20-20
{{CD|:d12-12|cornflowerblue|3em}} {{CD|:d20-17|royalblue|3em}} {{CD|:d20-20|navy|3em}}