Code Snippets Wiki
Advertisement

Barnstars are decorative awards that are given to users to thank them for editing and article or reverting vandalism, they are oftenly 5 pointed but also sometimes in a wagon wheel style which is to adorn a barn.

Barnstars characteristics, such as border, background colour, text colour, text and image can be altered depending on the purpose of gifting a user one.

Here is an example of a barnstar;

Barnstar barnstar The Guest Book Barnstar
This barnstar is awarded to [username goes here] for signing A Users Guestbook.

This is an award given for signing a guest book.

How to create a Barnstar[]

First you start out with

{|

This is how you start all templates. Then you create a border and pick a border color. The colors may be in either Hex triplet format, or typed in a special way using the word. (this will be explained later.) This code would create a black border:

style="border:1px solid {{border|#000000}};

You can pick the size of the border by changing the number of pixels (px) and the color by simply inserting the hex triplet code for the color you want. Next you need a background color. This is done in much the same way with a minor alteration:

background-color: {{color|#FF0000}};"

In order to make a complete box there is one more thing we must do, which is put something in the box, to do this you will use this code;

|rowspan="2" valign="middle" | [[Image:Barnstar_barnstar.png|100px]]

(Please note you can use any image you desire, you must simply just upload it and insert the desired picture where I put mine.)

Now you have your basic box, it will look like something this:

Barnstar barnstar

Next we need to insert the information, such as the title of the barnstar and the information we want to be displayed, heres how. this code will create a title,

|style="font-size: x-large; padding: 0; vertical-align: middle; height: 1.1em;"<font color=#BFFF00>Example Barnstar</font>

now here is an example of what to do for the non hex decimal colors. In creating a title with color, such as the example barnstar. you add the same code but with a new ending, here is the example.

|style="font-size: x-large; padding: 0; vertical-align: middle; height: 1.1em;" | <font color="lime green">Example Barnstar</font>

so here is what we have so far.

Barnstar barnstar Example Barnstar

Now we are almost done, we just have to insert the rest of the information, heres how.

|-
|style="vertical-align: middle; border-top: 1px solid gray;" |<font color="gold">This barnstar is an example and was created by Sirkad specifically for this article.</font>
|}

(Note:At the end of a template you must always make a new line and put |} otherwise it will not create it correctly. but it MUST BE MADE ON A NEW LINE.)

If we finally add all this together we get the final product, a finished barnstar.

{| style="border: 1px solid {{{border|#000000}}}; background-color: {{{color|#FF0000}}};" |rowspan="2" valign="middle" | [[Image:Barnstar_barnstar.png|100px]]
|style="font-size: x-large; padding: 0; vertical-align: middle; height: 1.1em;" | <font color="green">Example Barnstar</font>
|-
|style="vertical-align: middle; border-top: 1px solid gray;" |<font color="gold">This barnstar is an example and was created by Sirkad specifically for this article.</font>
|}
Barnstar barnstar Example Barnstar
This barnstar is an example and was created by Sirkad specifically for this article.

(If you don't know Hexadecimals or don't want to study up on them, you can simply use the regular name of the color, which is a lot easier for the beginners.)

See also[]

Hex Triplet Colors

Advertisement