Template:Image button: Difference between revisions
Appearance
Created page with "This creates one of the stylized and formatted buttons on the [[{{MediaWiki:Mainpage}}|main page]]. == Usage == Groups of this template should be wrapped inside of <code><nowiki><div class="image-buttons"></div></nowiki></code> and each entry should be a separate line in an unordered list. This div can be given one of the classes <code>columns-x</code> where x is a number from 1 to 9, and the links will line up in that many columns if..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><!-- | |||
Variables | |||
-->{{#vardefine:link|{{{link|}}}}}<!-- | |||
-->{{#vardefine:label|{{{label|}}}}}<!-- | |||
Single container div for positioning | |||
--><div class="image-button-container {{#if:{{#var:label}}|has-text}}"><!-- | |||
Main image with link | |||
--><div class="image {{#if:{{{image-hover|}}}|hide-on-hover}}">{{#if:{{{image|}}}|[[File:{{#replace:{{{image|}}}|File:}}|{{{size|330px}}}|link={{#var:link}}|class={{{imageClass|}}} ]]}}</div><!-- | |||
Hover image with same link (positioned absolutely) | |||
-->{{#if:{{{image-hover|}}}|<div class="hover-image">[[File:{{#replace:{{{image-hover|}}}|File:}}|{{{size|330px}}}|link={{#var:link}}|class={{{imageClass|}}}]]</div>}}<!-- | |||
{ | |||
</ | |||
--><div class="image-button--gloss"></div><!-- | |||
< | -->{{#if:{{#var:label}}|<div class="image-button--text">[[{{#var:link}}|{{#var:label}}]]</div>}}<!-- | ||
[[ | |||
--></div></includeonly><!-- | |||
Link text below (if needed) | |||
--><noinclude> | |||
{{doc}} | |||
</noinclude> | </noinclude> | ||