Template:PlayAudio: Difference between revisions

From The World of Gotha
Jump to navigation Jump to search
(Created page with "<span class="play-audio"> <a href="{{{1}}}" target="_blank"> 24px|link={{{1}}} </a> <span class="audio-title">'''{{{2}}}'''</span> </span>")
 
m (Transclude /doc page)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<span class="play-audio">
<includeonly><div style="text-align: center; display: flex; align-items: center; justify-content: center; gap: 5px;">
   <a href="{{{1}}}" target="_blank">
   [[File:Play.png|24px|link={{{1}}}]] <span style="font-weight: bold;">{{{2}}}</span>
    [[File:Play.png|24px|link={{{1}}}]]
</div></includeonly><noinclude>{{doc}}</noinclude>
  </a>
  <span class="audio-title">'''{{{2}}}'''</span>
</span>

Latest revision as of 20:08, 10 February 2025

Template documentation

The {{PlayAudio}} template places a "play" button () and displays a title for an audio file in an article. Pressing the "play" button opens the audio file and plays it.

Usage

To use the template, copy and paste the following where it should appear. Note: The template does not work inline and works best within a table cell.

{{PlayAudio|1|2}}

Parameters

Parameter Description Type Status Notes
1 Audio file link String Required Use the full url (e.g., https://gothandawn.com/w/images/x/xx/filename)
2 Display text String Required Text to display next to the "play button" (for no text, set this parameter to &nbsp;)

Example

{{PlayAudio|https://gothandawn.com/w/images/f/f6/02_idiotul_idioten_idiot.ogg|Idiotul Idioten Idiot}}

  Idiotul Idioten Idiot