Difference between revisions of "Template:Navbar/doc"

From EVE University Wiki
Jump to: navigation, search
m
 
(11 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Work in Progress}}
 
 
<!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE--->
 
<!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE--->
 
+
<noinclude>{{main|Template:Navbar}}</noinclude>
 
== Usage ==
 
== Usage ==
 
===General===
 
===General===
When one of the following examples is placed inside a given [[Help:templates|template]], it adds navbar navigational functionality:
+
Copy one of the following examples. When it is placed inside a given [[wikipedia:Help:templates|template]] or other page it adds navbar navigational functionality to the following; the pagename, its doc subpage, and an editing link to the page, as follows:
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|mini=1}}</nowiki></tt>  
+
:<tt><nowiki>{{navbar|{{subst:FULLPAGENAME}}|mini=1}}</nowiki></tt> (v/t/e only, most used)
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|plain=1}}</nowiki></tt>  
+
:<tt><nowiki>{{navbar|{{subst:FULLPAGENAME}}|plain=1}}</nowiki></tt> (no "this box" comment)
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|fontstyle=color:green}}</nowiki></tt>  
+
:<tt><nowiki>{{navbar|{{subst:FULLPAGENAME}}|fontstyle=color:green}}</nowiki></tt> (may fit better in some navboxes)
  
The <code><nowiki>{{subst:PAGENAME}}</nowiki></code> will be substituted with the template's name when parsed by the servers. For example, <code><nowiki>{{navbar|navbar/doc}}</nowiki></code> gives:<br> {{navbar|navbar/doc}}
+
The <code><nowiki>{{subst:FULLPAGENAME}}</nowiki></code> will be substituted with the template's namespace and pagename, when parsed by the servers. For example, <code><nowiki>{{navbar|{{subst:FULLPAGENAME}}}}</nowiki></code> on this template page gives: <code><nowiki>{{navbar|navbar}}</nowiki></code>. Note that the wikispace, is nominally in the link or URL (eg [[:Template:Navbox]] and is included in the parameter specified. And thus, the final output of this test example is inside the following:
 +
{|style="background:#000000"
 +
|{{navbar|navbar}}
 +
|}
  
 
===Font-size===
 
===Font-size===
Line 17: Line 19:
 
== Examples ==
 
== Examples ==
 
===Required parameters===
 
===Required parameters===
*<code><nowiki>{{navbar|Template Name}}</nowiki></code> – the template name is required.
+
*<code><nowiki>{{navbar|Template Name}}</nowiki></code> – the template name is required. It should the template-space identifier, as per FULLPAGENAME magic word formatting. It may be automatically filled as in the Usage section, again with the magic word code, for convenience.
  
 
===Optional parameters===
 
===Optional parameters===
 
{| class="wikitable"
 
{| class="wikitable"
! Options !! Parameters !! Produces...
+
! Options !! Parameters !! Produces... (this page)
 
|-
 
|-
| Basic || <code><nowiki>{{navbar|Template Name}}</nowiki></code> || {{navbar|navbar/doc}}
+
| Basic || <code><nowiki>{{navbar|Template: Name}}</nowiki></code> || {{navbar|navbar/doc}}
 
|-
 
|-
| Different text || <code><nowiki>{{navbar|Template Name|text=This template:}}</nowiki></code> || {{navbar|navbar/doc|text=This template:}}
+
| Different text || <code><nowiki>{{navbar|Template: Name|text=This template:}}</nowiki></code> || {{navbar|navbar/doc|text=This template:}}
 
|-
 
|-
| Without "This box:" text || <code><nowiki>{{navbar|Template Name|plain=1}}</nowiki></code> || {{navbar|navbar/doc|plain=1}}
+
| Without "This box:" text || <code><nowiki>{{navbar|Template: Name|plain=1}}</nowiki></code> || {{navbar|navbar/doc|plain=1}}
 
|-
 
|-
| Short version || <code><nowiki>{{navbar|Template Name|mini=1}}</nowiki></code> || {{navbar|navbar/doc|mini=1}}
+
| Short version || <code><nowiki>{{navbar|Template: Name|mini=1}}</nowiki></code> || {{navbar|navbar/doc|mini=1}}
 
|-
 
|-
| With a color option || <code><nowiki>{{navbar|Template Name|fontstyle=color:green}}</nowiki></code> || {{navbar|navbar/doc|fontstyle=color:green}}
+
| With a color option || <code><nowiki>{{navbar|Template: Name|fontstyle=color:green}}</nowiki></code> || {{navbar|navbar/doc|fontstyle=color:green}}
 
|-
 
|-
 
| With brackets
 
| With brackets
| <code><nowiki>{{navbar|Template Name|brackets=1}}</nowiki></code>
+
| <code><nowiki>{{navbar|Template: Name|brackets=1}}</nowiki></code>
 
| {{navbar|navbar/doc|brackets=1}}
 
| {{navbar|navbar/doc|brackets=1}}
 
|}
 
|}
  
 
===Deprecated parameters===
 
