Content deleted Content added
Created page with "<noinclude> Examples: === Traditional === ==== Source ==== <pre><nowiki> {{Alert |type=traditional |content = an alert |content bold = This is |icon = info-circle |icon-type = fad }} </nowiki></pre> ==== Result ==== {{Alert |type=traditional |content = an alert |content bold = This is |icon = info-circle |icon-type = fad }} === Modern with Badge === ==== Source ==== <pre><nowiki> {{Alert |type=modern |content = an alert |content bold = This is |icon = info-circle |icon-t..." |
No edit summary |
||
| Line 190: | Line 190: | ||
<p>{{#if:{{{content bold|}}}|'''{{{content bold}}}'''|}} {{{content|}}}</p> |
<p>{{#if:{{{content bold|}}}|'''{{{content bold}}}'''|}} {{{content|}}}</p> |
||
</div> |
</div> |
||
|top border = <div class="not-prose {{{bg-color|bg-teal-100}}} border-t-4 {{{border-color|border-teal-500}}} rounded-b {{{text-color|text-teal-900}}} px-4 py-3 shadow-md" role="alert"><div class="flex"><div class="py-1">{{#if:{{{icon|}}}|{{i|{{{icon}}}|{{{icon-type|fal}}}|fill-current h-6 w-6 text-teal-500 mr-4}} }}</div> |
|top border = <div class="not-prose {{{bg-color|bg-teal-100}}} border-t-4 {{{border-color|border-teal-500}}} rounded-b {{{text-color|text-teal-900}}} px-4 py-3 shadow-md" role="alert"><div class="flex"><div class="py-1">{{#if:{{{icon|}}}|{{i|{{{icon}}}|{{{icon-type|fal}}}|fa-xl fill-current h-6 w-6 text-teal-500 mr-4}} }}</div> |
||
<div> |
<div> |
||
<p class="font-bold">{{{content bold|}}}</p> |
<p class="font-bold">{{{content bold|}}}</p> |
||
| Line 203: | Line 203: | ||
| |
| |
||
}}</includeonly> |
}}</includeonly> |
||
<noinclude> |
|||
<templatedata> |
|||
{ |
|||
"params": { |
|||
"type": { |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"traditional", |
|||
"titled", |
|||
"solid", |
|||
"modern", |
|||
"left border", |
|||
"top border", |
|||
"banner" |
|||
], |
|||
"default": "traditional", |
|||
"suggested": true |
|||
}, |
|||
"bg-color": { |
|||
"label": "Background color", |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"bg-light-azure", |
|||
"bg-light-purple", |
|||
"bg-light-magenta" |
|||
], |
|||
"suggested": true |
|||
}, |
|||
"border-color": { |
|||
"label": "Border color", |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"border-fox-purple", |
|||
"border-fox-azure", |
|||
"bg-fox-magenta" |
|||
], |
|||
"suggested": true |
|||
}, |
|||
"text-color": { |
|||
"label": "Text color", |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"text-fox-purple", |
|||
"text-fox-azure", |
|||
"text-fox-magenta" |
|||
] |
|||
}, |
|||
"icon": { |
|||
"label": "Icon", |
|||
"description": "Font Awesome icon name", |
|||
"type": "string" |
|||
}, |
|||
"icon-type": { |
|||
"label": "Icon type", |
|||
"description": "Font Awesome icon weight", |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"fa-solid", |
|||
"fa-regular", |
|||
"fa-light", |
|||
"fa-thin", |
|||
"fa-duotone" |
|||
], |
|||
"suggested": true |
|||
}, |
|||
"content bold": { |
|||
"label": "Bold content", |
|||
"type": "line", |
|||
"suggested": true |
|||
}, |
|||
"content": { |
|||
"label": "Content", |
|||
"type": "line", |
|||
"suggested": true |
|||
}, |
|||
"link": { |
|||
"label": "Link to page", |
|||
"type": "wiki-page-name", |
|||
"suggested": true |
|||
}, |
|||
"direction": { |
|||
"label": "Direction", |
|||
"description": "click if RTL", |
|||
"suggestedvalues": [ |
|||
"rtl" |
|||
] |
|||
} |
|||
}, |
|||
"description": "Template for text alerts and banners", |
|||
"paramOrder": [ |
|||
"content", |
|||
"content bold", |
|||
"type", |
|||
"bg-color", |
|||
"border-color", |
|||
"text-color", |
|||
"icon", |
|||
"icon-type", |
|||
"link", |
|||
"direction" |
|||
], |
|||
"format": "inline" |
|||
} |
|||
</templatedata> |
|||
</noinclude> |
|||
Revision as of 01:15, 2 May 2025
Examples:
Traditional
Source
{{Alert
|type=traditional
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
}}
Result
This is an alert
Modern with Badge
Source
{{Alert
|type=modern
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
|link=https://example.com
}}
Result
This isan alert
Left Accent Border
Source
{{Alert
|type=left border
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
|link=https://example.com
}}
Result
This is
an alert
Titled
Source
{{Alert
|type=titled
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
|link=https://example.com
}}
Result
This is
an alert
Solid
Source
{{Alert
|type=solid
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
|link=https://example.com
}}
Result
This is an alert
Top Accent Border
Source
{{Alert
|type=top border
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
|link=https://example.com
}}
Result
This is
an alert
Banner
Source
{{Alert
|type=banner
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
|link=https://example.com
}}
Result
This is
an alert
Titled
Source
{{Alert
|type=Titled
|content = an alert
|content bold = This is
|icon = info-circle
|icon-type = fad
|link=https://example.com
}}
Result
Template for text alerts and banners
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Content | content | no description | Line | suggested |
| Bold content | content bold | no description | Line | suggested |
| type | type | no description
| String | suggested |
| Background color | bg-color | no description
| String | suggested |
| Border color | border-color | no description
| String | suggested |
| Text color | text-color | no description
| String | optional |
| Icon | icon | Font Awesome icon name | String | optional |
| Icon type | icon-type | Font Awesome icon weight
| String | suggested |
| Link to page | link | no description | Page name | suggested |
| Direction | direction | click if RTL
| Unknown | optional |