v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Rounded info box/doc"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (another example)
m ({{documentation subpage}})
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{documentation subpage}}
 
This template is used on the [[Main page]]. Be careful when editing (test on your user page first!)
 
This template is used on the [[Main page]]. Be careful when editing (test on your user page first!)
  
Line 8: Line 9:
 
{{Rounded info box|Header|Text}}
 
{{Rounded info box|Header|Text}}
  
'''Bad''' example:
+
===Existing shortcuts===
 +
See [[:Category:Rounded info box templates]] for a list of existing templates.
 +
 
 
<pre>
 
<pre>
{{Rounded info box|Header|Text|hcolor=purple|hbgcolor=pink|bgcolor=lime|color=rgb(255,150,10)|bordercolor=hsl(0, 100%, 0%)}}
+
{{Red rounded info box|Header|Text}}
 
</pre>
 
</pre>
 +
{{Red rounded info box|Header|Text}}
  
{{Rounded info box|Header|Text|hcolor=purple|hbgcolor=pink|bgcolor=lime|color=rgb(255,150,10)|bordercolor=hsl(0, 100%, 0%)}}
+
<pre>
 +
{{Grey rounded info box|Header|Text}}
 +
</pre>
 +
{{Grey rounded info box|Header|Text}}
 +
 
 +
<pre>
 +
{{Orange rounded info box|Header|Text}}
 +
</pre>
 +
{{Orange rounded info box|Header|Text}}
 +
 
 +
<pre>
 +
{{Green rounded info box|Header|Text}}
 +
</pre>
 +
{{Green rounded info box|Header|Text}}
 +
 
 +
===Custom colors===
 +
<pre>
 +
{{Rounded info box|Header|Text|bordercolor=red|hbgcolor=yellow|hcolor=#090}}
 +
</pre>
 +
{{Rounded info box|Header|Text|bordercolor=red|hbgcolor=yellow|hcolor=#090}}
 +
 
 +
<pre>
 +
{{Rounded info box|Header|Text|hcolor=purple|hbgcolor=red|bgcolor=lime|color=rgb(255,150,10)|bordercolor=hsl(0, 100%, 0%)}}
 +
</pre>
 +
 
 +
{{Rounded info box|Header|Text|hcolor=purple|hbgcolor=red|bgcolor=lime|color=rgb(255,150,10)|bordercolor=hsl(0, 100%, 0%)}}
  
 
==Parameters (optional)==
 
==Parameters (optional)==
Line 19: Line 48:
 
===Colors===
 
===Colors===
  
* '''color''': The text color of the body (named after the CSS property)
+
* '''color''': The text color of the body
 
* '''hcolor''': The text color of the header
 
* '''hcolor''': The text color of the header
* '''bordercolor''': Border color of the infobox (hard to see)
+
* '''bordercolor''': Border color of the infobox
 
* '''bgcolor''': Background color of the body
 
* '''bgcolor''': Background color of the body
 
* '''hbgcolor''': Background color of the header
 
* '''hbgcolor''': Background color of the header
Line 28: Line 57:
 
{{Color help}}
 
{{Color help}}
  
==Technical Notes==
+
===Layout===
* The rounded corners are produced with ''-webkit-border-radius'' and ''-moz-border-radius'', which don't work on all browsers (only ones that support CSS3)
+
* '''align''': The alignment of the body (defaults to "center")
* The header comes '''after''' the body in the template. Make sure you don't edit the wrong part by mistake!
+
* '''halign''': The alignment of the header (defaults to "center")
 +
 
 +
<includeonly>[[Category:Templates]]</includeonly>
 +
<noinclude>[[Category:Template Documentation]]</noinclude>

Latest revision as of 23:44, 26 January 2023

This template is used on the Main page. Be careful when editing (test on your user page first!)

Examples[edit]

{{Rounded info box|Header|Text}}
Header

Text

Existing shortcuts[edit]

See Category:Rounded info box templates for a list of existing templates.

{{Red rounded info box|Header|Text}}
Header

Text

{{Grey rounded info box|Header|Text}}
Header

Text

{{Orange rounded info box|Header|Text}}
Header

Text

{{Green rounded info box|Header|Text}}
Header

Text

Custom colors[edit]

{{Rounded info box|Header|Text|bordercolor=red|hbgcolor=yellow|hcolor=#090}}
Header

Text

{{Rounded info box|Header|Text|hcolor=purple|hbgcolor=red|bgcolor=lime|color=rgb(255,150,10)|bordercolor=hsl(0, 100%, 0%)}}
Header

Text

Parameters (optional)[edit]

Colors[edit]

  • color: The text color of the body
  • hcolor: The text color of the header
  • bordercolor: Border color of the infobox
  • bgcolor: Background color of the body
  • hbgcolor: Background color of the header

Multiple formats are acceptable.

Format Red Light blue [1]
Hexadecimal #f00 or #ff0000 #e0f0ff
Text red None [2]
RGB rgb(255,0,0) rgb(224,240,255)
HSL hsl(0, 100%, 50%) hsl(209, 100%, 94%)

[1] This is only an example - many other colors would also work.

[2] Some browsers may support a name for this color (like skyBlue) but it might not be consistent.

Layout[edit]

  • align: The alignment of the body (defaults to "center")
  • halign: The alignment of the header (defaults to "center")