Jump to content

Template:Species call

From WhiskerWiki


This template renders the "Call" section as one connected card -- a collapsible hearing-safety warning fused directly to a captioned, credited audio player -- instead of

Placeholder image
Hearing Safety Warning. This recording contains sonic frequencies that may be inaudible but could still be harmful at high volume. Start at a very low volume and increase only if needed.

and

sitting stacked as separate, disconnected pieces.===

⚠ Hearing safety warning
This recording contains sonic frequencies that may be inaudible but could still be harmful at high volume. Start at a very low volume and increase only if needed.
Example call
Recorded by Jane Doe, 2024.

How to use it

On a species page, replaces this:

{{Hearing safety warning}}
{{Audio player}}

with this:

{{Species call|title=Male advertisement call|attribution=Recording courtesy of the Pasch Lab (Kobrina et al. 2022).}}

Same file/width defaults and overrides as

: file defaults to {{PAGENAME}}.opus, width falls through to the widget's own default. title and attribution are both optional -- omit either for no caption / no credit line. attribution is plain wikitext, so it can carry italics, links, or a citation.

{{Species call|title=Alarm call|attribution=See Riede et al. (2023).|file=Some other file.opus|width=350px}}

The warning starts collapsed and expands on click -- see MediaWiki:Common.css (whisker-call-card / whisker-call-warning / whisker-audio-player-wrapper / whisker-audio-attribution classes) and MediaWiki:Common.js (the click handler that toggles .whisker-call-warning's is-open class) for the implementation. The warning text itself is duplicated here rather than reusing

Placeholder image
Hearing Safety Warning. This recording contains sonic frequencies that may be inaudible but could still be harmful at high volume. Start at a very low volume and increase only if needed.

/Module:Message_box, since that module always renders its own fixed box markup with no compact/collapsible mode -- this template needs different markup around the same message, not the same markup.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.