Template:OBX source: Difference between revisions

From OLPC
Jump to navigation Jump to search
(test for specifying the source location)
 
m (some usage doc)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{OBX boilerplate params
{{XO box2
| logo = {{{2|GIT}}} <!-- whatever wiki text is appropriate (including images) -->
| border-color = #6cbe42
| info = [[:Category:XO source{{!}}sources]] in {{{1|[http://dev.laptop.org/ dev.laptop.org]}}}
| border-width = 1 <!-- the border width in px -->
| logo-background = #6cbe42
| logo-background = {{ #switch: {{{status|}}} | abandoned=#d84b18 | #default=#6cbe42 }}
| info-background = {{ #switch: {{{status|}}} | abandoned=#f96735 | #default=#8ad962 }}
| logo-size = 14 <!-- the font size in pt -->
}}<includeonly>[[Category:XO source|{{PAGENAME}}]]</includeonly><noinclude>{{-}}
| logo-color = black <!-- the font color -->
| info-background = #8ad962
| info-size = 8 <!-- the font size in pt -->
| info-color = black <!-- the font color -->
| logo = {{{2|GIT}}} <!-- whatever wiki text is appropriate (including images) -->
| info = The [[:Category:XO source{{!}}sources]] can be found in {{{1|[http://dev.laptop.org/ dev.laptop.org]}}} <!-- whatever wiki text is appropriate (images not recommended) -->
| float = left <!-- if the box should float on the { left | right } -->
}}<includeonly>[[Category:XO source|{{PAGENAME}}]]</includeonly><noinclude>{{-}}[[Category:XO templates]]


== 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
{|
|-
|-
! Result !! Stand alone !! [[Template:Babel-XO|Babel-XO]]
! Result !! Stand alone !! {{tl|olpcboxmacro}} code
|-
|-
| {{XO source|wiki-url-to-source|type}}
| {{OBX source|{{{wiki-url-to-source}}}|{{{type}}}}}
| style="font-size:80%;" | <tt><nowiki>{{XO source|wiki-url-to-source|type}}</nowiki></tt>
| style="font-size:80%; font-style:fixed; " | <nowiki>{{OBX source|wiki-url-to-source|type}}</nowiki>
| style="font-size:80%;" | <tt><nowiki>|source{{!}}wiki-url-to-source{{!}}type|</nowiki></tt>
| style="font-size:80%;" | <tt><nowiki>|source{{!}}wiki-url-to-source{{!}}type|</nowiki></tt>
|-
| {{OBX source|{{{wiki-url-to-source}}}|{{{type}}}|status=abandoned}}
| style="font-size:80%; font-style:fixed; " | <nowiki>{{OBX source|wiki-url-to-source|type|status=abandoned}}</nowiki>
| 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]].
== Samples ==



[[Category:OBX templates|Source]]
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
</noinclude>
</noinclude>

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.