Difference between revisions of "Template:Note"

From MakerFX Wiki!
Jump to: navigation, search
m (97 revisions imported)
 
(56 intermediate revisions by 27 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{1|}}}|<table cellspacing="0" cellpadding="0" border="0" style="background: transparent;"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[File:Bulbgraph.png|18px|Note|link=]]</span> '''Note''': {{#if: {{{1|}}}|</td><td valign="top" style="padding-left:0.5em;">''{{{1|}}}''</td></tr></table>}}</includeonly><noinclude>
+
<languages/>
== Why using this template ==
+
<onlyinclude>{{#switch:<translate></translate>
Displays a {{Note}}''icon and text.''
+
| =
 
+
{{#if: {{#if:{{{1|}}}|{{{1}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <div role="note" class="note note-{{#switch:{{{2|}}}
== Parameters ==
+
    |gotcha=error
List the parameters with a brief description.
+
    |=info
*Note text is optional, see [[#Methode 2|Method 2]] for details.
+
    |#default={{{2|}}}
 
+
    }}" style="background-position:{{dir|{{pagelang}}|right|left}} 7px top 50%; {{dir|{{pagelang}}|padding-right: 40px; padding-left: 0.5em;|padding-right: 0.5em; padding-left: 40px;}}">{{{1}}}</div>
== How to use ==
+
  | [[File:Bulbgraph.png|18px|<translate><!--T:1--> Note</translate>|link=]]&nbsp;'''<translate><!--T:2--> Note:</translate>''' }}
 +
| #default=
 +
  {{ {{TNTN|Note}}
 +
  |1={{#if:{{{1|}}}|<nowiki></nowiki>{{{1|}}}}}
 +
  |2={{{2|}}}
 +
  |demo=<noinclude>demo</noinclude>
 +
  }}
 +
}}</onlyinclude>
 +
{{ {{TNTN|documentation}} |content=
 +
<translate>
 +
== Usage == <!--T:3-->
 +
</translate>
 
<pre>
 
<pre>
{{Note|parameter1=value}}
+
{{note|Foo}}
 +
{{note|Foo|reminder}}
 +
{{note|Foo|error}}
 +
{{note|Foo|gotcha}}
 +
{{tip|Foo}}
 +
{{note}} <translate><!--T:6--> Loose test</translate>
 +
{{tip}} <translate><!--T:7--> Loose test</translate>
 
</pre>
 
</pre>
 +
{{note|Foo}}
 +
{{note|Foo|reminder}}
 +
{{note|Foo|error}}
 +
{{note|Foo|gotcha}}
 +
{{tip|Foo}}
 +
{{note}} <translate><!--T:4--> Loose test</translate>
  
=== Method 1 ===
+
{{tip}} <translate><!--T:5--> Loose test</translate>
The following displays the note icon and the word 'Note:'.  You can follow this with whatever text/images/markup you like, and it works in-line, within a paragraph.
 
Monsters are green. <nowiki>{{Note}}''This is an in-line note, to remind you that some monsters are orangey-purple.''</nowiki>
 
 
 
Monsters are green. {{Note}}''This is an in-line note, to remind you that some monsters are orangey-purple.''
 
 
 
=== Method 2 ===
 
The following includes the text passed to the template, and uses a table to stop the text flowing round the icon.  These always force a newline before and after the note.
 
  
<nowiki>{{Note|Here is a long note, which is sufficiently wordy to run onto a second line,  
+
<templatedata>
which would normally cause it to wrap round the icon, but because we passed it as a parameter
+
{
it keeps its left alignment straight.}}</nowiki>  
+
"params": {
 +
"1": {
 +
"type": "content",
 +
"label": "Text",
 +
"required": true
 +
},
 +
"2": {
 +
"label": "Type",
 +
"description": "'reminder', 'error', 'gotcha' or nothing. Will affect formatting.",
 +
"type": "string"
 +
}
 +
},
 +
"format": "inline",
 +
"description": "Show a note in a box (e.g. a top-of-the-page warning)."
 +
}
 +
</templatedata>
  
{{Note|Here is a long note, which is sufficiently wordy to run onto a second line, which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.}}
+
}}
</noinclude>
+
[[Category:Templates{{#translation:}}|{{PAGENAME}}]]

Latest revision as of 14:10, 6 August 2018

<languages/>

Script error: No such module "documentation". [[Category:Templates{{#translation:}}|Note]]