Template:AudioEpisodeCard: Difference between revisions

From Bodhicitta
(VSCode edit)
(VSCode edit)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="col-md-4 filterable">
<includeonly><!--
<div class="position-relative offwhite-bg shadow-sm rounded-xl overflow-hidden mb-4">
The cover is requested at 120px, not 100px. The Commons scaler returns no
<div class="position-relative" style="height: 100px;">[[File:{{PAGENAME:{{#show:{{{ AssociatedArticle | }}}|?FrontCoverImg#}}}}|class=object-fit-cover position-absolute w-100 h-100]]</div>
thumbnail for the 100px bucket on these files, so the image degrades to a
<div class="p-3">
plain link to the file page — every row on the Listening Room was showing a
<div class="mb-3 text-center">[[{{{ AssociatedArticle | }}}|{{{ AssociatedDoorway | }}} - {{SUBPAGENAME:{{{ AssociatedArticle | }}}}}]]</div>
blue link rather than a cover. 120px is clean for all 15 audio covers.
<div class="mb-2">[[{{{ 1 | }}}]]</div>
 
<div class="mb-2">{{{ AudioDisplayText | }}}</div>
Same failure as the 260px bucket on the topic-page rows: if covers ever
<div class="d-flex justify-content-between text-muted text-90" style="bottom: 5px; right: 7px;"><span>{{{ AudioCreationDate | }}}</span>[[Special:Edit/{{{ 1 | }}}|<i class="fa-sharp-duotone fa-solid fa-pencil"></i>]]</div>
render as links again, probe a few widths before suspecting the file or the
ForeignFileRepo. See Template:TopicBiblioRow for the longer note.
--><div class="audio-episode filterable">
<div class="audio-episode-thumb">[[File:{{PAGENAME:{{#show:{{{ AssociatedArticle | }}}|?FrontCoverImg#}}}}|120px|link={{{ AssociatedArticle | }}}|class=object-fit-cover w-100 h-100]]</div>
<div class="audio-episode-body">
<div class="audio-episode-title">[[{{{ AssociatedArticle | }}}|{{SUBPAGENAME:{{{ AssociatedArticle | }}}}}]]</div>
<div class="audio-episode-meta"><span class="audio-episode-narrator">{{#if: {{{ AudioPerformerName | }}}
|[[{{{ AudioPerformerName | }}}|{{SUBPAGENAME:{{{ AudioPerformerName | }}}}}]]
|
}}</span>{{#if: {{{ AudioCreationDate | }}}
|<span class="audio-episode-date">{{{ AudioCreationDate | }}}</span>
|
}}<span class="audio-episode-admin tws-group-only tws-group-inline" data-group="sysop">[[Special:Edit/{{{ 1 | }}}|<i class="fa-sharp-duotone fa-solid fa-pencil"></i>]]</span>
</div>
</div>
</div>
</div>
</div></includeonly>
<div class="audio-episode-player">[[{{{ 1 | }}}]]</div>
</div></includeonly><noinclude>{{TemplateTag}}
 
One row in the [[Listening Room]] list.
 
These recordings are narrations of specific site pages rather than standalone
episodes, so the row leads with the article it narrates and treats the narrator
and date as secondary metadata. The player is a plain <code>[[File:…]]</code>
transclusion, which MediaWiki renders as a native <code>&lt;audio controls&gt;</code>
element — that already exposes duration and scrubbing, so neither is duplicated
in the markup.
 
The edit pencil is wrapped in <code>.tws-group-only</code> so it stays out of the
way for readers without making the page uncacheable. See <code>tws.js</code>.
</noinclude>

Latest revision as of 17:42, 26 August 2026


One row in the Listening Room list.

These recordings are narrations of specific site pages rather than standalone episodes, so the row leads with the article it narrates and treats the narrator and date as secondary metadata. The player is a plain File:… transclusion, which MediaWiki renders as a native <audio controls> element — that already exposes duration and scrubbing, so neither is duplicated in the markup.

The edit pencil is wrapped in .tws-group-only so it stays out of the way for readers without making the page uncacheable. See tws.js.