Template:Nav buttons: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
(Rudolf@tygron.nl moved page Template:Nav buttons to Template:Nav buttons/inner: Allow rendering without providing theme reference to prevent template loops)
 
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
#REDIRECT [[Template:Nav buttons/inner]]
<includeonly>
<div class='nav-button-container' style='color: {{#if:{{{{{theme|}}}}} | {{{text-color|}}} | {{{{{theme|}}}|text-color}} }};'>
{{nav button
    |color={{#if:{{{{{theme|}}}}} | {{{color|}}} | {{{{{theme|}}}|color}} }}
    |image={{#if:{{{{{theme|}}}}} | {{{image|}}} | {{{{{theme|}}}|image}} }}
    |link={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }}               
    |text={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }}
  }}
{{nav button
    |color={{#if:{{{{{theme|}}}}} | {{{color|}}} | {{{{{theme|}}}|color}} }}
    |image=getting_started_button.png
    |link={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }} getting started
    |text=Tutorials                                                       
  }}
{{nav button
    |color={{#if:{{{{{theme|}}}}} | {{{color|}}} | {{{{{theme|}}}|color}} }}
    |image=Overview_button.png       
    |link={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }} overview     
    |text=Overview                                                         
  }}
{{nav button
    |color={{#if:{{{{{theme|}}}}} | {{{color|}}} | {{{{{theme|}}}|color}} }}
    |image=theory_button.png         
    |link={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }} theory       
    |text=Theory                                                           
  }}
{{nav button
    |color={{#if:{{{{{theme|}}}}} | {{{color|}}} | {{{{{theme|}}}|color}} }}
    |image=benchmarks_button.png   
    |link={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }} benchmarks     
    |text=Benchmarks                                                       
  }}
</div>
</includeonly><noinclude>
Example with theme:
{{Nav buttons
| theme=      aerius theme
}}
Example without theme/color:
{{Nav buttons
| image=    waterwijzer100px.png
| link=    Waterwijzer Module
|
| theme=   
}}
 
Example in nav element:
{{nav
| title=[[Aerius Module]]
| icon=Editor_ribbon_icon_current.png
| buttons=
  {{Nav buttons
  | image=    waterwijzer100px.png
  | link=    Waterwijzer Module
  | color=    {{Aerius theme|color}}
  }}
| theme-color=lightgreen
|
{{nav-group|group=      [[Model attributes (Aerius Overlay)| Aerius Overlay Attributes]] }}
{{nav-group|postappend = &nbsp;(Aerius Overlay) | Attributes | Calculation year | Nox overlay attribute | Nh3 overlay attribute }}
}}
 
This template can either be used with a theme, or with manual configuration. The following buttons are created:
* A main button, linking to "<nowiki>[link]</nowiki>"
* A tutorials button, linking to "<nowiki>[link] getting started</nowiki>"
* A overview button, linking to "<nowiki>[link] overview</nowiki>"
* A theory button, linking to "<nowiki>[link] theory</nowiki>"
* A benchmarks button, linking to "<nowiki>[link] benchmarks</nowiki>"
 
Parameters:
* With a theme:
** theme: the theme template to use
 
* Without a theme:
** image: The image to use for the first button
** link: Main article of the subject matter
** color: Main article of the subject matter
** text: Main article of the subject matter
 
General style here (note that part of the style should be overwrite-able by parameters):
[[MediaWiki:Common.css]]
</noinclude>

Latest revision as of 15:24, 15 December 2020

Example with theme:

Example without theme/color:


Example in nav element:


This template can either be used with a theme, or with manual configuration. The following buttons are created:

  • A main button, linking to "[link]"
  • A tutorials button, linking to "[link] getting started"
  • A overview button, linking to "[link] overview"
  • A theory button, linking to "[link] theory"
  • A benchmarks button, linking to "[link] benchmarks"

Parameters:

  • With a theme:
    • theme: the theme template to use
  • Without a theme:
    • image: The image to use for the first button
    • link: Main article of the subject matter
    • color: Main article of the subject matter
    • text: Main article of the subject matter

General style here (note that part of the style should be overwrite-able by parameters): MediaWiki:Common.css