Template:linkbox

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(Added no-wrap style, some browsers (i.e. mine) will think it ok to put a linebreak between the icon and the label without it)
(Add the ability to make link boxes link to full urls (I hope I did this right))
Line 1: Line 1:
-
<span class="hovul" style="font-size:smaller; background:#EEE; border:1px #999 solid; padding:2px; white-space:nowrap;">[[{{{3|HR}}}:{{{1}}}|{{{2|watch}}}]]</span><noinclude>
+
<span class="hovul" style="font-size:smaller; background:#EEE; border:1px #999 solid; padding:2px; white-space:nowrap;">{{#ifeq:{{{3}}}|fullurl|{{p|l={{{1}}} {{{2|watch}}}}}}|[[{{{3|HR}}}:{{{1}}}|{{{2|watch}}}]]}}</span><noinclude>
-
Use this template to link directly to content in [[homestarrunner.com]] and related sites.  Simply copy the path of the filename and the desired label for the link ("watch" is the default label; "HR" is the default link style).  
+
Use this template to link directly to content in [[homestarrunner.com]] and related sites.  Simply copy the path of the filename and the desired label for the link ("watch" is the default label; "HR" is the default link style). If the link style given is "fullurl", a full url will be expected and linked to.  
'''Examples:'''
'''Examples:'''
Line 11: Line 11:
<code><nowiki>{{linkbox|hallrunner.html|play|Videlectrix}}</nowiki></code>
<code><nowiki>{{linkbox|hallrunner.html|play|Videlectrix}}</nowiki></code>
:produces: {{linkbox|hallrunner.html|play|Videlectrix}}
:produces: {{linkbox|hallrunner.html|play|Videlectrix}}
 +
<code><nowiki>{{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}</nowiki></code>
 +
:produces: {{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}
----
----
*See also: {{tl|watch}}
*See also: {{tl|watch}}

Revision as of 22:35, 18 July 2018

[[HR:{{{1}}}|watch]]

Use this template to link directly to content in homestarrunner.com and related sites. Simply copy the path of the filename and the desired label for the link ("watch" is the default label; "HR" is the default link style). If the link style given is "fullurl", a full url will be expected and linked to.

Examples:

{{linkbox|sbemail.html|listen}}

produces: listen

{{linkbox|rapsong.html}}

produces: watch

{{linkbox|hallrunner.html|play|Videlectrix}}

produces: play

{{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}

produces: watch

Personal tools