Difference between revisions of "Template:Navbox style/doc"
(Rewrite the docs to reflect the new purpose of this template. Preserve the history in the docs, in case it's useful to someone in the future. (And yeah, I know the italics don't work in <pre>…)) |
(→Usage: New options) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
* {{para|color|red}} | * {{para|color|red}} | ||
+ | * {{para|color|yellow}} | ||
* {{para|color|green}} | * {{para|color|green}} | ||
+ | * {{para|color|cyan}} | ||
* {{para|color|blue}} (the current site default, and only included for completeness) | * {{para|color|blue}} (the current site default, and only included for completeness) | ||
+ | * {{para|color|magenta}} | ||
+ | * {{para|color|silver}} | ||
e.g. {{Tlx|{{BASEPAGENAME}}|color{{=}}green|title}} | e.g. {{Tlx|{{BASEPAGENAME}}|color{{=}}green|title}} | ||
Line 47: | Line 51: | ||
}} | }} | ||
</pre> | </pre> | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | {{Navbox | ||
+ | | name = Navbox style/doc | ||
+ | |||
+ | | titlestyle = {{Navbox style|color=red|title}} | ||
+ | | abovestyle = {{Navbox style|color=red|above}} | ||
+ | | belowstyle = {{Navbox style|color=red|below}} | ||
+ | | groupstyle = {{Navbox style|color=red|group}} | ||
+ | |||
+ | | title = Level 1 | ||
+ | | above = Level 2 | ||
+ | |||
+ | | list1 = {{Navbox|child | ||
+ | | titlestyle = {{Navbox style|color=red|child|title}} | ||
+ | | abovestyle = {{Navbox style|color=red|child|above}} | ||
+ | | belowstyle = {{Navbox style|color=red|child|below}} | ||
+ | | groupstyle = {{Navbox style|color=red|child|group}} | ||
+ | |||
+ | | above = Level 3 | ||
+ | |||
+ | | list1 = color=red | ||
+ | }} | ||
+ | }} | ||
+ | {{Navbox | ||
+ | | name = Navbox style/doc | ||
+ | |||
+ | | titlestyle = {{Navbox style|color=yellow|title}} | ||
+ | | abovestyle = {{Navbox style|color=yellow|above}} | ||
+ | | belowstyle = {{Navbox style|color=yellow|below}} | ||
+ | | groupstyle = {{Navbox style|color=yellow|group}} | ||
+ | |||
+ | | title = Level 1 | ||
+ | | above = Level 2 | ||
+ | |||
+ | | list1 = {{Navbox|child | ||
+ | | titlestyle = {{Navbox style|color=yellow|child|title}} | ||
+ | | abovestyle = {{Navbox style|color=yellow|child|above}} | ||
+ | | belowstyle = {{Navbox style|color=yellow|child|below}} | ||
+ | | groupstyle = {{Navbox style|color=yellow|child|group}} | ||
+ | |||
+ | | above = Level 3 | ||
+ | |||
+ | | list1 = color=yellow | ||
+ | }} | ||
+ | }} | ||
+ | {{Navbox | ||
+ | | name = Navbox style/doc | ||
+ | |||
+ | | titlestyle = {{Navbox style|color=green|title}} | ||
+ | | abovestyle = {{Navbox style|color=green|above}} | ||
+ | | belowstyle = {{Navbox style|color=green|below}} | ||
+ | | groupstyle = {{Navbox style|color=green|group}} | ||
+ | |||
+ | | title = Level 1 | ||
+ | | above = Level 2 | ||
+ | |||
+ | | list1 = {{Navbox|child | ||
+ | | titlestyle = {{Navbox style|color=green|child|title}} | ||
+ | | abovestyle = {{Navbox style|color=green|child|above}} | ||
+ | | belowstyle = {{Navbox style|color=green|child|below}} | ||
+ | | groupstyle = {{Navbox style|color=green|child|group}} | ||
+ | |||
+ | | above = Level 3 | ||
+ | |||
+ | | list1 = color=green | ||
+ | }} | ||
+ | }} | ||
+ | {{Navbox | ||
+ | | name = Navbox style/doc | ||
+ | |||
+ | | titlestyle = {{Navbox style|color=cyan|title}} | ||
+ | | abovestyle = {{Navbox style|color=cyan|above}} | ||
+ | | belowstyle = {{Navbox style|color=cyan|below}} | ||
+ | | groupstyle = {{Navbox style|color=cyan|group}} | ||
+ | |||
+ | | title = Level 1 | ||
+ | | above = Level 2 | ||
+ | |||
+ | | list1 = {{Navbox|child | ||
+ | | titlestyle = {{Navbox style|color=cyan|child|title}} | ||
+ | | abovestyle = {{Navbox style|color=cyan|child|above}} | ||
+ | | belowstyle = {{Navbox style|color=cyan|child|below}} | ||
+ | | groupstyle = {{Navbox style|color=cyan|child|group}} | ||
+ | |||
+ | | above = Level 3 | ||
+ | |||
+ | | list1 = color=cyan | ||
+ | }} | ||
+ | }} | ||
+ | {{Navbox | ||
+ | | name = Navbox style/doc | ||
+ | |||
+ | | titlestyle = {{Navbox style|color=blue|title}} | ||
+ | | abovestyle = {{Navbox style|color=blue|above}} | ||
+ | | belowstyle = {{Navbox style|color=blue|below}} | ||
+ | | groupstyle = {{Navbox style|color=blue|group}} | ||
+ | |||
+ | | title = Level 1 | ||
+ | | above = Level 2 | ||
+ | |||
+ | | list1 = {{Navbox|child | ||
+ | | titlestyle = {{Navbox style|color=blue|child|title}} | ||
+ | | abovestyle = {{Navbox style|color=blue|child|above}} | ||
+ | | belowstyle = {{Navbox style|color=blue|child|below}} | ||
+ | | groupstyle = {{Navbox style|color=blue|child|group}} | ||
+ | |||
+ | | above = Level 3 | ||
+ | |||
+ | | list1 = color=blue | ||
+ | }} | ||
+ | }} | ||
+ | {{Navbox | ||
+ | | name = Navbox style/doc | ||
+ | |||
+ | | titlestyle = {{Navbox style|color=magenta|title}} | ||
+ | | abovestyle = {{Navbox style|color=magenta|above}} | ||
+ | | belowstyle = {{Navbox style|color=magenta|below}} | ||
+ | | groupstyle = {{Navbox style|color=magenta|group}} | ||
+ | |||
+ | | title = Level 1 | ||
+ | | above = Level 2 | ||
+ | |||
+ | | list1 = {{Navbox|child | ||
+ | | titlestyle = {{Navbox style|color=magenta|child|title}} | ||
+ | | abovestyle = {{Navbox style|color=magenta|child|above}} | ||
+ | | belowstyle = {{Navbox style|color=magenta|child|below}} | ||
+ | | groupstyle = {{Navbox style|color=magenta|child|group}} | ||
+ | |||
+ | | above = Level 3 | ||
+ | |||
+ | | list1 = color=magenta | ||
+ | }} | ||
+ | }} | ||
+ | {{Navbox | ||
+ | | name = Navbox style/doc | ||
+ | |||
+ | | titlestyle = {{Navbox style|color=silver|title}} | ||
+ | | abovestyle = {{Navbox style|color=silver|above}} | ||
+ | | belowstyle = {{Navbox style|color=silver|below}} | ||
+ | | groupstyle = {{Navbox style|color=silver|group}} | ||
+ | |||
+ | | title = Level 1 | ||
+ | | above = Level 2 | ||
+ | |||
+ | | list1 = {{Navbox|child | ||
+ | | titlestyle = {{Navbox style|color=silver|child|title}} | ||
+ | | abovestyle = {{Navbox style|color=silver|child|above}} | ||
+ | | belowstyle = {{Navbox style|color=silver|child|below}} | ||
+ | | groupstyle = {{Navbox style|color=silver|child|group}} | ||
+ | |||
+ | | above = Level 3 | ||
+ | |||
+ | | list1 = color=silver | ||
+ | }} | ||
+ | }} | ||
=== History === | === History === |
Latest revision as of 21:01, 12 June 2015
Error creating thumbnail: /bin/bash: rsvg-convert: command not found |
This is a documentation subpage for Template:Navbox style. It contains usage information, categories and other content that is not part of the original template page. |
Usage
This template is not used directly, it is intended for a very specific use, to generate parameters for another highly complex template.
This template provides a mechanism for standard style customisation of {{Navbox}}
templates. The site default style comes from MediaWiki:Common.css, and navbox templates should generally use the site default unless they have a good reason to use something else. Currently the style
parameter below can be set one of the following:
-
|color=red
-
|color=yellow
-
|color=green
-
|color=cyan
-
|color=blue
(the current site default, and only included for completeness) -
|color=magenta
-
|color=silver
e.g. {{Navbox style|color=green|title}}
It is currently intended to only be used for relatively minor re-styling, such as alternate color schemes. Major changes to the style should really be done via the site CSS.
If you do not wish to customise the style of a navbox, it should not contain any reference to this template.
{{Navbox ... | titlestyle = {{Navbox style|''style''|title}} | abovestyle = {{Navbox style|''style''|above}} | belowstyle = {{Navbox style|''style''|below}} | groupstyle = {{Navbox style|''style''|group}} ... }}
{{Navbox|child ... | titlestyle = {{Navbox style|''style''|child|title}} | abovestyle = {{Navbox style|''style''|child|above}} | belowstyle = {{Navbox style|''style''|child|below}} | groupstyle = {{Navbox style|''style''|child|group}} ... }}
Examples
|
|
|
|
|
|
|
History
This template was originally a temporary workaround for the CSS missing from MediaWiki:Common.css which was needed to properly support the use of {{Navbox}}. Due to the nature of CSS, it can never be a perfect solution, and is the wrong way to specify the actual layout. The style options being passed to {{Navbox}} exceeded the original design of it, as those options were only ever intended for minor adjustments such as changing the color scheme. Despite that, the usage did provide a short term acceptable solution until the correct CSS was in place. The visual result was broadly similar to that achieved with the correct CSS stylesheet in place. Inline style via the "style" attribute on HTML elements is never a full or correct replacement for a CSS stylesheet, and contains a number of limitations not present for a stylesheet.
The original approximation of the full CSS for {{Navbox}} has been stripped out, but can be found in the template's change history. Remember, it was an imperfect solution, and was only ever intended to be a temporary workaround. It was removed from this template to avoid both current and future conflicts with changes made to the site CSS.