Help:Template cheatsheet: Difference between revisions

Content deleted Content added
 
(28 intermediate revisions by the same user not shown)
Line 209:
|
|}
 
 
== Inline Infoboxes ==
{{markupv
|t=Note |m=<nowiki>{{Note|Don't do that, do this..}}</nowiki>|r={{Note|Don't do that, do this..}}
}}{{markupv
|m=<nowiki>{{Note|Don't do that, do this..|reminder-yellow}}</nowiki>|r={{Note|Don't do that, do this..|reminder-yellow}}
}}
{{markupv
|t=Tip |m=<nowiki>{{Tip|Plug the FC Link into the Port Labelled 1A}}</nowiki>|r={{Tip|Plug the FC Link into the Port Labelled 1A}}
}}
{{markupv
|t=Info |m=<nowiki>{{Info|It is helpful to know that ...}}</nowiki>|r={{Info|It is helpful to know that ...}}
}}
{{markupv
|m=<nowiki>{{Info|It is helpful to know that ...|info-blue}}</nowiki>|r={{Info|It is helpful to know that ...|info-blue}}
}}
{{markupv
|t=Warning |m=<nowiki>{{Warning|The CPU die is likely to be very-hot, allow to cool before handling!}}</nowiki>|r={{Warning|The CPU die is likely to be very-hot, allow to cool before handling!}}
}}
{{markupv
|t=Caution |m=<nowiki>{{Caution|Please ensure to replace the cables in the original positions after controller replacement to avoid unexpected performance issues}}</nowiki>|r={{Caution|Please ensure to replace the cables in the original positions after controller replacement to avoid unexpected performance issues}}
}}
{{markupv
|m=<nowiki>{{Caution|Please ensure to replace the cables in the original positions after controller replacement to avoid unexpected performance issues|caution-red}}</nowiki>|r={{Caution|Please ensure to replace the cables in the original positions after controller replacement to avoid unexpected performance issues|caution-red}}
}}
{{markupv
|t=Escalate |m=<nowiki>{{Escalate|a Principle-Engineer}}</nowiki>|r={{Escalate|a Principle-Engineer}}
}}
{{markupv
|m=<nowiki>{{Escalate|Engineering via L3}}</nowiki>|r={{Escalate|Engineering via L3}}
}}
 
 
Line 366 ⟶ 398:
|{{Tl|convert}}
|
|<code><nowiki>{{convert|number|unit|unit}}</nowiki></code>
|<code><nowiki>MX7000 chassis weights{{convert|1|lb|kg}}</nowiki></code>
|MX7000 chassis weights{{convert|180|lb|kg}}
|Displays inline conversion between different unit types
|-
|{{nowraplinks|{{Tl|number table sorting}}}}
|{{tl|nts}}
|<code><nowiki>{{nts|number|prefix= |format= }}</nowiki></code>
|<code><nowiki>{{nts|123456789.00123|prefix=approx.&nbsp;}}</nowiki></code>
|{{nts|123456789.00123|prefix=approx.&nbsp;}}
|allows numbers to be prefixed but still sort numberically
|-
|{{Tl|str right}}
|
|<code><nowiki>{{str right|<string>|<offset>}}</nowiki></code>
|<code><nowiki>{{str right |Lorem ipsum dolor sit amet |10}}</nowiki></code>
|{{str right |Lorem ipsum dolor sit amet |10}}
|Returns a substring of characters from the end of a trimmed string.
|-
|{{Tl|str left}}
|
|<code><nowiki>{{str left|<string>|<offset>}}</nowiki></code>
|<code><nowiki>{{str left |Lorem ipsum dolor sit amet |10}}</nowiki></code>
|{{str left |Lorem ipsum dolor sit amet |10}}
|A substring of characters from the start of the trimmed string
|-
|{{Tl|age}}
|{{nowraplinks|{{Tl|number table sorting}}}}
|
|<code><nowiki>{{age|date}}</nowiki></code>
|<code><nowiki>If Einstein was alive he would be {{age|March 14 1879}} years old</nowiki></code>
|If Einstein was alive he would be {{age|March 14 1879}} years old
|
|-
|{{Tl|Birth date and age}}
|{{Tl|bda}}
|<code><nowiki>{{Birth date and age|date}}</nowiki></code>
|<code><nowiki>Elon Reeve Musk born {{bda|June 28 1971}}</nowiki></code>
|Elon Reeve Musk born {{bda|June 28 1971}}
|
|-
|{{Tl|strGregorian rightserial date}}
|{{Tl|gsd}}
|<code><nowiki>{{Gregorian serial date|date}}</nowiki></code>
|<code><nowiki>{{gsd|{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}</nowiki></code>
|{{gsd|{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
|Number of days since Monday 1st of january 1 AD
|-
|{{Tl|coord}}
|
|<code><nowiki></nowiki></code>
Line 384 ⟶ 451:
|
|
|}
 
== Images ==
{| class="wikitable"
|+
!Template
!Shortcut /
Alternative
!Usage
!Example
!Rendered
!Description
|-
|{{Tl|agepanorama}}
|
|<code><nowiki></nowiki></code>
Line 392 ⟶ 471:
|
|-
|{{Tl|coordwide image}}
|
|<code><nowiki>{{Wide image|name|image width|caption|box width|alignment|alt=alt text |dir=rtl |align-cap= }}</nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|bdatall image}}
|
|<code><nowiki>{{Tall image|name|image width|box height|alt=alt text|caption|alignment}}</nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|gsdlegend}}
|
|<code><nowiki></nowiki></code>
Line 413 ⟶ 492:
|
|}
 
 
== Quotes ==
Line 661 ⟶ 741:
|{{Tl|lower}}
|{{Tl|out}} {{Tl|od}}
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|wide template}}
|{{Tl|out}} {{Tl|od}}
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|}
 
 
== Hidden Areas ==
{| class="wikitable"
|+
!Template
!Shortcut /
Alternative
!Usage
!Example
!Rendered
!Description
|-
|{{Tl|collapse}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|collapse top}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|collapse bottom}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|reveal}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|hidden}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|hidden begin}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|{{Tl|hidden end}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
Line 963 ⟶ 1,112:
|{{Tl|transform-rotate}}
|
|<syntaxhighlight lang=html inline=1><span style="{{Transform-rotate|angle}}">rotated text</span></syntaxhighlight>
|<code><nowiki></nowiki></code>
|<syntaxhighlight lang=html inline=1><span style="{{Transform-rotate|90}}">5</span></syntaxhighlight>
|<code><nowiki></nowiki></code>
|<span style="{{Transform-rotate|90}}">5</span>
|
|Shorthanded CSS code for rotating elements inside style attribute.
|
|-
|{{Tl|writing-mode}}
|
|<syntaxhighlight lang=html inline=1><div style="{{writing-mode| direction }}">transformed text</div></syntaxhighlight>
|<code><nowiki></nowiki></code>
|<syntaxhighlight lang=html inline=1><div style="{{writing-mode|v1}}">Lorem ipsum...</div></syntaxhighlight>
|<code><nowiki></nowiki></code>
|<div style="{{writing-mode|v1}}">Lorem ipsum...</div>
|
|Shortcut for adding writing mode property using CSS
|
|-
|{{Tl|transform}}
Line 984 ⟶ 1,133:
|{{Tl|mirrorH}}
|
| {{center}} {{smallcaps|no parameters}}
|<code><nowiki></nowiki></code>
|<syntaxhighlight lang=html inline=1>A B <span style="{{mirrorH}}">C</span> D</syntaxhighlight>
|<code><nowiki></nowiki></code>
|A B <span style="{{mirrorH}}">C</span> D
|
|Shorthanded CSS code for horizontally mirroring elements inside style attribute
|
|-
|{{Tl|mirrorV}}
|
| {{center}} {{smallcaps|no parameters}}
|<code><nowiki></nowiki></code>
|<syntaxhighlight lang=html inline=1><span style="{{mirrorV}}">A</span> B C D</syntaxhighlight>
|<code><nowiki></nowiki></code>
|<span style="{{mirrorV}}">A</span> B C D
|
|Shorthanded CSS code for vertically mirroring elements inside style attribute
|
|}
 
