Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (tweaking)
(reorganize)
 
(71 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
Often you need to test an idea for a template, so try it out here.
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).


: 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). -- [[User:Xavi]]
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.


The idea of this {{tl|Sandbox}} page is to have that, a simple testing template 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
[[Category:Template]]
</noinclude>
<div id="{{{element_name}}}"/>
<div style="border:1px 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%


If you try out the template here, you have to save the template and then preview to see how it works. You can instead edit [[Test sandbox template]].
|- valign="top"
! <tt>default</tt>
| {{{STATE_NORMAL}}}


'''See Also''' http://meta.wikimedia.org/wiki/Help:Template
|- valign="top"
[[Category:Template]]
! <tt>focused</tt>
| {{{STATE_SELECTED}}}


''Please leave this comment/text above for others to read.''
|- valign="top"
----
! <tt>pressed</tt>
| {{{STATE_ACTIVE}}}


: <big>'''Testing: subpage parsing'''</big>
|- valign="top"
! <tt>hover</tt>
| {{{STATE_PRELIGHT}}}


; Goal
|- valign="top"
: Given "Feature roadmap/Name of feature", return "Name of feature"
! <tt>inactive</tt>
: Given "Just a title", return "Just a title"
| {{{STATE_INSENSITIVE}}}


|}</div></div>
</noinclude>
{{#sub:
<noinclude>
{{{1}}} |
{{#if: {{#pos:{{{1}}}|/}} |
{{#expr: {{#pos:{{{1}}}|/}} + 1}} |
{{#pos:{{{1}}}|/}}
}}
}}


pos={{#pos:{{{1}}}|/}}
: <big>'''Testing Graphics API template<strike></strike>'''</big>
iftest={{#if: {{#pos:{{{1}}}|/}} |

yes |
== Usage ==
no

}}
<nowiki>{{</nowiki> Sandbox
| element_path = &lt;-- the 'path' or 'qualification' of the elmente &mdash;ie: <tt>gtk, sugar.activity, sugar.graphics ...</tt> --&gt;
| element_name = &lt;-- name of the component&mdash;ie: <tt>window, IconButton, ...</tt> --&gt;
| description = &lt;-- full text describing the appropriate attributes or peculiarities of the element --&gt;
| STATE_NORMAL = &lt;-- 'default' state considerations or peculiarities --&gt;
| STATE_SELECTED = &lt;-- 'focused' state considerations or peculiarities --&gt;
| STATE_ACTIVE = &lt;-- 'pressed' state considerations or peculiarities --&gt;
| STATE_PRELIGHT = &lt;-- 'hover' state considerations or peculiarities --&gt;
| STATE_INSENSITIVE = &lt;-- 'inactive' state considerations or peculiarities --&gt;
<nowiki>}}</nowiki>

== Samples ==

<nowiki>{{</nowiki> Sandbox
| element_path = sugar.graphics
| 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 = &lt;-- 'default' state considerations or peculiarities --&gt;
| 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
| element_path = sugar.graphics
| 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 = &lt;-- 'default' state considerations or peculiarities --&gt;
| 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>

Latest revision as of 01:31, 16 March 2009

Often you need to test an idea for a template, so try it out here.

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). -- User:Xavi

The idea of this {{Sandbox}} page is to have that, a simple testing template that will not interfere with others and avoid leaving a trail of botched attempts.

If you try out the template here, you have to save the template and then preview to see how it works. You can instead edit Test sandbox template.

See Also http://meta.wikimedia.org/wiki/Help:Template

Please leave this comment/text above for others to read.


Testing: subpage parsing
Goal
Given "Feature roadmap/Name of feature", return "Name of feature"
Given "Just a title", return "Just a title"


{{#sub:

 {{{1}}} |
 Expression error: Unrecognized punctuation character "{".

}}

pos={{#pos:{{{1}}}|/}} iftest=yes