Шаблон:Strongbad/doc

Материал из Машинное обучение - Кафедра прикладной кибернетики
< Шаблон:Strongbad
Версия от 04:24, 27 апреля 2020; wikipedia>Vanisaac (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к навигации Перейти к поиску

{{#ifeq:doc |doc

    | 

{{#ifeq:show |show

         | {{#invoke:Message box|mbox}}
        }}{{#if: |
         |   {{#ifexist:Шаблон:Strongbad
                  | [[Category:{{#switch:Шаблон |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

Usage

This template is used to insert a quick and easy warning or negative notice with high visibility (because it is red) on project and discussion pages (like the following sentence). {{#switch:

 {{#if: 
 | {{{demospace}}}    
 | {{#ifeq:Шаблон|
   | main
   | other
   }} 
 }}

| main = {{#invoke:Error|error|Template:Strongbad is only for use in template documentation, guidelines and other Wikipedia-internal purposes. Do not use it in actual articles.|tag=}}{{#switch:Шаблон

|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}} | other | #default = This template cannot be used in articles. }} In situations where color is not relevant (color blindness, screen readers, etc.), it renders exactly the same as {{#Invoke:Template link general|main|code=on}} (to which it is a CSS-styled call). This template is only for use in template documentation, guidelines, and other Wikipedia-internal purposes. It is the opposite of the {{#Invoke:Template link general|main|code=on}} template.

{{#Invoke:Template link general|main|nolink=yes|code=yes}}

or, if the important text contains an equals sign:

{{#Invoke:Template link general|main|nolink=yes|code=yes}}

These both render as:

{{#switch:
 {{#if: 
 | {{{demospace}}}    
 | {{#ifeq:Шаблон|
   | main
   | other
   }} 
 }}

| main = {{#invoke:Error|error|Template:Strongbad is only for use in template documentation, guidelines and other Wikipedia-internal purposes. Do not use it in actual articles.|tag=}}{{#switch:Шаблон

|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}} | other | #default = important text }}

It is safest to always use the |{{SAFESUBST:#if:1|1=}} syntax.

This template puts intentional and explicit {{#switch:pair

 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|strong|strong}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:strong|!--||>}}...
}}{{#switch:pair
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:strong|!--|-->|</strong>}}
}} (importance, seriousness, or urgency) HTML markup around the text provided as the first parameter. 

Because some people are color blind, and some use screen readers, this template should not be used in a manner in which only the color indicates the difference between the content being marked up and other content; it's simply a visual aid for those who can use it.

Parameters

See Template:Strong#Optional parameters.

See also

  • {{#Invoke:Template link general|main|code=on}} – same but not red (same color as surrounding text, usually black)
  • {{#Invoke:Template link general|main|code=on}} – same but green
  • {{#Invoke:Template link general|main|code=on}} – for italic rather than bold semantic emphasis
     
{{#invoke:Navbar|navbar}}
  • {{#Invoke:Template link general|main|code=on}} inline {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|positive example text}}, in green, with serif font

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but for blocks of text
  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|bold instead of serif font}}

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|mono-spaced font}} (especially useful in source code)
 

  • {{#Invoke:Template link general|main|code=on}} inline {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|negative example text}}, in red, with serif font

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but for blocks (i.e., same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but red)
  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|boldface}}

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|mono-spaced font}}; used for incorrect or strongly deprecated code/output/input examples and should usually be wrapped in {{#switch:o

 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|code|code}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:code|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:code|!--|-->|</code>}}
}}, {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|samp|samp}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:samp|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:samp|!--|-->|</samp>}}
}}, or {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|kbd|kbd}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:kbd|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:kbd|!--|-->|</kbd>}}
}} as appropriate; see also {{#Invoke:Template link general|main|code=on}} and its variants below
  • {{#Invoke:Template link general|main|code=on}} inline strongly deprecated or deleted material; {{#Invoke:Template link general|main|code=on}} variant has strikethrough (they both use the {{#switch:open
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|del|del}}{{#if:| {{{attribs}}}}}
}}{{#switch:open
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:del|!--||>}}...
}}{{#switch:open
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:del|!--|-->|</del>}}
}} element, and do not add monospace font on their own; can be used in mainspace (articles), and where necessary wrapped in {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|code|code}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:code|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:code|!--|-->|</code>}}
}}, {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|samp|samp}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:samp|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:samp|!--|-->|</samp>}}
}}, or {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|kbd|kbd}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:kbd|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:kbd|!--|-->|</kbd>}}
}}); see also {{#Invoke:Template link general|main|code=on}} below
 
  • {{#Invoke:Template link general|main|code=on}} inline {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|deprecated (or uncertain, unavailable, lorem, etc.) example text}}, in grey

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|boldface}}

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|mono-spaced font}}

  • {{#Invoke:Template link general|main|code=on}} inline deprecated or deleted material; (uses the {{#switch:open
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|del|del}}{{#if:| {{{attribs}}}}}
}}{{#switch:open
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:del|!--||>}}...
}}{{#switch:open
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:del|!--|-->|</del>}}
}} element, and does not add monospace font on it own; can be used in mainspace (articles), and where necessary wrapped in {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|code|code}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:code|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:code|!--|-->|</code>}}
}}, {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|samp|samp}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:samp|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:samp|!--|-->|</samp>}}
}}, or {{#switch:o
 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|kbd|kbd}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:kbd|!--||>}}...
}}{{#switch:o
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:kbd|!--|-->|</kbd>}}
}}); see also {{#Invoke:Template link general|main|code=on}} above
 
  • {{#Invoke:Template link general|main|code=on}} inline {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|neutral example text}}, with no color change, when none of the above applies; used for "permissible" examples neither favored nor deprecated

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but for blocks of text
  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|boldface}}; it still applies a CSS class, so it's not simply boldfacing

  • {{#Invoke:Template link general|main|code=on}} same as {{#Invoke:Template link general|main|nolink=yes|code=yes}} but uses {{#ifeq:Шаблон||{{#invoke:Error|error|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.|tag=}}{{#switch:Шаблон
|Обсуждение
|Участник
|Обсуждение участника
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:|
 |
}}

}}|mono-spaced font}}; this is a good template to use when the shaded box formatting of {{#switch:pair

 |c|close =
 |e|empty|s|single|v|void
 |o|open
 |p|pair = <{{#if:|code|code}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
 |c|close = 
 |e|empty|s|single|v|void =  />
 |o|open = >
 |p|pair = {{#ifeq:code|!--||>}}...
}}{{#switch:pair
 |e|empty|s|single|v|void
 |o|open =
 |c|close
 |p|pair = {{#ifeq:code|!--|-->|</code>}}
}} might be undesirable, or the semantics of it is incorrect in the context{{#if:no||
 
  • {{#Invoke:Template link general|main|code=on}} – for introducing something as deprecated or issuing some other warning in documentation, e.g.: {{#Invoke:Template link general|main|code=on}}

}}


{{#invoke:Navbox|navbox}}