Lancey's Personal Style Guide

From Dota 2 Wiki
Jump to: navigation, search


This is the Style Guide I use when I make edits to pages. I don't always follow it so I guess that makes me unpredictable.

Image Tables[edit]

I made Image Tables specifically for status effects like Stun and Silence, because they were, at the time, long lists of names. I think adding a visual aspect, in this case, an icon, helps players identify abilities. It works really well for other stuff, so I've started replacing lists with Image Tables where I can. You can add an Image Table to any page with the following code:

{{img table start}} <!-- Starts an image table block -->
{{img table el    <!-- Starts an image table element -->
|  image =        <!-- The image of this element -->
|   link =        <!-- The page the image links to -->
| header =        <!-- The header of this element, usually another link -->
|  text1 =        <!-- The first line of text under the header -->
|  text2 =        <!-- The second line of text under the header -->
}}
|-                <!-- Separate lines with |-. Maximum of two elements per line -->
{{img table end}} <!-- Remember to close your blocks -->

They look like this: Template:Img table start Template:Img table hero Template:Img table el |- Template:Img table el Template:Img table end

Image tables have specific limitations and benefits.

Pros:

  • Uses normal table formatting, so you can insert headers and raw information in between elements
  • Displays information with visual backing
  • Is a neat and organized way to format lists of things
  • You can modify Template:Img table el to do a lot of things with them.

Cons:

  • Maximum of two elements per line
  • Subtext can run long. If it's too long, it'll wrap around the image.
  • A lot of typing to properly link up everything

Examples:

Wikitables[edit]

Wikitables are also pretty cool. All the formatting is handled in the CSS and you can do a ton of stuff with them, so they're recognizable elements across all pages. I use them to contain quantitative information, like statistics and things that you can easily tabulate. You can make them with this code:

{| class = "wikitable"
! class = "header" |    <!-- Use this for header cells -->
|-
| <!-- Use this for normal cells -->
|}

Personally, I like to center most information in wikitables so that it looks neat and make them take up the whole page. Overall they look like:

Hero Cool Factor Difficulty
Skeleton King Fonzie Too Easy
Chen A Dog with
Sunglasses
Hard as Balls
Crystal Maiden Jim Carrey after
he was the Riddler
Pfft Dunno

You can do so much with them.

Pros:

  • They're tables so you can easily see and compare information
  • Comes with all sorts of classes like "sortable" and "collapsible"
  • You can do really neat stuff like split columns and multiple rows without breaking the formatting
  • Really awesome

Cons:

  • Not as efficient for certain things
  • Formatting is strict on these. You can't do much with style.
  • You have to think about the best way to display information with them

Examples:

Navboxes[edit]

Navboxes are neato. I fell in love with them for a while but they're very limited in what they can really do, but what they do they do well. They're basically at the bottom of every Wikipedia article and that's for a good reason. But they're really not as great as other things, and you shouldn't make a navbox because you feel like it.

You'll have to make your own navbox templates if you want to use them.

Pros:

  • Really good way to link to related articles
  • They're neat
  • Wikipedia uses them everywhere

Cons:

  • Takes some effort to make one and they're not always the best
  • Stacking them up on top of each other looks bad
  • They're really expensive
  • Wikipedia uses them everywhere

Examples: Template:HeroNav

Infoboxes[edit]

Here's another thing Wikipedia uses, because they show information in no time. Want to know a Hero's BAT? Just check the infobox. Want to see who owns your favorite competitive team? Just check the infobox. If you have a navbox somewhere on your page, you should probably have an infobox somewhere on your page. Also like navboxes you should figure out how to use these before you do.

Pros:

  • Displays information about a thing that can be categorized in a small space
  • They draw the eye to the side of the page, which in turn causes people to read things

Cons:

  • You can overuse them
  • They can get very expensive if you're lazy (and boy howdy are we)
  • It's hard to find a middle ground between too much infomation and too little information
  • We have so many different styles of infoboxes

Examples: