Template:Nav buttons: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{nav buttons/inner
<includeonly>
| image=     {{   #if:{{{{{theme|}}}}} | {{{image|}}}     | {{{{{theme|}}}|image}}   }}
<div class='nav-button-container' style='color: {{#if:{{{{{theme|}}}}} | {{{text-color|}}} | {{{{{theme|}}}|text-color}} }};'>
| link=       {{   #if:{{{{{theme|}}}}} | {{{link|}}}       | {{{{{theme|}}}|mainlink}}   }}
{{nav button
| color=     {{   #if:{{{{{theme|}}}}} | {{{color|}}}     | {{{{{theme|}}}|color}}   }}
    |color={{#if:{{{{{theme|}}}}} | {{{color|}}} | {{{{{theme|}}}|color}} }}
| text-color= {{   #if:{{{{{theme|}}}}} | {{{text-color|}}} | {{{{{theme|}}}|text-color}}   }}
    |image={{#if:{{{{{theme|}}}}} | {{{image|}}} | {{{{{theme|}}}|image}} }}  
| size=       {{{size|}}}
    |link={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }}               
| fontsize=  {{{font-size|}}}
    |text={{#if:{{{{{theme|}}}}} | {{{link|}}} | {{{{{theme|}}}|mainlink}} }}
}}</includeonly><noinclude>
  }}
{{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:
Example with theme:
{{Nav buttons
{{Nav buttons
Line 51: Line 77:
** color: Main article of the subject matter
** color: Main article of the subject matter
** text: Main article of the subject matter
** text: Main article of the subject matter
* Optional, either with or without theme:
** size: Size of the images
** fontsize: Size of the text


Style here:
Style here:
[[MediaWiki:Common.css]]
[[MediaWiki:Common.css]]
</noinclude>
</noinclude>

Revision as of 14:40, 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

Style here: MediaWiki:Common.css