Template:HeroTabs: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
No edit summary
Vergir (talk | contribs)
Replace with module code.
Tag: Replaced
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><templatestyles src="HeroTabs/styles.css" /><div class="navbox-title hero-tabs"><!--
<includeonly>{{#invoke:HeroTabs|render|{{{1|}}}}}</includeonly><noinclude>{{Documentation}}</noinclude>
-->{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}{{if_lang}}|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}{{if_lang}} | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}{{if_lang}}|<span>{{translate|Overview}}</span>]]</div>|{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}} | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}|<span>{{translate|Overview}}</span>]]</div>}}}}<!--
-->{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Strategy{{if_lang}}|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Strategy{{if_lang}} | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Strategy{{if_lang}}|<span>{{translate|Strategy}}</span>]]</div>|{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Strategy|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Strategy | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Strategy|<span>{{translate|Strategy}}</span>]]</div>}}}}<!--
-->{{#ifexist:{{ROOTPAGENAME}}/Quotes{{if_lang}}|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{ROOTPAGENAME}}/Quotes{{if_lang}} | hero-tab-active | hero-tab-inactive }}">[[{{ROOTPAGENAME}}/Quotes{{if_lang}}|<span>{{translate|Quotes}}</span>]]</div>|{{#ifexist:{{ROOTPAGENAME}}/Quotes|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{ROOTPAGENAME}}/Quotes | hero-tab-active | hero-tab-inactive }}">[[{{ROOTPAGENAME}}/Quotes|<span>{{translate|Quotes}}</span>]]</div>}}}}<!--
-->{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Sounds{{if_lang}}|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Sounds{{if_lang}} | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Sounds{{if_lang}}|<span>{{translate|Sounds}}</span>]]</div>|{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Sounds|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Sounds | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Sounds|<span>{{translate|Sounds}}</span>]]</div>}}}}<!--
-->{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Movement{{if_lang}}|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Movement{{if_lang}} | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Movement{{if_lang}}|<span>{{#invoke:Lang|get_string|Citadel_ShopFilter_Movement}}</span>]]</div>|{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Movement|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Movement | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Movement|<span>{{#invoke:Lang|get_string|Citadel_ShopFilter_Movement}}</span>]]</div>}}}}<!--
-->{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Update_history{{if_lang}}|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Update_history{{if_lang}} | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Update_history{{if_lang}}|<span>{{translate|Update history}}</span>]]</div>|{{#ifexist:{{{1|{{ROOTPAGENAME}}}}}/Update_history|<div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}}/Update_history | hero-tab-active | hero-tab-inactive }}">[[{{{1|{{ROOTPAGENAME}}}}}/Update_history|<span>{{translate|Update history}}</span>]]</div>}}}}<!--
--></div></includeonly><!--
--><noinclude>{{Documentation}}</noinclude>

Latest revision as of 17:29, 15 July 2026

Template documentation [view] [edit] [history] [purge]
CSS3 logo.svg
This template uses CSS found at HeroTabs/styles.css.

Adds a navigation header for a main page and its subpages. Mainly used for heroes but also works for other pages if it has the same subpages.

Place this template at the top of the relevant pages. The template automatically detects which subpages exist and highlights the current (active) page's tab.

Example

[edit source]

Using the code:

{{HeroTabs}}

Will render the navigation bar. The example below shows how it appears on the "Sounds" page, with that tab highlighted as active.