Community Central
Community Central
m (Undo revision 2359636 by DerpTheMerp (wall) That looks unnecessary for the example)
Tag: Help
(→‎Styling: Adding styling information for FD)
Tag: Help
(44 intermediate revisions by 29 users not shown)
Line 1: Line 1:
  +
{{Extension infobox
[[File:Tabber.png|right||250px|thumb|Tabber, used to display character types]]
 
  +
| name = Tabber
{{Enabled by default}} __NOTOC__
 
  +
| image = Tabber.png
 
 
| caption = A tabber used to display character types
  +
| version = 2.4.5
  +
| author =
  +
* Eric Fortin
  +
* Alexia E. Smith
  +
| link = [[mw:Extension:Tabber|MediaWiki.org]]
  +
| desc = {{int:tabber-desc}}
  +
| default = yes
  +
}}
  +
__NOTOC__
 
'''Tabber''' allows you to add multiple tabs to a section of content, which can be toggled without having to reload the page.
 
'''Tabber''' allows you to add multiple tabs to a section of content, which can be toggled without having to reload the page.
   
 
== Step-by-step ==
 
== Step-by-step ==
* Open an article for editing and switch to Source mode.
+
* Open an article for editing and switch to source editor.
 
* Copy and paste the following code into your editor.
 
* Copy and paste the following code into your editor.
  +
 
<pre style="margin: 20px;">
 
<pre style="margin: 20px;">
 
<tabber>
<tabber>First Tab Title=First tab sample text.
 
|-|Second Tab Title=Second tab content goes here.
+
|-|First Tab Title=
 
First tab sample text.
|-|Third Tab Title=Third tab content goes here.
 
  +
|-|Second Tab Title=
  +
Second tab content goes here.
  +
|-|Third Tab Title=
 
Third tab content goes here.
 
</tabber>
 
</tabber>
 
</pre>
 
</pre>
* Click "Preview". You'll see that the code produced these tabs:
+
* Click "Preview" to see that the code produced these tabs:
  +
<div style="margin: 20px;">
+
<div style="margin: 20px;"><tabber>
<tabber>First Tab Title=First tab sample text.
 
|-|Second Tab Title=Second tab content goes here.
+
|-|First Tab Title=
 
First tab sample text.
|-|Third Tab Title=Third tab content goes here.
 
  +
|-|Second Tab Title=
</tabber>
 
  +
Second tab content goes here.
</div>
 
  +
|-|Third Tab Title=
 
Third tab content goes here.
  +
</tabber></div>
  +
 
* Click "Back" to return to editing.
 
