From Dark and Darker Wiki

(moved tabs to top part of infobox)
(WIP directing to infobox)
Tag: Reverted
Line 22: Line 22:
{{#if:{{{content7|}}}|<div data-cardtabs-btn="7" class="cardtabs__button  rarity6 {{#ifeq:{{{firstShownTier|}}}|7|cardtabs__button--active|}} <!--
{{#if:{{{content7|}}}|<div data-cardtabs-btn="7" class="cardtabs__button  rarity6 {{#ifeq:{{{firstShownTier|}}}|7|cardtabs__button--active|}} <!--
-->">&nbsp;VII&nbsp;</div>}}
-->">&nbsp;VII&nbsp;</div>}}
{{#if:{{{content8|}}}|<div data-cardtabs-btn="8" class="cardtabs__button  rarity7 {{#ifeq:{{{firstShownTier|}}}|8|cardtabs__button--active|}} <!--
{{#if:{{{content8|}}}|<a href="#infobox-8" data-cardtabs-btn="8" class="cardtabs__button  rarity7 {{#ifeq:{{{firstShownTier|}}}|8|cardtabs__button--active|}} <!--
-->">&nbsp;VIII&nbsp;</div>}}
-->">&nbsp;VIII&nbsp;</a>}}
{{#if:{{{contentRS|}}}|<div data-cardtabs-btn="RS" class="cardtabs__button  rarity5 {{#ifeq:{{{firstShownTier|}}}|RS|cardtabs__button--active|}} <!--
{{#if:{{{contentRS|}}}|<div data-cardtabs-btn="RS" class="cardtabs__button  rarity5 {{#ifeq:{{{firstShownTier|}}}|RS|cardtabs__button--active|}} <!--
-->">&nbsp;RS&nbsp;</div>}}
-->">&nbsp;RS&nbsp;</div>}}

Revision as of 23:33, 19 February 2023

Creates a set of tabs for items. Use it with infoboxes

Notes

The firstShownTier option is mandatory. Leaving it out will prevent anything from being shown.

  • Make sure to add nomargin for infoboxes

Example

Code Preview
{{Tabs
|firstShownTier=1
|content1 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 0
	|stat1                = Armor Rating 60
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|content2 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 1
	|stat1                = Armor Rating 61~64
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|content3 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 2
	|stat1                = Armor Rating 65~76
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|content4 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 3
	|stat1                = Armor Rating 77~88
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|enchantments         = 1
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|content5 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 4
	|stat1                = Armor Rating 89~97
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|enchantments         = 2
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|content6 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 5
	|stat1                = Armor Rating 97~105
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|enchantments         = 3
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|content7 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 6
	|stat1                = Armor Rating 105~110
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|enchantments         = 4
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|content8 = 
	{{Infobox
	|name                 = Fine Cuirass
	|classes              = [[Fighter]]
	|rarity               = 7
	|stat1                = Armor Rating 110~115
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|enchantments         = 5
	|slottype             = Chest
	|armortype            = Metal
	|description          = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
    |nomargin             = 1
	}}
|contentRS = 
	{{Infobox
	|name                 = Fine Cuirass
	|image                = Rubysilver Fine Cuirass
	|classes              = [[Fighter]], [[Cleric]]
	|rarity               = 5
	|stat1                = Armor Rating 97~105
	|stat2                = Move Speed -35
	|stat3                = Projectile Reduction 12%
	|stat4                = Magic Resistance -10
	|enchantments         = 3
	|slottype             = Chest
	|armortype            = Metal
	|description          = A high-quality cuirass made with a large amount of Rubysilver ingots. It has considerable durability.
    |nomargin             = 1
	}}
}} 
As you can see there is no Cobalt Tab
 I 
 II 
 III 
 IV 
 V 
 VI 
 VII 

<a href="#infobox-8" data-cardtabs-btn="8" class="cardtabs__button rarity7 "> VIII </a>

 RS 
Fine Cuirass.png
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Fine Cuirass.png
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Fine Cuirass.png
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Fine Cuirass.png
-
Up to 1 extra enchantments
-
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Fine Cuirass.png
-
Up to 2 extra enchantments
-
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Fine Cuirass.png
-
Up to 3 extra enchantments
-
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Fine Cuirass.png
-
Up to 4 extra enchantments
-
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Fine Cuirass.png
-
Up to 5 extra enchantments
-
Required Class:
Armor Type:
Metal
Slot Type:
Chest
This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy.
Rubysilver Fine Cuirass.png
-
Up to 3 extra enchantments
-
Required Class:
Armor Type:
Metal
Slot Type:
Chest
A high-quality cuirass made with a large amount of Rubysilver ingots. It has considerable durability.


All Options

The full list of options are listed below. Please don't leave anything blank though, else the previous tier's values won't get used (ie., only include options if you use them).


{{Tabs
|firstShownTier   =1
|content1         = 
|content2         = 
|content3         = 
|content4         = 
|content5         = 
|content6         = 
|content7         = 
|content8         = 
|contentRS        =
|contentCB        = 
}}

No description.

Template parameters

ParameterDescriptionTypeStatus
First Shown TierfirstShownTier

Either 1, 2, 3,....7,8,RS,CB. Should always be 1, unless a lower tier is disabled. CB is for Cobalt, RS is for Rubysilver

Example
1
Auto value
1
Stringrequired
Content 1content1

Content of Junk rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
Content 2content2

Content of Poor rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
Content 3content3

Content of Common rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
Content 4content4

Content of Uncommon rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
Content 5content5

Content of Rare rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
Content 6content6

Content of Epic rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
Content 7content7

Content of Legendary rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
Content 8content8

Content of Unique rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
ContentRS contentRS

Content for Rubysilver rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested
ContentCBcontentCB

Content for Cobalt rarity, usually an infobox

Example
{{Infobox|name=Arming Sword}}
Stringsuggested