Jump to content

SeptemWiki:Style Guide/Templates: Difference between revisions

From SeptemWiki
Line 30: Line 30:
== Banners ==
== Banners ==


Stub templates are a subtype of ''banners.'' Banners are nice boxes which run across the width of your article.  They are produced using the "Article Message Box" template, fully documented at [[Template:Ambox]].
Stub templates are a subtype of ''banners.'' Banners are nice boxes which run across the width of your article
 
There are two main types of banners: "meta" and "content".  Meta banners are information about your article, rather than about your subject.  They are produced using the "Article Message Box" template, fully documented at [[Template:Ambox]].


The color of the tab (and the default icon) is determined by the <tt>type</tt> parameter, and you can make banners which are smaller and appear at the left.
The color of the tab (and the default icon) is determined by the <tt>type</tt> parameter, and you can make banners which are smaller and appear at the left.
Line 39: Line 41:


See [[Template:Ambox]] for further details.
See [[Template:Ambox]] for further details.
Content banners are any banners you care to display in your article which are about your topic itself.  You can produce them with the "Color Paragraph" template, documented at [[Template:Colorparagraph]]:
{{colorparagraph
|background=#ccccff
|color=#ffff00
|image=[[File:Ambox_content.png|20px]]
|text="I'll have a blue / paragraph / without you ..."
}}


== Text Formatting ==
== Text Formatting ==

Revision as of 13:29, 9 April 2016

The judicious use of templates will make it easier for SeptemWiki editors to write clear, consistent articles. This guide contains information on templates which editors should know about and use appropriately.

Syntax

Main article: Help:Templates

Templates are embedded in your article using the template syntax described in the Help:Templates page. For each template described in this page, examples are given.

Subtypes

Main article: Help:Templates

Some templates take a lot of parameters, but most of the time, only a few of them are used. So we create a "subtype" template which provides most of the parameters for you, like Template:Stub, which just calls Template:Ambox but provides most of the parameters to produce a convenient "stub article" banner.

This process can subdivide further, and further. The Stub template itself has several subtypes, which produce different looking stubs, with different icons and text, for articles about Triparic, the Turnpike, and so forth.

Stubs

The stub templates indicate that your article is in need of expansion. You can use the generic version:

{{stub}}

which yields:

Or you can use more specific ones.

{{TriparicStub}}

All stub templates should be found in Category:Stub templates.

Banners

Stub templates are a subtype of banners. Banners are nice boxes which run across the width of your article.

There are two main types of banners: "meta" and "content". Meta banners are information about your article, rather than about your subject. They are produced using the "Article Message Box" template, fully documented at Template:Ambox.

The color of the tab (and the default icon) is determined by the type parameter, and you can make banners which are smaller and appear at the left.

{{ambox|type=delete|text=Articles to be deleted.}}
{{ambox|type=notice|small=left|text=This is a small notice message.}}

See Template:Ambox for further details.

Content banners are any banners you care to display in your article which are about your topic itself. You can produce them with the "Color Paragraph" template, documented at Template:Colorparagraph:

"I'll have a blue / paragraph / without you ..."

Text Formatting

For formatting linguistic documentation, the angle bracket template is useful for producing angle brackets, which are the conventional way to display orthography: {{ab|ch}} produces "ch".

Infoboxes and Clearing Margins

Infobox for a Service Plaza

We've put this infobox here to demonstrate what they look like in general, and how to use the {{Clear}} template in conjunction with them to fix any issues caused by infoboxes taking up margins. By the way, that is Sideling Hill Plaza in the picture.
Direction Eastbound and Westbound
County Fulton
State Kalmont


Category:Infobox templates are for compact, standardized summaries of facts about a topic. For details on parameters, see each template.

You often want to insert an infobox template at the top of a section and allow the remaining text in the section to flow around it, which is what we did here; the template code to generate the infobox at the right was put at the top of this section, just under the header.

But the rest of your page, including additional sections, will continue to flow to the left of the infobox. If you want to force your page to "clear its margins", you simply include the template {{clear}}, which is what we do right after this sentence.

And you can see how no further content appears until after the margins are clear of the infobox. This paragraph, and the rest of the guide, are pushed down below the infobox.