|
Β |
| (29 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| <includeonly> | | <includeonly>{{#ifeq: {{NAMESPACE}} | {{ns:Template}} | {{#ifeq: {{#sub:{{ROOTPAGENAME}}|0|3}} | Tab | [[Category:Tabs]] |}} |}}<templatestyles src="Pagetabs/styles.css" /><div class="pagetabs noexcerpt noscrollbar" {{#if:{{{styles|}}}|style="{{{styles}}}|}} ><!-- |
| <div class="nophone" style="width:100%; height: 50px; border-bottom: 5px solid #8b0024;">
| | --><div>[[{{{tab1|}}}|{{{title1|{{{tab1|}}}}}}]]</div><!-- |
| {{#if: {{{tab1}}} | | --><div>[[{{{tab2|}}}|{{{title2|{{{tab2|}}}}}}]]</div><!-- |
| |<div style="width:5px; height:50px; border-bottom: 5px solid #8b0024; background: #ffffff; float:left;"></div> | | -->{{#if:{{{tab3|}}}|<div>[[{{{tab3|}}}|{{{title3|{{{tab3|}}}}}}]]</div>}}<!-- |
| <div style="width:20%; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; float:left; text-align:center; padding-top:7px;
| | -->{{#if:{{{tab4|}}}|<div>[[{{{tab4|}}}|{{{title4|{{{tab4|}}}}}}]]</div>}}<!-- |
| {{#ifeq: {{{currenttab|}}} | 1 | | -->{{#if:{{{tab5|}}}|<div>[[{{{tab5|}}}|{{{title5|{{{tab5|}}}}}}]]</div>}}<!-- |
| |border-bottom: 5px solid #ffffff; background: #ffffff;">
| | -->{{#if:{{{tab6|}}}|<div>[[{{{tab6|}}}|{{{title6|{{{tab6|}}}}}}]]</div>}}<!-- |
| {{#if: {{{tab1url}}}|{{{tab1url}}}|{{#if: {{{tab1text}}}|[[{{{tab1}}}|<span style="color:black;">'''{{{tab1text}}}''']]|[[{{{tab1}}}|<span style="color:black;">'''{{{tab1}}}''']]}}}} | | --></div> |
| |background: #8b0024;">
| | <hr /> |
| {{#if: {{{tab1url}}}|{{{tab1url}}}|{{#if: {{{tab1text}}}|[[{{{tab1}}}|<span style="color:white;">'''{{{tab1text}}}''']]|[[{{{tab1}}}|<span style="color:white;">'''{{{tab1}}}''']]}}}} | | <!-- moved to Template:Tab Userpage <div class="pagetabsmore">{{Pagetabs/pagetabsmore|username=|style=position:absolute; bottom:24px;}}</div> --></includeonly><noinclude> {{documentation2}} |
| }}
| | This template was originally created for use on user pages. |
| </div> | | Β |
| |}}
| | This template creates a row of at most 6 tabs with (internal) links, meant to ease navigation between related and sub-pages. External links may only be included trough interwiki prefixes. The current page should also be included as a tab to maintain navigation in all directions. |
| {{#if: {{{tab2}}}
| | Tabs left blank are excluded. The first 2 tabs are required. |
| |<div style="width:5px; height:50px; border-bottom: 5px solid #8b0024; background: #ffffff; float:left;"></div>
| | If a title field is left blank, the associated tab (link) field will be included instead. |
| <div style="width:20%; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; float:left; text-align:center; padding-top:7px;
| | Β |
| {{#ifeq: {{{currenttab|}}} | 2
| | The implementation of this template was in part inspired by the Hollow Knight wiki's [https://hollowknight.fandom.com/wiki/Template:Navbar Template:Navbar]. |
| |border-bottom: 5px solid #ffffff; background: #ffffff;">
| | ===Example=== |
| {{#if: {{{tab2url}}}|{{{tab2url}}}|{{#if: {{{tab2text}}}|[[{{{tab2}}}|<span style="color:black;">'''{{{tab2text}}}''']]|[[{{{tab2}}}|<span style="color:black;">'''{{{tab2}}}''']]}}}}
| | <pre><nowiki>{{pagetabs |
| |background: #8b0024;"> | | |tab1Β Β = {{FULLPAGENAME}} |
| {{#if: {{{tab2url}}}|{{{tab2url}}}|{{#if: {{{tab2text}}}|[[{{{tab2}}}|<span style="color:white;">'''{{{tab2text}}}''']]|[[{{{tab2}}}|<span style="color:white;">'''{{{tab2}}}''']]}}}}
| | |title1Β = Pagetabs |
| }}
| | |tab2Β Β = dc:Announcements |
| </div>
| | |title2Β = Announcements |
| |}}
| | |tab3Β Β = Special:History/{{FULLPAGENAME}} |
| {{#if: {{{tab3}}}
| | |title3Β = History |
| |<div style="width:5px; height: 50px; border-bottom: 5px solid #8b0024; background: #ffffff; float:left;"></div>
| | |tab5 Β Β = Main Page |
| <div style="width:20%; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; float:left; text-align:center; padding-top:7px; | | }}</nowiki></pre> generates: {{pagetabs |
| {{#ifeq: {{{currenttab|}}} | 3
| | |tab1 Β Β = {{FULLPAGENAME}} |
| |border-bottom: 5px solid #ffffff; background: #ffffff;">
| | |title1 Β = Pagetabs |
| {{#if: {{{tab3url}}}|{{{tab3url}}}|{{#if: {{{tab3text}}}|[[{{{tab3}}}|<span style="color:black;">'''{{{tab3text}}}''']]|[[{{{tab3}}}|<span style="color:black;">'''{{{tab3}}}''']]}}}} | | |tab2 Β Β = dc:Announcements |
| |background: #8b0024;"> | | |title2 Β = Announcements |
| {{#if: {{{tab3url}}}|{{{tab3url}}}|{{#if: {{{tab3text}}}|[[{{{tab3}}}|<span style="color:white;">'''{{{tab3text}}}''']]|[[{{{tab3}}}|<span style="color:white;">'''{{{tab3}}}''']]}}}} | | |tab3 Β Β = Special:History/{{FULLPAGENAME}} |
| }}
| | |title3 Β = History |
| </div> | | |tab5 Β Β = Main Page |
| |}}
| |
| {{#if: {{{tab4}}}
| |
| |<div style="width:5px; height: 50px; border-bottom: 5px solid #8b0024; background: #ffffff; float:left;"></div>
| |
| <div style="width:20%; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; float:left; text-align:center; padding-top:7px;
| |
| {{#ifeq: {{{currenttab|}}} | 4
| |
| |border-bottom: 5px solid #ffffff; background: #ffffff;">
| |
| {{#if: {{{tab4url}}}|{{{tab4url}}}|{{#if: {{{tab4text}}}|[[{{{tab4}}}|<span style="color:black;">'''{{{tab4text}}}''']]|[[{{{tab4}}}|<span style="color:black;">'''{{{tab4}}}''']]}}}} | |
| |background: #8b0024;">
| |
| {{#if: {{{tab4url}}}|{{{tab4url}}}|{{#if: {{{tab4text}}}|[[{{{tab4}}}|<span style="color:white;">'''{{{tab4text}}}''']]|[[{{{tab4}}}|<span style="color:white;">'''{{{tab4}}}''']]}}}}
| |
| }}
| |
| </div> | |
| |}}
| |
| {{#if: {{{tab5}}}
| |
| |<div style="width:5px; height: 50px; border-bottom: 5px solid #8b0024; background: #ffffff; float:left;"></div>
| |
| <div style="width:20%; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; float:left; text-align:center; padding-top:7px;
| |
| {{#ifeq: {{{currenttab|}}} | 5
| |
| |border-bottom: 5px solid #ffffff; background: #ffffff;">
| |
| {{#if: {{{tab5url}}}|{{{tab5url}}}|{{#if: {{{tab5text}}}|[[{{{tab5}}}|<span style="color:black;">'''{{{tab5text}}}''']]|[[{{{tab5}}}|<span style="color:black;">'''{{{tab5}}}''']]}}}} | |
| |background: #8b0024;"> | |
| {{#if: {{{tab5url}}}|{{{tab5url}}}|{{#if: {{{tab5text}}}|[[{{{tab5}}}|<span style="color:white;">'''{{{tab5text}}}''']]|[[{{{tab5}}}|<span style="color:white;">'''{{{tab5}}}''']]}}}}
| |
| }}
| |
| </div> | |
| |}}
| |
| </div> | |
| {| class="phoneonly pagetabs"
| |
| | style="text-align: center; width: 290px; height: 50px; " |{{#if: {{{tab1}}}|{{#ifeq: {{{currenttab|}}} | 1 |{{#if: {{{tab1url}}}|{{{tab1url}}}|{{#if: {{{tab1text}}}|[[{{{tab1}}}|<span style="color:black;">'''{{{tab1text}}}''']]|[[{{{tab1}}}|<span style="color:black;">'''{{{tab1}}}''']]}}}}|{{#if: {{{tab1url}}}|{{{tab1url}}}|{{#if: {{{tab1text}}}|[[{{{tab1}}}|<span style="color:white;">'''{{{tab1text}}}''']]|[[{{{tab1}}}|<span style="color:white;">'''{{{tab1}}}''']]}}}}}}|}}
| |
| | style="text-align: center; width: 290px; height: 50px; " |{{#if: {{{tab2}}}|{{#ifeq: {{{currenttab|}}} | 2 |{{#if: {{{tab2url}}}|{{{tab2url}}}|{{#if: {{{tab2text}}}|[[{{{tab2}}}|<span style="color:black;">'''{{{tab2text}}}''']]|[[{{{tab2}}}|<span style="color:black;">'''{{{tab2}}}''']]}}}}|{{#if: {{{tab2url}}}|{{{tab2url}}}|{{#if: {{{tab2text}}}|[[{{{tab2}}}|<span style="color:white;">'''{{{tab2text}}}''']]|[[{{{tab2}}}|<span style="color:white;">'''{{{tab2}}}''']]}}}}}}|}}
| |
| | style="text-align: center; width: 290px; height: 50px; " |{{#if: {{{tab3}}}|{{#ifeq: {{{currenttab|}}} | 3 |{{#if: {{{tab3url}}}|{{{tab3url}}}|{{#if: {{{tab3text}}}|[[{{{tab3}}}|<span style="color:black;">'''{{{tab3text}}}''']]|[[{{{tab3}}}|<span style="color:black;">'''{{{tab3}}}''']]}}}}|{{#if: {{{tab3url}}}|{{{tab3url}}}|{{#if: {{{tab3text}}}|[[{{{tab3}}}|<span style="color:white;">'''{{{tab3text}}}''']]|[[{{{tab3}}}|<span style="color:white;">'''{{{tab3}}}''']]}}}}}}|}} | |
| | style="text-align: center; width: 290px; height: 50px; " |{{#if: {{{tab4}}}|{{#ifeq: {{{currenttab|}}} | 4 |{{#if: {{{tab4url}}}|{{{tab4url}}}|{{#if: {{{tab4text}}}|[[{{{tab4}}}|<span style="color:black;">'''{{{tab4text}}}''']]|[[{{{tab4}}}|<span style="color:black;">'''{{{tab4}}}''']]}}}}|{{#if: {{{tab4url}}}|{{{tab4url}}}|{{#if: {{{tab4text}}}|[[{{{tab4}}}|<span style="color:white;">'''{{{tab4text}}}''']]|[[{{{tab4}}}|<span style="color:white;">'''{{{tab4}}}''']]}}}}}}|}}
| |
| | style="text-align: center; width: 290px; height: 50px; " |{{#if: {{{tab5}}}|{{#ifeq: {{{currenttab|}}} | 5 |{{#if: {{{tab5url}}}|{{{tab5url}}}|{{#if: {{{tab5text}}}|[[{{{tab5}}}|<span style="color:black;">'''{{{tab5text}}}''']]|[[{{{tab5}}}|<span style="color:black;">'''{{{tab5}}}''']]}}}}|{{#if: {{{tab5url}}}|{{{tab5url}}}|{{#if: {{{tab5text}}}|[[{{{tab5}}}|<span style="color:white;">'''{{{tab5text}}}''']]|[[{{{tab5}}}|<span style="color:white;">'''{{{tab5}}}''']]}}}}}}|}} | |
| |
| |
| |}
| |
| </includeonly> | |
| <noinclude> | |
| {{pagetabs | |
| |tab1 Β Β Β = User:{{ROOTPAGENAME}} | |
| |tab1text Β = User Page | |
| |tab1urlΒ Β =
| |
| |tab2 Β Β Β = User:{{ROOTPAGENAME}}/Trophies | |
| |tab2text Β = Trophies | |
| |tab2urlΒ Β =
| |
| |tab3 Β Β Β = Special:Contributions/{{ROOTPAGENAME}} | |
| |tab3text Β = Contributions | |
| |tab3urlΒ Β =
| |
| |tab4Β Β Β =
| |
| |tab4textΒ =
| |
| |tab4urlΒ Β =
| |
| |tab5 Β Β Β = | |
| |tab5textΒ =
| |
| |tab5urlΒ Β =
| |
| |currenttab = 2
| |
| }} | | }} |
| | ===Template Data=== |
| | <templatedata> |
| | { |
| | "params": { |
| | "tab1": { |
| | "label": "Tab 1", |
| | "description": "Link to the target page of the first tab. May be a page name, interwiki-prefixed page name or a magic name variable.", |
| | "example": "Main_Page, {{FULLPAGENAME}}, dc:Announcements", |
| | "type": "wiki-page-name", |
| | "required": true, |
| | "suggested": true |
| | }, |
| | "title1": { |
| | "label": "Title 1", |
| | "description": "Title text of the first tab.", |
| | "example": "Main page", |
| | "type": "string", |
| | "suggested": true |
| | }, |
| | "tab2": { |
| | "label": "Tab 2", |
| | "description": "Link to the target page of the second tab. May be a page name, interwiki-prefixed page name or a magic name variable.", |
| | "example": "Main_Page, {{FULLPAGENAME}}, dc:Announcements", |
| | "type": "wiki-page-name", |
| | "required": true, |
| | "suggested": true |
| | }, |
| | "title2": { |
| | "label": "Title 2", |
| | "description": "Title text of the second tab.", |
| | "example": "Main page", |
| | "type": "string", |
| | "suggested": true |
| | }, |
| | "tab3": { |
| | "label": "Tab 3", |
| | "description": "Link to the target page of the third tab. May be a page name, interwiki-prefixed page name or a magic name variable.", |
| | "example": "Main_Page, {{FULLPAGENAME}}, dc:Announcements", |
| | "type": "wiki-page-name", |
| | "suggested": true |
| | }, |
| | "title3": { |
| | "label": "Title 3", |
| | "description": "Title text of the third tab.", |
| | "example": "Main page", |
| | "type": "string", |
| | "suggested": true |
| | }, |
| | "tab4": { |
| | "label": "Tab 4", |
| | "description": "Link to the target page of the fourth tab. May be a page name, interwiki-prefixed page name or a magic name variable.", |
| | "example": "Main_Page, {{FULLPAGENAME}}, dc:Announcements", |
| | "type": "wiki-page-name", |
| | "suggested": true |
| | }, |
| | "title4": { |
| | "label": "Title 4", |
| | "description": "Title text of the fourth tab.", |
| | "example": "Main page", |
| | "type": "string", |
| | "suggested": true |
| | }, |
| | "tab5": { |
| | "label": "Tab 5", |
| | "description": "Link to the target page of the fifth tab. May be a page name, interwiki-prefixed page name or a magic name variable.", |
| | "example": "Main_Page, {{FULLPAGENAME}}, dc:Announcements", |
| | "type": "wiki-page-name", |
| | "suggested": true |
| | }, |
| | "title5": { |
| | "label": "Title 5", |
| | "description": "Title text of the fifth tab.", |
| | "example": "Main page", |
| | "type": "string", |
| | "suggested": true |
| | }, |
| | "tab6": { |
| | "label": "Tab 6", |
| | "description": "Link to the target page of the sixth tab. May be a page name, interwiki-prefixed page name or a magic name variable.", |
| | "example": "Main_Page, {{FULLPAGENAME}}, dc:Announcements", |
| | "type": "wiki-page-name", |
| | "suggested": true |
| | }, |
| | "title6": { |
| | "label": "Title 6", |
| | "description": "Title text of the sixth tab.", |
| | "example": "Main page", |
| | "type": "string", |
| | "suggested": true |
| | } |
| | }, |
| | "description": "This template creates a row of at most 6 tabs with (internal) links, meant to ease navigation between related and sub-pages. External links may only be included trough interwiki prefixes. The current page should also be included as a tab to maintain navigation in all directions. Blank tabs are excluded.", |
| | "format": "block" |
| | } |
| | </templatedata> |
| | {{Interface template}} [[Category:Tabs]] |
| | </noinclude> |