Template:Outdent: Difference between revisions

From Wikidata
Jump to navigation Jump to search
Content deleted Content added
imported>Ludwigs2
revised to include 'outdent' text with link
extend to another level
 
(24 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<span class="outdent-template" style="font-family:DejaVu Sans, sans-serif;"><span style="color:#808080">┌{{#switch:{{{1|}}}|1|:|{{padleft:┘|{{#expr: ceil(1*(3.33)) }}|─}}
<span class="outdent-template" style="display:block; margin-top:-0.5em; color:#AAA;"><!--
--><span style="display:inline-block; overflow:hidden;">{{#if:{{{reverse|}}}|└|┌}}</span><!--
|2|::={{padleft:┘|{{#expr: ceil(2*(3.33)) }}|─}}
--><span style="display:inline-block; overflow:hidden; word-wrap:normal; width:{{#switch:{{{1}}}
|3|:::={{padleft:┘|{{#expr: ceil(3*(3.33)) }}|─}}
|:=0.8
|4|::::={{padleft:┘|{{#expr: ceil(4*(3.33)) }}|─}}
|::=2.4
|5|:::::={{padleft:┘|{{#expr: ceil(5*(3.33)) }}|─}}
|:::=4.0
|6|::::::={{padleft:┘|{{#expr: ceil(6*(3.33)) }}|─}}
|::::=5.6
|7|:::::::={{padleft:┘|{{#expr: ceil(7*(3.33)) }}|─}}
|:::::=7.2
|8|::::::::={{padleft:┘|{{#expr: ceil(8*(3.33)) }}|─}}
|::::::=9
|9|:::::::::={{padleft:┘|{{#expr: ceil(9*(3.33)) }}|─}}
|:::::::=10.6
|10|::::::::::={{padleft:┘|{{#expr: ceil(10*(3.33)) }}|─}}
|::::::::=12
|11|:::::::::::={{padleft:┘|{{#expr: ceil(11*(3.33)) }}|─}}
|:::::::::=13.6
|12|::::::::::::={{padleft:┘|{{#expr: ceil(12*(3.33)) }}|─}}
|::::::::::=15.2
|13|:::::::::::::={{padleft:┘|{{#expr: ceil(13*(3.33)) }}|─}}
|14|::::::::::::::={{padleft:┘|{{#expr: ceil(14*(3.33)) }}|─}}
|:::::::::::=16.8
|15|:::::::::::::::={{padleft:┘|{{#expr: ceil(15*(3.33)) }}|─}}
|::::::::::::=18.4
|16|::::::::::::::::={{padleft:┘|{{#expr: ceil(16*(3.33)) }}|─}}
|:::::::::::::=20
|17|:::::::::::::::::={{padleft:┘|{{#expr: ceil(17*(3.33)) }}|─}}
|::::::::::::::=21.6
|18|::::::::::::::::::={{padleft:┘|{{#expr: ceil(18*(3.33)) }}|─}}
|:::::::::::::::=23.2
|19|:::::::::::::::::::={{padleft:┘|{{#expr: ceil(19*(3.33)) }}|─}}
|::::::::::::::::=24.8
|20|::::::::::::::::::::={{padleft:┘|{{#expr: ceil(20*(3.33)) }}|─}}
|:::::::::::::::::=26.4
|::::::::::::::::::=28
|{{padleft:┘|{{#expr: ceil(10*(3.33)) }}|─}}
|:::::::::::::::::::=29.6
}}</span><br/>([[Wikipedia:Indentation#Outdenting|outdent]])&nbsp;</span>
|::::::::::::::::::::=31.2
|:::::::::::::::::::::=32.8
|#default={{ #expr: {{ #iferror: {{ #ifexpr: {{{1}}} > 0 and {{{1}}} < 40 | {{{1}}} | 10 }} | 10 }} * 1.6 - 0.8 }} }}em;"><!--
-->────────────────────────────────────────────────────────────────────────────────────────────────────</span><!--
--><span style="display:inline-block; overflow:hidden;">{{#if:{{{reverse|}}}|┐|┘}}</span><!--
--></span><!--
--><span>{{{{{|safesubst:}}}#if:{{{2|}}}|([[Wikipedia:Indentation#Outdenting|outdent]])&#32;}}</span><noinclude>
{{Documentation}}
</noinclude>

Latest revision as of 10:03, 4 July 2023

────────────────────────────────────────────────────────────────────────────────────────────────────

Documentation icon Template documentation[view · edit · history · purge ]

For outdenting a reply on a talk page when indention gets too deep. Indenting on talk pages is done using a colon character (:) to produce tabs; this template produces a connector bar and initial text to indicate an outdent, based on the number of colons used in the previous indent.

Usage

[edit]

To outdent posts, insert the number of colons that were used for indenting in the previous post, or use an integer value for that number.

::::This is the previous post, indented 4 levels
{{Outdent|::::}} Start of a new post

displays as

This is the previous post, indented 4 levels

──────────────────────────────────────────────────────────────────────────────────────────────────── Start of a new post

::::::This is the previous post, indented 6 levels
{{Outdent|6}} Start of a new post

displays as

This is the previous post, indented 6 levels

──────────────────────────────────────────────────────────────────────────────────────────────────── Start of a new post

You can also have the template automatically add a linked tag, by adding any second parameter (its specific value is discarded):

::::::This is the previous post, indented 6 levels
{{Outdent|6|link}} Start of a new post

displays as

This is the previous post, indented 6 levels

────────────────────────────────────────────────────────────────────────────────────────────────────(outdent) Start of a new post

To not outdent all the way to the left margin, the outdent template itself can be indented using one or more colons:

::::::This is the previous post, indented 6 levels
::{{Outdent|4}} Start of a new post

displays as

This is the previous post, indented 6 levels
──────────────────────────────────────────────────────────────────────────────────────────────────── Start of a new post

The template supports up to 20 colons as a parameter, but supports any given integer. Values above 40 may show a separated line though.

The default number of colons is 10. Do not use subst: with this template.

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):

span.outdent-template { display: none; }

Indicate that a conversation is continued at a lower level of indentation

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Levels1

Number of indentation levels to reset

Example
6
Numberrequired
Link2

Includes a link to an outdenting explanation

Booleanoptional
Reversereverse

Flips the vertical lines at each end of the template

Booleanoptional