A template article, to use the new webdesign

So, you are publishing an article on fsfe.org? Let’s have a look at
this template page source code to see how you can make use of the many
features at your disposal with this new design!
1
All code samples are pasted directly from the source file of this page.

Just like before, fsfe.org web pages are built from xml source files.
You can actually see the source code directly by clicking on the link
at the bottom of each page. So there’s no big
change here, go on to read more about the website in genral if you want
to know more (there’s a link in the sidebar, on the right).

Page styling and metadata

The first thing with the new design are the <body>
attributes. This page has:

<body class="article" microformats="h-entry" id="the-template-2014">

A file can have more than one class and more than one microformats
(separated by a space), but a file can only have one id. These
attributes are very useful to have different kinds of styling depending
on what kind of content we’re showing.

For instance, the page About FSFE is not an
article, but one of the four main sections of the website. It’s a way
to get to other pages relating to what FSFE is about. For this kind of
pages, there are some specific styling (using <body
class="subsite">). In doubt, it’s always useful to find a
page that’s as close as possible to what you have to edit, and see how
this one is made. And of course, you can always get in touch
with the web team. What’s more, all pages which are on
wiki.fsfe.org have the wiki class, all pages on planet.fsfe.org have the
planet class, etc.

So, all articles should have an "article" class. However, it is
optional for them to have an id. If you put an id, please choose it
carefully. Id can be very useful to apply very specific styling. If you
need to write new CSS style for a page, please make sure to put an id
and then use that id for the rules in the CSS files.

Microformats attributes are both about style and about metadata of a
page. To learn what microformats are, please read microformats.org.
This page, as most articles, news entries, event items, should have
proper metadata and use microformats.
If you are not going to use microformats markup inside a
source file, there’s no need to enable them, so remove the
"microformats" information from the <body> element.

The sidebar

By the way, did you notice that, if you inspect the HTML of this page
as rendered in your web browser, each title automatically gets an id?
That way you can easily link to a specific
part of a page on fsfe.org by using anchors. For example, the title
above probably has <h2 id="id-the-sidebar">The
sidebar<h2>

The sidebar is what’s showing on the right side of this very page (if
your screen is large enough!). Articles should really have a sidebar
and we encourage you to add things in it. They are useful to provide
context to an article, and to give more things to read if somebody’s
interested. So you should show related articles, and/or related
campaigns if that makes sense. See the code above: you can write
directly inside the <sidebar> elements.

However, the sidebar is not just another place to write, it’s also a
useful tool where we can automatically put stuff. So if you are very lazy,
or if there’s nothing to write in, just write
<sidebar> without anything in it, and the build system
will automatically decide what to show for you. Note: the sidebar
element should be after the body element, not within. It’s at the same
place that timestamp, tags and translator elements.

Sidebar options

You can also give parameters to your sidebar. This page has the following sidebar parameters:

<sidebar news="ilovefs" promo="about-fsfe">

The news value is a tag.
It’s going to fetch some news items that match the given tag and display
them in the sidebar. For matter of demonstration, this page displays links
to news items with the "ilovefs" tag.

Note: The news feature of the sidebar is disabled until
Nicolas finds a better way of building the tag. Your help is welcome!

The promo parameter is a paragraph promoting one important aspect of
FSFE. This page promotes the "about-fsfe" paragraph, which is a general
paragraph about FSFE which is going to invite the user to go read the
about-page. If you don’t want to show any promotional paragraph, set
promo="no". If you do not choose which paragraph to promote in
your sidebar, the build system is going to default to one paragraph for
you.

These paragraphs should already be ready for translation like other
generic parts of the website. For now, you can choose to promote among:

our-work

about-fsfe

donate

More to come… Do not hesitate to ask the web team to add one.

Table of contents

Right now, it’s not automated. But the sidebar should be very a nice place
to add a table of contents, especially if you wrote a long article. More to
come on that.

The follow-up

It’s important to help people engage and support FSFE and to make it
easy for them. This is why we have the "followup" box. This box is the
second section of each page on fsfe.org, which you can see below the
license information of this page. Why is it at the bottom? The idea is
that, if somebody reaches the end of an article on fsfe.org, it’s probably
a very good sign that this person is interested! So we should engage with
them, give them a way to follow up on that enthusiasm! By default, if you
don’t put anything, the build system is going to insert a followup box for
you. If you don’t want to show a followup box for some reason, then please
write <followup>no</followup>.

This page chooses to help people engage by subscribing to our monthly
newsletter. So, after the body element, it has:

<followup>subscribe-nl</followup>

These boxes should already be ready for translation like other generic
parts of the website. For now, you can choose to follow up on:

Alternative, you can also quote an example inline (the quotation marks will vary depending on the language).

An article would not be complete without a picture!

This is a picture from the Group coordinators meeting in Berlin, September 2013!

If you want to use the div class="captioned" to display
a picture like the above, please specify a style="max-width:
Xpx;" property where X is the width of the picture.

This is the source code for the example picture above:

<div class="captioned" style="max-width: 2000px;">
<header>
<p>An article would not be complete without a picture!</p>
</header>
<img src="https://hroy.eu/images/fsfe_ecm-group_pic/2013-09-ECM-group-picture.JPG" alt="group picture!" />
<footer>
<p>This is a picture from the Group coordinators meeting in Berlin, September 2013!</p>
</footer>
</div>

If you want to center the picture, add the center-block
class. If you want to make it float on the left, add the class
left, and right to make it float… to the
right! So, if you want to have a captioned picture on the right, you can
add div class="captioned right" style="max-width: Xpx; width:
Y%;"

Here's an example code for a right-side picture taking 1/3 of the width:

<div class="captioned right" style="max-width: 400px; width: 33%;">
<header>
<p>An article would not be complete without a picture!</p>
</header>
<img src="https://hroy.eu/images/fsfe_ecm-group_pic/2013-09-ECM-group-picture.JPG" alt="group picture!" />
<footer>
<p>This is a picture from the Group coordinators meeting in Berlin, September 2013!</p>
</footer>
</div>

General design

Please avoid adding inline css styles in your css. Use css classes
instead. If you need new classes, create new classes, or try to see if the
current design does not already solve what you want to do! Also check with
bootstrap if there’s not something standard to use. To understand how to
edit the stylesheets of the new design, head to the documentation.

The new design uses bootstrap. Visit getbootstrap.com for more
information about that. This should allow you to have some nice things on
fsfe.org pages now! However if you are doing something a bit out of the
ordinary or if you are not sure of yourself, do not hesitate to get in touch
with the web team.

Some notes on typography

Typography matters. Please, if you share my love for typography, letters, spaces and symboles, try to use curly quotes and real apostrophes. I know this article did not respect that rule and used "stright quotes" instead of “curly quotes” because I needed to imitate the source code in order not to confuse anyone. However, for most articles on fsfe.org there’s no need for this. Especially, since we use utf-8, there’s no reason not to put some utf-8 in our pages! ☺

Other examples to take inspiration from

This template should get you going for most articles, i.e. pages which
are mostly about “content”. However, not all pages are like that. So here’s
a selection of well designed pages that should help you to get some
inspiration from.