ModEnc:Tables: Difference between revisions
Added links to templates that create listed tables automatically |
No edit summary |
||
Line 38: | Line 38: | ||
|Red - should only be used for backgrounds, in certain "Attention! Warning!" scenarios | |Red - should only be used for backgrounds, in certain "Attention! Warning!" scenarios | ||
|} | |} | ||
Resulting from this color set, it is apparent that contrasting lightnesses are the best way to create effects - light colored borders on dark backgrounds or vice-versa, light and dark-backgrounded rows in succession, etc. Look at the designs below to get a feeling for | Resulting from this color set, it is apparent that contrasting lightnesses are the best way to create effects - light colored borders on dark backgrounds or vice-versa, light and dark-backgrounded rows in succession, etc. Look at the designs below to get a feeling for what you can do. | ||
==Content Tables== | ==Content Tables== | ||
Line 100: | Line 100: | ||
|style="border-left: 1px solid #aaaaaa;border-right: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 2nd col | |style="border-left: 1px solid #aaaaaa;border-right: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 2nd col | ||
|style="border-left: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 3rd col | |style="border-left: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 3rd col | ||
|}</pre> | |||
===Three-parted=== | |||
Original used on [[Help:Contents]] and, flipped, on [[RockPatch:Wishlist]]. | |||
{| align="center" width="98%" style="border: 1px solid #aaaaaa; background:#e5e5e5; border-spacing: 5px;" | |||
! colspan="2"|Table Headline | |||
|- | |||
|width="100%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;" colspan="2"|<div align="center">'''Headline Cell 1'''</div>Text cell 1 | |||
|- | |||
|width="50%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;"|<div align="center">'''Headline Cell 2'''</div>Text cell 2 | |||
|width="50%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;"|<div align="center">'''Headline Cell 3'''</div>Text cell 3 | |||
|} | |||
<pre>{| align="center" width="98%" style="border: 1px solid #aaaaaa; background:#e5e5e5; border-spacing: 5px;" | |||
! colspan="2"|Table Headline | |||
|- | |||
|width="100%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;" colspan="2"|<div align="center">'''Headline Cell 1'''</div>Text cell 1 | |||
|- | |||
|width="50%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;"|<div align="center">'''Headline Cell 2'''</div>Text cell 2 | |||
|width="50%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;"|<div align="center">'''Headline Cell 3'''</div>Text cell 3 | |||
|}</pre> | |}</pre> | ||
Revision as of 05:10, 22 June 2006
In the process of creating a ModEnc page, you might be faced with the challenge of creating a table; while creating a basic table is fairly easy thanks to wikicode, a plain, style-less table also drags down the general quality of a page.
Now you face a dilemma: Add content quickly, and accept it's design leaves something to be desired, or abandon the ease of a few lines of wikicode and dig out your HTML and CSS references.
And if you did the latter, you just might be lucky enough to create something not fitting the general ModEnc theme, and have it rewritten by someone else the next day.
To both save you the work of writing as well as standardize certain appearances, this page will hold the code for several "official" tables used on ModEnc, ready for you to copy and paste; the cells are all descriptively filled, and the table itself is shown so you can look what text appears where.
You are free to add new tables here, as long as they fit the general style of the others.
Color and Style Conventions
- Outer borders should either be dashed or solid with a light color.
- Borders in general should be thin, standard is 1px.
- To guarantee a common design, only the following colors should be used:
#FFFFFF | White - should only be used as transparent | |
#F0F0F0 | Lighter Grey - standard background | |
#e5e5e5 | Medium Grey - standard darker background | |
#aaaaaa | Darker Grey - For lighter borders | |
#000000 | Black - should only be used for borders, and not a lot (i.e. either dashed or not all borders) | |
#F00000 | Red - should only be used for backgrounds, in certain "Attention! Warning!" scenarios |
Resulting from this color set, it is apparent that contrasting lightnesses are the best way to create effects - light colored borders on dark backgrounds or vice-versa, light and dark-backgrounded rows in succession, etc. Look at the designs below to get a feeling for what you can do.
Content Tables
While the tables in the other categories are mainly used for templates and template-like applications, the tables in this category are intended for actual inline-use, to be filled with data. After you have seen the code of these monsters, you will understand why copying a pre-made style is favorable to creating a new one...especially in terms of time spent.
To extend these tables, always copy middle rows and/or columns, as the bordering cells have special style attributes for their borders.
Description Row and Description Column
Original base used on NavalTargeting and LandTargeting.
desc col desc | 1st col desc | 2nd col desc |
---|---|---|
1st row desc | 1st row, 1st col | 1st row, 2nd col |
2nd row desc | 2nd row, 1st col | 2nd row, 2nd col |
{| align="center" cellspacing="2" cellpadding="4" style="border-collapse: collapse; border: 1px dashed #aaaaaa;background:#F0F0F0;" !bgcolor="#e5e5e5" style="border-bottom: 1px solid #000000;border-right: 1px solid #000000;"|desc col desc !bgcolor="#e5e5e5" style="border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;"|1st col desc !bgcolor="#e5e5e5" style="border-bottom: 1px solid #000000;border-left: 1px solid #000000;"|2nd col desc |- !bgcolor="#e5e5e5" style="border-bottom: 1px solid #000000;border-right: 1px solid #000000;border-top: 1px solid #000000;"|1st row desc |style="border: 1px solid #aaaaaa;"|1st row, 1st col |style="border-bottom: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|1st row, 2nd col |- !bgcolor="#e5e5e5" style="border-right: 1px solid #000000;border-top: 1px solid #000000;"|2nd row desc |style="border-left: 1px solid #aaaaaa;border-right: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 1st col |style="border-left: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 2nd col |}
Description Row only
Original base used on Powerups.
1st col desc | 2nd col desc | 3rd col desc |
---|---|---|
1st row, 1st col | 1st row, 2nd col | 1st row, 3rd col |
2nd row, 1st col | 2nd row, 2nd col | 2nd row, 3rd col |
{| align="center" cellspacing="2" cellpadding="4" style="border-collapse: collapse; border: 1px dashed #aaaaaa;background:#F0F0F0;" |+'''Here goes the headline''' !bgcolor="#e5e5e5" style="border-bottom: 1px solid #000000;border-right: 1px solid #000000;"|1st col desc !bgcolor="#e5e5e5" style="border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;"|2nd col desc !bgcolor="#e5e5e5" style="border-bottom: 1px solid #000000;border-left: 1px solid #000000;"|3rd col desc |- |style="border-bottom: 1px solid #aaaaaa;border-right: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|1st row, 1st col |style="border: 1px solid #aaaaaa;"|1st row, 2nd col |style="border-bottom: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|1st row, 3rd col |- |style="border-right: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 1st col |style="border-left: 1px solid #aaaaaa;border-right: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 2nd col |style="border-left: 1px solid #aaaaaa;border-top: 1px solid #aaaaaa;"|2nd row, 3rd col |}
Three-parted
Original used on Help:Contents and, flipped, on RockPatch:Wishlist.
Table Headline | |
---|---|
Headline Cell 1 Text cell 1
| |
Headline Cell 2 Text cell 2
|
Headline Cell 3 Text cell 3
|
{| align="center" width="98%" style="border: 1px solid #aaaaaa; background:#e5e5e5; border-spacing: 5px;" ! colspan="2"|Table Headline |- |width="100%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;" colspan="2"|<div align="center">'''Headline Cell 1'''</div>Text cell 1 |- |width="50%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;"|<div align="center">'''Headline Cell 2'''</div>Text cell 2 |width="50%" style="border: 1px solid #aaaaaa; background:#F0F0F0; padding: 5px; vertical-align: top;"|<div align="center">'''Headline Cell 3'''</div>Text cell 3 |}
Horizontal Bars
These designs are used for simple messages, like the disambiguation or deprecated ones.
Grey Bar
The most basic message bar, used for virtually all standard notices - an example being Template:Disambig.
Can be created automatically using Template:HorizontalBar.
Some custom message. |
{|width="100%" style="background:#F0F0F0;border-bottom-color:#000000;border-bottom-style:solid;border-bottom-width:1px;border-top-color:#000000;border-top-style:solid;border-top-width:1px;" |width="3%"| |'''''Some custom message.''''' |}
Big Grey Bar
Expansion of the Grey Bar, conceived for Template:NeedTesting.
Can be created automatically using Template:BigHorizontalBar.
Some custom Headline |
---|
Some custom message. |
{|width="100%" style="background:#F0F0F0;border-bottom-color:#000000;border-bottom-style:solid;border-bottom-width:1px;border-top-color:#000000;border-top-style:solid;border-top-width:1px;" ! style="font-size: large;"|Some custom Headline |- | style="text-align: center;"|Some custom message. |}
Red Bar
Use for warning or attention-catching texts, an example being the "obsolete" warning.
Can be created automatically using Template:RedHorizontalBar.
Some custom message. |
{|width="100%" style="background:#F00000;border-bottom-color:#000000;border-bottom-style:solid;border-bottom-width:2px;border-top-color:#000000;border-top-style:solid;border-top-width:2px;" |width="3%"| |'''''Some custom message.''''' |}
Horizontal Blocks
These designs are used for blocks at the top, mainly to quicklink pages of a certain category - like the main RockPatch pages. Include a width="" statement if necessary.
Headline here |
---|
Body here |
{| align="center" cellspacing="0" cellpadding="4" style="border-collapse: collapse; border: 1px dashed #000000;background:#F0F0F0;" !Headline here |- |Body here |}
Vertical Blocks
These designs are used for floating sidebars, like the mod-information bar or custom TOCs.
Simple Sidebar
An example being the RockPatch Help Sidebar.
Can be created automatically using Template:SideBar, although that template is clearly aimed at bigger lists, similar to RockPatch Help's.
Headline |
---|
Body |
{| align="right" width="20%" style="border-collapse: collapse; border: 1px dashed #000000; background:#F0F0F0; margin: 2.8em 0 0 3.2em; padding: 1em 1em 1.5em 1em ;" !Headline |- |Body |}
Linklist/TOC Sidebar
Examples being the Wishlist TOC and the Reference TOC. Simply add more list items to expand.
Headline |
---|
|
{| align="right" cellspacing="0" cellpadding="4" style="border-collapse: collapse; border: 1px dashed #000000;background:#F0F0F0;" !bgcolor="#e5e5e5"|Headline |-style="border-top-color:#aaaaaa;border-top-style:solid;border-top-width:1px;" | *Bulleted list |}
Infobar
An example being Template:ModBar - simple copy the last row over and over again to expand.
Headline | |
---|---|
Space for an image or a block of text | |
row desc | row content |
{| align="right" width="20%" style="border-collapse: collapse; border: 1px dashed #000000; background:#F0F0F0; margin: 2.8em 0 0 3.2em; padding: 1em 1em 1.5em 1em ;" !colspan="2"|Headline |- |align="center" colspan="2"|Space for an image or a block of text |-style="font-size:84%;border-top-color:#aaaaaa;border-top-style:solid;border-top-width:1px;" |style="padding-left:2px;" bgcolor="#e5e5e5" width="50%"|'''row desc''' |width="50%" style="padding-left:2px;"|row content |}
See also
- ModEnc:Styleguide
- ModEnc:Templates
- RockPatch:Wishlist - for the use of colors in the Introduction Table