Template:Nutshell/doc

From MeritBadgeDotOrg

(Difference between revisions)
Jump to: navigation, search
(New page: {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --> ==Location== This infobox template presents a concise summary at the top of [[MeritBadge...)
Current revision (12:41, October 20, 2008) (edit) (undo)
(expland doc file text to include built-in options for width and leftmargin)
 
(One intermediate revision not shown.)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->
-
==Location==
+
<big>'''Function'''</big>
 +
----
 +
'''<nowiki>{{Nutshell|Sample text}}</nowiki>''' lets you quickly note a key fact at the top of a page.
 +
 
 +
'''<nowiki>{{Nutshell|Sample text|width|leftmargin}}</nowiki>''' is the format for the optional variables 2 and 3. The default values are width = 80% and leftmargin=10%.
 +
 
 +
 
 +
<big>'''Location'''</big>
 +
----
This infobox template presents a concise summary at the top of [[MeritBadgeDotOrg:Policies and guidelines|MeritBadgeDotOrg policy and guideline]] pages. It is placed below the title and other infoboxes and above the first paragraph of the main body.
This infobox template presents a concise summary at the top of [[MeritBadgeDotOrg:Policies and guidelines|MeritBadgeDotOrg policy and guideline]] pages. It is placed below the title and other infoboxes and above the first paragraph of the main body.
-
==Usage==
 
-
* <pre>{{nutshell|text}}</pre>
 
-
::becomes:
 
-
{{nutshell|text}}
 
-
* <pre>{{nutshell|<li>item 1<li>item 2<li>item 3}}</pre>
+
<big>'''Examples'''</big>
 +
----
 +
;If you use <nowiki>{{Nutshell|Sample text}}</nowiki> with just the text parameter:
 +
<nowiki>{{Nutshell|Sample text}}</nowiki>
 +
which gives:
 +
{{Nutshell|Sample text}}
 +
<br>
 +
;You can use Nutshell to give a three point outline of the article:
 +
* <nowiki>{{nutshell|<li>item 1<li>item 2<li>item 3}}</nowiki>
::becomes:
::becomes:
{{nutshell|<li>item 1<li>item 2<li>item 3}}
{{nutshell|<li>item 1<li>item 2<li>item 3}}
 +
<br>
 +
;To automatically set the width to the minimum width needed:
 +
<nowiki>{{Nutshell|Sample text|auto}}</nowiki>
 +
which gives:
 +
{{Nutshell|Sample text|auto}}
 +
<br>
 +
;To change the left margin to 5% and use auto width:
 +
<nowiki>{{Nutshell|Sample text|auto|5%}}</nowiki>
 +
which gives:
 +
{{Nutshell|Sample text |auto|5%}}
 +
<br>
 +
;One last example of left margin of 30px and width of 60%:
 +
<nowiki>{{Nutshell|Sample text|60%|30px}}</nowiki>
 +
which gives:
 +
{{Nutshell|Sample text |60%|30px}}
 +
===Template notes===
===Template notes===
Line 18: Line 46:
*Make sure each word in the nutshell carries significant weight — "Make every word tell"
*Make sure each word in the nutshell carries significant weight — "Make every word tell"
*[[Wikilink]] key words to other [[MeritBadgeDotOrg :Policies and guidelines|policy and guideline]] pages to create a "nut trail"}}
*[[Wikilink]] key words to other [[MeritBadgeDotOrg :Policies and guidelines|policy and guideline]] pages to create a "nut trail"}}
 +
 +
 +
<big>'''See also'''</big>
 +
----
 +
* [[MeritBadgeDotOrg:Article message boxes]]
 +
* [[Article Message_Box usage]]
 +
* [[Template:Info]]
 +
* [[Template:Expand]]
 +
* [[Template:Stub|Stub]]
 +
* [[Template:Workpage|Workpage]]
 +
 +
<noinclude>[[Category:Template documentation]]</noinclude>

Current revision

This documentation is transcluded from Template:Nutshell/doc/doc.
This template may have a sandbox (edit) and testcases for editors to experiment.

Function


{{Nutshell|Sample text}} lets you quickly note a key fact at the top of a page.

{{Nutshell|Sample text|width|leftmargin}} is the format for the optional variables 2 and 3. The default values are width = 80% and leftmargin=10%.


Location


This infobox template presents a concise summary at the top of MeritBadgeDotOrg policy and guideline pages. It is placed below the title and other infoboxes and above the first paragraph of the main body.


Examples


If you use {{Nutshell|Sample text}} with just the text parameter
{{Nutshell|Sample text}}

which gives:

This page in a nutshell: Sample text


You can use Nutshell to give a three point outline of the article
  • {{nutshell|<li>item 1<li>item 2<li>item 3}}
becomes:
This page in a nutshell:
  • item 1
  • item 2
  • item 3

  • To automatically set the width to the minimum width needed
    {{Nutshell|Sample text|auto}}
    

    which gives:

    This page in a nutshell: Sample text


    To change the left margin to 5% and use auto width
    {{Nutshell|Sample text|auto|5%}}
    

    which gives:

    This page in a nutshell: Sample text


    One last example of left margin of 30px and width of 60%
    {{Nutshell|Sample text|60%|30px}}
    

    which gives:

    This page in a nutshell: Sample text


    Template notes

    • Use the nutshell summary to make MeritBadgeDotOrg more inviting to new users
    • Nutshell entries must be brief overviews, with a very high signal to noise ratio
    • Make sure each word in the nutshell carries significant weight — "Make every word tell"
    • Wikilink key words to other policy and guideline pages to create a "nut trail"}}


    See also


    Personal tools
    language