From Dark and Darker Wiki
(css adjustments) |
(Removed options for Rubysilver and Cobalt content windows as they are a subset of the rarity content tabs. Changed Whitespace format to be python-esque.) |
||
Line 2: | Line 2: | ||
--><div class="cardtabs" data-cardtabs> | --><div class="cardtabs" data-cardtabs> | ||
<!-- | <!-- | ||
Explanation: | |||
* `cardtabs__button--active` = Aplied to the sole initially visible button, usually tier1. Only used once | * `cardtabs__button--active` = Aplied to the sole initially visible button, usually tier1. Only used once | ||
* `cardtabs__button--disabled` = Applied to any disabled tiers. Most of the time this won't be used | * `cardtabs__button--disabled` = Applied to any disabled tiers. Most of the time this won't be used | ||
* Also, data-cardtabs-btn is -1 if that tier is disabled | * Also, data-cardtabs-btn is -1 if that tier is disabled | ||
--> | --><div class="cardtabs__buttons" data-cardtabs-btns><!-- | ||
-->{{#if:{{{content1|}}}<!-- | |||
{{#if:{{{content1|}}}|<div data-cardtabs-btn="1" class="cardtabs__button rarity0 {{#ifeq:{{{firstShownTier|}}}|1|cardtabs__button--active|}} | -->|<div data-cardtabs-btn="1" class="cardtabs__button rarity0 {{#ifeq:{{{firstShownTier|}}}|1|cardtabs__button--active|}}"> | ||
I </div>}}<!-- | |||
{{#if:{{{content2|}}}|<div data-cardtabs-btn="2" class="cardtabs__button rarity1 {{#ifeq:{{{firstShownTier|}}}|2|cardtabs__button--active|}} <!-- | -->{{#if:{{{content2|}}}<!-- | ||
-->|<div data-cardtabs-btn="2" class="cardtabs__button rarity1 {{#ifeq:{{{firstShownTier|}}}|2|cardtabs__button--active|}}"><!-- | |||
{{#if:{{{content3|}}}|<div data-cardtabs-btn="3" class="cardtabs__button rarity2 {{#ifeq:{{{firstShownTier|}}}|3|cardtabs__button--active|}} <!-- | --> II </div>}}<!-- | ||
-->{{#if:{{{content3|}}}<!-- | |||
{{#if:{{{content4|}}}|<div data-cardtabs-btn="4" class="cardtabs__button rarity3 {{#ifeq:{{{firstShownTier|}}}|4|cardtabs__button--active|}} <!-- | -->|<div data-cardtabs-btn="3" class="cardtabs__button rarity2 {{#ifeq:{{{firstShownTier|}}}|3|cardtabs__button--active|}}"><!-- | ||
--> III </div>}}<!-- | |||
{{#if:{{{content5|}}}|<div data-cardtabs-btn="5" class="cardtabs__button rarity4 {{#ifeq:{{{firstShownTier|}}}|5|cardtabs__button--active|}} <!-- | -->{{#if:{{{content4|}}}<!-- | ||
-->|<div data-cardtabs-btn="4" class="cardtabs__button rarity3 {{#ifeq:{{{firstShownTier|}}}|4|cardtabs__button--active|}}"><!-- | |||
{{#if:{{{content6|}}}|<div data-cardtabs-btn="6" class="cardtabs__button rarity5 {{#ifeq:{{{firstShownTier|}}}|6|cardtabs__button--active|}} <!-- | --> IV </div>}}<!-- | ||
-->{{#if:{{{content5|}}}<!-- | |||
{{#if:{{{content7|}}}|<div data-cardtabs-btn="7" class="cardtabs__button rarity6 {{#ifeq:{{{firstShownTier|}}}|7|cardtabs__button--active|}} <!-- | -->|<div data-cardtabs-btn="5" class="cardtabs__button rarity4 {{#ifeq:{{{firstShownTier|}}}|5|cardtabs__button--active|}}"><!-- | ||
--> V </div>}}<!-- | |||
{{#if:{{{content8|}}}|<div data-cardtabs-btn="8" class="cardtabs__button rarity7 {{#ifeq:{{{firstShownTier|}}}|8|cardtabs__button--active|}} <!-- | -->{{#if:{{{content6|}}}<!-- | ||
-->|<div data-cardtabs-btn="6" class="cardtabs__button rarity5 {{#ifeq:{{{firstShownTier|}}}|6|cardtabs__button--active|}}"><!-- | |||
--> VI </div>}}<!-- | |||
--> | -->{{#if:{{{content7|}}}<!-- | ||
-->|<div data-cardtabs-btn="7" class="cardtabs__button rarity6 {{#ifeq:{{{firstShownTier|}}}|7|cardtabs__button--active|}}"><!-- | |||
--> VII </div>}}<!-- | |||
-->{{#if:{{{content8|}}}<!-- | |||
--> | -->|<div data-cardtabs-btn="8" class="cardtabs__button rarity7 {{#ifeq:{{{firstShownTier|}}}|8|cardtabs__button--active|}}"><!-- | ||
--> VIII </div>}}<!-- | |||
-->{{#if:{{{contentCommon|}}}<!-- | |||
{{#if:{{{contentNightmare|}}}|<div data-cardtabs-btn="Nightmare | -->|<div data-cardtabs-btn="Common" class="cardtabs__button rarity2 {{#ifeq:{{{firstShownTier|}}}|Common|cardtabs__button--active|}}"><!-- | ||
--> Common </div>}}<!-- | |||
-->{{#if:{{{contentElite|}}}<!-- | |||
-->|<div data-cardtabs-btn="Elite" class="cardtabs__button rarityElite {{#ifeq:{{{firstShownTier|}}}|Elite|cardtabs__button--active|}}"><!-- | |||
--> Elite </div>}}<!-- | |||
-->{{#if:{{{contentNightmare|}}}<!-- | |||
-->|<div data-cardtabs-btn="Nightmare" class="cardtabs__button rarityNightmare {{#ifeq:{{{firstShownTier|}}}|Nightmare|cardtabs__button--active|}}"><!-- | |||
--> Nightmare </div>}}</div><!-- | |||
--><div class="mytabs__panels" data-cardtabs-panels><!-- | --><div class="mytabs__panels" data-cardtabs-panels><!-- | ||
-->{{#if:{{{content1|}}} | -->{{#if:{{{content1|}}}<!-- | ||
-->|<div data-cardtabs-panel="1" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|1||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{{content1|}}}</div>}}<!-- | |||
-->{{#if:{{{content2|}}}<!-- | |||
-->{{#if:{{{content2|}}} | -->|<div data-cardtabs-panel="2" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|2||cardtabs__panel--js-hidden}}"><!-- | ||
-->{{{content2|}}}</div>}}<!-- | |||
-->{{#if:{{{content3|}}}<!-- | |||
-->|<div data-cardtabs-panel="3" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|3||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{#if:{{{content3|}}} | -->{{{content3|}}}</div>}}<!-- | ||
-->{{#if:{{{content4|}}}<!-- | |||
-->|<div data-cardtabs-panel="4" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|4||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{{content4|}}}</div>}}<!-- | |||
-->{{#if:{{{content4|}}} | -->{{#if:{{{content5|}}}<!-- | ||
-->|<div data-cardtabs-panel="5" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|5||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{{content5|}}}</div>}}<!-- | |||
-->{{#if:{{{content6|}}}<!-- | |||
-->{{#if:{{{content5|}}} | -->|<div data-cardtabs-panel="6" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|6||cardtabs__panel--js-hidden}}"><!-- | ||
-->{{{content6|}}}</div>}}<!-- | |||
-->{{#if:{{{content7|}}}<!-- | |||
-->|<div data-cardtabs-panel="7" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|7||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{#if:{{{content6|}}} | -->{{{content7|}}}</div>}}<!-- | ||
-->{{#if:{{{content8|}}}<!-- | |||
-->|<div data-cardtabs-panel="8" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|8||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{{content8|}}}</div>}}<!-- | |||
-->{{#if:{{{content7|}}} | -->{{#if:{{{contentCommon|}}}<!-- | ||
-->|<div data-cardtabs-panel="Common" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|Common||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{{contentCommon|}}}</div>}}<!-- | |||
-->{{#if:{{{contentElite|}}}<!-- | |||
-->{{#if:{{{content8|}}} | -->|<div data-cardtabs-panel="Elite" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|Elite||cardtabs__panel--js-hidden}}"><!-- | ||
-->{{{contentElite|}}}</div>}}<!-- | |||
-->{{#if:{{{contentNightmare|}}}<!-- | |||
-->|<div data-cardtabs-panel="Nightmare" style="overflow: auto;" class="cardtabs__panel {{#ifeq:{{{firstShownTier|}}}|Nightmare||cardtabs__panel--js-hidden}}"><!-- | |||
-->{{#if:{{{ | -->{{{contentNightmare|}}}</div>}}</div></div><!-- | ||
--> | |||
-->{{#if:{{{contentElite|}}} | |||
-->{{#if:{{{contentNightmare|}}} | |||
</div><!-- | |||
--></includeonly></onlyinclude><noinclude> | --></includeonly></onlyinclude><noinclude> | ||
Creates a set of tabs for items. Use it with infoboxes | Creates a set of tabs for items. Use it with infoboxes | ||
Line 363: | Line 347: | ||
|armortype = Metal | |armortype = Metal | ||
|description = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy. | |description = This armor makes living in impossible situations suddenly possible. Plate armor, uncomfortable to wear and quite heavy. | ||
|nomargin = 1 | |nomargin = 1 | ||
}} | }} | ||
Line 474: | Line 442: | ||
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). | 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). | ||
<pre style="display: inline-block;"> | <pre style="display: inline-block;"> | ||
{{Tabs | {{Tabs | ||
Line 487: | Line 453: | ||
|content7 = | |content7 = | ||
|content8 = | |content8 = | ||
| | |contentCommon = | ||
| | |contentElite = | ||
|contentNightmare = | |||
}}</pre> | |||
</noinclude> | |||
</ |
Revision as of 23:18, 8 April 2024
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 |
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. 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. 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. - 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. - 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. - 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. - 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. - 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. |
{{Tabs |firstShownTier=Common |contentCommon = {{Infobox |name = Lich |rarity = 2 |image = Lich |stat1 = Health 2100 |stat2 = Move Speed 200 |enemytype = [[Undead]] |location = [[Inferno]] |experience = 50 |nomargin = 1 }} |contentElite = {{Infobox |name = Lich |rarity = 6 |image = Lich |stat1 = Health 3000 |stat2 = Move Speed 250 |enemytype = [[Undead]] |location = [[Inferno]] |experience = 125 |nomargin = 1 }} |contentNightmare = {{Infobox |name = Lich |rarity = Nightmare |image = Lich |stat1 = Health ??? |stat2 = Move Speed ??? |enemytype = [[Undead]] |location = [[Inferno]] |experience = ??? |nomargin = 1 }} }}As you can see there is no Cobalt Tab |
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 = |contentCommon = |contentElite = |contentNightmare = }}