Template:FrontpageSection

Documentation
It's intended to be fairly easy to add new sections to the front page. Each section is contained within its own FrontpageSection instance, which can just be stacked next to each other in the markup, without needing to worry about spacing/formatting.

It's not necessarily immediately clear from the code of the front page itself, but both the left column and right column are essentially just the following, except placed in their own templates:

If you want to add a new section, you'd just add another instance of the template to this group. So, for example, the markup of the left column currently looks like this:

This may seem a bit confusing, but remember that each one of those template transclusions is really just transcluding FrontpageSection. So, if we wanted to add a new section, we'd just add it as follows:

This would append a section similar to the following to the left column:

FrontpageSection Syntax
There are two ways of creating sections. Using FrontpageSection (as shown in the examples in the first section) is easier, but allows less customisability, and may cause weird behaviour if the title/content of your section include an equals sign. Alternatively, you can create sections using the section components, which are explained in the next section. This section will detail the syntax of FrontpageSection.

FrontpageSection has two required parameters - a title, and a content. The first parameter passed to the template should be the title of the section, which will be displayed as its heading, and the second parameter should be the content, which will be displayed below the title. The content is styled as normal wikitext. Entering the following:  would produce this output:

FrontpageSection also accepts one optional parameter,. This allows you to specify an icon to be displayed at the top of the section. This should be the name of a file on the wiki, without the preceding  namespace. So, to add the image File:Frontpage-icon-pencil.png to our example section, we'd add  to the template, to produce the code. This would produce the following:

As with all named parameters, the position in the order of parameters to the template doesn't matter. You could place the image to display before the title & content, or between them; it won't affect anything. The title and content just need to be kept in the same order.

Try to follow the advice on images in the "Images" section below when selecting icons.

More Control with Section Components
FrontpageSection is actually just an interface to a set of templates for putting sections together. The template itself just substitutes user supplied values into the following, with a very small amount of template magic to allow for not including an image:

CONTENT

Each of these templates corresponds to a single, styled HTML tag. For example, FrontpageSection Start is a  tag to open the section, with some CSS styling. FrontpageSection Title is just a  tag with the title substituted in. These components allow a bit more customisation than FrontpageSection. You could, for example, begin a section with FrontpageSection Start, then include multiple instances of FrontpageSection Title, with corresponding content, to have multiple partitions of content in a single section.

The basic structure of a section is to start with a FrontpageSection Start and end with a FrontpageSection End, but you can put whatever you like between them. All the sections on the front page currently use the basic skeleton outlined above, but the spacing/formatting of things should look alright in any order really.

An example of using these components can be seen in the source of FrontpageWS.

FrontpageSection Start
This starts a section, and accepts no parameters. Should always have a corresponding FrontpageSection End further on in the markup.

FrontpageSection End
This ends a section, and accepts no parameters.

FrontpageSection Image
This includes an icon for the section. The first parameter should be the filename of the image, without the  namespace prefix. There are a number of optional named parameters.


 * :Opacity of the image, as a decimal, where 0 = transparent, 1 = opaque. Default = 0.6
 * :Width of the image, not including unit suffix. Default = 25px
 * :Link that the icon should go to when clicked. Default = none

Please follow the guidelines in the "Images" section when making/choosing images for icons.

will display:

will display:

FrontpageSection Title
This displays a, which displays the first parameter as a title. This accepts an optional parameter of. If you supply, the title will be left-aligned, rather than centre-aligned.

Images
Images are displayed at 60% opacity, with a width of 25px. The front page is designed to accommodate square icons, coloured plain white, with a transparent background. Other icons will probably look fairly ugly.

There are a couple of icons which already exist on the wiki you may wish to use: If you upload a new icon for use on the front page, consider prefixing its filename with "Frontpage-icon-" and adding it to this list for ease of discovery :)
 * File:Frontpage-icon-list.png - Frontpage-icon-list.png
 * File:Frontpage-icon-pencil.png - Frontpage-icon-pencil.png
 * File:Frontpage-icon-star.png - Frontpage-icon-star.png
 * File:Frontpage-icon-trophy.png - Frontpage-icon-trophy.png

When searching for icons, Wikimedia Commons may be of use (especially their categories for white icons). You might also want to look at icon fonts (e.g: Font Awesome).