website/app/views/music1.twig
2016-11-28 16:58:49 -05:00

71 lines
2.2 KiB
Twig

{% extends 'templates/default.twig' %}
{% block javascripts %}
<script type="text/javascript" src="/js/music.js"></script>
{% endblock %}
{% block title %}Music Design #1{% endblock %}
{% block content %}
<header id="music-header" class="row">
<h1>Music</h1>
</header>
<!-- music player -->
<section class="row">
<!-- no javascript warning -->
<noscript class="card">Woah there, lassy! You will need to enable Javascript to use this page!</noscript>
<!-- left album stuff -->
<article class="col-sm-5 col-xs-12">
<div class="thumbnail shadow-1">
<img class="image-responsive album-art" src="{{ albums[0].album_art }}" alt="{{ albums[0].title }}">
<div class="caption">
<h3>{{ albums[0].title }}</h3>
{% if albums[0].description %}
<hr />
<p>{{ albums[0].description }}</p>
{% endif %}
</div>
</div>
</article>
<!-- right album stuff -->
<div class="col-sm-7 col-xs-12">
<article id="music-player-card" class="card">
<audio id="music-player" controls>
<source src="{{ songs[0].audio_file }}.ogg" type="audio/ogg" />
<source src="{{ songs[0].audio_file }}.mp3" type="audio/mpeg" />
</audio>
</article>
<article class="card">
<ul class="now-playing-list">
{% for song in songs %}
<li class="music-track {% if loop.index0 == 0 %}selected{% endif %}" data-trackid="{{ song.id }}" data-title="{{ song.title }}" data-album="{{ song.album_id }}" data-order="{{ song.track_order }}" data-path="{{ song.audio_file }}">
<span>{{ song.track_order }}. {{ song.title }}</span>
</li>
{% endfor %}
</ul>
</article>
</div>
</section>
<!-- available albums -->
<section class="row">
{% for album in albums %}
<!-- album details -->
<div class="music-album col-sm-3 col-xs-6" data-albumid="{{ album.id }}">
<div class="thumbnail shadow-1">
<img class="album-art" src="{{ album.album_art }}" alt="{{ album.title }}">
<div class="caption">
<h5>{{ album.title }}</h5>
</div>
</div>
</div>
{% endfor %}
</section>
{% endblock %}