Template:Masked gif: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
No edit summary
allow specifying a caption
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div class="qud-inline-gif"><div class="qud-inline-gif-mask"><span>gif</span></div>[[File:{{{img}}}|link=]][[File:{{{gif}}}|class=qud-invisible|link=]]</div>[[Category:Pages with GIFs]]</includeonly><noinclude>
<includeonly><div class="qud-inline-gif-wrap"><div class="qud-inline-gif"><div class="qud-inline-gif-mask"><span>gif</span></div>[[File:{{{img}}}|link=]][[File:{{{gif}}}|class=qud-invisible|link=]]</div><div class="qud-inline-gif-label">[[:File:{{{gif}}}|{{{text|{{{gif}}}}}}]]</div></div>[[Category:Pages with GIFs]]</includeonly><noinclude>
 
This template allows inserting a masked GIF onto a page. The GIF must then be clicked before it can play.
This template allows inserting a masked GIF onto a page. The GIF must then be clicked before it can play.


Line 7: Line 6:
== Example Usage ==
== Example Usage ==
<syntaxhighlight lang=html>
<syntaxhighlight lang=html>
{{masked gif | img = machine press demo.png | gif = machine press demo.gif }}
{{masked gif | img = machine press demo.png | gif = machine press demo.gif}}
</syntaxhighlight>
</syntaxhighlight>


{{suppress categories|{{masked gif | img = machine press demo.png | gif = machine press demo.gif }}}}
{{suppress categories|{{masked gif | img = machine press demo.png | gif = machine press demo.gif}}}}
[[Category:Templates]]
[[Category:Image templates]]
</noinclude>
</noinclude>

Latest revision as of 03:15, 3 March 2025

This template allows inserting a masked GIF onto a page. The GIF must then be clicked before it can play.

You must provide a mask image as the img parameter (such as a static .png of the GIF or just a plain color rectangle), as well as a gif parameter that includes the .gif image itself. The images should be the same size as one another.

Example Usage

{{masked gif | img = machine press demo.png | gif = machine press demo.gif}}