Template:TournamentTabs: Difference between revisions
Template page
More actions
Esportsamaze (talk | contribs) No edit summary |
Esportsamaze (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
Auto-detecting navigation tabs. Tabs appear only if the subpage exists. | |||
Usage: {{TournamentTabs}} | Usage: {{TournamentTabs}} | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
<div class="tournament-tabs" style="display:flex; border-bottom:2px solid #007bff; margin-bottom:20px;"> | <div class="tournament-tabs" style="display:flex; flex-wrap:wrap; gap:4px; border-bottom:2px solid var(--primary-color, #007bff); margin-bottom:20px;"> | ||
{{#vars:basePage|{{#switch:{{SUBPAGENAME}} | |||
|Standings|Statistics|Teams|Matches|Qualifiers={{#titleparts:{{PAGENAME}}|-1}} | |||
|#default={{PAGENAME}} | |||
}}}} | |||
<div style="padding:10px 20px; font-weight:bold; cursor:pointer; | <div style="padding:10px 20px; font-weight:bold; cursor:pointer; | ||
background-color:{{# | background-color:{{#ifeq:{{PAGENAME}}|{{#var:basePage}}|#eee|#fff}}; | ||
border-bottom:{{# | border-bottom:{{#ifeq:{{PAGENAME}}|{{#var:basePage}}|3px solid var(--primary-color, #007bff)|none}};"> | ||
[[{{# | [[{{#var:basePage}}|<span style="color:var(--text-main, #333);">Overview</span>]] | ||
}}|<span style="color:#333;">Overview</span>]] | |||
</div> | </div> | ||
{{#ifexist: {{#var:basePage}}/Standings | | |||
<div style="padding:10px 20px; font-weight:bold; cursor:pointer; | <div style="padding:10px 20px; font-weight:bold; cursor:pointer; | ||
background-color:{{#ifeq:{{SUBPAGENAME}}|Standings|#eee|#fff}}; | background-color:{{#ifeq:{{SUBPAGENAME}}|Standings|#eee|#fff}}; | ||
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Standings|3px solid #007bff|none}};"> | border-bottom:{{#ifeq:{{SUBPAGENAME}}|Standings|3px solid var(--primary-color, #007bff)|none}};"> | ||
[[{{# | [[{{#var:basePage}}/Standings|<span style="color:var(--text-main, #333);">Standings</span>]] | ||
}}/Standings|<span style="color:#333;">Standings</span>]] | |||
</div> | </div> | ||
}} | |||
{{#ifexist: {{#var:basePage}}/Statistics | | |||
<div style="padding:10px 20px; font-weight:bold; cursor:pointer; | <div style="padding:10px 20px; font-weight:bold; cursor:pointer; | ||
background-color:{{#ifeq:{{SUBPAGENAME}}|Statistics|#eee|#fff}}; | background-color:{{#ifeq:{{SUBPAGENAME}}|Statistics|#eee|#fff}}; | ||
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Statistics|3px solid #007bff|none}};"> | border-bottom:{{#ifeq:{{SUBPAGENAME}}|Statistics|3px solid var(--primary-color, #007bff)|none}};"> | ||
[[{{# | [[{{#var:basePage}}/Statistics|<span style="color:var(--text-main, #333);">Statistics</span>]] | ||
</div> | |||
| | }} | ||
}}/ | {{#ifexist: {{#var:basePage}}/Teams | | ||
<div style="padding:10px 20px; font-weight:bold; cursor:pointer; | |||
background-color:{{#ifeq:{{SUBPAGENAME}}|Teams|#eee|#fff}}; | |||
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Teams|3px solid var(--primary-color, #007bff)|none}};"> | |||
[[{{#var:basePage}}/Teams|<span style="color:var(--text-main, #333);">Teams</span>]] | |||
</div> | |||
}} | |||
{{#ifexist: {{#var:basePage}}/Matches | | |||
<div style="padding:10px 20px; font-weight:bold; cursor:pointer; | |||
background-color:{{#ifeq:{{SUBPAGENAME}}|Matches|#eee|#fff}}; | |||
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Matches|3px solid var(--primary-color, #007bff)|none}};"> | |||
[[{{#var:basePage}}/Matches|<span style="color:var(--text-main, #333);">Matches</span>]] | |||
</div> | </div> | ||
}} | |||
</div> | </div> | ||
</includeonly> | </includeonly> | ||
Revision as of 15:50, 14 January 2026
Auto-detecting navigation tabs. Tabs appear only if the subpage exists. Usage:
{{#vars:basePage|TournamentTabs}}
[[|Overview]]