Template:Hatnote: Difference between revisions
More actions
Tesinormed (talk | contribs) No edit summary |
Tesinormed (talk | contribs) No edit summary Tag: 2017 source edit |
||
| (46 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| ⚫ | |||
<includeonly><div class="noexcerpt" style="{{#if:{{{color|}}}|--color-amaranth-legacy-scope:#{{{color}}};--color-link:#{{{color}}};--color-link--hover:#{{{color}}};--color-link--active:#{{{color}}};--color-visited:#{{{color}}}|}}"> |
|||
| ⚫ | |||
{{yesno|{{yesno-no|{{{remove_hr|{{{remove_hr_top|}}}}}}}}|no=<hr/>|yes=}} |
|||
<templatedata> |
|||
<div class="hatnote"> |
|||
<div>[[File:{{{file}}}|{{{file_size|80px}}}|class=notpageimage|link=]]</div> |
|||
<div><span style="{{#if:{{{primary_gradient|}}}|color:transparent;background-image:linear-gradient({{{primary_gradient}}});-webkit-background-clip:text;background-clip:text|color:var(--color-amaranth-legacy-scope)}};font-size:var(--font-size-xx-large);font-family:'{{{font|Cinzel}}}'">{{{primary}}}</span><br/><!-- |
|||
--><i>{{{secondary}}}</i></div> |
|||
</div> |
|||
{{yesno|{{yesno-no|{{{remove_hr|{{{remove_hr_bottom|}}}}}}}}|no=<hr/>|yes=}} |
|||
</div> |
|||
| ⚫ | |||
| ⚫ | |||
{ |
{ |
||
"params": { |
"params": { |
||
" |
"file2": { |
||
"label": " |
"label": "Right image", |
||
"description": "The file to put on the |
"description": "The file to put on the right as a thumbnail (80px or custom size)", |
||
| ⚫ | |||
"type": "wiki-file-name", |
"type": "wiki-file-name", |
||
" |
"example": "Glypht.png" |
||
| ⚫ | |||
}, |
}, |
||
"file_size": { |
"file_size": { |
||
"label": "File size", |
"label": "File size", |
||
"description": "The |
"description": "The size of the images (only works with two images)", |
||
"example": "120px", |
"example": "120px", |
||
"type": "string", |
"type": "string", |
||
| Line 30: | Line 20: | ||
"label": "Color", |
"label": "Color", |
||
"description": "The color of the horizontal rules, the primary text, and links inside the header", |
"description": "The color of the horizontal rules, the primary text, and links inside the header", |
||
"example": "ababab", |
"example": "#ababab", |
||
"type": "string", |
"type": "string", |
||
"suggested": true |
"suggested": true |
||
}, |
}, |
||
"primary_gradient": { |
"primary_gradient": { |
||
"label": "Primary gradient", |
"label": "Primary text gradient", |
||
"description": "The CSS linear-gradient of the primary text", |
"description": "The CSS linear-gradient of the primary text", |
||
"example": "to bottom, #ffffff, #36454f", |
"example": "to bottom, #ffffff, #36454f", |
||
| Line 41: | Line 31: | ||
}, |
}, |
||
"font": { |
"font": { |
||
"label": " |
"label": "Primary text font", |
||
"description": "The font to use for |
"description": "The font to use for the primary text", |
||
"example": "Varela Round", |
"example": "Varela Round", |
||
"type": "string", |
"type": "string", |
||
| Line 58: | Line 48: | ||
"type": "string", |
"type": "string", |
||
"required": true |
"required": true |
||
}, |
|||
"italic_secondary": { |
|||
"label": "Italic secondary text", |
|||
"description": "If the secondary text should be italicized", |
|||
"type": "boolean", |
|||
"default": "true" |
|||
}, |
}, |
||
"remove_hr": { |
"remove_hr": { |
||
| Line 76: | Line 72: | ||
"type": "boolean", |
"type": "boolean", |
||
"default": "false" |
"default": "false" |
||
}, |
|||
"color_applies_to_links": { |
|||
"label": "Color applies to links", |
|||
"description": "If the color specified should apply to links as well", |
|||
"example": "false", |
|||
"type": "boolean", |
|||
"default": "true" |
|||
}, |
|||
"file1": { |
|||
"label": "Left image", |
|||
"description": "The file to put on the left as a thumbnail (80px or custom size)", |
|||
| ⚫ | |||
"type": "wiki-file-name", |
|||
| ⚫ | |||
}, |
|||
"primary_font_size": { |
|||
"label": "Primary text font size", |
|||
"description": "The size of the primary text", |
|||
"example": "x-large", |
|||
"type": "string", |
|||
"default": "xxx-large" |
|||
} |
} |
||
}, |
}, |
||
"description": "Adds a |
"description": "Adds a hatnote with either no images, one image on the left, or two images on the left and right", |
||
"format": "block", |
"format": "block", |
||
"paramOrder": [ |
"paramOrder": [ |
||
" |
"file1", |
||
| ⚫ | |||
"file_size", |
"file_size", |
||
"color", |
"color", |
||
"color_applies_to_links", |
|||
"primary_gradient", |
"primary_gradient", |
||
| ⚫ | |||
"primary", |
"primary", |
||
"font", |
|||
"primary_font_size", |
|||
"secondary", |
"secondary", |
||
"italic_secondary", |
|||
"remove_hr", |
"remove_hr", |
||
"remove_hr_top", |
"remove_hr_top", |
||
| Line 95: | Line 116: | ||
</templatedata> |
</templatedata> |
||
== |
==Examples== |
||
<pre>{{Hatnote |
|||
| ⚫ | |||
| ⚫ | |||
|primary_gradient=to right, #ababab, #ffffff |
|||
|primary=Glypht Glypht glypht |
|||
|secondary=[[Main Page|Amarant]] |
|||
|italic_secondary=yes |
|||
}}</pre> |
|||
{{Hatnote |
{{Hatnote |
||
|file=Glypht.png |
|file=Glypht.png |
||
|color=ababab |
|color=#ababab |
||
|primary_gradient=to right, #ababab, #ffffff |
|||
|primary=Glypht Glypht glypht |
|primary=Glypht Glypht glypht |
||
|secondary=[[Main Page|Amarant]] |
|secondary=[[Main Page|Amarant]] |
||
|italic_secondary=yes |
|||
|remove_hr_top=true |
|||
}} |
}} |
||
<pre>{{Hatnote |
<pre>{{Hatnote |
||
|color=red |
|||
| ⚫ | |||
| ⚫ | |||
|primary=Glypht Glypht glypht |
|primary=Glypht Glypht glypht |
||
|secondary=[[Main Page|Amarant]] |
|secondary=[[Main Page|Amarant]] |
||
|remove_hr_top=true |
|||
}}</pre> |
}}</pre> |
||
{{Hatnote |
|||
|color=red |
|||
|primary=Glypht Glypht glypht |
|||
|secondary=[[Main Page|Amarant]] |
|||
}} |
|||
<pre>{{Hatnote |
|||
== See also == |
|||
|file1=Glypht.png |
|||
* [[Template:Hatnote2]] |
|||
|file2=Cosmoria Symbol.png |
|||
|color=#cdcdcd |
|||
|primary=Glypht Glypht glypht |
|||
|secondary=[[Main Page|Amarant]] |
|||
}}</pre> |
|||
{{Hatnote |
|||
|file1=Glypht.png |
|||
|file2=Cosmoria Symbol.png |
|||
|color=#cdcdcd |
|||
|primary=Glypht Glypht glypht |
|||
|secondary=[[Main Page|Amarant]] |
|||
}} |
|||
</noinclude> |
</noinclude> |
||
Latest revision as of 16:44, July 2, 2025
Adds a hatnote with either no images, one image on the left, or two images on the left and right
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Left image | file1 | The file to put on the left as a thumbnail (80px or custom size)
| File | suggested |
| Right image | file2 | The file to put on the right as a thumbnail (80px or custom size)
| File | optional |
| File size | file_size | The size of the images (only works with two images)
| String | optional |
| Color | color | The color of the horizontal rules, the primary text, and links inside the header
| String | suggested |
| Color applies to links | color_applies_to_links | If the color specified should apply to links as well
| Boolean | optional |
| Primary text gradient | primary_gradient | The CSS linear-gradient of the primary text
| String | optional |
| Primary text | primary | The text displayed at the top (on the first line) | String | required |
| Primary text font | font | The font to use for the primary text
| String | optional |
| Primary text font size | primary_font_size | The size of the primary text
| String | optional |
| Secondary text | secondary | The text displayed at the bottom (on the second line) | String | required |
| Italic secondary text | italic_secondary | If the secondary text should be italicized
| Boolean | optional |
| Remove lines | remove_hr | If the lines at the top and bottom should be removed
| Boolean | optional |
| Remove top line | remove_hr_top | If the line at the top should be removed
| Boolean | optional |
| Remove bottom line | remove_hr_bottom | If the line at the bottom should be removed
| Boolean | optional |
Examples
{{Hatnote
|file=Glypht.png
|color=#ababab
|primary_gradient=to right, #ababab, #ffffff
|primary=Glypht Glypht glypht
|secondary=[[Main Page|Amarant]]
|italic_secondary=yes
}}
{{Hatnote
|color=red
|primary=Glypht Glypht glypht
|secondary=[[Main Page|Amarant]]
}}
{{Hatnote
|file1=Glypht.png
|file2=Cosmoria Symbol.png
|color=#cdcdcd
|primary=Glypht Glypht glypht
|secondary=[[Main Page|Amarant]]
}}