Difference between revisions of "Template:Note"

From PINE64
Jump to navigation Jump to search
(Add more technical notes)
(+1)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
<!--    -->
{{Template}}
{{Template}}


Line 12: Line 11:


  <nowiki>{{Note|This is an note.}}</nowiki>
  <nowiki>{{Note|This is an note.}}</nowiki>
<!--      -->
 
{{Note | This is an note.}}
{{Note | This is an note.}}
<!--      -->
 
For a more flexible usage, it doesn't start with "'''Note:'''" by default,
For a more flexible usage, it doesn't start with "'''Note:'''" by default,
you may add it manually with <code><nowiki>'''Note:'''</nowiki></code>:
you may add it manually with <code><nowiki>'''Note:'''</nowiki></code>:
<!--      -->
 
  <nowiki>{{Note|'''Note:''' This is an note.}}</nowiki>
  <nowiki>{{Note|'''Note:''' This is an note.}}</nowiki>
<!--      -->
 
{{Note | '''Note:''' This is an note.}}
{{Note | '''Note:''' This is an note.}}
<!--      -->
 
== Technical notes ==
== Technical notes ==


Line 34: Line 33:
* [https://wiki.archlinux.org/title/Template:Note ArchWiki: Template:Note]: the template on which this one is based on
* [https://wiki.archlinux.org/title/Template:Note ArchWiki: Template:Note]: the template on which this one is based on
* [[Template:Hint]]
* [[Template:Hint]]
* [[Template:Info]]
* [[Template:Warning]]
* [[Template:Warning]]
<!--                  -->
</noinclude><includeonly><div role="note" class="template-box template-hint" style="
</noinclude><includeonly>
<!--                  -->
<div role="note" class="template-box template-hint" style="
display: table;
display: table;
min-width: 16em;
min-width: 16em;
Line 47: Line 44:
color: #705000;
color: #705000;
background-color: #fef6e7;
background-color: #fef6e7;
">{{{1|}}}</div>
">{{{1|}}}</div></includeonly>
<!--      -->
</includeonly>

Latest revision as of 09:21, 12 April 2022

This page is a template. Check out all pages using this template.
For more information, read Template:Template.

A note box for showing important notes.

Usage

{{Note|note content}}

Examples

{{Note|This is an note.}}
This is an note.

For a more flexible usage, it doesn't start with "Note:" by default, you may add it manually with '''Note:''':

{{Note|'''Note:''' This is an note.}}
Note: This is an note.

Technical notes

The boxes use display: table to support both adaptive width and floating siblings, all other alternatives can't archive them as perfect as this solution within just one HTML element. However, it has its own flaw, if you put it into another table, its padding will gone. Avoid putting hints, notes and warnings into any tables until solution was found, or we give up and use two elements for just one box.

This template uses class .template-box and .template-note. In the future, if the TemplateStyles Extension is installed on this MediaWiki instance, one may move the embedded inline styles to Template Style files.

See also