yoohoo! hot sauce please
10:27, 7 September 2026 (UTC)
Template:Swaggbox: Difference between revisions
m SomeBois moved page Template:Soybox to Template:Swaggbox |
mNo edit summary |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><templatestyles src=" | <includeonly><templatestyles src="Swaggbox/styles.css"/><div | ||
class=" | |||
template-swaggbox noexcerpt {{{class|}}} | |||
" | |||
style=" | |||
width: clamp(0rem, {{#if:{{{halfWidth|}}}|30rem|40rem}}, 100%); | |||
<!--If no style nor class is specified, then the Swaggbox must be unstyled, so we apply sensible defaults.--> | |||
{{{style|{{#if:{{{class|}}}||border: 1px solid #aaa; background: #ededed;}}}}} | |||
" | |||
data-hastwoimages=" | |||
{{#if:{{{image2|}}}|true|false}} | |||
" | |||
{{#if:{{{dark|}}}|data-dark=""}} | |||
><!-- | |||
-->{{{rootContent|}}}<!-- | |||
-->{{{image1|}}}<!-- | |||
--><div class="content"><!-- | |||
-->{{{content|<!-- | |||
-->{{#if:{{{line1|}}}|<span class="line1" style="{{{line1_style|}}}">{{{line1|'''Example text'''}}}</span>|}}<!-- | |||
--><span class="line2" style="{{{line2_style|}}}">{{{line2|}}}</span> | |||
}}}<!-- | |||
--></div><!-- | |||
-->{{{image2|}}} | |||
</div></includeonly><noinclude> | |||
{{Swaggbox | |||
|style=background: linear-gradient(#c0c0c0, lightgray); border: 1px solid #6e6e6e; | |||
|image1=[[File:Color wheel.png|60px|link=Neutralplier]] | |||
|image2=[[File:Color wheel.png|50px|link=Neutralplier]] | |||
|line1=[[File:Color wheel.png|24px|link=]] '''This page is Color wheel''' [[File:Color wheel.png|24px|link=]] | |||
|line2=It's not very Color wheel o algo | |||
}} | |||
{{Documentation}} | |||
</noinclude> | |||
Latest revision as of 04:12, 16 October 2026
Usage[edit source]
Swaggboxes can be used for both dedicated templates and for single-use templates on pages.
Below is a basic Swaggbox example:
{{Swaggbox
|style=background: linear-gradient(#c0c0c0, lightgray); border: 1px solid #6e6e6e;
|image1=[[File:Color wheel.png|60px|link=Neutralplier]]
|image2=[[File:Color wheel.png|50px|link=Neutralplier]]
|line1=[[File:Color wheel.png|24px|link=]] '''This page is Color wheel''' [[File:Color wheel.png|24px|link=]]
|line2=It's not very Color wheel o algo
}}
Description[edit source]
A meta-template for making header templates that look good, consistently sized, and follows modern CSS practices.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| CSS styling | style | Allows you to define styling with CSS, defaults only apply if no style nor class is defined. Don't forget your trailing semi-colons between CSS statements!
| Content | suggested |
| Image (Left) | image1 | Defines what image should be placed on the left side. | Content | suggested |
| Image (Right) | image2 | Defines what image should be placed on the right side. | Content | optional |
| Top message line | line1 | The large message at the top.
| Content | suggested |
| Line 1 CSS styling | line1_style | Appends CSS styling to line 1. | Content | optional |
| Bottom message line | line2 | The smaller explanatory message at the bottom. | Content | suggested |
| Line 2 CSS styling | line2_style | Appends CSS styling to line 2. | Content | optional |
| Content override | content | Overrides the default line1 and line2 system for you to manually decide how the lines should be placed/styled. | Content | optional |
| Root content | rootContent | Allows you to place content in the root of the soybox. Should generally not be used except for effects that are positioned absolutely. | Content | optional |
| Class | class | Allows you to append class names for use with <templatestyles>, be sure to follow the Template Manual of Style regarding class names. | String | optional |
| Half Width | halfWidth | Makes the template half as wide. (From 40rem to 28rem) | Boolean | optional |
Classes[edit source]
This template has custom classes which you can use to have your template follow a certain style guide, such as with Page Issue Headers.
| Class Name | Use |
|---|---|
page-issue ok |
For templates that indicate the article is good and well written. |
page-issue info |
For templates that indicate the article has minor issues the reader needs to be aware about, such as with articles lacking images and for confusing and controversial articles. |
page-issue warning |
For templates that indicate the article has substantial issues such as link rot, being biased, or sounding like AI slop. |
page-issue critical |
For templates that indicate the article has critical issues that could risk it being deleted or has unverifiable information due to dead links. |
line1 |
Allows you to override the styling of the first line of text. |
line2 |
Allows you to override the styling of the second line of text. |
Notes[edit source]
- On screens less than 400px wide, the
{{{image2}}}will not render due to the text wrapping in an illegible manner.