Line 1,017 ⟶ 1,166:
|{{Tl|color}}
|
|<code><nowiki>{{color|color or hex code|Text}}</nowiki></code>
|<code><nowiki>{{color|red|'''Hello, world!'''}}</nowiki></code>
|{{color|red|'''Hello, world!'''}}
|
|Changes text to specified color
|
|-
|{{Tl|font color}}
|
|<code><nowiki>{{font color | text color | background color | text }}</nowiki></code>
|<code><nowiki>{{font color|yellow|purple|text with four words}}</nowiki></code>
|{{font color|yellow|purple|text with four words}}
|
|Changes text and background to specified colours
|
|-
|{{Tl|font}}
|
|<code><nowiki>{{font|text= |font= |size= |color= |bgcolor= |css= }}</nowiki></code>
|<code><nowiki>{{font|text=Some text.|font=Comic Sans MS|size=20px|color=#7f5620}}</nowiki></code>
|{{font|text=Some text.|font=Comic Sans MS|size=20px|color=#7f5620}}
|
| Allows changing font, size, colour and background colour of text
|
|-
|{{Tl|em}}
|
|<code><nowiki>{{em|text to be emphasized}}</nowiki></code>
|<code><nowiki>Contrary to reports, she was {{em|not}} dead after all.</nowiki></code>
|Contrary to reports, she was {{em|not}} dead after all.
|
|Applies semantic {{tag|em}} emphasis markup as apposed to <code><nowiki>''...''</nowiki></code> typographic italicizations. This conveys meaning not just visible appearance and is used by screen readers.
|
|-
|{{Tl|strong}}
|
|<code><nowiki>{{strong|important text}}</nowiki></code>
|<code><nowiki>"The {{strong|soma}}, or {{strong|perikaryon}}, or {{strong|cyton}}, is the bulbous end of a neuron."</nowiki></code>
|"The {{strong|soma}}, or {{strong|perikaryon}}, or {{strong|cyton}}, is the bulbous end of a neuron."
|
|Applies semantic {{tag|strong}} emphasis markup as apposed to <code><nowiki>'''...'''</nowiki></code> typographic italicizations
|
|-
|{{tl|yesitalic}}
Line 1,423 ⟶ 1,572:
|{{Tl|multi-section link}}
|{{Tl|mslink}}
|
|
|
|
|}
 
 
== Hatnotes ==
{| class="wikitable"
|+
!Template
!Shortcut /
Alternative
!Usage
!Example
!Rendered
!Description
|-
|{{Tl|selfref}}
|
|
|
|
|
|-
|{{Tl|see also}}
|
|
|
|
|
|-
|{{Tl|about}}
|
|
|
|
|
|-
|{{Tl|redirect}}
|
|
|
|
|
|-
|{{Tl|redirect2}}
|
|
|
|
|
|-
|{{Tl|for}}
|
|
|
|
|
|-
|{{Tl|for2}}
|
|
|
|
|
|-
|{{Tl|main}}
|
|
|
|
|
|-
|{{Tl|further}}
|
|
|
|
|
|-
|{{Tl|redirect-distinguish}}
|
|
|
Line 1,430 ⟶ 1,662:
 
== Tables ==
{{hidden begin|toggle=left|collapsetext="-"|expandtext="+"|title=Example tabletables}}
{{hidden begin|toggle=left|collapsetext="-"|expandtext="+"|title=Code}}
{{col-begin}}
{{col-break}}
<pre class="inline">
{{Aligned table
|cols=4 |class=wikitable sortable
|col1align=left |col2align=center
|col3align=right |col4align=right
|row1header=y
| caps left | alpha center | # right | num right
| AAA | aa | 123 | 12345
| C | ccc | 0123456 | 2
| B | bbbbb | 1234 | 2
}}
</pre>
{{col-break}}
<pre class="inline">
{|{{table|sort|class=floatright}}
Line 1,449 ⟶ 1,696:
|}
</pre>
{{col-end}}
{{hidden end}}
{{col-begin}}
{{col-break}}
{{Aligned table
|cols=4 |class=wikitable sortable
|col1align=left |col2align=center
|col3align=right |col4align=right
|row1header=y
| caps left | alpha center | # right | num right
| AAA | aa | 123 | 12345
| C | ccc | 0123456 | 2
| B | bbbbb | 1234 | 2
}}
{{col-break}}
{|{{table|sort|class=floatright}}
! {{vert header|stp=1|Regular column}}
Line 1,465 ⟶ 1,726:
! {{vert header|nb=1|va=top|Unsortable column}}
|}
{{col-end}}
{{hidden end}}
 
Line 1,546 ⟶ 1,808:
|{{nowraplinks|{{Tl|vertical header}}}}
|{{nowraplinks|{{Tl|vert header}} {{tl|Verth}}}}
|<code><nowiki>|{{vert header|nb= |stp= |va= |mw= |style= |cellstyle=|Your text here}}</nowiki></code>
|<code><nowiki>{{vertical header|long text}}</nowiki></code>
|<code><nowiki><span style="writing-mode: vertical-lr; white-space: nowrap; min-width: 20px; transform: rotate(180deg); ">long text</span></nowiki></code>
Line 1,556 ⟶ 1,818:
|<code><nowiki>{{Vertical Text|long text}}</nowiki></code>
|<code><nowiki><span style="writing-mode: vertical-lr; white-space: nowrap; min-width: 20px; transform: rotate(180deg); ">long text</span></nowiki></code>
|
|-
|{{Tl|end}}
|
|<code><nowiki>{{end}}</nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|}
Line 1,665 ⟶ 1,934:
|-
|{{Tl|col-begin}}
|{{tl|C-s}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
Line 2,986 ⟶ 3,255:
<code><nowiki>{{POV}}</nowiki></code> {{POV}}
 
== For Templates ==
=== Links ===
{| class=wikitable
!Template
Line 2,999 ⟶ 3,269:
|
|
|-
|{{tl|tlx}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|tlbare}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|purge}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|edit}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|diff}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|page-multi}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|}
 
