Template:Hover button

From The Sims Wiki, a collaborative database for The Sims series
Jump to navigation Jump to search
[[File:{{{image}}}|180px|{{{link}}}|link={{{link}}}]]
[[{{{link}}}|{{{link}}}]]
Template documentation (View · Edit · History · Purge)
The hover button creates an image-based button link. The template was designed to be used on the main page and related pages.
Usage and specifications

Hover button behaves similarly to {{Pagecover}}, in that an image is displayed within an "outer box," allowing the image inside to be moved around. Unlike Pagecover, the size of the image is not dependent on the size of the outer box. The template is 180px wide by 135px tall by default, (this can be modified with {{{box-width}}} and {{{box-height}}} parameters, respectively) while any image used in the box will be displayed at 180px by default unless the {{{size}}} parameter is given. Any portions of the image that are not shown in the box can be shown by use of the {{{h-offset}}} (horizontal) and {{{v-offset}}} (vertical) offset parameters. The h-offset and v-offset parameters move the image inside the box leftwards and upwards, respectively.

Full syntax
{{Hover button
|image      = 
|size       = 
|box-width  = 
|box-height = 
|h-offset   = 
|v-offset   = 
|link       = 
|linktext   = 
}}
Main parameters
  • image: File names should be input without the File: prefix and link brackets
  • link: Sets the page that the image and text will link to. If linking to a category, be sure to include a colon before 'Category' in the title
  • h-offset: Moves the image horizontally by a set number of pixels to the left within the box (0px is the default h-offset)
  • v-offset: Moves the image vertically by a set number of pixels to upwards within the box (0px is the default v-offset)
Secondary parameters
  • size: This parameter defines the size of the image inside the box. Size should usually not be set lower than the value of the "box-width" parameter (180px by default), and generally shouldn't exceed the maximum native width of the image being displayed. Sizes should be input as plain numbers, without the 'px' suffix
  • box-height This optional parameter changes the height of the template itself (135px is default)
  • box-width This optional parameter changes the width of the template itself (180px is default)
  • linktext: An optional parameter; can be specified so that the text in the textbar and hover text is different than the link. If the parameter is not specified, the input from the link parameter will be used verbatim, including prefixes.
Change log
  • February 19, 2016 - Template was completed and made available for use.
  • October 1, 2016 - Template "box-height" and "box-width" parameters were added.
Attribution

This template was designed on The Sims Wiki; the template's revision history and list of contributors is available here.


Visit Template:Hover button/doc to edit this text! (How does this work?) (Refresh this text - why?)