Difference between revisions of "Template:Infobox/themes/style"

From Twinsuniverse
Jump to: navigation, search
(this template should simplify the general use of Template:Infobox/themes)
 
Line 1: Line 1:
<includeonly>{{subst:#if: true|
+
<includeonly>{{subst:#if: true |
{{safesubst:!}}bordercolor={{{border|#cccccc}}}
+
{{safesubst:!}}bordercolor={{{b|#cccccc}}}
{{safesubst:!}}mainbgcolor={{{mainbg|#ffffff}}}
+
{{safesubst:!}}mainbgcolor={{{bg|#ffffff}}}
{{safesubst:!}}headbgcolor={{{headbg|#ccccff}}}
+
{{safesubst:!}}headbgcolor={{{bgh|#ccccff}}}
{{safesubst:!}}headercolor={{{color|#000000}}}
+
{{safesubst:!}}headercolor={{{txt|#000000}}}
{{safesubst:!}}headiconurl={{{image|}}}
+
{{safesubst:!}}headiconurl={{{icon|}}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
This template...
+
This template produces the appropriate theme for an <nowiki>{{</nowiki>[[Template:Infobox|infobox]]<nowiki>}}</nowiki>, by wrapping the specified values into dynamic parameters for the calling template-call.
 +
 
 +
In simpler terms, this template tells another template how to make a particular theme, using the specified values.
 +
 
 +
This template must be called using the '''safesubst:''' prefix, or it won't work.
  
 
{{stub}}
 
{{stub}}
 +
 +
==Parameters==
 +
This template uses abbreviated parameter names, to allow for short(er) lines of code in the <nowiki>{{</nowiki>[[Template:Infobox/themes|Infobox/themes]]<nowiki>}}</nowiki> template, where all themes are specified per line.
 +
* '''b''': The colour of the '''b'''order
 +
* '''bg''': The colour of the main '''b'''ack'''g'''round
 +
* '''bgh''': The colour of the '''b'''ack'''g'''round of '''h'''eadings
 +
* '''txt''': The colour of '''t'''e'''xt''' in headings
 +
* '''icon''': The url of the '''icon''' left of the title
 +
 +
 +
'''''Note''': The colours may be in any CSS accepted format, that is #RGB, #RRGGBB, rgb(xxx,xxx,xxx) or string literal.''
 +
 +
'''''Note''': To get the url for the '''icon''' parameter, search for the icon in [[:Category:Icons]], click it to open it's file page, and then right-click on the link of the filename below the full-sized image to copy the link address. Then remove everything before "/images/".''
 +
 +
==Syntax==
 +
<nowiki>{{safesubst:Infobox/theme
 +
|b=
 +
|bg=
 +
|bgh=
 +
|txt=
 +
|icon=
 +
}}</nowiki>
 +
 +
==Example==
 +
<nowiki>{{safesubst:Infobox/theme
 +
|b=red
 +
|bg=#efe
 +
|bgh=#ababab
 +
|txt=rgb(50,60,70)
 +
|icon=/images/6/6e/Orb_grey30.png
 +
}}</nowiki>
 +
 +
The result would be a custom theme for an infobox.
  
 
[[Category:System Templates]]
 
[[Category:System Templates]]
 
[[Category:Infoboxes| ]]
 
[[Category:Infoboxes| ]]
 
</noinclude>
 
</noinclude>

Revision as of 21:00, 5 January 2013

This template produces the appropriate theme for an {{infobox}}, by wrapping the specified values into dynamic parameters for the calling template-call.

In simpler terms, this template tells another template how to make a particular theme, using the specified values.

This template must be called using the safesubst: prefix, or it won't work.


  This article is a stub [list all]. You can help the Twinsuniverse by expanding it.

Parameters

This template uses abbreviated parameter names, to allow for short(er) lines of code in the {{Infobox/themes}} template, where all themes are specified per line.

  • b: The colour of the border
  • bg: The colour of the main background
  • bgh: The colour of the background of headings
  • txt: The colour of text in headings
  • icon: The url of the icon left of the title


Note: The colours may be in any CSS accepted format, that is #RGB, #RRGGBB, rgb(xxx,xxx,xxx) or string literal.

Note: To get the url for the icon parameter, search for the icon in Category:Icons, click it to open it's file page, and then right-click on the link of the filename below the full-sized image to copy the link address. Then remove everything before "/images/".

Syntax

{{safesubst:Infobox/theme
 |b=
 |bg=
 |bgh=
 |txt=
 |icon=
}}

Example

{{safesubst:Infobox/theme
 |b=red
 |bg=#efe
 |bgh=#ababab
 |txt=rgb(50,60,70)
 |icon=/images/6/6e/Orb_grey30.png
}}

The result would be a custom theme for an infobox.