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

From Twinsuniverse
Jump to: navigation, search
m
m (creating a new infobox layer...)
Line 1: Line 1:
<includeonly>{{#if:|<!-- maybe #explode will be of use -->
+
<includeonly>{{#switch: {{lc:{{{style|}}}}}
/**/mainstyle=border-color:{{{b|#ccc}}}; background-color:{{{bg|#fff}}};
+
|main=border-color:{{{b|#ccc}}}; background-color:{{{bg|#fff}}};
/**/headstyle=border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}};
+
|head=border-color:{{{b|#ccc}}}; background-color:{{{bgh|#ccf}}}; color:{{{txt|#000}}};
/**/datastyle=border-color:{{{b|#ccc}}};
+
|data=border-color:{{{b|#ccc}}};
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
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.
 
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.

Revision as of 18:58, 8 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 article is a stub [list all]. You can help the Twinsuniverse by expanding it.
  This template has been invalidated because it's technique appears not to function properly.

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

This template also outputs the following parameters upon use to the calling template-call:

  • mainstyle: The theme style for the infobox' main table
  • headstyle: The theme style for the infobox' headings (title, subtitle, headings)
  • datastyle: The theme style for the infobox' plain data cells


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

Note: To get an accepted value for the class parameter, look for the class names (in the form of "theme-icon-color") under INFOBOX THEME ICONS in MediaWiki:Common.css.

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.