|
|
| (42 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| <div style="width:100%; height: 50px; border-bottom: 5px solid #8b0024;"> | | <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 style="width:290px; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; background: #8b0024; float:left; text-align:center; padding-top:7px;"> | | --><div>[[{{{tab1|}}}|{{{title1|{{{tab1|}}}}}}]]</div><!-- |
| [[User:{{ROOTPAGENAME}}|<span style="color:white;">'''User Page''']] | | --><div>[[{{{tab2|}}}|{{{title2|{{{tab2|}}}}}}]]</div><!-- |
| </div> | | -->{{#if:{{{tab3|}}}|<div>[[{{{tab3|}}}|{{{title3|{{{tab3|}}}}}}]]</div>}}<!-- |
| <div style="width:15px; height:50px; border-bottom: 5px solid #8b0024; background: #ffffff; float:left;"></div>
| | -->{{#if:{{{tab4|}}}|<div>[[{{{tab4|}}}|{{{title4|{{{tab4|}}}}}}]]</div>}}<!-- |
| <div style="width:290px; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; border-bottom: 5px solid #ffffff; background: #ffffff; float:left; text-align:center; padding-top:7px;"> | | -->{{#if:{{{tab5|}}}|<div>[[{{{tab5|}}}|{{{title5|{{{tab5|}}}}}}]]</div>}}<!-- |
| [[User:{{ROOTPAGENAME}}/Trophies|<span style="color:black;">'''Trophies''']] | | -->{{#if:{{{tab6|}}}|<div>[[{{{tab6|}}}|{{{title6|{{{tab6|}}}}}}]]</div>}}<!-- |
| </div> | | --></div> |
| <div style="width:15px; height: 50px; border-bottom: 5px solid #8b0024; background: #ffffff; float:left;"></div>
| | <hr /> |
| <div style="width:290px; height: 50px; border-style:solid; border-color: #8b0024; border-width: 5px; background: #8b0024; float:left; text-align:center; padding-top:7px;"> | | <!-- moved to Template:Tab Userpage <div class="pagetabsmore">{{Pagetabs/pagetabsmore|username=|style=position:absolute; bottom:24px;}}</div> --></includeonly><noinclude> {{documentation2}} |
| [[Special:Contributions/{{ROOTPAGENAME}}|<span style="color:white;">'''Contributions''']]
| | This template was originally created for use on user pages. |
| </div> | |
| </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. |
| | Tabs left blank are excluded. The first 2 tabs are required. |
| | If a title field is left blank, the associated tab (link) field will be included instead. |
|
| |
|
| | | The implementation of this template was in part inspired by the Hollow Knight wiki's [https://hollowknight.fandom.com/wiki/Template:Navbar Template:Navbar]. |
| {| class="tabs32" | | ===Example=== |
| | style="text-align: center; width: 290px; height: 50px; " |[[User:{{ROOTPAGENAME}}|<span style="color:white;">'''User Page''']] | | <pre><nowiki>{{pagetabs |
| | style="text-align: center; width: 290px; height: 50px; " |[[User:{{ROOTPAGENAME}}/Trophies|<span style="color:black;">'''Trophies''']]
| | |tab1 = {{FULLPAGENAME}} |
| | style="text-align: center; width: 290px; height: 50px; " |[[Special:Contributions/{{ROOTPAGENAME}}|<span style="color:white;">'''Contributions''']]
| | |title1 = Pagetabs |
| | style="text-align: center; width: 290px; height: 50px; " |
| | |tab2 = dc:Announcements |
| |
| | |title2 = Announcements |
| |}
| | |tab3 = Special:History/{{FULLPAGENAME}} |
| | |title3 = History |
| | |tab5 = Main Page |
| | }}</nowiki></pre> generates: {{pagetabs |
| | |tab1 = {{FULLPAGENAME}} |
| | |title1 = Pagetabs |
| | |tab2 = dc:Announcements |
| | |title2 = Announcements |
| | |tab3 = Special:History/{{FULLPAGENAME}} |
| | |title3 = History |
| | |tab5 = Main Page |
| | }} |
| | ===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> |