GSWiki:Customizing your userpage

From [N8]
Jump to navigation Jump to search
Shortcuts:

This page is here to help you customise your userpage!

What to put on your userpage

Well, pretty much anything you want!

Backgrounds and borders

Backgrounds and borders are created in two main ways:

  1. Using the HTML tag <div>.
  2. Using tables.

We will cover both here.

Using the HTML tag <div>

Div tags follow the basic format as follows:

<div style="background:color; border:width style color; color:c; width:w; height:h;">

----page content here----

</div>

Explanation:

code result/why
<div The opening of the div tag. Without it nothing happens!
style=" Most of the userpage quantities (background, border, text size, etc.) are styles, so a style attribute is opened. Note the quote mark, this is required to open the style.
background:color; This defines the background color. Color can take many values: a name, a hexadecimal code, or a RGB (red green blue) code. More later. Note that the semicolon trailing the color is required to separate different quantities (in this case background from border).
border:width style color; This defines the border. Width is the width of the border, usually given in pixels (e.g. 4px). Style is what the border is, e.g. solid, dashed, double, triple, etc. See also Help:Customising your signature - although its uses span the method is the same. Color can take the same values as background above.
color:c; This define the text color. Note the spelling of color. Colors can take the same values as background above. Be aware that link formatting overrides the text color. You will need to use [[internal link location|<span style="color:preferred colour;">link name</span>]] or [external url <span style="color:preferred color;">link name</span>].
width:w; This defines how wide this border/background/attributes stretches across the page. W takes a value of a percentage (e.g. 80%), or length in pixels (300px). A common usage is 100% - to span the entire width of the page.
height:h; This defines the height the attributes span down the page. H can be a percentage or a length, like width. Note again the semicolon - its not strictly required in this case (being the last quantity in the style) but should be used.
" This quote mark closes the style so it is required.
> This greater-than sign closes the opening div - it marks where the attributes end and the rest of your page begins. It is required.
----page content here---- This is the rest of the content of your userpage.
</div> This is the closing div tag. It marks where you no longer want the styles defined in the opening tag to no longer apply.
Example request Code Result
green background, red solid border 2 pixels wide, 100% wide and 500 pixels high <div style="background:green; border:2px solid red; width:100%; height:500px;"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div>

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

orange background, blue outset border 5px wide, green text <div style="background:orange; border:5px outset blue; color:green;"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div>

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

more example to come...

Using tables

Most of the time you can accomplish what you want with div. However sometimes you might want to use a table.

Advantages of tables to div:

  • Each cell can have a different style
  • Can make positioning easier with use of colspan and rowspan

Disadvantages

  • Can be unwieldy to some
  • Can get complex with lots of colspans and rowspans

Basic code is as follows:

{| style="background:color; border:width style color; color:c; width:w; height:h;"
| --content--
|style="background:color; border:width style color; color:c; width:w; height:h;"| --more content--
|-
|colspan="2"| --some more--
|- style="background:color; border:width style color; color:c; width:w; height:h;"
| --more--
| --and more--
|}


Explanation:

code result/why
{| This opens the table. Without it nothing happens!
style="..." All this is exactly the same as above.
| This defines a cell.
--content-- This is the content of that cell
|style="..."| --more content-- This defines the next cell (to the right of the one before), and also gives it a certain style (following all the normal rules). This can be used to make the cell have a different background, or its own border, etc.
|- This defines a new row.
|colspan="2"| --some more-- This defines a cell which spans two columns. The number can be increased.
|- style="..." This defines a row with a style (normal rules). The style applies to the cells following it, not preceding it.
|} This defines the end of the table. It is required.
See also
Example request Code Result
green background, red solid border 2 pixels wide, 100% wide and 500 pixels high
{| style="background:green; border:2px solid red; width:100%; height:500px;"
|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
black background, gold 5px inset border, purple text, second cell is red with white border, third cell on new row is blue, white text with 2 colspan
{| style="background:black; border:5px inset gold; color:purple;"
|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|style="background:red; border:2px solid white;"|Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|-
|colspan="2" style="background:blue; color:white;"|Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
more examples to come...

Other useful HTML

The following tags can be used on your userpage for the following effects:

Tag Description Example
<big>text</big> Increases the font size. Can be nested. text large text
<small>text</small> Decreases the font size. can be nested. text small text
<sup>text</sup> Superscripts text. Can be nested. textsuperscript
<sub>text</sub> Subscripts text. Can be nested. textsubscript
<div align="alignment">content</div> Aligns content to the left, right or center.
centered text

Colors

Colors can be defined by name (red), by hexadecimal (#FF0000) or RGB number (rgb(255,0,0). Note that the # for hex and the rgb, ( and , for RGB should be included.

A list of colours can be found here.

Userboxes

Userboxes are special templates designed specifically for use on userpages. They can be used to show many things, from your Gemini Station wiki edits, guild, and so on.

There are many premade ones, and you can also make your own personalised ones.

Premade userboxes

A list of premade userboxes can be found here.

Using premade userboxes

Simply include the userbox's name between a set of curly brackets (AKA braces). For example, if you are a free player, you could use Template:Userbox/free player:

{{Userbox/free player}}
Which gives you...
Template:Userbox/free player
Positioning

Userboxes by default jump to the left of the page; you may not like that. You can align them more regularly using Template:Userboxes and Template:Userboxesend. To use these template, place {{userboxes}} before your userboxes, and {{userboxesend}} after them. This is better explained by example:

{{userboxes}}
{{Userbox/moderator}}
{{Userbox/guild|DadCorp}}
{{userboxesend}}

gives

The symbol of moderators. This user is a Gemini Station Wiki moderator.
This user is in DadCorp guild


Notice the list of boxes on the right of the page →

The userboxes header template can be customised further, instructions are on the page.

Subpages

Sometimes, you want something in your userspace but not on your main userpage. This is where making subpages comes in.

There are three ways to make a subpage:

  • Edit a page and create a link to a non-existent page and press preview (e.g. put in [[User:Example/Missions]] for a Missions subpage (remember, its case sensitive), then click the link (it should take you straight to an edit box).
  • Type in the subpage you want into the search box to the left (e.g. type in User:Example/Missions), then click the Create this page link.
  • Go to Special:CreatePage and put your subpage as the title (e.g. User:Example/Cheese) and your content in the edit box.

Usage of subpages

You can use subpages for whatever you like, just like your base userpage. An example would be Personal sandboxes for code testing.