=== Examples ===
{| class=wikitable
!Template
!Usage
!Example
!Rendered
!Description
|-
|{{tl|escape}}
Line 3,013 ⟶ 3,329:
|-
|{{tl|markup}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|markup2}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|markupv}}
|
|<code><nowiki></nowiki></code>
|
|
|-
|{{tl|fake heading}}
|
|<code><nowiki></nowiki></code>
Line 3,023 ⟶ 3,357:
|
|
|-
|}
 
=== Text Emphasis ===
{| class=wikitable
!Template
!Usage
!Example
!Rendered
!Description
|-
|{{tl|xt}}
Line 3,103 ⟶ 3,447:
|-
|{{tl|stronggood}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|}
 
== Typos ==
{| class="wikitable"
|+
!Template
!Usage
!Example
!Rendered
!Description
|-
|{{Tl|sic}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|-
|{{Tl|not a typo}}
|{{Tl|typo}}
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|-
|{{Tl|as written}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|-
|{{Tl|text}}
|
|<code><nowiki></nowiki></code>
Line 3,137 ⟶ 3,515:
|-
|{{Tl|rp}}
|{{Tl|Refpages}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
Line 3,255 ⟶ 3,633:
|
|Web sources not covered by any of the above
|}
 
== Transclusion ==
{| class="wikitable"
|+
!Template
!Shortcut /
Alternative
!Usage
!Example
!Rendered
!Description
|-
|{{Tl|excerpt}}
|
|<code><nowiki></nowiki></code>
|<code><nowiki></nowiki></code>
|
|
|-
|}