]> git.parisson.com Git - mezzo.git/commitdiff
Various fixes from tasks, audio player designed
authorPhilippe Barbosa <contact@philippebarbosa.com>
Fri, 8 Apr 2016 16:21:28 +0000 (18:21 +0200)
committerPhilippe Barbosa <contact@philippebarbosa.com>
Fri, 8 Apr 2016 16:21:28 +0000 (18:21 +0200)
app/festival/static/css/index.css
app/festival/static/js/index.js
app/festival/static/scss/base/_typography.scss
app/festival/static/scss/index.scss
app/festival/static/scss/modules/audio-player.scss [new file with mode: 0644]
app/festival/static/scss/modules/icons.scss
app/festival/templates/festival/artist_detail.html
app/festival/templates/festival/inc/audio_playlist.html
app/festival/templates/festival/video_detail.html
app/templates/agenda/event_location_list.html
app/templates/index.html

index f4640bc87859f6563749114b00b241fdecf2741b..19c2b12a90d8ae431a6bad24b08dd7af3d2d873e 100755 (executable)
@@ -3247,6 +3247,11 @@ th {
   content: "";
 }
 
+/* line 115, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/icons.scss */
+.icon__play:before {
+  content: "";
+}
+
 /* line 154, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/icons.scss */
 .icon__calendar:before {
   content: "";
@@ -3582,92 +3587,63 @@ th {
   margin-bottom: 0;
 }
 
-/**
- * Tabs navigation
- */
-/* line 8, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs-nav {
-  display: block;
-  float: left;
-  text-align: left;
-  width: 40%;
+/* line 1, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.audio__player,
+.audio__playlist {
+  padding: 1rem;
+  background: #e0cfad;
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.4);
 }
 
-/* line 18, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs-nav__link {
-  color: #d2ba88;
+/* line 16, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.audio__player audio,
+.audio__playlist audio {
+  width: 100%;
+  background: white;
+  margin: 0 auto;
   display: block;
-  transition: color 0.3s;
-  font-size: .6em;
-  padding: 0.25rem;
 }
 
-/* line 32, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs-nav__link:last-child {
-  margin-right: 0;
-}
-
-/* line 40, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs-nav__link.is-active {
-  color: #b18d43;
+/* line 25, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.audio__player {
+  border-bottom: 1px solid #fff;
+  background: #fff;
 }
 
-/* line 45, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs-nav__link i,
-.c-tabs-nav__link span {
-  margin: 0;
-  padding: 0;
+/* line 30, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.audio__playlist__item {
+  font-size: .75rem;
+  color: #555;
   line-height: 1;
+  transition: .3s;
 }
 
-/* line 52, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs-nav__link i {
-  font-size: 18px;
-}
-
-/* line 56, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs-nav__link span {
-  display: none;
-  font-size: 18px;
-}
-
-/**
- * Tab
- */
-/* line 74, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tab {
-  display: none;
-  float: left;
-  width: 60%;
-}
-
-/* line 84, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tab.is-active {
-  display: block;
+/* line 35, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.audio__playlist__item:before {
+  content: normal;
+  font-family: "Font-Awesome";
+  content: "";
+  font-size: 0;
+  transition: .3s;
 }
 
-/* line 88, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tab__content {
-  padding-left: .5rem;
+/* line 43, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.active .audio__playlist__item {
+  color: #000;
 }
 
-/**
- * Tabs no-js fallback
- */
-/* line 95, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs.no-js .c-tabs-nav {
-  display: none;
+/* line 45, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.active .audio__playlist__item:before {
+  font-size: 0.5rem;
+  margin-right: .3rem;
+  color: #000;
 }
 
-/* line 99, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs.no-js .c-tab {
+/* line 52, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+.audio__title {
   display: block;
-  margin-bottom: 1.5rem;
-}
-
-/* line 104, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-.c-tabs.no-js .c-tab:last-child {
-  margin-bottom: 0;
+  color: #000;
+  font-size: .75rem;
 }
 
 /* line 1, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/location.scss */
@@ -3693,15 +3669,6 @@ th {
   .c-tabs-nav__link span{
     display: block;
   }
-  /* line 62, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-  .c-tabs-nav__link i{
-    margin-bottom: 12px;
-    font-size: 22px;
-  }
-  /* line 66, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-  .c-tabs-nav__link span{
-    display: block;
-  }
 }
 @media (min-width: 769px){
   /* line 72, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/base/_layout.scss */
@@ -3774,6 +3741,12 @@ th {
   .hero__slider__name{
     font-size: 3rem;
   }
+  /* line 1, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+  .audio__player,
+  .audio__playlist{
+    width: 50%;
+    margin: 0 auto;
+  }
 }
 @media (min-width: 961px){
   /* line 59, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/base/_typography.scss */
@@ -4000,19 +3973,11 @@ th {
   .c-tab{
     width: 70%;
   }
-  /* line 8, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-  .c-tabs-nav{
-    width: 30%;
-  }
-  /* line 18, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-  .c-tabs-nav__link{
-    padding: 0;
-    font-size: .75rem;
-    line-height: 1.6;
-  }
-  /* line 74, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/tabs.scss */
-  .c-tab{
-    width: 70%;
+  /* line 1, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/audio-player.scss */
+  .audio__player,
+  .audio__playlist{
+    width: 33%;
+    margin: 0;
   }
   /* line 1, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/location.scss */
   .location__title{
index ee42447f62d0097a433c53659c08ce31f24c61f8..55d86a9a68ffbbeac5b0c2a41fae5216a4b19142 100644 (file)
@@ -130,7 +130,9 @@ $(function() {
      * Tabs
      */
 
+   var zeTab = $('#tabs');
 
+   if (zeTab.length) {
     var myTabs = tabs({
         el: '#tabs',
         tabNavigationLinks: '.c-tabs-nav__link',
@@ -138,52 +140,60 @@ $(function() {
     });
 
     myTabs.init();
+   }
+
 
     /**
      * Audio player
      */
 
-    function init_player() {
-        var audio;
-        var playlist;
-        var tracks;
-        var current;
-
-        current = 0;
-        audio = $('#audio');
-        playlist = $('#playlist');
-        tracks = playlist.find('li a');
-        len = tracks.length - 1;
-        audio[0].volume = .90;
-        //    audio[0].play();
-        playlist.find('a').click(function(e) {
-            e.preventDefault();
-            link = $(this);
-            current = link.parent().index();
-            run_player(link, audio[0]);
-        });
-        audio[0].addEventListener('ended', function(e) {
-            current++;
-            if (current == len) {
-                current = 0;
-                link = playlist.find('a')[0];
-            } else {
-                link = playlist.find('a')[current];
-            }
-            run_player($(link), audio[0]);
-        });
-    }
-
-    function run_player(link, player) {
-        $(player).find('#primarysrc').attr('src', link.attr('href'));
-        $(player).find('#secondarysrc').attr('src', link.attr('data-altsrc'));
-        par = link.parent();
-        par.addClass('active').siblings().removeClass('active');
-        player.load();
-        player.play();
-    }
-
-    init_player();
+     if ($('#audio').length) {
+        function init_player() {
+            var audio;
+            var playlist;
+            var tracks;
+            var current;
+
+            current = 0;
+            audio = $('#audio');
+            playlist = $('#playlist');
+            tracks = playlist.find('li a');
+            len = tracks.length - 1;
+            audio[0].volume = .90;
+            //    audio[0].play();
+            playlist.find('a').click(function(e) {
+                e.preventDefault();
+                link = $(this);
+                current = link.parent().index();
+                run_player(link, audio[0]);
+                linkTitle = link.text();
+                $('.audio__title').html(linkTitle);
+            });
+            audio[0].addEventListener('ended', function(e) {
+                current++;
+                if (current == len) {
+                    current = 0;
+                    link = playlist.find('a')[0];
+                } else {
+                    link = playlist.find('a')[current];
+                }
+                run_player($(link), audio[0]);
+            });
+        }
+
+        function run_player(link, player) {
+            $(player).find('#primarysrc').attr('src', link.attr('href'));
+            $(player).find('#secondarysrc').attr('src', link.attr('data-altsrc'));
+            par = link.parent();
+            par.addClass('active').siblings().removeClass('active');
+            player.load();
+            player.play();
+        }
+
+        init_player();
+     }
+
+
 
 
 });
index d65eb4b98d90796cb127a7a7fe48655c53a049ad..ad9c8373f72557ada0f87741783e505f0da82f20 100755 (executable)
@@ -234,17 +234,6 @@ pre > p {
   font-weight: $bold;
 }
 
-.location__title {
-  text-transform: uppercase;
-  margin: 0;
-  padding: 0;
-  font: $bold 1.1em/1.2 $base_font_family;
-  color: $main_color_darker;
-  @media (min-width : $desktop ) {
-    font: $bold 1.7em/1.2 $base_font_family;
-  }
-}
-
 .section__title {
   line-height: $base_line_height;
   font-family: $base_font_family;
index 0f5af632b2f2fc51d9cfb131fc65f79c2e5b7c86..d1ae52158931acc58860a22c944ed3c50a9f40f4 100755 (executable)
@@ -84,5 +84,5 @@
         'modules/push-calendar',
         'modules/calendar',
         'modules/tabs',
-        'modules/tabs',
+        'modules/audio-player',
         'modules/location';
\ No newline at end of file
diff --git a/app/festival/static/scss/modules/audio-player.scss b/app/festival/static/scss/modules/audio-player.scss
new file mode 100644 (file)
index 0000000..09b95af
--- /dev/null
@@ -0,0 +1,56 @@
+.audio__player,
+.audio__playlist {
+
+  @media (min-width : $tablet ) {
+    width: 50%;
+    margin: 0 auto;
+  }
+  @media (min-width : $desktop ) {
+    width: 33%;
+    margin: 0;
+  }
+
+  padding: 1rem;
+  background: lighten($main_color, 10);
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.4);
+  audio {
+    width: 100%;
+    // max-width: 100%;
+    background: white;
+    margin: 0 auto;
+    display: block;
+  }
+}
+
+.audio__player {
+  border-bottom: 1px solid $white;
+  background: $white;
+}
+
+.audio__playlist__item {
+  font-size: .75rem;
+  color: $base_font_color;
+  line-height: 1;
+  transition: .3s;
+  &:before {
+    content: normal;
+    font-family: $icon-font;
+    content: $fa-var-play;
+    font-size: 0;
+    transition: .3s;
+  }
+}
+.active .audio__playlist__item {
+  color: $black;
+  &:before {
+    font-size: 0.5rem;
+    margin-right: .3rem;
+    color: $black;
+  }
+}
+
+.audio__title {
+  display: block;
+  color: $black;
+  font-size: .75rem;
+}
\ No newline at end of file
index 57eff3289184616c23a99ced5c0a21a9e9359c05..2509f0eeaa824a152e8356d7ae61ef62137d3b97 100755 (executable)
 // .icon__step-backward:before { content: $fa-var-step-backward; }
 // .icon__fast-backward:before { content: $fa-var-fast-backward; }
 // .icon__backward:before { content: $fa-var-backward; }
-// .icon__play:before { content: $fa-var-play; }
+.icon__play:before { content: $fa-var-play; }
 // .icon__pause:before { content: $fa-var-pause; }
 // .icon__stop:before { content: $fa-var-stop; }
 // .icon__forward:before { content: $fa-var-forward; }
index ace9bd85cc211863b02fd2cffd769166d2fd96a3..22ccc9f17d72086982f0cbce602d6781a3502fcd 100644 (file)
@@ -22,6 +22,7 @@
     </p>
 </div>
 
+<hr style="margin-top: 3rem;">
 <h2 class="section__title">{% trans "Related events" %}</h2> <br>
 {% for event in artist.events.all %}
  {% include 'agenda/includes/event_card.html' %}
index 4a27ae9beed324cc8b821b435f8a3497ef75ffc7..8347873033809f79448a71e364fe1a3040fe9ec1 100644 (file)
@@ -1,23 +1,26 @@
 {% load staticfiles %}
 
-{% for audio in playlist.audios.all %}
-{% if forloop.first %}
-<audio id="audio" preload="auto" tabindex="0" controls="">
-    <source id="primarysrc" src="{{ audio.closed_source_url }}">
-    <source id="secondarysrc" src="{{ audio.open_source_url }}">
-    {{ audio.title }}
-</audio>
-<ul id="playlist">
-{% endif %}
-    <li class="active">
-        <a href="{{ audio.closed_source_url }}" data-altsrc="{{ audio.open_source_url }}">
+<div class="audio__block">
+    {% for audio in playlist.audios.all %}
+    {% if forloop.first %}
+    <div class="audio__player">
+        <audio id="audio" preload="auto" tabindex="0" controls="">
+            <source id="primarysrc" src="{{ audio.closed_source_url }}">
+            <source id="secondarysrc" src="{{ audio.open_source_url }}">
+        </audio>
+        <span class="audio__title">
             {{ audio.title }}
-        </a>
-    </li>
-{% endfor %}
-{% if forloop.first %}
-</ul>
-{% endif %}
-
-<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
-<script src="{% static "js/player.js" %}"></script>
+        </span>
+    </div>
+    <ul id="playlist" class="audio__playlist">
+    {% endif %}
+        <li>
+            <a href="{{ audio.closed_source_url }}" class="audio__playlist__item" data-altsrc="{{ audio.open_source_url }}">
+                {{ audio.title }}
+            </a>
+        </li>
+    {% endfor %}
+    {% if forloop.first %}
+    </ul>
+    {% endif %}
+</div>
index e4a7de5edcbf5ea11872fd6ef9c1e321554d8609..94a3b082f716a2a028f241cca17fefc2edcd66e7 100644 (file)
@@ -28,7 +28,7 @@
 {% endwith %}
 
 <div class="video-event">
-    <h2>{% trans 'Related event' %}</h2>
+    <h2 class="section__title">{% trans 'Related event' %}</h2>
     {% with video.event as event %}
     {% include 'agenda/includes/event_card.html' %}
     {% endwith %}
index 18d0e29cef6f568aea4159d03cc479b39c25b862..414cd5eaaeb4d0b56e5bc6980de04eedae6c2350 100644 (file)
@@ -44,8 +44,8 @@
                       {{ location.address }}<br />
                       <a href="{{ location|google_nav_url }}" target="_blank" class="">{% trans "Click to get the interactive map" %}</a>
                   </p>
-                  <a href="{{ location|google_nav_url }}" target="_blank" class="">
-                  {% google_static_map location 900 300 15 %}
+                  <a href="{{ location|google_nav_url }}" target="_blank" class="location__map">
+                    {% google_static_map location 900 300 15 %}
                   </a/>
                   {% endeditable %}
                   {% endblock %}
index 355ad5639a04fce72f9b03d167a0fed8e553004e..03660133ff604c17eb14271acd762f2472fac966 100644 (file)
@@ -23,7 +23,7 @@
 
     {% for post in featured.blogposts.all %}
     <div class="last__media__entry">
-         <span>{% trans "Article" %}</span>
+         <span>{% trans "Article" %} :</span>
          {% include 'blog/includes/post_card.html' %}
          <a href="{% url 'blog_post_list' %}" class="btn btn-full">{% trans "All" %} {% trans "articles" %}</a>
     </div>
@@ -31,7 +31,7 @@
 
     {% for artist in featured.artists.all %}
     <div class="last__media__entry">
-         <span>{% trans "Artist" %}</span>
+         <span>{% trans "Artist" %} :</span>
          {% include "festival/inc/artist_card.html" %}
          <a href="{% url 'festival-artist-list' %}" class="btn btn-full">{% trans "All" %} {% trans "artists" %}</a>
     </div>
@@ -39,7 +39,7 @@
 
     {% for video in featured.videos.all %}
     <div class="last__media__entry">
-        <span>{% trans "Video" %}</span>
+        <span>{% trans "Video" %} :</span>
         {% include 'festival/inc/video_card.html' %}
         <a href="{% url 'festival-video-list' %}" class="btn btn-full">{% trans "All" %} {% trans "videos" %}</a>
     </div>