]> git.0d.be Git - earwig.git/commitdiff
include link to origin site in player
authorFrédéric Péters <fpeters@0d.be>
Sun, 2 Sep 2018 12:28:31 +0000 (14:28 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 2 Sep 2018 13:36:11 +0000 (15:36 +0200)
earwig/static/css/style.scss
earwig/static/js/earwig.js
earwig/templates/earwig/home.html

index 3be1629c6d2abc5038f4bb1e7c3b2a210821bcfb..5a1f16234b5f47d73ed31524001a3f78b89cd61f 100644 (file)
@@ -25,11 +25,11 @@ header {
                margin: 1rem;
                flex: 1 1 auto;
                span {
                margin: 1rem;
                flex: 1 1 auto;
                span {
-                       display: block;
                        height: 50px;
                        line-height: 50px;
                }
                audio {
                        height: 50px;
                        line-height: 50px;
                }
                audio {
+                       display: block;
                        width: 100%;
                }
        }
                        width: 100%;
                }
        }
index 0001e8bd8722e2e6179a4f36ed18126d1b1af6ed..03dc2e46a07e0b438b7d1f0e0e0681b64207a276 100644 (file)
@@ -3,6 +3,7 @@ $(function() {
     $('header').removeClass('hidden');
     $('header #cover').css('background-image', $(this).parent().css('background-image'));
     $('header #title').text($(this).find('.channel').text() + ' - ' + $(this).find('.sound').text());
     $('header').removeClass('hidden');
     $('header #cover').css('background-image', $(this).parent().css('background-image'));
     $('header #title').text($(this).find('.channel').text() + ' - ' + $(this).find('.sound').text());
+    $('header #site').attr('href', $(this).data('page-uri'));
     $('audio').empty();
     var source = $('<source>', {src: $(this).data('sound-uri')});
     $('audio').append(source);
     $('audio').empty();
     var source = $('<source>', {src: $(this).data('sound-uri')});
     $('audio').append(source);
index 725c438b10fbb984d74183e041c0f8b09591717d..63e68e4228e48f8256001f59caf7c0e31401a1fe 100644 (file)
@@ -8,6 +8,7 @@
 </div>
 <div>
   <span id="title">&nbsp;</span>
 </div>
 <div>
   <span id="title">&nbsp;</span>
+  - <a id="site" href="#">{% trans "Visit Site" %}</a>
   <audio controls></audio>
 </div>
 </header>
   <audio controls></audio>
 </div>
 </header>
@@ -19,7 +20,8 @@
 <div id="content">
 {% for sound in object_list|slice:":50" %}
 <div class="tile" style="background-image: url({% url 'sound-image' pk=sound.pk %})">
 <div id="content">
 {% for sound in object_list|slice:":50" %}
 <div class="tile" style="background-image: url({% url 'sound-image' pk=sound.pk %})">
-  <a href="#" data-sound-uri="{{ sound.sound_url }}">
+  <a href="#" data-sound-uri="{{ sound.sound_url }}"
+              data-page-uri="{{ sound.page_url }}">
     <span class="channel">{{ sound.channel.title }}</span>
     <span class="sound">{{ sound.title }}</span>
   </a>
     <span class="channel">{{ sound.channel.title }}</span>
     <span class="sound">{{ sound.title }}</span>
   </a>