* Click "Back" to return to editing.
* Edit your tabs by replacing the text of the titles and content with your community's content. '''For example''', replace with "First Tab Title" with "Characters," and replace the sample text with descriptions and images of your favorite characters. You can also change the number of tabs by adding or removing code.
+
* Edit your tabs by replacing the text of the titles and content with your community's content. '''For example''', replace "First Tab Title" with "Characters," and replace the sample text with descriptions and images of your favorite characters. You can also change the number of tabs by adding or removing code.
  +
  +
==Complex Tabbers==
  +
It is possible to create Tabbers with two sections, using two lines of text: <nowiki>{{#tag:tabber</nowiki> and <nowiki>{{!}}-{{!}}</nowiki>. <nowiki>{{!}}-{{!}}</nowiki> acts as a break for the original tag; creating the second, third et cetera tabbers. The tag itself is a new Tabber, functioning exactly like the Tabber shown above this section.
  +
  +
===Example===
  +
<tabber>
  +
|-|Tabber One=
  +
{{#tag:tabber|1=
  +
Content one
  +
  +
{{!}}-{{!}}
  +
2=
  +
Content two
  +
  +
{{!}}-{{!}}
  +
3=
  +
Et cetera.
  +
  +
}}
  +
|-|Tabber Two=
  +
{{#tag:tabber|4=
  +
Content `
  +
  +
{{!}}-{{!}}
  +
5=
  +
Content 2
  +
  +
{{!}}-{{!}}
  +
6=
  +
Content 3
  +
  +
}}
  +
</tabber>
  +
Unlike normal Tabbers, these must be closed with }} at the end, for each Tab!
  +
  +
Code:
  +
<pre><tabber>
  +
|-|Tabber One=
  +
{{#tag:tabber|1=
  +
Content one
  +
  +
{{!}}-{{!}}
  +
2=
  +
Content two
  +
  +
{{!}}-{{!}}
  +
3=
  +
Et cetera.
  +
  +
}}
  +
|-|Tabber Two=
  +
{{#tag:tabber|4=
  +
Content `
  +
  +
{{!}}-{{!}}
  +
5=
  +
Content 2
  +
  +
{{!}}-{{!}}
  +
6=
  +
Content 3
  +
  +
}}
  +
</tabber></pre>
   
 
== Usage information ==
 
== Usage information ==
Line 28: Line 111:
   
 
== Styling ==
 
== Styling ==
  +
===For Oasis===
 
<syntaxhighlight lang="css">
 
<syntaxhighlight lang="css">
 
.tabberlive {
 
.tabberlive {
Line 52: Line 136:
 
.tabberlive > .tabbernav > li.tabberactive > a:active {
 
.tabberlive > .tabbernav > li.tabberactive > a:active {
 
/* selected tabber tab when being clicked */
 
/* selected tabber tab when being clicked */
  +
}
  +
</syntaxhighlight>
  +
  +
===For FandomDesktop===
  +
<syntaxhighlight lang="css">
  +
.wds-tabber {
  +
/* tabber wrapper style */
  +
}
  +
.wds-tabber > .wds-tab__content.wds-is-current {
  +
/* tabber visible content */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab {
  +
/* tabber tabs */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab > .wds-tabs__tab-label {
  +
/* tabber tab labels */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab:hover {
  +
/* tabber tabs when being hovered */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab > .wds-tabs__tab-label:hover {
  +
/* tabber tab labels when being hovered */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab:active {
  +
/* tabber tabs when being clicked */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab > .wds-tabs__tab-label:active {
  +
/* tabber tab labels when being clicked */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab.wds-is-current {
  +
/* selected tabber tab */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab.wds-is-current:hover {
  +
/* selected tabber tab when being hovered */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab.wds-is-current:active {
  +
/* selected tabber tab when being clicked */
  +
}
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs__arrow-right,
  +
.wds-tabber > .wds-tabs__wrapper > .wds-tabs__arrow-left {
  +
/* tabber arrows */
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 57: Line 182:
 
== Issues ==
 
== Issues ==
 
=== Broken mobile experience ===
 
=== Broken mobile experience ===
A lot of the CSS and JavaScript that runs on your desktop/laptop ''cannot'' on a mobile device. To counter this, FANDOM has removed most of that code from the mobile skin - including the stuff that makes Tabber possible. As a result, mobile users won't see any of the visual cues that separate each set of information.
+
A lot of the CSS and JavaScript that runs on your desktop/laptop ''cannot'' be applied on a mobile device. To counter this, Fandom has removed most of that code from the mobile skin - including the stuff that makes Tabber possible. As a result, mobile users won't see any of the visual cues that separate each set of information (The contents of the tabs will appear, just not separated into tabs).
   
 
There are problems with additional CSS and HTML hacks used as workarounds, which no amount of user-facing coding can solve. Therefore, that's a lot of effort for very little gain; you might as well use ordinary sections instead.
 
There are problems with additional CSS and HTML hacks used as workarounds, which no amount of user-facing coding can solve. Therefore, that's a lot of effort for very little gain; you might as well use ordinary sections instead.
   
 
=== View/Edit tab content ===
 
=== View/Edit tab content ===
Tabber does not provide a simple way to view/edit the original page. This can be troublesome for inexperienced users that want to edit the content inside a tab. Additionally, people who use the [[Help:VisualEditor|VisualEditor]] will be unable to edit it without switching to [[Help:Source edit mode|source mode]].
+
Tabber does not provide a simple way to edit individual sections. This can be troublesome for inexperienced users that want to edit the content inside a tab. Additionally, people who use the [[Help:VisualEditor|VisualEditor]] will be unable to edit it without switching to [[Help:Source editor|source editor]].
  +
  +
=== Infoboxes ===
  +
Tabber does not always display properly when put within an [[Help:Infoboxes|infobox]]. To counter this, a [[Help:Galleries, Slideshows, and Sliders/wikitext|gallery]] may be used within an infobox to provide the same effect as the Tabber. When using Fandom standard portable infoboxes, a gallery can be passed directly to an image field to create tabbed images. For tabbing other content, infobox panels can be used. For more information, see [[Help:Infoboxes]].
   
 
== See also ==
 
== See also ==
  +
* [{{fullurl:Special:TagsReport|target=tabber}} Tags report], a list of pages containing a tag &lt;tabber&gt;
 
* [[mw:Extension:Tabber|Extension:Tabber]] at MediaWiki.org
 
* [[mw:Extension:Tabber|Extension:Tabber]] at MediaWiki.org
 
* [[Help:Tab view]]
 
* [[Help:Tab view]]
Line 71: Line 200:
   
 
== Further help and feedback ==
 
== Further help and feedback ==
{{Help and feedback section}}
+
{{Help and feedback section}}[[de:Hilfe:Tabber]]
 
[[de:Hilfe:Tabber]]
 
 
[[es:Ayuda:Tabber]]
 
[[es:Ayuda:Tabber]]
 
[[fi:Ohje:Välilehdet]]
 
[[fi:Ohje:Välilehdet]]
Line 83: Line 210:
 
[[pt:Ajuda:Tabber]]
 
[[pt:Ajuda:Tabber]]
 
[[ru:Справка:Табуляция]]
 
[[ru:Справка:Табуляция]]
  +
[[tr:Yardım:Sekmeci]]
 
[[uk:Довідка:Табуляція]]
 
[[uk:Довідка:Табуляція]]
 
[[vi:Trợ giúp:Tabber]]
 
[[vi:Trợ giúp:Tabber]]

Revision as of 10:29, 17 July 2021

Tabber allows you to add multiple tabs to a section of content, which can be toggled without having to reload the page.

Step-by-step

  • Open an article for editing and switch to source editor.
  • Copy and paste the following code into your editor.
<tabber>
|-|First Tab Title=
First tab sample text.
|-|Second Tab Title=
Second tab content goes here. 
|-|Third Tab Title=
Third tab content goes here.
</tabber>
  • Click "Preview" to see that the code produced these tabs:

First tab sample text.

Second tab content goes here.

Third tab content goes here.

  • Click "Back" to return to editing.
  • Edit your tabs by replacing the text of the titles and content with your community's content. For example, replace "First Tab Title" with "Characters," and replace the sample text with descriptions and images of your favorite characters. You can also change the number of tabs by adding or removing code.

Complex Tabbers

It is possible to create Tabbers with two sections, using two lines of text: {{#tag:tabber and {{!}}-{{!}}. {{!}}-{{!}} acts as a break for the original tag; creating the second, third et cetera tabbers. The tag itself is a new Tabber, functioning exactly like the Tabber shown above this section.

Example

Content one

Content two

Et cetera.

Content `

Content 2

Content 3

Unlike normal Tabbers, these must be closed with }} at the end, for each Tab!

Code:

<tabber>
|-|Tabber One= 
{{#tag:tabber|1=
Content one

{{!}}-{{!}}
2=
Content two

{{!}}-{{!}}
3=
Et cetera.

}}
|-|Tabber Two=
{{#tag:tabber|4=
Content `

{{!}}-{{!}}
5=
Content 2

{{!}}-{{!}}
6=
Content 3

}}
</tabber>

Usage information

  • Formatting: Keep in mind that the title should always end with an equal sign ("="), and the tab separator ("|-|") must always appear between tabs.
  • Wikitext: You can use any wikitext within your tabs, including templates and images.

Styling

For Oasis

.tabberlive {
    /* tabber wrapper style */
}
.tabberlive > .tabbertab:not(.tabbertabhide) {
    /* tabber visible content */
}
.tabberlive > .tabbernav > li > a {
    /* tabber tabs */
}
.tabberlive > .tabbernav > li > a:hover {
    /* tabber tabs when being hovered */
}
.tabberlive > .tabbernav > li > a:active {
    /* tabber tabs when being clicked */
}
.tabberlive > .tabbernav > li.tabberactive > a {
    /* selected tabber tab */
}
.tabberlive > .tabbernav > li.tabberactive > a:hover {
    /* selected tabber tab when being hovered */
}
.tabberlive > .tabbernav > li.tabberactive > a:active {
    /* selected tabber tab when being clicked */
}

For FandomDesktop

.wds-tabber {
    /* tabber wrapper style */
}
.wds-tabber > .wds-tab__content.wds-is-current {
    /* tabber visible content */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab {
    /* tabber tabs */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab > .wds-tabs__tab-label {
    /* tabber tab labels */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab:hover {
    /* tabber tabs when being hovered */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab > .wds-tabs__tab-label:hover {
    /* tabber tab labels when being hovered */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab:active {
    /* tabber tabs when being clicked */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab > .wds-tabs__tab-label:active {
    /* tabber tab labels when being clicked */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab.wds-is-current {
    /* selected tabber tab */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab.wds-is-current:hover {
    /* selected tabber tab when being hovered */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs > .wds-tabs__tab.wds-is-current:active {
    /* selected tabber tab when being clicked */
}
.wds-tabber > .wds-tabs__wrapper > .wds-tabs__arrow-right,
.wds-tabber > .wds-tabs__wrapper > .wds-tabs__arrow-left {
    /* tabber arrows */
}

Issues

Broken mobile experience

A lot of the CSS and JavaScript that runs on your desktop/laptop cannot be applied on a mobile device. To counter this, Fandom has removed most of that code from the mobile skin - including the stuff that makes Tabber possible. As a result, mobile users won't see any of the visual cues that separate each set of information (The contents of the tabs will appear, just not separated into tabs).

There are problems with additional CSS and HTML hacks used as workarounds, which no amount of user-facing coding can solve. Therefore, that's a lot of effort for very little gain; you might as well use ordinary sections instead.

View/Edit tab content

Tabber does not provide a simple way to edit individual sections. This can be troublesome for inexperienced users that want to edit the content inside a tab. Additionally, people who use the VisualEditor will be unable to edit it without switching to source editor.

Infoboxes

Tabber does not always display properly when put within an infobox. To counter this, a gallery may be used within an infobox to provide the same effect as the Tabber. When using Fandom standard portable infoboxes, a gallery can be passed directly to an image field to create tabbed images. For tabbing other content, infobox panels can be used. For more information, see Help:Infoboxes.

See also

Further help and feedback