Template:Navbox: Difference between revisions

From Vintage Story Wiki
No edit summary
(New navbox template)
Line 3: Line 3:
{{WIP}}
{{WIP}}


<includeonly>
<includeonly><div style="margin: auto; {{#if: {{{child|}}} |margin: -3px; |padding: 4px;  border-color: #382b1e; border-width: 3px; border-style: solid; margin: auto; width: 90%; border-radius: 4px; background-color: #e0cfbb;"}}>
{{#if: {{{child|}}} | | <div style="border-color: #382b1e; border-width: 3px; border-style: solid; margin: auto; width: 90%; border-radius: 4px; background-color: #e0cfbb;">}}
<table {{#if: {{{child|}}} || class="mw-collapsible"}} style="border-spacing: 2px; width: 100%;">
<table class="mw-collapsible" style="border-spacing: 2px; width: 100%;">
   {{#if: {{{child|}}} || <tr><th colspan="2" style="{{#if: {{{titlestyle|}}}|{{{titlestyle}}}|
   <tr><th colspan="3" style="
     background: rgb(91,76,62);
     background: rgb(91,76,62);
     background: linear-gradient(to bottom, rgba(91,76,62,1) 0px, rgba(91,76,62,0) 5px, rgba(56,43,30,0) calc(100% - 5px), rgba(56,43,30,1) 100%),
     background: linear-gradient(to bottom, rgba(91,76,62,1) 0px, rgba(91,76,62,0) 5px, rgba(56,43,30,0) calc(100% - 5px), rgba(56,43,30,1) 100%),
                 linear-gradient(to right, rgba(91,76,62,1) 0px, rgba(69,52,36,1) 5px, rgba(69,52,36,1) 50%, rgba(69,52,36,1) calc(100% - 5px), rgba(56,43,30,1) 100%);">
                 linear-gradient(to right, rgba(91,76,62,1) 0px, rgba(69,52,36,1) 5px, rgba(69,52,36,1) 50%, rgba(69,52,36,1) calc(100% - 5px), rgba(56,43,30,1) 100%);}}">
     <big>'''[[Wiki Navigation|<span style="color: #e0cfbb">Wiki Navigation</span>]]'''</big></th>
     <big>'''{{#if: {{{titlelink|}}} | [[{{{title}}}|<span style="color: #e0cfbb">Wiki Navigation</span>]] | <span style="color: #e0cfbb">{{{title}}}</span> }}'''</big></th>
   </tr>
   </tr>}}
<!-- Group 1 -->
<!-- Group 1 -->
{{#if: {{{group1|}}} |
   <tr>
   <tr>
     <td style="text-align: center; margin: 10px; width: 10%; background: rgb(91,76,62);"">[[Group 1|<span style="color: #e0cfbb">Group 1</span>]]</td>
     <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group1}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group1}}}</span>]]</td>
    <td style="text-align: center; width: 10%; background: rgb(91,76,62);">[[Group 1.1|<span style="color: #e0cfbb">Group 1.1</span>]]</td>
     <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}" }}>{{#if: {{{cnt1|}}}|{{{cnt1}}}|}}</td>
     <td style="height: 30px;">''Group 1.1 contents''</td>
   </tr>
   </tr>
}}
<!-- Group 2 -->
<!-- Group 2 -->
{{#if: {{{group2|}}} |
   <tr>
   <tr>
     <td style="text-align: center; margin: 10px; width: 10%; background: rgb(91,76,62);"">[[Group 2|<span style="color: #e0cfbb">Group 2</span>]]</td>
     <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group2}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group2}}}</span>]]</td>
     <td colspan="2" style="background-color: #d3c3b0; height: 30px;">''Group 2 contents''</td>
     <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt2|}}}|{{{cnt2}}}|}}</td>
   </tr>
   </tr>
}}
<!-- Group 3 -->
<!-- Group 3 -->
{{#if: {{{group3|}}} |
  <tr>
    <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group3}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group3}}}</span>]]</td>
    <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt3|}}}|<div style="display: inline; float: left; padding:0em; ">{{{cnt3}}}</div>|}}</td>
  </tr>
}}
<!-- Group 4 -->
{{#if: {{{group4|}}} |
  <tr>
    <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group4}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group4}}}</span>]]</td>
    <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt4|}}}|{{{cnt4}}}|}}</td>
  </tr>
}}
<!-- Group 5 -->
{{#if: {{{group5|}}} |
  <tr>
    <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group5}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group5}}}</span>]]</td>
    <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt5|}}}|{{{cnt5}}}|}}</td>
  </tr>
}}
<!-- Group 6 -->
{{#if: {{{group6|}}} |
  <tr>
    <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group4}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group6}}}</span>]]</td>
    <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt6|}}}|{{{cnt6}}}|}}</td>
  </tr>
}}
<!-- Group 7 -->
{{#if: {{{group7|}}} |
  <tr>
    <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group7}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group7}}}</span>]]</td>
    <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt7|}}}|{{{cnt7}}}|}}</td>
  </tr>
}}
<!-- Group 8 -->
{{#if: {{{group8|}}} |
   <tr>
   <tr>
     <td rowspan="3" style="text-align: center; margin: 10px; width: 10%; background: rgb(91,76,62);">[[Group 3|<span style="color: #e0cfbb">Group 3</span>]]</td>
     <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group8}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group8}}}</span>]]</td>
    <td style="text-align: center; width: 10%; background: rgb(91,76,62);">[[Group 3.1|<span style="color: #e0cfbb">Group 3.1</span>]]</td>
     <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt8|}}}|{{{cnt8}}}|}}</td>
     <td style="height: 30px;">''Group 3.1 contents''</td>
   </tr>
   </tr>
}}
<!-- Group 9 -->
{{#if: {{{group9|}}} |
   <tr>
   <tr>
     <td style="text-align: center; width: 10%; background: rgb(91,76,62);">[[Group 3.2|<span style="color: #e0cfbb">Group 3.2</span>]]</td>
     <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group9}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group9}}}</span>]]</td>
     <td style="background-color: #d3c3b0; height: 30px;">''Group 3.2 contents''
     <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt9|}}}|{{{cnt9}}}|}}</td>
   </tr>
   </tr>
}}
<!-- Group 10 -->
{{#if: {{{group10|}}} |
   <tr>
   <tr>
     <td style="text-align: center; width: 10%; background: rgb(91,76,62);">[[Group 3.3|<span style="color: #e0cfbb">Group 3.3</span>]]</td>
     <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: rgb(91,76,62);}}">[[{{{group10}}}|<span style="{{#if: {{{groupfont|}}}|{{{groupfont}}}|color: #e0cfbb;}}">{{{group10}}}</span>]]</td>
     <td style="height: 30px;">''Group 3.3 contents''</td>
     <td {{#if: {{{bodystyle|}}}|style="{{{bodystyle}}}"}}>{{#if: {{{cnt10|}}}|{{{cnt10}}}|}}</td>
   </tr>
   </tr>
}}
</table>
</table>
{{#if: {{{child|}}} | | </div>}}
</div>
</includeonly>
</includeonly>


<noinclude>{{doc}}</noinclude>
<noinclude>{{doc}}</noinclude>

Revision as of 01:23, 7 August 2022

Redirect to:

UnderCon icon.png

This page is under construction.
This page is being created, or is in the process of extensive expansion or major restructuring. Until this notice is removed, please do not translate this page. Expect the content of this page to change significantly.




[view | edit | history | purge this page]Documentation

This template serves as the base for any navbox templates, providing a customizable layout to build off of. Each navbox can currently contain up to 10 nav groups, along with a theoretically infinite number of subgroups thanks to child navboxes.

Usage

While the parameters up to only group2 are listed here, it is possible to have up to 10 different groups group1-10. The content of bodyN can contain a child navbox which has child=true, allowing for up to 10 subgroups per group.

{{Navbox
|child = If this navbox should be formatted as a child navbox
|title = Navbox title
|group1 = First group title
|body1 = First group body content
|group2 = Second group title
|body2 = Second group body content
|groupN = N group title
|bodyN = N group body content
}}
Parameter Description Type Required
child If this navbox should be formatted as a child navbox -- disables the outer div primarily Boolean no
title The title shown at the top of the navbox String yes
group1 The title for the first group Content suggested
body1 The content to feature in the first groups' body Content suggested
group2 The title for the second group Content suggested
body2 The content to feature in the second groups' body Content suggested
groupN The title for the N group Content suggested
bodyN The content to feature in the N groups' body Content suggested

Example

Code Result
{{Navbox
|title = Example navbox
|group1 = Group 1
|body1 = Group 1 content
|group2 = Group 2
|body2 = {{Navbox
  |child = true
  |group1 = Group 2.1
  |body1 = Group 2.1 content
  |group2 = Group 2.2
  |body2 = Group 2.2 content
  |group3 = Group 2.3
  |body3 = Group 2.3 content
  }}
|group3 = Group 3
|body3 = Group 3 content<br/>
With a second line
}}


Vanilla Game Content
Terrain Blocks

Rawclay blue.pngClay Grid Gravel Granite.pngGravel Peat.pngPeat Grid Rock granite.pngRock Grid Sand Granite.pngSand Grid Barren low fertility soil.pngSoil

Construction Blocks

Grid Blue clay bricks.pngCeramic Blocks Grid Glass.pngGlass Grid Oak plank.pngBoards Grid Diagonal logs plaster.pngPlaster Grid Cob.pngSoil Blocks Grid Polished Granite.pngStone Blocks Grid Stone Path.pngPath

Functional Blocks

Grid Barrel.pngBarrel Grid Woodbucket.pngWooden bucket Grid Wooden bed.pngBed Grid Chest.pngContainers Firepit lit.pngFirepit Forge.pngForge Grid Loot Vessel.pngCracked vessel Grid Ore Bomb.pngOre blasting bomb Grid Large trough.pngTrough

Decorative Blocks

Grid Painting.pngPainting Mediumcarpet-turqoise-ns.pngCarpet Bookshelves-ns.pngBookshelves Flowerpot-earthern-empty.pngFlowerpots Agedwallpaperplanks-green-east.pngWallpapers Salvation.pngTapestry

Metal Working

Copper Anvil.pngAnvil Bloomery.pngBloomery Crucible.pngCrucible Forge.pngForge Grid Tin bronze helve hammer.pngHelve hammer Ingot Mold Burned.pngMolds Grid Copper Ingot.pngMetal Gem-emerald-rough.pngGemstone

Tools & Weapons

Grid Copper axe.pngAxe Grid Bow.pngBow Grid Copper Chisel.pngChisel Grid copper cleaver.pngCleaver Grid Club.pngClub Grid Copper hammer.pngHammer Grid Copper hoe.pngHoe Grid Copper knife.pngKnife Grid Copper pickaxe.pngPickaxe Grid Copper prospecting pick.pngProspecting Pick Grid Copper saw.pngSaw Grid Copper scythe.pngScythe Grid Copper shears.pngShears Grid Crude Square Shield.pngShield Grid Copper shovel.pngShovel Grid Copper spear.pngSpear Grid Copper sword.pngSword

Equipment

Armor-body-brigandine-iron.pngArmor Clothes-upperbody-lackey-shirt.pngClothes Grid Backpack.pngBags

Craftable Resources

Grid Oak board.pngBoards Grid Charcoal.pngCharcoal Grid Coke.pngCoke Grid Firewood.pngFirewood Grid Copper Ingot.pngIngots Grid Raw hide.pngLeather Grid Flax twine.pngFlax

Plants

Berrybush red currant ripe.pngBerries Grid mushroom bolete.pngMushrooms Grid Cattail tops.pngReed Flower-californiapoppy.pngFlowers Tallgrass-tall.pngGrass Tallfern.pngOther Plants Sapling-oak.pngTrees Sapling-oak.pngFruit tree Flax.pngWild Foods

Mobs

Bear-male-polar.pngBear BeeMob.pngBees Creature-bell-normal.pngBell Bighorn.pngBighorn sheep Rooster.pngChicken Drifter.pngDrifter Fox(Male).pngFox Hare.pngHare Hyena.pngHyena Locust.pngLocust Raccoon.pngRaccoon Pig.pngWild Pig Wolf.pngWolf

Mechanics

Pig.pngAnimal Husbandry Grid Empty skep.pngBeekeeping Grid Crucible burned.pngCasting Grid Blue clay.pngClay Forming Grid Copper sword.pngCombat Grid Copper hoe.pngFarming Grid Spelt bread.pngCooking Bone.pngHealth Flax.pngSatiety Grid Flint arrow head.pngKnapping Grid Angled Gears.pngMechanical Power Grid Copper pickaxe.pngMining Grid Copper anvil.pngSmithing Creature-humanoid-trader-treasurehunter.pngTrading Gear-temporal.pngTemporal Stability Grid Copper hammer.pngSteel Making

Guides

Grid Lore Book.pngCrafting Recipes Grid Charcoal.pngFuel Grid Raw hide.pngLeather Working Heat Torch.pngLight sources Grid Copper Chunk.pngOre Deposits Grid Ruins.pngRuins Grid Lore Scroll.pngStarter Guide Berrybush blueberry ripe.pngWorld Generation

[view | edit | history | purge this page]The above documentation is transcluded from Template:Navbox/doc.