Wedge
Public area => The Pub => Features => Topic started by: Arantor on February 25th, 2012, 03:09 PM
-
OK, so I was working on my style based on SMF's Core theme again, and I realised that the board index actually needs some work to it in the markup.
Those of you who remember the Core theme will probably remember that in Core, each category was a separate block visually - well, turns out it's also a separate block in the markup, i.e. a separate table. But in Curve, it's one massive table for the entire board index.
Specifically, it's a single massive table that uses 3 tbodys per category, one for the heading, one for the boards and one as a divider between boards.
I'm suggesting the structure be altered thus:
* a new div around the board index (encapsulating everything that is currently #board_list)
* a new table for each category
* said table should use a thead for the category name and tbody to contain each of the rows, which is both easier to style and more semantically correct
* the divider between categories should be handled a div in case people want to style it or otherwise target it (much as currently it's a tbody.divider, it should become a div.table_divider or similarly named class)
This combination of things should allow us to retain anything that can be presently done against Curve markup whilst also allowing for the sorts of things I want to do in my Core mashup (like putting borders around entire categories to visually separate them from everything else)
Thoughts?
-
Any reasons to reproduce them exactly?
-
No reason to reproduce exactly other than because I want to.
But right now your choices are actually limited. You cannot put any kind of visual border around a single category to keep it visually broken away from any other category - without changing the code.
-
Well, as long as this remains in the Boards template, I have no problem with adding some extra tags.
Never been a fan of tbodies and theads though, personally...
-
It will be mostly the boards template with a little tweaking of CSS to re-align things with the changed structure.
The advantage of having thead and tbody is that you can semantically group rows together - and there's already tbodys present so it's not like I'm dumping new tags everywhere, just tweaking what's there.
-
OK, so what I did in r1455 was mostly this, I just didn't specifically implement the divider as suggested (though I can if needed), instead I did everything else but dropped the divider and implemented that part as a margin-bottom attached to the per-category tables.
It makes sense when you look at the code :P