Difference between revisions of "User:Evon R'al/Sandbox template/doc"

From EVE University Wiki
Jump to: navigation, search
m (Working on template {{Lex}}doc.)
m (rewrite for removal of the ws= parameter.)
Line 1: Line 1:
 
; Description
 
; Description
: This is a template exclusively used for the [[EVE Lexicon]] page, to tidy up the list of abbreviations and acronyms and make editing the list easy without losing functionality like highlighting words, allowing for links (anchors) etc.
+
: This is a template exclusively used for the [[EVE Lexicon]] page, to tidy up the list of abbreviations and acronyms and make editing the list easy without losing functionality like highlighting words, allowing for links (anchors) etc. It also creates an anchor so that it can be linked.
  
 
; Syntax
 
; Syntax
: {{T|Lex|word|description|4=ws= ws}}
+
: {{T|Lex|word|description}}
:: '''word''' - Abbreviation, acronym or word that needs explanation.
+
:: '''word''' - Abbreviation, acronym or word that needs explanation. Word is also used to create an anchor so that it can be linked to.
 
:: '''description''' - The meaning of word (Can contain formatting, links, etc.)
 
:: '''description''' - The meaning of word (Can contain formatting, links, etc.)
:: '''ws=''' - Control of the white-space<ref name="white-space" /> behavior in the description field. When omitted the behavior defaults to pre-wrap (i.e. Sequences of white space are preserved. Lines are broken at newline characters, at <nowiki><br></nowiki>, and as necessary to fill line boxes.).<br> If ws= is used without an actual value then the white-space property is not added to the style, so if no other white-space property is set, it will fallback to normal (i.e. Sequences of white space are collapsed. Newline characters in the source are handled the same as other white space. Lines are broken as necessary to fill line boxes.)<br> The ws parameter is of importance when using lists, either numbered(#) or unnumbered(*). if ws is not used when a list is used this results in an extra empty line between the list elements. A simple ws= is enough to fix this.<br>Valid values of ws are: normal, nowrap, pre, pre-line, pre-wrap, initial and inherit.
 
  
 
; Sample
 
; Sample
Line 12: Line 11:
 
{{Lex|Word|Description}}
 
{{Lex|Word|Description}}
  
: List withour the ws parameter
 
 
: {{Code|<nowiki>{{Lex|Word|
 
: {{Code|<nowiki>{{Lex|Word|
 
# Item one
 
# Item one
Line 19: Line 17:
 
# Item one
 
# Item one
 
# Item two}}
 
# Item two}}
 
: List with the ws parameter
 
: {{Code|<nowiki>{{Lex|Word|ws=|
 
# Item one
 
# Item two}}</nowiki>}} gives...
 
{{Lex|Word|ws=|
 
# Item one
 
# Item two}}
 
 
== References ==
 
<references>
 
<ref name="white-space">For more information see: <br>
 
[https://www.w3schools.com/cssref/pr_text_white-space.asp w3schools]<br>
 
[https://developer.mozilla.org/en-US/docs/Web/CSS/white-space MDN]</ref>
 
</references>
 
  
 
<includeonly>[[Category:Formatting templates]]</includeonly>
 
<includeonly>[[Category:Formatting templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 14:42, 26 April 2022

Description
This is a template exclusively used for the EVE Lexicon page, to tidy up the list of abbreviations and acronyms and make editing the list easy without losing functionality like highlighting words, allowing for links (anchors) etc. It also creates an anchor so that it can be linked.
Syntax
{{Lex|<word>|<description>}}
word - Abbreviation, acronym or word that needs explanation. Word is also used to create an anchor so that it can be linked to.
description - The meaning of word (Can contain formatting, links, etc.)
Sample
{{Lex|Word|Description}}
gives...
Word
Description
{{Lex|Word| # Item one # Item two}}
gives...
Word
  1. Item one
  2. Item two