Difference between revisions of "TDE Wiki Style Guideline"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
m (Added section about tables)
(Get rid of "Be..." strings, per suggestion of User:Msi)
Line 12: Line 12:
 
= Generic guidelines =
 
= Generic guidelines =
   
 
* Use visual styles to make it easier tell apart different kinds of information.
''' Be <span style="color: red">semantic</span>. '''
 
 
* Try to be consistent with how other pages look and the way they use styles and templates to achieve things.
Use visual styles to make it easier tell apart different kinds of information.
 
 
* Create templates for things that can be reused on the wiki. Re-use [[Special:UncategorizedTemplates|existing templates]] as much as possible.
 
''' Be <span style="color: green">consistent</span>. '''
 
Try to be consistent with how other pages look and the way they use styles and templates to achieve things.
 
 
''' Be <span style="color: blue">smart</span>. '''
 
Create templates for things that can be reused on the wiki. Re-use [[Special:UncategorizedTemplates|existing templates]] as much as possible.
 
   
   

Revision as of 22:01, 28 February 2022

Messagebox info.png
Tip
This document is a work-in-progress, you can help by discussing it on the tde-users mailing list, the discussion page, via Jabber/XMPP or IRC.

This page is meant to provide a single guideline for styling pages on this Wiki.

The goal is to achieve consistency between pages as much as possible.


Generic guidelines

  • Use visual styles to make it easier tell apart different kinds of information.
  • Try to be consistent with how other pages look and the way they use styles and templates to achieve things.
  • Create templates for things that can be reused on the wiki. Re-use existing templates as much as possible.


Style Recommendations

Code

  • To denote a non-Trinity class use the <tt>...</tt> tag.
  • To denote a function signature or a function call use the <code>...</code> tag.
  • To denote a source code block use <syntaxhighlighting lang="...">...</syntaxhighlighting> tag with the appropriate lang attribute.
    • To denote commands to be run in a shell use the shell-session. Prepend the commands with the $ sign for commands to be run with normal user privileges or # for commands to be run with root privileges.

Files

  • To denote a file, a directory or a path, use the <tt>...</tt> tag.
  • To denote the (whole or partial) contents of a file use a space before each line unless it contains code.

Tables

  • To make tables look better and be more readable, add class="wikitable" to your tables.
  • Make sure tables don't stretch too much vertically or horizontally.

Messages and boxes

Warnings

  • If a page or section is unfinished, place Template:TODO in the beginning of the page or section.
  • If a page or section is being actively worked on, and only for that time span, you may use Template:WIP to prevent other users from accidentally causing a save conflict.
  • If a page or section contains outdated information, place Template:Outdated inserting the appropriate date and justifying it.
    • If a page or section contains information relevant to KDE3, use Template:KDE3 instead. When such a page is updated to be applicable to the Trinity Desktop, replace it with Template:Applicable to TDE.
  • Denote spam pages with Template:Spam.
  • For generic warnings use Template:WarningBox with the appropriate arguments.

Other boxes

  • For generic type messages (notes, tips, etc.) use Template:TipBox.
  • Avoid using Template:Box directly if you can help it. If you really need to use it, consider proposing a new template.