Template:audio: Difference between revisions

From sona pona, the Toki Pona wiki
Content added Content deleted
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span style="font-size:smaller;"><span alt="{{{alt|Play audio}}}" title="{{{title|Play audio}}}" style="display:inline-block;height:30px;overflow:hidden;vertical-align:middle;width:{{{width|40px}}};">[[File:{{{1}}}|{{{width|40px}}}]]</span>{{#if:{{{2|{{{title|}}}}}}|<nowiki /> {{{2|{{{title}}}}}}}}</span>
<span style="font-size:smaller;"><span alt="{{{alt|Play audio}}}" title="{{{title|Play audio}}}" style="border-radius:15px;display:inline-block;height:30px;overflow:hidden;vertical-align:middle;width:{{{width|40px}}};">[[File:{{{1<noinclude>|Example.ogg</noinclude>}}}|{{{width|40px}}}]]</span>{{#if:{{{2|{{{title|}}}}}}|<nowiki /> {{{2|{{{title}}}}}}}}</span><noinclude>

==Documentation==
===Template data===
<templatedata>
{
"params": {
"1": {
"label": "File name",
"example": "Example.ogg",
"type": "wiki-file-name",
"required": true
},
"2": {
"label": "Inline caption",
"type": "content",
"suggested": true
},
"alt": {
"label": "Alt text",
"description": "HTML alt property",
"type": "string"
},
"title": {
"label": "Title text",
"description": "HTML title property; autofills inline caption",
"type": "string"
},
"width": {
"label": "Width",
"description": "Embed width",
"example": "40px",
"type": "number"
}
},
"description": "Embeds an audio file compactly",
"paramOrder": [
"1",
"2",
"alt",
"title",
"width"
]
}
</templatedata>
</noinclude>

Latest revision as of 00:19, 13 May 2024

Documentation[edit source]

Template data[edit source]

Embeds an audio file compactly

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
File name1

no description

Example
Example.ogg
Filerequired
Inline caption2

no description

Contentsuggested
Alt textalt

HTML alt property

Stringoptional
Title texttitle

HTML title property; autofills inline caption

Stringoptional
Widthwidth

Embed width

Example
40px
Numberoptional