Template:InfoboxGobbler: Difference between revisions

From Inkipedia, the Splatoon wiki
m (& I think this may be causing a spacing issue on pages, experimenting)
(add a parameter intend for choosing the initial infobox (doesn't work yet, requires changing JavaScript))
Line 1: Line 1:
<includeonly>
<includeonly>
<templatestyles src="InfoboxGobbler/styles.css" /><div style="display: none;" id="gobbler"></div><templatestyles src="Infobox/common.css" /><div class="infobox-gobbler">
<templatestyles src="InfoboxGobbler/styles.css" /><div style="display: none;" id="gobbler" data-initial="{{{initial|}}}"></div><templatestyles src="Infobox/common.css" /><div class="infobox-gobbler">
<div class="infobox-game-list">
<div class="infobox-game-list">
<div class="infobox-game S" title="Splatoon">[[File:Splatoon "S" icon.svg|24x24px|link=]]</div>
<div class="infobox-game S" title="Splatoon">[[File:Splatoon "S" icon.svg|24x24px|link=]]</div>
Line 12: Line 12:


If only one infobox is present, it will still be moved, but no tab strip will be generated since there are no other infoboxes to switch between.
If only one infobox is present, it will still be moved, but no tab strip will be generated since there are no other infoboxes to switch between.
=== Parameters ===
{|
|- style="vertical-align: top;"
|<code>initial</code>||Optional.||The 1-based index of the infobox to be shown initially, or <code>0</code> for the last infobox. By default the last infobox is shown.
|}
</noinclude>
</noinclude>

Revision as of 13:18, 20 September 2023

Moves all infoboxes on a page into a tabbed interface.

Ordinarily, multiple infoboxes are used when the data differs between games. Wherever this template is used on a page via {{InfoboxGobbler}}, the infoboxes will be combined into a single tab-controlled infobox.

The tabbed functionality requires JavaScript on the client. If JavaScript is not available, then the infoboxes will not be moved from their original locations on the page. For this reason, it's important to design pages with separate infobox in appropriate places before rolling them together with this template.

If only one infobox is present, it will still be moved, but no tab strip will be generated since there are no other infoboxes to switch between.

Parameters

initial Optional. The 1-based index of the infobox to be shown initially, or 0 for the last infobox. By default the last infobox is shown.