Difference between revisions of "Template:Clade labels/doc"
From Summertime Saga Wiki
m |
m (→Example) |
||
Line 32: | Line 32: | ||
|2= {{clade | |2= {{clade | ||
|1=Leaf 3 | |1=Leaf 3 | ||
− | |2=Leaf 4 | + | |2=Leaf 4 |
}} | }} | ||
}} | }} | ||
Line 49: | Line 49: | ||
|bar2=red | |bar2=red | ||
|2= {{clade | |2= {{clade | ||
− | |1=Leaf 3 | + | |1=Leaf 3 |
− | |2=Leaf 4 | + | |2=Leaf 4 |
}} | }} | ||
}} | }} | ||
}} | }} | ||
|grouplabel1= {{clade labels|width=10em; | |grouplabel1= {{clade labels|width=10em; | ||
− | |label1= | + | |label1=top group|top1=20%|color1=green |
− | |label2= | + | |label2=bottom group|top2=70%|color2=red |
}} | }} | ||
}} | }} |
Revision as of 17:07, 24 August 2020
{{clade labels}} is a utility template for labeling cladograms made with the Template:Tl template. In particular, it is for use with |grouplabeln=
and adding multiple labels with defined positions.
Parameters
The following parameters apply to each label:
|labeln=
- The text to place in the label n.
|topn=
- The position of the label from the top of the table cell containing the group label. It is recommended that the value be given in %, e.g. 50% to center the label. This is the CSS property so the values can also be given in other units.
|bottomn=
,|leftn=
,|leafn=
- Similar to
|topn=
these parameters position the bottom, left, and right of the label. The behaviour is counter‐intuitive. Because|leftn=
shifts the left edge of the label, the result is a shift to the right. |stylen=
- Add CSS styleing specific to the numbered label.
|colorn=
- Changes the color of text in the label.
The following parameters apply to all the labels in the group:
|width=
- Fixes the width of the element containing the group of labels. This is useful because the positioning uses absolute CSS positions so they don't automatically change the size of the parenet element. As a result the labels can appear outside the parent element.
|style=
- Applies a common CCS style to all the labels.
|left=
- Shifts all the labels to the right.
|top=
,|bottom=
,|right=
- Similar to
|left=
these shift the positions of all the labels. |color=
- Changes the color of text in all the labels.
Example
Markup | Renders as | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{clade |label1=root |1= {{clade |1=Leaf 1|bar1=green |2= {{clade |1=Leaf 2 |bar1=green |bar2=red |2= {{clade |1=Leaf 3 |2=Leaf 4 }} }} }} |grouplabel1={{clade labels|width=10em; |label1=stem group|top1=20%|color1=green |label2=crown group|top2=70%|color2=red }} }} |
|