Template:Hover gif

From Noita Wiki
Jump to navigation Jump to search

{{Hover gif}} provides a way for gifs to be displayed but not playing until the user hovers over the image. It uses code from Mediawiki:Common.js and styles from Mediawiki:Common.css. In mobile view, the hover functionality is ignored and gifs play as normal.

Parameters

There are several unnamed parameters:

  1. File name (no extension)
  2. Size (defaults to 300x300px, and specifying a size larger than the actual image will not enlarge it)
  3. Float; can be left, right, center, or inline. inline aligns left rather than fully floating and allows for multiple hover gifs to go on the same line in a gallery. (defaults to inline)
  4. Description

Known issue

Sometimes the static thumbnail fails to load, resulting in a blank space with the gif icon overlaid on it. The template otherwise works as normal, and a simple page refresh can fix the issue.

Example

{{Hover gif|Giant Firebolt(demo)|600px|left|An example description}}
An example description

When it's left-floating, text placed below the gif will be to the right of it


{{Hover gif|Giant Firebolt(demo)|600px|inline|An example description}}
{{Hover gif|Giant Firebolt(demo)|600px|inline|An example description}}
An example description
An example description

These are inline and don't fully float


{{Hover gif|Giant Firebolt(demo)|600px|right|An example description}}
An example description

When it's right-floating, text placed below the gif will be to the left of it