Difference between revisions of "Template:Outdent/doc"

From Summertime Saga Wiki
Jump to: navigation, search
m
m
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
Threading of replies on talk pages is done using indentation and lists. This template is used for ''out''denting a reply on a talk page when indentation gets too deep.
+
The template {{tlg|outdent}} is used for outdenting a reply on a talk page when indentation gets too deep.
  
 
== Usage ==
 
== Usage ==
  
{{tlc|outdent|<var>integer</var>}} or {{tlc|outdent|<var>indentation wikitext</var>}}. Integer examples: {{tlc|outdent|5}}, {{tlc|outdent|-15}}, {{tlc|outdent|11|r{{=}}y}}. Indentation examples: {{tlc|outdent|:::::}}, {{tlc|outdent|*::::::}}, {{tlc|outdent|**:::#}}.
+
: {{tlg|code=yes|nolink=yes|outdent|<var>integer</var>}}.
 +
Integer examples:
 +
* {{tlg|code=yes|nolink=yes|outdent|5}}
 +
* {{tlg|code=yes|nolink=yes|outdent|-15}}
 +
Indentation examples:
 +
* {{tlg|code=yes|nolink=yes|outdent|:::::}}
 +
* {{tlg|code=yes|nolink=yes|outdent|*::::::}}
 +
* {{tlg|code=yes|nolink=yes|outdent|**:::#}}.
  
== Parameters ==
+
== Parameter ==
  
; {{para|1|<var>indent</var>}}
+
; {{para|1|<var>indent</var>}} : Supports two modes: literal indentation or an integer. In literal indentation mode the value may contain {{code|:}} (indents), <code>*</code> (unnumbered list), and {{code|#}} (numbered list). It is recommended to copy the colons, asterisks, and hashes from the start of the previous message. An integer value is interpreted as number or indents ({{code|:}}). Supported range is from −40 to 40.
: Supports two modes: literal indentation or an integer. In literal indentation mode the value may contain <code>:</code> (indents), <code>*</code> (unnumbered list), and <code>#</code> (numbered list). It is recommended to copy the colons, asterisks, and hashes from the start of the previous message. An integer value is interpreted as number or indents (<code>:</code>). Magnitude of a negative integer specifies the width of ''in''dentation (same as positive integer with {{para|reverse|y}}). Default value is <code>10</code>. Supported range is from −40 to 40.
 
; {{para|2|y}}
 
: Set it to add a link to [[Wikipedia:Indentation#Outdenting]]. {{tlc|outdent|5|y}} produces:
 
{{outdent|5|y}}
 
; {{para|r|y}} (aliases {{para|reverse|y}}, {{para|indent|y}}, {{para|in|y}})
 
: Reverses the outdentation to become indentation and vice versa.
 
  
 
== Examples ==
 
== Examples ==
Line 19: Line 20:
 
=== With indentation wikitext ===
 
=== With indentation wikitext ===
  
<div style="border:1px #A2A9B1 solid; padding:8px; margin:4px;">
+
{|class=wikitable style="width:100%;"
<pre>:::: Previous post, indented with four colons.
+
! style="width:50%;" | Markup
 +
! Renders as
 +
|-
 +
| <pre>:::: Previous post, indented with four colons.
 
{{outdent|::::}} New post.</pre>
 
{{outdent|::::}} New post.</pre>
 
+
|
''displays as''
 
 
 
 
:::: Previous post, indented with four colons.
 
:::: Previous post, indented with four colons.
 
{{outdent|::::}} New post.
 
{{outdent|::::}} New post.
</div>
+
|}
  
 
=== Positive integer ===
 
=== Positive integer ===
  
<div style="border:1px #A2A9B1 solid; padding:8px; margin:4px;">
+
{|class=wikitable style="width:100%;"
<pre>:::::: Previous post, indented 6 levels.
+
! style="width:50%;" | Markup
 +
! Renders as
 +
|-
 +
| <pre>:::::: Previous post, indented 6 levels.
 
{{outdent|6}} New post.</pre>
 
{{outdent|6}} New post.</pre>
 
+
|
''displays as''
 
 
 
 
:::::: Previous post, indented 6 levels.
 
:::::: Previous post, indented 6 levels.
 
{{outdent|6}} New post.
 
{{outdent|6}} New post.
</div>
+
|}
  
 
=== With separate indent ===
 
=== With separate indent ===
  
To not outdent all the way to the left margin, indent the {{tl|outdent}} template itself using colons:
+
To not outdent all the way to the left margin, indent the {{tlg|code=yes|nolink=yes|outdent}} template itself using colons:
<div style="border:1px #A2A9B1 solid; padding:8px; margin:4px;">
+
 
<pre>:::::: Previous post, indented 6 levels.
+
{|class=wikitable style="width:100%;"
 +
! style="width:50%;" | Markup
 +
! Renders as
 +
|-
 +
| <pre>:::::: Previous post, indented 6 levels.
 
:: {{outdent|4}} New post.</pre>
 
:: {{outdent|4}} New post.</pre>
 
+
|
''displays as''
 
 
 
 
:::::: Previous post, indented 6 levels.
 
:::::: Previous post, indented 6 levels.
 
:: {{outdent|4}} New post.
 
:: {{outdent|4}} New post.
</div>
+
|}
  
 
=== Indent ===
 
=== Indent ===
  
<div style="border:1px #A2A9B1 solid; padding:8px; margin:4px;">
+
{|class=wikitable style="width:100%;"
Using {{para|reverse|y}}:
+
! style="width:50%;" | Markup
<pre>:::::: Previous post, indented 6 levels.
+
! Renders as
:: {{outdent|4}} Start of a new post indented 2 levels using a bar of length 6 − 2 = 4.
+
|-
:: {{outdent|5|reverse=yes}}
+
| <pre>:::::: Original conversation.
::::::: Indent to indentation level 7 using a reversed bar of length 7 − 2 = 5.</pre>
 
 
 
''displays as''
 
 
 
:::::: Previous post, indented 6 levels.
 
:: {{outdent|4}} Start of a new post indented 2 levels using a bar of length 6 − 2 = 4.
 
:: {{outdent|5|reverse=yes}}
 
::::::: Indent to indentation level 7 using a reversed bar of length 7 − 2 = 5.
 
</div>
 
 
 
Or with a negative integer:
 
<div style="border:1px #A2A9B1 solid; padding:8px; margin:4px;">
 
<pre>
 
:::::: Original conversation.
 
 
:::::: {{outdent|-3}}
 
:::::: {{outdent|-3}}
 
::::::::: Afterthought.
 
::::::::: Afterthought.
 
::::::: {{outdent|2}}
 
::::::: {{outdent|2}}
 
::::::: Continuation of original conversation.</pre>
 
::::::: Continuation of original conversation.</pre>
 
+
|
''displays as''
 
 
 
 
:::::: Original conversation.
 
:::::: Original conversation.
 
:::::: {{outdent|-3}}
 
:::::: {{outdent|-3}}
Line 87: Line 76:
 
::::::: {{outdent|2}}
 
::::::: {{outdent|2}}
 
::::::: Continuation of original conversation.
 
::::::: Continuation of original conversation.
</div>
+
|}
  
 
== CSS and hide ==
 
== CSS and hide ==
  
This template is contained in the CSS class "outdent-template". Users who would prefer not to see the template can add the following line to their custom CSS ([[Special:MyPage/common.css]]):
+
This template is contained in the CSS class “outdent-template”. Users who would prefer not to see the template can add the following line to their custom CSS in [[Special:MyPage/common.css]]:
  
 
<syntaxhighlight lang="css">span.outdent-template { display:none; }</syntaxhighlight>
 
<syntaxhighlight lang="css">span.outdent-template { display:none; }</syntaxhighlight>

Latest revision as of 17:13, 21 July 2020

The template {{outdent}} is used for outdenting a reply on a talk page when indentation gets too deep.

Usage

{{outdent|integer}}.

Integer examples:

  • {{outdent|5}}
  • {{outdent|-15}}

Indentation examples:

  • {{outdent|:::::}}
  • {{outdent|*::::::}}
  • {{outdent|**:::#}}.

Parameter

|1=indent 
Supports two modes: literal indentation or an integer. In literal indentation mode the value may contain : (indents), * (unnumbered list), and # (numbered list). It is recommended to copy the colons, asterisks, and hashes from the start of the previous message. An integer value is interpreted as number or indents (:). Supported range is from −40 to 40.

Examples

With indentation wikitext

Markup Renders as
:::: Previous post, indented with four colons.
{{outdent|::::}} New post.
Previous post, indented with four colons.
New post.

Positive integer

Markup Renders as
:::::: Previous post, indented 6 levels.
{{outdent|6}} New post.
Previous post, indented 6 levels.
New post.

With separate indent

To not outdent all the way to the left margin, indent the {{outdent}} template itself using colons:

Markup Renders as
:::::: Previous post, indented 6 levels.
:: {{outdent|4}} New post.
Previous post, indented 6 levels.
New post.

Indent

Markup Renders as
:::::: Original conversation.
:::::: {{outdent|-3}}
::::::::: Afterthought.
::::::: {{outdent|2}}
::::::: Continuation of original conversation.
Original conversation.
Afterthought.
Continuation of original conversation.

CSS and hide

This template is contained in the CSS class “outdent-template”. Users who would prefer not to see the template can add the following line to their custom CSS in Special:MyPage/common.css:

span.outdent-template { display:none; }