{#- chirp-ui: Playlist component Vertical list of video items. Usage: from "chirpui/playlist.html" import playlist, playlist_item call playlist(title="Up next") call playlist_item(href="/watch/1", title="Video 1", duration="4:32", active=true) end call playlist_item(href="/watch/2", title="Video 2", duration="8:15") end end -#} {% def playlist(title=none, cls="") %}
{% if title %}

{{ title }}

{% slot header_actions %}
{% end %}
    {% slot %}
{% end %} {% def playlist_item(href, title, duration=none, active=false, cls="") %} {% set active_class = " chirpui-playlist-item--active" if active else "" %}
  • {{ title }} {% if duration %} {{ duration }} {% end %}
  • {% end %}