Difference between revisions of "Template:Annotation/Documentation"

From War Thunder Wiki
Jump to: navigation, search
(Created page with "{{docpage}} The Template:Annotation template should be applied to avoid excessive use of HTML tags when adding short annotations. Code <code><nowiki>{{Annotation|20 + 20|Th...")
 
Line 1: Line 1:
 
{{docpage}}
 
{{docpage}}
  
The Template:Annotation template should be applied to avoid excessive use of HTML tags when adding short annotations. Code
+
=== Description ===
+
The template <code>Annotation</code> is used to avoid excessive use of HTML tags when adding short annotations to specific texts. This works by expanding the text with the following code:
<code><nowiki>{{Annotation|20 + 20|The side is reinforced with screens}}</nowiki></code>
+
 
+
<code><nowiki><span title="Annotated text" style="border-bottom: 1px dotted; cursor: help; white-space: nowrap">Text</span></nowiki></code>
expands to
+
 
+
=== Code ===
<code><nowiki><span title="The side is reinforced with screens" style="border-bottom: 1px dotted; cursor: help; white-space: nowrap">20 + 20</span></nowiki></code>
+
<pre>{{Annotation|Text|Annotated text}}</pre>
   
+
 
Here is the same example in action: {{Annotation|20 + 20|The side is reinforced with screens}} (move the mouse over the underlined text to display the hint).
+
=== Example ===
 +
'''Code:'''
 +
  <pre>{{Annotation|20 + 20|The side is reinforced with screens}}</pre>
 +
 
 +
'''Generated:'''
 +
 
 +
{{Annotation|20 + 20|The side is reinforced with screens}}

Revision as of 23:57, 2 November 2019

Description

The template Annotation is used to avoid excessive use of HTML tags when adding short annotations to specific texts. This works by expanding the text with the following code:

<span title="Annotated text" style="border-bottom: 1px dotted; cursor: help; white-space: nowrap">Text</span>

Code

{{Annotation|Text|Annotated text}}

Example

Code:

{{Annotation|20 + 20|The side is reinforced with screens}}

Generated:

20 + 20