]> git.0d.be Git - panikweb.git/commitdiff
templates: add current player icon to homepage
authorFrédéric Péters <fpeters@0d.be>
Fri, 27 Dec 2019 09:00:51 +0000 (10:00 +0100)
committerFrédéric Péters <fpeters@0d.be>
Fri, 27 Dec 2019 11:35:57 +0000 (12:35 +0100)
panikweb_templates/static/css/_specifics.scss
panikweb_templates/static/img/listen.png [new file with mode: 0644]
panikweb_templates/static/js/specifics.js
panikweb_templates/templates/home.html

index 2575886b0ad18192c79185d3170c672b59a47350..d0638da2a91cdbd37d400082b59764cc17c99ee2 100644 (file)
@@ -723,7 +723,6 @@ h1.top#frequence {
        z-index: 1;
 }
 #specialHome {
-       padding-top: 105px;
 }
 #Main >.wrapper{
        padding-bottom:2em;
@@ -2241,3 +2240,17 @@ div.episode.soundfile {
                }
        }
 }
+
+a.listen-home {
+        background: url(../img/listen.png) top left no-repeat;
+        margin-top: 20px;
+        display: block;
+        width: 286px;
+        height: 97px;
+        text-indent: -10000px;
+        overflow: hidden;
+        cursor: pointer;
+        &:hover {
+                background-position: -286px 0px;
+        }
+}
diff --git a/panikweb_templates/static/img/listen.png b/panikweb_templates/static/img/listen.png
new file mode 100644 (file)
index 0000000..3383a71
Binary files /dev/null and b/panikweb_templates/static/img/listen.png differ
index 5e1e51f4b59d7a4c5b41d6a2d6a521a2d66b50c7..ba1d9eabeae3bb4d428e0cd61fa4caa781291b36 100644 (file)
@@ -120,6 +120,9 @@ $(function() {
                        return;
                }
                this.each(function() {
+                       if (! $(this).attr("href")) {
+                               return;
+                       }
                        $(this).unbind('click');
                        $(this).bind('click',function(e){
                                var href = $(this).attr("href");
@@ -296,6 +299,9 @@ $(function() {
                        });  
                        activeTab.trigger('load');
                });
+               $('a.listen-home').on('click', function() {
+                       $('#DirectStreamPanikControler').trigger('click');
+               });
                $('[data-player-action]').on('click',function(){
                        var audio = $('#'+$(this).attr('data-player-audio'));
                        var sound_id = audio.data('sound-id');
index eec005d615c7b21261102fa57dea15c86fa8b189..2598f4ca22e4b573726d5b5adf23663f4a7e8a65 100644 (file)
@@ -4,6 +4,9 @@
 {% block title %}{% trans 'Home' %}{% endblock %}
 
 {% block main %}
+<header class="mainHeader">
+        <a class="listen-home">Écouter le direct</a>
+</header>
 
 <div class="sided wrapper navigation" id="specialHome">
     <div>