Template:Notice: Difference between revisions

From OpenMW Wiki
Jump to navigation Jump to search
(It did matter; doing it with comments. Also making header bolder.)
(but it didn't)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="{{#if:{{{float|}}} |float: {{{float}}};}} background-color: {{{bg|inherit}}}; border: {{{border-width|3px}}} {{{border-style|solid}}} {{{border-color|Green}}}; padding: 1em; margin: 1em; width: {{{width|80%}}}; text-align: center; {{{style|}}}"><!--
<div style="{{#if:{{{float|}}} |float: {{{float}}};}} background-color: {{{bg|inherit}}}; border: {{{border-width|3px}}} {{{border-style|solid}}} {{{border-color|Green}}}; padding: 1em; margin: 1em; width: {{{width|80%}}}; text-align: center; {{{style|}}}"><!--
--><span style="font-size: 120%; font-weight: bold;">{{{1|{{{heading|{{{header|{{{title|<noinclude>Heading/Title Text Here</noinclude>}}}}}}}}}}}}</span> <!--
--><span style="font-size: 120%; font-weight: bold;">{{{1|{{{heading|{{{header|{{{title|<noinclude>Heading/Title Text Here</noinclude>}}}}}}}}}}}}</span><!--
--><span style="text-align: left; display: inline-block; padding-top: 0.5em; width: 100%">{{#if:{{{2|}}}{{{note|}}} |{{{2|{{{note}}}}}} }}<noinclude>Additional note text here. 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.</noinclude></span><!--
--><span style="text-align: left; display: inline-block; padding-top: 0.5em; width: 100%">{{#if:{{{2|}}}{{{note|}}} |&nbsp;{{{2|{{{note}}}}}} }}<noinclude>Additional note text here. 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.</noinclude></span><!--
--></div><noinclude>
--></div><noinclude>



Latest revision as of 20:21, 1 March 2017

Heading/Title Text HereAdditional note text here. 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.

Documentation

This template is used for creating notices/alerts. Basic usage:

{{Notice |This is My Heading! |Here's some text. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}


If the content of the title or the note text contains an equals (=) symbol, the parameter must be named/numbered. The title parameter is |1=, |title=, |heading=, or |header=. The additional note parameter is |2= or |note=. It is always safest to name/number these parameters, in case the content changes to include a = later.

If you want no heading/title, use:

{{Notice |2=Here's some text. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}

or

{{Notice |note=Here's some text. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}


Customizing appearance

|width= – changes the size, using CSS unit values, e.g. 35% or 25em; defaults to 80% Do not use fixed pixel widths (e.g. 50px or you'll break the device-scalability of the content.

|float=left or |float=right – used to move the box left or right. Should usually also use the |width= parameter to make it smaller, or there won't be much point.

|border-width= – change the border width. It is safe to us px here. The default is 3px

|border-width= – change the border style, using standard CSS terms. The default is solid

|border-color= – change the border color, using standard HTML hex codes like #664499 or CSS color names like LightGrey. The default is Green

Example:

{{Notice |title=<span style="color: Red;">Warning!</span> |note=If you do this, your game asplode! |width=15em |float=left |border-color=Red}}

Gives:

Warning! If you do this, your game asplode!


Additional parameters:

|bg= — supply a hex color code or CSS color name to color the background of the box
|style= — pass arbitrary CSS, e.g. |style=clear: right; to stack a right-hand notice box under another one.

Example:

{{Notice |bg=#F8E8D7 |title=Mac users: |note=This modeling tool will only work in macOS 10.12 (Sierra) or later. |width=30% |float=right |border-color=DarkGrey}}
{{Notice |style=clear: right; |bg=#E8D7F9 |title=Linux users: |note=This tool's source is distribution-agnostic; binary packages are only available for yum and dpkg/apt systems. |width=30% |float=right |border-color=DarkGrey}}

gives (to the right):

Mac users: This modeling tool will only work in macOS 10.12 (Sierra) or later.
Linux users: This tool's source is distribution-agnostic; binary packages are only available for yum and dpkg/apt systems.