Go to file
auburnsummer e54a313de4
fix: run script after document is ready (#25)
* Wait until document ready before main

* More robust ready state handling

Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
2022-05-31 03:21:17 -04:00
.github build(deps): bump tj-actions/changed-files from 20 to 21 (#24) 2022-05-26 13:50:20 -04:00
.phan ci: set up composer 2021-06-21 19:55:06 -04:00
bin ci: set up composer 2021-06-21 19:55:06 -04:00
i18n feat: update French translation (#23) 2022-05-18 14:30:04 -04:00
includes feat: improve loading behavior before module is added 2022-05-06 17:53:52 -04:00
modules fix: run script after document is ready (#25) 2022-05-31 03:21:17 -04:00
.eslintignore ci: setup ESlint and Stylelint 2021-06-21 14:35:54 -04:00
.eslintrc.json ci: re-enable Wikimedia ES5 Eslint config 2022-04-22 20:00:03 -04:00
.gitignore ci: setup ESlint and Stylelint 2021-06-21 14:35:54 -04:00
.phpcs.xml feat: initial refactor into TabberNeue 2021-06-21 13:49:47 -04:00
.stylelintrc.json ci: setup ESlint and Stylelint 2021-06-21 14:35:54 -04:00
CODE_OF_CONDUCT.md ci: set up composer 2021-06-21 19:55:06 -04:00
composer.json build(deps-dev): update php-parallel-lint/php-console-highlighter requirement (#18) 2022-05-13 18:03:08 -04:00
extension.json build: bump to 1.6.0 2022-05-06 17:56:08 -04:00
LICENSE Add license and update author field. 2015-03-10 16:01:41 -05:00
package-lock.json build(deps-dev): bump eslint-config-wikimedia from 0.20.0 to 0.22.1 (#21) 2022-05-13 18:03:00 -04:00
package.json build(deps-dev): bump eslint-config-wikimedia from 0.20.0 to 0.22.1 (#21) 2022-05-13 18:03:00 -04:00
README.md docs: update usage documentation 2022-04-19 11:40:11 -04:00

TabberNeue

The TabberNeue extension allows wikis to create tabs within a page. It is a forked and rewritten version of Extension:Tabber. It includes multiple improvements such as page transclusion, responsive layout support, ARIA support, and conform to Wikimedia UI. TabberNeue is a complete replacement of Tabber, please disable or remove Tabber before enabling TabberNeue.

Extension:TabberNeue on MediaWiki.

Requirements

Installation

You can get the extension via Git (specifying TabberNeue as the destination directory):

git clone https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git TabberNeue

Or download it as zip archive.

In either case, the "TabberNeue" extension should end up in the "extensions" directory of your MediaWiki installation. If you got the zip archive, you will need to put it into a directory called TabberNeue.

Usage

TabberNeue uses the exact same syntax as Tabber.

Simple tabbers

Tabs are created with tabName=tabBody, and separated by |-|. You can use any wikitext within your tabs, including templates and images.

<tabber>
|-|First Tab Title=
First tab content goes here.
|-|Second Tab Title=
Second tab content goes here.
|-|Third Tab Title=
Third tab content goes here.
</tabber>

Nested tabbers

Nested tabbers need to be written as parser functions. Instead of the <tabber/> tags, they are wrapped with {{#tag:tabber|}} and separated by {{!}}-{{!}}. It is useful when creating nested tabber.

<tabber>
|-|First Tab Title=
{{#tag:tabber|
Tab Title A=
Tab content A goes here.
{{!}}-{{!}}
Tab Title B=
Tab content B goes here.
{{!}}-{{!}}
Tab Title C=
Tab content C goes here.
}}
|-|Second Tab Title=
{{#tag:tabber|
Tab Title D=
Tab content D goes here.
{{!}}-{{!}}
Tab Title E=
Tab content E goes here.
{{!}}-{{!}}
Tab Title F=
Tab content F goes here.
}}
|-|Third Tab Title=
{{#tag:tabber|
Tab Title G=
Tab content G goes here.
{{!}}-{{!}}
Tab Title H=
Tab content H goes here.
{{!}}-{{!}}
Tab Title I=
Tab content I goes here.
}}
</tabber>

Transclusion

With the transclusion mode, the syntax is different, and it's more similar to <gallery> syntax.

The contents of the page of the first tab will be transcluded. Other tabs will be transcluded on-demand with AJAX, performing a request to the MediaWiki api. Once requested, they won't be fetched again until the page is reloaded. Note that Tabbers on the transcluded page will not be rendered.

Tabs are created with pageName|tabName, and separated by a new line.

<tabbertransclude>
First Page Name|First Tab Title
Second Page Name|Second Tab Title
Third Page Name|Third Tab Title
</tabbertransclude>