Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
(tweak)
(testing template for translated text)
Line 7: Line 7:
'''See Also''' http://meta.wikimedia.org/wiki/Help:Template
'''See Also''' http://meta.wikimedia.org/wiki/Help:Template
[[Category:Template]]
[[Category:Template]]
</noinclude>
<div id="{{{element_name}}}"/>
<div style="border:2px solid #ba651f; margin:0px; ">
<div style="background:#e07b1d; "><tt>'''{{{element_path}}}.{{{element_name}}}'''</tt></div>
{{{description}}}
<div style="padding-left:10px; ">
{| cellspacing="0" border="1" width=100% style="border:1px solid #ba651f; "


: <big>'''Testing translated text<strike></strike>'''</big>
|- valign="top"
! <tt>default</tt>
| {{{STATE_NORMAL}}}


</noinclude><div style="display:{{{display|none}}}; border:1px solid orange; margin:0px; margin-left:20px; font-size=80%; ">{{{1}}}</div><noinclude>
|- valign="top"
! <tt>focused</tt>
| {{{STATE_SELECTED}}}

|- valign="top"
! <tt>pressed</tt>
| {{{STATE_ACTIVE}}}

|- valign="top"
! <tt>hover</tt>
| {{{STATE_PRELIGHT}}}

|- valign="top"
! <tt>inactive</tt>
| {{{STATE_INSENSITIVE}}}

|}</div></div>
<noinclude>

: <big>'''Testing Graphics API template<strike></strike>'''</big>


== Usage ==
== Usage ==


<nowiki>{{</nowiki> Sandbox
<nowiki>{{</nowiki> Sandbox
| someText
| element_path = &lt;!-- the 'path' or 'qualification' of the elmente &mdash;ie: <tt>gtk, sugar.activity, sugar.graphics ...</tt> --&gt;
| display = { block # Object is rendered as a block element.
| element_name = &lt;!-- name of the component&mdash;ie: <tt>window, IconButton, ...</tt> --&gt;
none # Default. Object is not rendered.
| description = &lt;!-- full text describing the appropriate attributes or peculiarities of the element --&gt;
inline # Object is rendered as an inline element sized by the dimensions of the content.
| STATE_NORMAL = &lt;!-- 'default' state considerations or peculiarities --&gt;
inline-block # Object is rendered inline, but the contents of the object are rendered as a block element. Adjacent inline elements are rendered on the same line, space permitting.
| STATE_SELECTED = &lt;!-- 'focused' state considerations or peculiarities --&gt;
list-item # Object is rendered as a block element, and a list-item marker is added.
| STATE_ACTIVE = &lt;!-- 'pressed' state considerations or peculiarities --&gt;
table-header-group # Table header is always displayed before all other rows and row groups, and after any top captions. The header is displayed on each page spanned by a table.
| STATE_PRELIGHT = &lt;!-- 'hover' state considerations or peculiarities --&gt;
table-footer-group # }
| STATE_INSENSITIVE = &lt;!-- 'inactive' state considerations or peculiarities --&gt;
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>


Line 56: Line 28:


<nowiki>{{</nowiki> Sandbox
<nowiki>{{</nowiki> Sandbox
| The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.<nowiki>}}</nowiki>
| element_path = sugar.graphics
{{ Sandbox
| element_name = IconButton
| The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.
| description = * Support for SVG and png.
| inline-block}}
* Icons should be grey scale. But might be coloured with the XO colors (svg only)

* Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
<nowiki>{{</nowiki> Sandbox
| STATE_NORMAL = &lt;!-- 'default' state considerations or peculiarities --&gt;
| The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.<nowiki>}}</nowiki>
| STATE_SELECTED = Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points &lt;!-- 'focused' state --&gt;
| STATE_ACTIVE = Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey &lt;!-- 'pressed' state --&gt;
| STATE_PRELIGHT = Black &lt;!-- 'hover' state --&gt;
| STATE_INSENSITIVE = Fallbacks if no inactive icon is specified. &lt;!-- 'inactive' state --&gt;
<nowiki>}}</nowiki>
{{ Sandbox
{{ Sandbox
| The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.
| element_path = sugar.graphics
| inline-block}}
| element_name = IconButton
| description = * Support for SVG and png.
* Icons should be grey scale. But might be coloured with the XO colors (svg only)
* Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
| STATE_NORMAL =
| STATE_SELECTED = Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points
| STATE_ACTIVE = Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey
| STATE_PRELIGHT = Black
| STATE_INSENSITIVE = Fallbacks if no inactive icon is specified.}}
</noinclude>
</noinclude>

Revision as of 18:48, 13 May 2007

Many times you may want to just 'test' an idea for a template, I haven't found a sensible way of fully testing templates by themselves (as they will not get included in the edited version, but rather the saved version).

The idea of this Template:Sandbox is to have that, a simple testing zone that will not interfere with others and avoid leaving a trail of botched attempts.

Please leave this comment/text for others to read.
See Also http://meta.wikimedia.org/wiki/Help:Template
Testing translated text
{{{1}}}

Usage

{{ Sandbox
  | someText
  | display = { block        # Object is rendered as a block element.
                none         # Default. Object is not rendered.
                inline       # Object is rendered as an inline element sized by the dimensions of the content.
                inline-block # Object is rendered inline, but the contents of the object are rendered as a block element. Adjacent inline elements are rendered on the same line, space permitting.
                list-item    # Object is rendered as a block element, and a list-item marker is added.
                table-header-group # Table header is always displayed before all other rows and row groups, and after any top captions. The header is displayed on each page spanned by a table.
                table-footer-group # }
}}

Samples

{{ Sandbox 
  | The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.}}
The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.
{{ Sandbox 
  | The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.}}
The reason is quite simple: the OLPC has made an offer (an inexpensive laptop) to national governments (not individuals or NGOs). Countries interested in the offer then decide if the offer is of their liking or not. If it is, negotiations and/or talks can start with the OLPC, and it's only then that they appear on the OLPC radar, and given a color/status depicting the level of commitment or interest.