Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Character Tabs: Difference between revisions

Template page
m (remove hr since it's unneeded with the new css)
m (fix murakumo links)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly><div class="NOL-tabs-wrapper"><ul class="NOL-tabs"><li>[[{{{1}}}|Overview]]</li></ul>{{#subpages:
<ul class="NOL-tabs" style="margin:0px;">
|page={{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}
<li style="display:inline-block;">[[{{{1}}}|Main]]<span class="NOL-tabs-divider"> &middot; </span></li>
|format=ul
<li style="display:inline-block;">[[{{{1}}}/Gallery|Gallery]]<span class="NOL-tabs-divider"> &middot; </span></li>
|pathstyle=
<li style="display:inline-block;">[[{{{1}}}/Gameplay|Gameplay]]<span class="NOL-tabs-divider"> &middot; </span></li>
|showpage=no
<li style="display:inline-block;">[[{{{1}}}/Quotes|Quotes]]<span class="NOL-tabs-divider"> &middot; </span></li>
|element=div
</ul><!--
|class=NOL-tabs
|kidsonly=yes
|default=<span style="display:none;"></span>
}}</div><!--
--></includeonly><!--
--></includeonly><!--


Line 12: Line 15:
--><noinclude>
--><noinclude>
== Usage ==
== Usage ==
This template will not show links to pages that do not exist (i.e. are redlinked and carry the class "new" (<code>a.new</code>). <ref>This feature requires the following lines of css be added to any skin (i.e. to "Common.css" and "Mobile.css") that does not already include it (any skin other than the Cathedral skin):
<pre>
/* CUSTOM TABS */
ul.NOL-tabs {
margin:0px !important;
}
.NOL-tabs li {
display: inline-block;
}
/* float the bullet points to the left of each item */
.NOL-tabs-divider {
    float: left;
    margin: 0px 5px;
}
/* hide new links */
.NOL-tabs li a.new {
    display: none !important;
}
/* hide bullet points for new links */
.NOL-tabs li a.new ~ span.NOL-tabs-divider {
    display: none;
}
/* hide bullet points for the first listed item */
.NOL-tabs li:first-child a ~ span.NOL-tabs-divider {
display:none;
}</pre></ref>
{{Character Tabs|Kagura Mutsuki}}
<pre><nowiki>
<pre><nowiki>
On the character's page:
{{Character Tabs|character name}}
{{Character Tabs|character name}}
{{Character Tabs|Kagura Mutsuki}}


On a character's subpage:
or for pages with different display names:
{{Character Tabs|character name|subpage}}
{{Character Tabs|Λ-No.11-|Lambda-11}}
{{Character Tabs|Kagura Mutsuki|Gallery}}
</nowiki></pre>
</nowiki></pre>


This tab includes links to the following subpages:
== Testing ==
<pre>
1 Character {{Character Tabs|Λ-No.11-|Lambda-11}}
(Main)
2 Character {{Character Tabs|Bang Shishigami}}
Gallery
3 BBTAG {{Character Tabs|BlazBlue: Cross Tag Battle}}
Gameplay
4 No subpages {{Character Tabs|Template:Character Tabs}}
Quotes
5
</pre>
6
== Notes ==
Uses the [https://github.com/JeroenDeDauw/SubPageList/blob/master/doc/USAGE.md SubPageList] extension, which supposedly should work as intended. However, template parsing fails and showpage=yes might not be working as intended (instead of being appended to the list as a list item ("li" element), it is being appended as a separate paragraph ("p" element), which complicates styliing).
 
For now tabs will only show the list of subpages.


== Notes ==
{{#tag:references}}
{{#tag:references}}


</noinclude>
</noinclude>

Latest revision as of 23:39, 18 March 2018

Usage

{{Character Tabs|character name}}

or for pages with different display names:
{{Character Tabs|Λ-No.11-|Lambda-11}}

Testing

1 Character

2 Character

3 BBTAG

4 No subpages

5 6

Notes

Uses the SubPageList extension, which supposedly should work as intended. However, template parsing fails and showpage=yes might not be working as intended (instead of being appended to the list as a list item ("li" element), it is being appended as a separate paragraph ("p" element), which complicates styliing).

For now tabs will only show the list of subpages.