Template:Block indent: Difference between revisions

From Guild of Archivists
(borrowing code from Template:Quote)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 19:49, 28 January 2016

Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Template documentation[view] [edit] [history] [purge]

Usage[edit source]

This template block-indents the value that is supplied to it. This is similar to block quotation, but it uses the HTML <div>...</div> element, instead of semantically abusing the <blockquote>...</blockquote> element.

{{block indent |1=The material to be indented here. May include markup, paragraph breaks, etc.}}

The default display differs from the block quotation template {{Quote}} in that it does not:

  • introduce whitespace margins above or below the indented material (just add a blank line above and/or below manually); nor
  • indent from the right as well as the left (there is an optional parameter for this); nor
  • (on mobile) bookend the block with large quotation marks.

It also does not support that other template's attribution parameters (since it isn't for quotations).

Example[edit source]

{{block indent |1={{Lorem}}}}

produces:

Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Parameters[edit source]

|1= a.k.a. |text= The material to be indented. {{{1}}}, because any occurrence (e.g. in a URL, template, etc.) of the = character will break the template without it.

|left= a.k.a. |em= the value (e.g. 0.1 or 7) in em units by which to indent the material from the left; defaults to 3

|right= the value, also in em, by which to indent the material from the right; defaults to 0 (use 7 to match the default left indentation)

|style= arbitrary CSS declarations, e.g. font-size: 95%;. This parameter should not normally be needed. Note: It already includes overflow: hidden; by default, to avoid collision of the div's background with floating elements.

|class= any CSS class names (e.g. as defined at MediaWiki:Common.css), comma-separated if more than one. This parameter should not normally be needed.

Comparison with {{Quote}} (block quotation)[edit source]

Block indent {{Quote}}
{{lorem}}{{block indent|1={{lorem}}}}{{lorem}} {{lorem}}{{quote|1={{lorem}}}}{{lorem}}
Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

See also[edit source]

  • {{indent}}, which indents a single line, after a newline, using a mixture of en- and em-dash sized spaces.
  • {{spaces}}, which indents a single line (or content inline in one) uses non-breaking spaces.
  • {{in5}}, which indents a single line (or content inline in one), skipping up to fifty equal en-sized spaces.
  • {{quote}}, the block quotation template