Style

From GoodRelations Wiki
Jump to: navigation, search

Style Guide

On this page, we summarize best practices for keeping the GoodRelations Wiki consistent.

URI Pattern

We use a hierarchical URI pattern:

  • Pages of generic relevance are in the "root" name space
  • The following types of documents have their own subspaces
    • /Cookbook/ - all recipes
    • /Case_studies/ - all case studies
    • /Tools/ - all tools
    • /Events/ - all events
    • /Vocabularies/ - all ontologies (VSO etc.)
    • /GEP/ - GoodRelations Enhancement Proposals
    • /Documentation/ - the User's Guide

Examples:

Color Codes

  • Links
    • Foreground color: #df6010
  • Code listings
    • Background color: #fff9ef
    • Border color: #efa363
  • Header menu
    • Background color on select: #636161
    • Background color on hover: none
    • Border color: #bd7b1a
  • Navigation boxes and footer bar
    • Background color: #eeeeee
    • Border color: #dddddd (bottom or top)

Basic Structure

Page titles use H1, e.g.

= The GoodRelations Cookbook =

All subsections use H2. e.g.

= The GoodRelations Cookbook =
blabla
== Section 1 ==
blabla
== Section 2 ==

Naming Conventions

Pages

Page URIs should be useful page titles, e.g. 

Only the first character is capitalized, unless the page title is a proper name, e.g. 

If the full page title is pretty long, use a good acronym and disable the displaying of this as the page title, e.g. as in

Categories

Category names should be in singular form, with proper English capitalization and underscores for spaces (no CamelWords). Examples:


Code: RDF/XML, Turtle, RDFa

The wiki supports syntax highlighting via the Geshi extension, plus a proprietary extension for syntax highlighting for SPARQL and Turtle. For RDF/XML, use

<code xml>
code
</code>

For SPARQL and Turtle, use 

<code n3>
code
</code>

See also http://www.mediawiki.org/wiki/Extension:GeSHiCodeTag

Images

Images should be 720 pixels wide.

Multiple Columns

Use a div element instead of tables:

Two columns

Tools

FAQs

Tools

FAQs

Three columns

Tools

FAQs

People

Tools

FAQs

People

Disabling Page Title

Insert (has been disabled - titles only appear if colon is found in title name, e.g. Mediawiki:Sidebar)

{{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}}

Better use

__NOTITLE__

Disabling Table of Contents

__NOTOC__

Forcing the Table of Contents to be Displayed at a Certain Position

__TOC__

or

__FORCETOC__

Disabling Edit Link for Subsections

__NOEDITSECTION__

Side-bar

Edit http://wiki.goodrelations-vocabulary.org/Mediawiki:Sidebar

Infobox, Message Boxes and Navigation Templates

Infoboxes

Example 1 - Case Study Infobox:

{{infobox Case Study
| company = Universität der Bundeswehr München
}}

Example 2 - User Infobox:

{{infobox User
| name = Martin Hepp
| affiliation = Universität der Bundeswehr München
| role = Professor and Head of Research Group
}}

Navbox

Example - Documentation Navbox:

{{navbox Documentation
| prev = Intro
| next = Quickstart
}}

Message boxes

{{Warning|It is important to observe ...}}
Warning: It is important to observe ...


{{Note|This feature has been introduced for scenarios where...}}
Note: This feature has been introduced for scenarios where...


{{Tip|You can save a lot of markup by ...}}
Tip: You can save a lot of markup by ...


{{Update required}}
Warning openclipart.png
Update required: The content and recommendation on this page may not reflect the current state of the art. Please help improve it by addressing the issues from the discussion page and remove this template when finished.
{{Work in progress}}
Construction.png
Work in progress: This page is an incomplete draft. Please help to improve it by addressing the issues from the discussion page and remove this template when finished.


Feed

Last modified pages: {{#widget:Feed |feedurl=http://wiki.goodrelations-vocabulary.org/index.php?title=Special:RecentChanges&feed=atom |chan=n |num=5 |desc=0 |date=n |targ=y }}

Extensions

No Title

This light-weight extension allows to hide the page title:

__NOTITLE__ 

CategorySuggest

... is an extraction of SelectCategoryTagCloud (without cloud feature). SelectCategoryTagCloud causes a weird behaviour of mediawiki in a sense that it trims all leading spaces in preformatted text. Thus we discarded it.

Read more

Cite

Example

According to scientists, the Sun is pretty big.<ref>E. Miller, The Sun, (New York: Academic Press, 2005), 23-5.</ref>
The Moon, however, is not so big.<ref>R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44-6.</ref>

==Notes==
<references />

Sample result

According to scientists, the Sun is pretty big.[1] The Moon, however, is not so big.[2]

Notes

  1. E. Miller, The Sun, (New York: Academic Press, 2005), 23-5.
  2. R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44-6.

Custom Sidebar

The replacement of the standard sidebar for a single page by a custom sidebar (e.g. with two boxes) is best accomplished via the sidebar tag:

<sidebar>
* Menu
** link1|Text 1
** link2|Text 2

* Menu2
** link1|Text 1
** link2|Text 2
</sidebar>

If you inserted the above snippet (omitting the sidebar-tag) into Tools/Sidebar the complete "Tools" hierarchy would inherit the custom sidebar, i.e. Tools/BMEcat2GR, etc.

More information:

Category Members on Sidebar

This extension allows to enrich the sidebar with a list of all members in a category.

* CATEGORY:Tool|List of Tools

Slideshare

This widget allows you to add SlideShare presentations to your wiki page.

To insert this widget, use the following code:

{{#widget:SlideShare
|doc=goodrelationsoverviewfinal3key-1227044498468783-9
|width=425
|height=348
}}

Parameters

  • doc - is a parameter from embed code
  • start - optional parameter to define start slide number
  • width & height - optional, 425x348 is a default
  • player - defaults to '2' and allows you to switch to other players
  • norelated - if set, widget will not display related content and sharing functionality at the end of the deck

Sample result

{{#widget:SlideShare |doc=goodrelationsoverviewfinal3key-1227044498468783-9 |width=425 |height=348 }}