Difference between revisions of "TDE Wiki Style Guideline"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
m (→‎Code: added note about TQt classes template)
m (Comment out "non-Trinity" while we have no better alternative for Trinity classes)
Line 23: Line 23:
 
* To denote a TQt class use [[:Template:TQt class]].
 
* To denote a TQt class use [[:Template:TQt class]].
 
<!-- TODO: * To denote a Trinity class use the special template. -->
 
<!-- TODO: * To denote a Trinity class use the special template. -->
* To denote a non-Trinity class use the <code><nowiki><tt>...</tt></nowiki></code> tag.
+
* To denote a <!-- non-Trinity --> class use the <code><nowiki><tt>...</tt></nowiki></code> tag.
 
* To denote a function signature or a function call use the <code><nowiki><code>...</code></nowiki></code> tag.
 
* To denote a function signature or a function call use the <code><nowiki><code>...</code></nowiki></code> tag.
 
* To denote a source code block use <code><nowiki><syntaxhighlighting lang="...">...</syntaxhighlighting></nowiki></code> tag with the appropriate <code>lang</code> attribute.
 
* To denote a source code block use <code><nowiki><syntaxhighlighting lang="...">...</syntaxhighlighting></nowiki></code> tag with the appropriate <code>lang</code> attribute.

Revision as of 17:06, 4 March 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 TQt class use Template:TQt class.
  • To denote a 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.