Template:Legend/doc and Template:R/doc: Difference between pages

From IxWiki
(Difference between pages)
Jump to navigation Jump to search
mp>Π
mNo edit summary
 
m (1 revision imported)
 
Line 1: Line 1:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
=== Usage ===
Shows a legend row with a colored box.
Fakes a red link, without actually linking anywhere, avoiding the issue of unnecessary pages listed on [[Special:Wantedpages|Wantedpages]].
__TOC__
==Usage==
<nowiki>{{</nowiki>legend|''color''|''label''|border=''border''<nowiki>}}</nowiki>


''color'' is passed to the css background-color property. The optional ''border'' argument is the css description (e.g. <code>1px solid #aaa</code>) of the border that will be drawn around the box.
The first parameter is whatever you want the displayed text to be. For example, <code><nowiki>{{r|Shiny shiny Jesusland}}</nowiki></code> produces {{r|Shiny shiny Jesusland}}.


==Examples==
The second parameter is for the text that is displayed when the cursor is hovering over the link (in normal links, this text shows the name of the article linked to). For example, <code><nowiki>{{r|The Bible Belt|AKA shiny shiny Jesusland}}</nowiki></code> produces {{r|The Bible Belt|AKA shiny shiny Jesusland}}.
===Use in text===
  <nowiki>{{legend|black|Africa}}</nowiki>
<nowiki>{{legend|green|Americas}}</nowiki>
<nowiki>{{legend|blue|Oceania}}</nowiki>
<nowiki>{{legend|#ff0|Europe}}</nowiki>
<nowiki>{{legend|#ff2800|Asia}}</nowiki>


{{legend|black|Africa}}
A third parameter allows users to change the display color.  The most obvious usage for this is making the fake red link a fake blue link.  For example, <code><nowiki>{{r|The Bible Belt|AKA shiny shiny Jesusland|#1034A6}}</nowiki></code> produces {{r|The Bible Belt|AKA shiny shiny Jesusland|#1034A6}}.
{{legend|green|Americas}}
=== See also ===
{{legend|blue|Oceania}}
{{legend|#ff0|Europe}}
{{legend|#ff2800|Asia}}


===Use in a caption ===
<includeonly>
<pre><nowiki>
[[Category:In-text templates]]
[[Image:Celts in Europe.png|200px|thumb|right|The Celts in Europe, past and present:
{{legend|#1a8000|present-day Celtic-speaking areas}}
{{legend|#27c600|other parts of the six most commonly recognized 'Celtic nations' and where a
Celtic language is spoken but not the dominating language}}
{{legend|#97ffb6|other parts of Europe once peopled by Celts; modern-day inhabitants of many of
these areas often claim a Celtic heritage and/or culture}}
]]
</nowiki></pre>
[[Image:Celts in Europe.png|200px|thumb|right|The Celts in Europe, past and present:
{{legend|#1a8000|present-day Celtic-speaking areas}}
{{legend|#27c600|other parts of the six most commonly recognized 'Celtic nations' and where a Celtic language is spoken but not the dominating language}}
{{legend|#97ffb6|other parts of Europe once peopled by Celts; modern-day inhabitants of many of these areas often claim a Celtic heritage and/or culture}}]]
{{clear}}


<includeonly>[[Category:In-text templates]]
</includeonly>
</includeonly>

Latest revision as of 22:01, 14 July 2023

Usage

Fakes a red link, without actually linking anywhere, avoiding the issue of unnecessary pages listed on Wantedpages.

The first parameter is whatever you want the displayed text to be. For example, {{r|Shiny shiny Jesusland}} produces [1].

The second parameter is for the text that is displayed when the cursor is hovering over the link (in normal links, this text shows the name of the article linked to). For example, {{r|The Bible Belt|AKA shiny shiny Jesusland}} produces [2][3].

A third parameter allows users to change the display color. The most obvious usage for this is making the fake red link a fake blue link. For example, {{r|The Bible Belt|AKA shiny shiny Jesusland|#1034A6}} produces [2][3][4].

See also

  1. Cite error: Invalid <ref> tag; no text was provided for refs named Shiny shiny Jesusland
  2. 2.0 2.1 Cite error: Invalid <ref> tag; no text was provided for refs named The Bible Belt
  3. 3.0 3.1 Cite error: Invalid <ref> tag; no text was provided for refs named AKA shiny shiny Jesusland
  4. Cite error: Invalid <ref> tag; no text was provided for refs named #1034A6