ModEnc:Tables: Difference between revisions
CSS'd the bases |
m Updated templates |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
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.<br> | 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.<br> | ||
Now you face a dilemma: Add content quickly, and accept | Now you face a dilemma: Add content quickly, and accept its 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. | 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. | ||
Line 25: | Line 25: | ||
|#e5e5e5 | |#e5e5e5 | ||
|Medium Grey - standard darker background | |Medium Grey - standard darker background | ||
|- | |||
|width="50px" bgcolor="#C9C9C9"| | |||
|#c9c9c9 | |||
|Medium Grey 2 - something even darker | |||
|- | |- | ||
|width="50px" bgcolor="#AAAAAA"| | |width="50px" bgcolor="#AAAAAA"| | ||
|#aaaaaa | |#aaaaaa | ||
|Darker Grey - For | |Darker Grey - For borders | ||
|} | |} | ||
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. | 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. | ||
Other colors may be used (notably red), but only for effect, not as the basis of the design. | |||
==Content Tables== | ==Content Tables== | ||
Line 133: | Line 131: | ||
|}</pre> | |}</pre> | ||
===Big Grey Bar=== | ===Big Grey Bar=== | ||
Expansion of the Grey Bar, conceived for [[Template: | Expansion of the Grey Bar, conceived for [[Template:NeedsTesting]].<br> | ||
Can be created automatically using [[Template:BigHorizontalBar]]. | Can be created automatically using [[Template:BigHorizontalBar]]. | ||
{|width="100%" class="table_biggreybar" | {|width="100%" class="table_biggreybar" | ||
Line 172: | Line 170: | ||
==Vertical Blocks== | ==Vertical Blocks== | ||
These designs are used for floating sidebars, like the mod-information bar or custom TOCs. | These designs are used for floating sidebars, like the mod-information bar or custom TOCs. | ||
=== Reusable Sidebars === | |||
For sidebars that should be repeated across many pages, like the [[Template:MappingBar|Mapping Bar]], use [[Template:Sidebar]], just remember that its content needs a separate container page, unwritten rule is to create those as subpages of {{Tt|ModEnc:Sidebars/}}. | |||
===Simple Sidebar=== | ===Simple Sidebar=== | ||
For simplest sidebars, you can use this: | |||
{| align="right" width="20%" class="table_simplesidebar" | {| align="right" width="20%" class="table_simplesidebar" | ||
!Headline | !Headline |
Latest revision as of 10:26, 27 November 2009
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 its 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. You can put up a request to add your custom classes to the stylesheet at ModEnc:CSS.
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 | |
#c9c9c9 | Medium Grey 2 - something even darker | |
#aaaaaa | Darker Grey - For borders |
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.
Other colors may be used (notably red), but only for effect, not as the basis of the design.
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.
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" cellpadding="4" class="table_descrowdesccol" !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 |}
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" cellpadding="4" class="table_descrow" |+'''Here goes the headline''' !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 |}
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%" class="table_parted" !colspan="2"|Table Headline |- |width="100%" colspan="2"|<div align="center">'''Headline Cell 1'''</div>Text cell 1 |- |width="50%"|<div align="center">'''Headline Cell 2'''</div>Text cell 2 |width="50%"|<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%" class="table_greybar" |width="3%"| |'''''Some custom message.''''' |}
Big Grey Bar
Expansion of the Grey Bar, conceived for Template:NeedsTesting.
Can be created automatically using Template:BigHorizontalBar.
Some custom Headline |
---|
Some custom message. |
{|width="100%" class="table_biggreybar" !Some custom Headline |- |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%" class="table_redbar" |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" cellpadding="4" class="table_horblock" !Headline here |- |Body here |}
Vertical Blocks
These designs are used for floating sidebars, like the mod-information bar or custom TOCs.
Reusable Sidebars
For sidebars that should be repeated across many pages, like the Mapping Bar, use Template:Sidebar, just remember that its content needs a separate container page, unwritten rule is to create those as subpages of ModEnc:Sidebars/.
Simple Sidebar
For simplest sidebars, you can use this:
Headline |
---|
Body |
{| align="right" width="20%" class="table_simplesidebar" !Headline |- |Body |}
Linklist/TOC Sidebar
Examples being the Wishlist TOC and the Reference TOC. Simply add more list items to expand.
Headline |
---|
|
{| align="right" cellpadding="4" class="table_tocsidebar" !Headline |- | *Bulleted list |}
Infobar
An example being Template:ModBar - simple copy the last row over and over again to expand (including the class).
Headline | |
---|---|
Space for an image or a block of text | |
row desc | row content |
{| align="right" width="20%" class="table_infobar" !colspan="2"|Headline |- |align="center" colspan="2"|Space for an image or a block of text |-class="contentrow" |width="50%"|'''row desc''' |width="50%"|row content |}
See also
- ModEnc:Styleguide
- ModEnc:Templates
- RockPatch:Wishlist - for the use of colors in the Introduction Table