User:Iced Bluejay/sandbox

For code testing, proposed codes, and ripping apart/explaining codes *dabs* 

Infobox Building Code
This can be edited (change tab names, change the required field name, the displayed field name, etc.) Sorry my notes are in caps, I needed a way to differentiate them from the code and I have to use nowiki to get the code to even show up.

You should have a basic understanding of how to use the infobox templates and how the tabber parser function works before trying to do this. Check below for my breakdown for tabber parsers and how they work if you don't understand them.

In summary, it looks complicated because of all the different functions, but once you break it down and keep track of how many open brackets you have, it becomes much simpler. If you're struggling with the code, take a break and go back and recount to make sure your number of  brackets is the same as your number of   brackets. And you can always ask for help in the Discord or leave a comment on my page or something.

Tabber Parser Functions
Make tabs within  without the whole thing exploding by using the   parser function.

Here's a basic general example of the code

Which will give you the following: Heading1= blahblahblah

Heading2= blaaaaaah

Making Tables Within the Tabber Parser
Okay, awesome, we know how to make tabs within tabs now. However, the regular wiki table coding using  that we usually use doesn't work within parsers. It basically causes the  to close weirdly, and the page will explode.

This page explains how to do it in-depth, it's easy to understand, and shows some excellent code examples. Generally, the key thing to note is that  gets replaced with. The number of  within the   changes based off how many   we would've put when generating a normal table.

For example, in a typical row of a table we might put:

But within the parser, we must use  and   instead, so we would write:

The Broken Heart table (under Trade -> Pathologic -> Andrey Stamatin) is already done, so follow that for example if you need more help, or you can ask on the Wiki Discord, or ask me directly.

Tables
Copy-pasting of an old doc i made to explain the codes we've been using for the hover/touch quotes in items pages.

This is what I used to help me write the table! → https://www.mediawiki.org/wiki/Help:Tables

Table Width
tells the table to go all the way to left of screen, automatic margin from right of the screen, and take up 70% of the screen width.

you can edit it as you need ! for example: if an item’s page is long enough where the Quotes section isnt blocked by the infobox, you can make it wider to take up more space like

This tells the the table to just use automatic margin on both sides, which will centre the table, and set it to take up 85% of the screen width

don’t forget the semi-colon before the last quote mark! ( “ )

Big Ol’ Single Cell Header
says how wide/long the cell is going to be in columns, i’ve been using it to make the “header” for the tables (hover quotes, touch quotes)

we will probably need to edit this in the future when more routes get added, but its very easy we just change the number right now its 3 (for haruspex, margle, alpha), but in the future it will be up to five (when we get bachelor & changeling)

How to make table even fancier
makes each column a specific width relative to the table width that will adjust automatically with the viewer’s screen size right now, each column is taking up 30% of the table space, but we’ll have to edit this down as more routes get added (30% → 25% → 20%)

needs to be added to the top cell of each column! Put it at cell start, before the word section that’ll actually appear on the table (in our case, its the haruspex margle and alpha labels), separated by a straight line (the | symbol)

Delicious padding
just gives a little extra space between the table cell lines and the words, so it can look a little cleaner and easier to read, feel free to adjust as you like

similar to  you need to put it at the start of the cell, before the words and separated with the line (this | thing again). Needs to be added to each cell you want padding, it wont work over an entire row/column!

Testing New Infobox Code
Trying to see if I can build an infobox that changes both image and text between tabs.