Template:Inline note/doc: Difference between revisions
(Added bold parameter, so that one can use bold=0 or even bold=800.) |
Thunder4ik (talk | contribs) m (clean up, replaced: {{Documentation subpage → {{Doc/subpage) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<!-- Please place categories where indicated at the bottom of this page.) --> | <!-- Please place categories where indicated at the bottom of this page.) --> | ||
{{Inline note templates}} | |||
{{Doc/subpage}} | |||
The idea of this template is to be able to (easily) generate inline templates like the existing ones. | The idea of this template is to be able to (easily) generate inline templates like the existing ones. | ||
Line 6: | Line 7: | ||
=== Parameters === | === Parameters === | ||
* {{param|name}} - The name of the note that stands in front of the other text. Use <nowiki><br></nowiki> to wrap text in here. Icons and categories can also be used here. There will be a colon appended to this parameter, unless it is empty. | * {{param|name}} - The name of the note that stands in front of the other text. Use <code><nowiki><br></nowiki></code> to wrap text in here. Icons and categories can also be used here. There will be a colon appended to this parameter, unless it is empty. | ||
* {{param|color}} - The text color of {{param|name}}. | * {{param|color}} - The text color of {{param|name}}. | ||
* {{param|bold}} - The font-weight of {{param|name}}. Can use <code>bold=0</code>, <code>bold=1</code> (default) or even <code>bold=800</code>. | * {{param|bold}} - The font-weight of {{param|name}}. Can use <code>bold=0</code>, <code>bold=1</code> (default) or even <code>bold=800</code>. | ||
Line 12: | Line 13: | ||
=== Examples === | === Examples === | ||
{| border=1 style="border-collapse:collapse; background:none" cellpadding=8 | {| class=mw-collapsible border=1 style="border-collapse:collapse; background:none" cellpadding=8 | ||
!colspan=2| Wikitext !! Result | !colspan=2| Wikitext !! Result | ||
|- | |- | ||
| <code>text <nowiki>{{inline note | ''Not to be confused with [[Main Page]].''}}</nowiki> text</code> | | <code>text <nowiki>{{inline note | ''Not to be confused with [[Main Page]].''}}</nowiki> text</code> | ||
| | | → || {{lorem}} {{inline note | ''Not to be confused with [[Main Page]].''}} {{lorem}} | ||
|- | |- | ||
| <code><nowiki>text {{inline note | name=Who said that?}} text</nowiki></code> | | <code><nowiki>text {{inline note | name=Who said that?}} text</nowiki></code> | ||
| | | → || {{lorem}} {{inline note | name=Who said that?}} {{lorem}} | ||
|- | |- | ||
|style=white-space:nowrap| <code>text <nowiki>{{inline note | name=[[file:note.png|link=]] Note | color=#eee}}</nowiki> text</code> | |style=white-space:nowrap| <code>text <nowiki>{{inline note | name=[[file:note.png|10px|link=]] Note | color=#eee}}</nowiki> text</code> | ||
| | | → || {{lorem}} {{inline note | name=[[file:note.png|10px|link=]] Note | color=#eee}} {{lorem}} | ||
|- | |- | ||
|style=white-space:nowrap| <code>text<br><nowiki>{{inline note | name=[[file:note.png|link=]] Note | text }}</nowiki><br><nowiki>{{inline note | name=[[file:note.png|link=]] Note | bold=0 | color=#4cf | text }}</nowiki><br><nowiki>{{inline note | name={{ | |style=white-space:nowrap| <code>text<br><nowiki>{{inline note | name=[[file:note.png|10px|link=]] Note | text }}</nowiki><br><nowiki>{{inline note | name=[[file:note.png|10px|link=]] Note | bold=0 | color=#4cf | text }}</nowiki><br><nowiki>{{inline note | name={{hl2|4}} | text }}</nowiki><br>text | ||
| | | → || {{lorem}} {{inline note | name=[[file:note.png|10px|link=]] Note | {{lorem}} }} | ||
{{inline note| name=[[file:note.png|link=]] Note | bold=0 | color=#4cf| {{lorem}} }} | {{inline note| name=[[file:note.png|10px|link=]] Note | bold=0 | color=#4cf| {{lorem}} }} | ||
{{inline note | name={{ | {{inline note | name={{hl2|4}} | {{lorem}} }} | ||
{{lorem}} | {{lorem}} | ||
|} | |} | ||
==== Comparison with Note and Tip ==== | ==== Comparison with Note and Tip ==== | ||
{| class=wikitable | {| class="wikitable mw-collapsible" style=background:none | ||
! {{tl|Note}} and {{tl|Tip}} !! {{tl|Inline note}} | ! {{tl|Note}} and {{tl|Tip}} !! {{tl|Inline note}} | ||
|- | |- | ||
| | | | ||
{{Note|{{Str left|{{Lorem ipsum}}| | {{Note|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
{{Note|{{Str left|{{Lorem ipsum}}| | {{Note|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
{{Tip|{{Str left|{{Lorem ipsum}}| | {{Tip|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
{{Tip|{{Str left|{{Lorem ipsum}}| | {{Tip|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
| | | | ||
{{Inline note|name=[[ | {{Inline note|name=[[file:note.png|10px|link=]] Note|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
{{Inline note|name=[[ | {{Inline note|name=[[file:note.png|10px|link=]] Note|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
{{Inline note|name=[[File:Tip.png|link=]] Tip|{{Str left|{{Lorem ipsum}}| | {{Inline note|name=[[File:Tip.png|10px|link=]] Tip|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
{{Inline note|name=[[File:Tip.png|link=]] Tip|{{Str left|{{Lorem ipsum}}| | {{Inline note|name=[[File:Tip.png|10px|link=]] Tip|{{Str left|{{Lorem ipsum}}|55}}.}} | ||
|- | |- | ||
| | | | ||
Line 52: | Line 53: | ||
{{Tip|{{Str left|{{Lorem ipsum}}|231}}}} | {{Tip|{{Str left|{{Lorem ipsum}}|231}}}} | ||
| | | | ||
{{Inline note|name=[[ | {{Inline note|name=[[file:note.png|10px|link=]] Note|{{Str left|{{Lorem ipsum}}|231}}}} | ||
{{Inline note|name=[[ | {{Inline note|name=[[file:note.png|10px|link=]] Note|{{Str left|{{Lorem ipsum}}|231}}}} | ||
{{Inline note|name=[[File:Tip.png|link=]] Tip|{{Str left|{{Lorem ipsum}}|231}}}} | {{Inline note|name=[[File:Tip.png|10px|link=]] Tip|{{Str left|{{Lorem ipsum}}|231}}}} | ||
{{Inline note|name=[[File:Tip.png|link=]] Tip|{{Str left|{{Lorem ipsum}}|231}}}} | {{Inline note|name=[[File:Tip.png|10px|link=]] Tip|{{Str left|{{Lorem ipsum}}|231}}}} | ||
|} | |} | ||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
[[Category:Inline note templates]] | [[Category:Inline note templates]] | ||
[[Category:Notice templates]] | |||
}}</includeonly> | }}</includeonly> |
Latest revision as of 02:24, 12 January 2024
Template | Pages using it |
---|---|
28 August 2024 | |
{{note}} | 6,436 |
{{warning}} | 1,253 |
{{bug}} | 1,192 |
{{tip}} | 1,516 |
{{todo}} | 1,628 |
{{inline note}} | 2,188 |
{{confirm}} | 672 |
{{question}} | 11 |
{{fix}} | 170 |
{{important}} | 459 |
{{clarify}} | 169 |
{{elaborate}} | 18 |
{{main}} | 143 |
{{distinguish}} | 85 |
{{workaround}} | 122 |
{{seealso}} | 145 |
{{when}} | 1 |
{{where}} | 0 |
{{which}} | 2 |
{{why}} | 38 |
{{idea}} | 21 |
{{placementTip}} | 13 |
{{codenote}} | 21 |
{{altnames}} | 35 |
{{deprecated}} | 109 |
{{how}} | 23 |
{{example}} | 16 |
{{confusion}} | 53 |
{{thanks}} | 7 |
{{code Fix}} | 9 + 7 (16) |
{{vote}} | 4 |

Don't forget to purge the contents of the base page upon creating or editing this subpage.
The idea of this template is to be able to (easily) generate inline templates like the existing ones. In addition, if the existing ones would be using the same implementation, it would make it easy to find "good" and uniform border widths, so that all inline templates are guaranteed to fit to each other.
Parameters
- {{{name}}} - The name of the note that stands in front of the other text. Use
<br>
to wrap text in here. Icons and categories can also be used here. There will be a colon appended to this parameter, unless it is empty. - {{{color}}} - The text color of {{{name}}}.
- {{{bold}}} - The font-weight of {{{name}}}. Can use
bold=0
,bold=1
(default) or evenbold=800
. - {{{1}}} - The text that is shown in the right. If left empty, then {{{name}}} will be shown as a superscripted note and there will not be a
<div>
taking up the full available width.
Examples
Wikitext | Result | |
---|---|---|
text {{inline note | ''Not to be confused with [[Main Page]].''}} text
|
→ | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Not to be confused with Main Page. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
text {{inline note | name=Who said that?}} text
|
→ | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. [Who said that?] Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
text {{inline note | name=[[file:note.png|10px|link=]] Note | color=#eee}} text
|
→ | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. [![]() |
text |
→ | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ![]() ![]() ![]() Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Comparison with Note and Tip
{{Note}} and {{Tip}} |
{{Inline note}}
|
---|---|
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |