(Create generic message box template) |
(Add `mbox-notice` base CSS class and clean up spaghetti code) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div class="mbox {{# | <includeonly><div class="mbox mbox-{{#switch:{{{1}}} | ||
|success=success | |||
|warning=warning | |||
|danger=danger | |||
|notice | |||
}}" role="presentation"><span class="mbox-icon metadata">{{#switch:{{{1}}} | |||
|success=[[File:OOjs_UI_icon_check.svg|link=]] | |||
|warning=[[File:OOjs_UI_icon_alert.svg|link=]] | |||
|danger=[[File:OOjs_UI_icon_error.svg|link=]] | |||
|notice=[[File:OOjs_UI_icon_lightbulb.svg|link=]] | |||
|? | |||
}}</span><div class="mbox-title">{{{2}}}</div><div class="mbox-text">{{{3}}}</div></div></includeonly><noinclude>Generic message box template. Editors are encouraged to use more specific templates when possible. | |||
== Examples == | |||
<syntaxhighlight lang="mediawiki" line> | |||
{{Mbox|notice|Heads up!|...}} | {{Mbox|notice|Heads up!|...}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 9: | Line 22: | ||
---- | ---- | ||
<syntaxhighlight lang="mediawiki" line> | |||
{{Mbox|warning|Be careful!|...}} | {{Mbox|warning|Be careful!|...}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 17: | Line 30: | ||
---- | ---- | ||
<syntaxhighlight lang="mediawiki" line> | |||
{{Mbox|danger|This might concern you|...}} | {{Mbox|danger|This might concern you|...}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 25: | Line 38: | ||
---- | ---- | ||
<syntaxhighlight lang="mediawiki" line> | |||
{{Mbox|success|Good news!|...}} | {{Mbox|success|Good news!|...}} | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 04:58, 1 June 2023
Generic message box template. Editors are encouraged to use more specific templates when possible.
Examples
{{Mbox|notice|Heads up!|...}}
Heads up!
Lorem ipsum, architecto illum voluptatem nobis doloribus voluptatem quod ut deleniti. Aliquid blanditiis in sit at veniam quaerat nesciunt. Velit voluptatem quia repellat. Rem pariatur debitis aliquam.
{{Mbox|warning|Be careful!|...}}
Be careful!
Ea quia et suscipit. At enim repellat omnis et corrupti consequatur. Rerum aperiam perspiciatis tenetur repellat reiciendis voluptatum atque et. Ut aut ea delectus.
{{Mbox|danger|This might concern you|...}}
This might concern you
Voluptatem incidunt unde sed perspiciatis exercitationem excepturi. Sit consequatur error fugiat maxime. Neque consequatur reprehenderit cumque consequatur sed facere commodi.
{{Mbox|success|Good news!|...}}
Good news!
Dolorem consequatur enim rerum reprehenderit harum rerum. Et velit sint est autem cum. Quis voluptatem enim et. Iure provident omnis aut molestiae et magnam rerum.