Template:Inline note templates:zh-cn: Difference between revisions
Kestrelguy (talk | contribs) (redirected to functionally-identical English version.) Tag: New redirect |
Kestrelguy (talk | contribs) m ("translated" into Simplified Chinese so the punctuation can be different.) Tag: Removed redirect |
||
Line 1: | Line 1: | ||
# | {{lang|Template:Inline note}} | ||
<onlyinclude><!-- | |||
++ IF right text given: like Template:Note etc. ++ | |||
-->{{#if: {{{1|}}} | |||
| | |||
<div><span style=" | |||
color:{{{color|#f0f0f0}}}; | |||
display:table-cell; | |||
font-weight:{{#ifeq: {{{bold|1}}} | 1 | bold | {{{bold|}}} }}; | |||
padding-left:1em; | |||
white-space:nowrap; | |||
{{{style|}}}; | |||
">{{#if: {{{name|}}} | {{{name}}}: }}</span><!-- | |||
--><span style=" | |||
display:table-cell; | |||
padding:0.2em; | |||
">{{{1|}}}</span></div><!-- | |||
++ ELSE: like Template:Why ++ | |||
-->| | |||
<sup style=" | |||
color:{{{color|#8BC53F}}}; | |||
white-space:nowrap; | |||
">【<i>{{{name|{{PAGENAME}}}}}</i>】<!-- | |||
--></sup> | |||
}}</onlyinclude> | |||
[[Category:Inline note templates:zh-cn|{{PAGENAME}}]] <!-- we don't want to include these categories for every page/template that uses this template --> | |||
[[Category:Notice templates:zh-cn|{{PAGENAME}}]] <!-- so we can't include these categories for inline note templates, they must remember to do that theirselves :/ --> | |||
{{documentation:zh-cn|Template:Inline note/doc}} |
Revision as of 12:58, 18 June 2022
【Inline note templates:zh-cn】
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 |
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}}
|
---|---|
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
编辑者可以在此模板的沙盒 (创建 | 将本页内容写入至沙盒页面) 和 testcases(测试用例) (创建) 页面编辑。
此模板的子页面