===Deprecated parameters===
The <tt>miniv=1</tt>, <tt>viewplain=1</tt>, <tt>nodiv=1</tt> and <tt>fontcolor=</tt> parameters have been deprecated. To implement the view-only version, use the {{tlx|v}} or {{tlx|view}} templates instead.
+
The <tt>miniv=1</tt>, <tt>viewplain=1</tt>, <tt>nodiv=1</tt> and <tt>fontcolor=</tt> parameters have been deprecated. To implement the view-only version, use the {{tl|v}} or {{tl|view}} templates instead.
  
 
== Notes ==
 
== Notes ==
Line 50: Line 52:
  
 
<!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE --->
 
<!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE --->
<includeonly>
+
<includeonly>[[Category:Navbox templates]]</includeonly>
[[Category:Formatting templates]]
+
<noinclude>[[Category:Template documentation]]</noinclude>
</includeonly>
 

Latest revision as of 13:08, 13 April 2022


Main article: Template:Navbar

Usage

General

Copy one of the following examples. When it is placed inside a given template or other page it adds navbar navigational functionality to the following; the pagename, its doc subpage, and an editing link to the page, as follows:

{{navbar|{{subst:FULLPAGENAME}}|mini=1}} (v/t/e only, most used)
{{navbar|{{subst:FULLPAGENAME}}|plain=1}} (no "this box" comment)
{{navbar|{{subst:FULLPAGENAME}}|fontstyle=color:green}} (may fit better in some navboxes)

The {{subst:FULLPAGENAME}} will be substituted with the template's namespace and pagename, when parsed by the servers. For example, {{navbar|{{subst:FULLPAGENAME}}}} on this template page gives: {{navbar|navbar}}. Note that the wikispace, is nominally in the link or URL (eg Template:Navbox and is included in the parameter specified. And thus, the final output of this test example is inside the following:

Font-size

Font-size is 88% when used in a navbar, and 100% when nested in a navbox. In the navbar, the weight is "normal"; when nested in navbox, it takes on the outer setting. The middot is bold.

Examples

Required parameters

  • {{navbar|Template Name}} – the template name is required. It should the template-space identifier, as per FULLPAGENAME magic word formatting. It may be automatically filled as in the Usage section, again with the magic word code, for convenience.

Optional parameters

Options Parameters Produces... (this page)
Basic {{navbar|Template: Name}}
Different text {{navbar|Template: Name|text=This template:}}
Without "This box:" text {{navbar|Template: Name|plain=1}}
Short version {{navbar|Template: Name|mini=1}}
With a color option {{navbar|Template: Name|fontstyle=color:green}}
With brackets {{navbar|Template: Name|brackets=1}}

Deprecated parameters

The miniv=1, viewplain=1, nodiv=1 and fontcolor= parameters have been deprecated. To implement the view-only version, use the {{v}} or {{view}} templates instead.

Notes

Navbar is contained within a <div>...</div> in order to accomodate a horizontal unnumbered list. This means it cannot be placed inside a <span>...</span> or other inline element, because Tidy will 'fix' situations where it finds block elements inside inline elements.

Prepackaged

{{Tnavbar-header}}
Positions ·· e on the right edge of the line, often used in non-collapsible navbox heading.
{{Tnavbar-navframe}}
For use in conjunction with Navframe divs, positions ·· e opposite of the [hide]/[show] feature.
{{Tnavbar-collapsible}}
For use in conjunction with Collapsible tables, floats ·· e opposite of the [hide]/[show] feature.