Template:Notify: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
{{Doc}}
{{Doc}}
<includeonly><onlyinclude>{{#switch:{{{mode|}}}
<includeonly><onlyinclude>{{#switch:{{{mode|}}}
| inline = <{{#if:{{{text|{{{1|}}}}}}|div|span}} style="{{#switch:{{{offset|0}}}
| inline = <{{#if:{{{text|{{{1|}}}}}}|div|span}} style="{{Offsetable}}{{{root_inline_style|}}}display:{{#if:{{{text|{{{1|}}}}}}|flex|inline-flex}}; {{#if:{{{text|{{{1|}}}}}}|gap:4px;|}} background:linear-gradient(90deg, rgba({{{color|240,240,240}}},.07) 0%, transparent 100%); border-left:2px solid rgb({{{color|240,240,240}}}); border-radius:2px; font-size:12px; padding:{{#if:{{{text|{{{1|}}}}}}|6px 0 4px 12px|2px 0 0 8px}}; margin:{{#if:{{{text|{{{1|}}}}}}|.5em 0|0}}"><!--
| 0        =
| 1        = margin-left: 2rem !important;
| 2        = margin-left: 4rem !important;
| 3        = margin-left: 6rem !important;
| 4        = margin-left: 8rem !important;
| 5        = margin-left: 10rem !important;
| 6        = margin-left: 12rem !important;
| 7        = margin-left: 14rem !important;
| 8        = margin-left: 16rem !important;
| 9        = margin-left: 18rem !important;
| 10      = margin-left: 20rem !important;
| #default = margin-left: 0rem !important;
}}<!--offset-->{{{root_inline_style|}}}display:{{#if:{{{text|{{{1|}}}}}}|flex|inline-flex}}; {{#if:{{{text|{{{1|}}}}}}|gap:4px;|}} background:linear-gradient(90deg, rgba({{{color|240,240,240}}},.07) 0%, transparent 100%); border-left:2px solid rgb({{{color|240,240,240}}}); border-radius:2px; font-size:12px; padding:{{#if:{{{text|{{{1|}}}}}}|6px 0 4px 12px|2px 0 0 8px}}; margin:{{#if:{{{text|{{{1|}}}}}}|.5em 0|0}}"><!--


-->{{#if:{{{img|}}}{{{type|}}}|<strong style="{{{inline_style|}}}display:table-cell; color:rgb({{{color|240,240,240}}}); white-space:nowrap"><!--
-->{{#if:{{{img|}}}{{{type|}}}|<strong style="{{{inline_style|}}}display:table-cell; color:rgb({{{color|240,240,240}}}); white-space:nowrap"><!--

Revision as of 13:39, 9 May 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

Different types of notifications in one template. Created as a basis for other templates.

Copy and Paste

{{Notify | mode = inline | size = 10px | img = | text = | color = }}

Parameters and Examples

Shared

Parameter Description Example Preview
{{{1}}} or {{{text}}} Your text.
Icon-Important.pngImportant: Do not use {{{text}}} in other templates that are based on this template. The named parameter breaks the lists.
| Hello, World!
| text = Hello, World!
Hello, World!
Hello, World!
{{{mode}}} Switches the template modes. Avaliable modes: inline.
| mode = inline
Hello, World!

Inline mode

Parameter Description Example Preview
{{{img}}} Notification icon.
| img = Note.png
Important template.png:Hello, World!
{{{size}}} Notification icon size (Highly recommended to specify since most icons support high DPI.)
| size = 16px
Important template.pngImportant:Hello, World!
{{{type}}} Notification type.
| type = Warning
Important template.pngImportant:Hello, World!
{{{color}}} Notification color (RGB only).
RGBA may also work.
| color = 240,211,0
Important template.pngImportant:Hello, World!

Offset

  1. Important template.pngImportant:Hello, World!
  2. Important template.pngImportant:Hello, World!
  3. Important template.pngImportant:Hello, World!
  4. Important template.pngImportant:Hello, World!
  5. Important template.pngImportant:Hello, World!
  6. Important template.pngImportant:Hello, World!
  7. Important template.pngImportant:Hello, World!

Custom styles

  1. Important template.pngImportant:Hello, World!
  2. Important template.pngImportant:Hello, World!
  3. Important template.pngImportant:Hello, World!
  4. Important template.pngImportant:Hello, World!
  5. Important template.pngImportant:Hello, World!
  6. Important template.pngImportant:Hello, World!
  7. Important template.pngImportant:Hello, World!
  8. Important template.pngImportant:Hello, World!
  9. Important template.pngImportant:Hello, World!
  10. Important template.pngImportant:Hello, World!
  11. Important template.pngImportant:Hello, World!
  12. Important template.pngImportant:Hello, World!
  13. Important template.pngImportant:Hello, World!
  14. Important template.pngImportant:Hello, World!
  15. Important template.pngImportant:Hello, World!
  16. Important template.pngImportant:Hello, World!

Special Subpages

See also