Template:OBX source: Difference between revisions

From OLPC
Jump to navigation Jump to search
(testing some color status)
m (some usage doc)
 
Line 5: Line 5:
| info-background = {{ #switch: {{{status|}}} | abandoned=#f96735 | #default=#8ad962 }}
| info-background = {{ #switch: {{{status|}}} | abandoned=#f96735 | #default=#8ad962 }}
}}<includeonly>[[Category:XO source|{{PAGENAME}}]]</includeonly><noinclude>{{-}}
}}<includeonly>[[Category:XO source|{{PAGENAME}}]]</includeonly><noinclude>{{-}}

<pre>
real
| logo-background = {{ #switch: {{{status|}}} | abandoned=#d84b18 | #default=#6cbe42 }}
| info-background = {{ #switch: {{{status|}}} | abandoned=#f96735 | #default=#8ad962 }}
test
| logo-background = {{ #switch: {{{status|}}} | abandoned=#6cbe42 | #default=#d84b18 }}
| info-background = {{ #switch: {{{status|}}} | abandoned=#8ad962 | #default=#f96735 }}
</pre>


== Usage ==
== Usage ==


Has two un-named parameters:
Categorizes the including page into the [[:Category:XO sources]].
* <tt>wiki-url-to-source</tt> &mdash; a full link to where the sources are kept
* <tt>logo</tt> &mdash; a full wiki-text (or image) to be used on the left (by default '''GIT''')
Has an extra '''named''' parameter, which if specified '''should always be after''' the previous two:
* <tt>status</tt> &mdash; to specify the status of the code base. Currently, if '''abandoned''' is specified, it changes the background colors to red-ish tones (see below). No other status names are being used, and the colors will default to greens for any (or no) status.


{| border=1 cellspacing=0 cellpadding=5
{| border=1 cellspacing=0 cellpadding=5
Line 32: Line 26:
| style="font-size:80%;" | <tt><nowiki>|source{{!}}wiki-url-to-source{{!}}type{{!}}status=abandoned|</nowiki></tt>
| style="font-size:80%;" | <tt><nowiki>|source{{!}}wiki-url-to-source{{!}}type{{!}}status=abandoned|</nowiki></tt>
|}
|}

Categorizes the including page into the [[:Category:XO sources]].





Latest revision as of 22:41, 12 September 2007

GIT sources in dev.laptop.org


Usage

Has two un-named parameters:

  • wiki-url-to-source — a full link to where the sources are kept
  • logo — a full wiki-text (or image) to be used on the left (by default GIT)

Has an extra named parameter, which if specified should always be after the previous two:

  • status — to specify the status of the code base. Currently, if abandoned is specified, it changes the background colors to red-ish tones (see below). No other status names are being used, and the colors will default to greens for any (or no) status.
Result Stand alone {{olpcboxmacro}} code
{{{type}}} sources in {{{wiki-url-to-source}}}
{{OBX source|wiki-url-to-source|type}} |source{{!}}wiki-url-to-source{{!}}type|
{{{type}}} sources in {{{wiki-url-to-source}}}
{{OBX source|wiki-url-to-source|type|status=abandoned}} |source{{!}}wiki-url-to-source{{!}}type{{!}}status=abandoned|

Categorizes the including page into the Category:XO sources.