]> git.parisson.com Git - mezzo.git/commitdiff
style improvments, responsive menu
authorPhilippe Barbosa <contact@philippebarbosa.com>
Thu, 3 Mar 2016 10:20:59 +0000 (11:20 +0100)
committerPhilippe Barbosa <contact@philippebarbosa.com>
Thu, 3 Mar 2016 10:20:59 +0000 (11:20 +0100)
app/festival/static/css/index.css
app/festival/static/js/index.js
app/festival/static/scss/components/_headers.scss
app/festival/static/scss/components/_menu-toggle.scss
app/festival/static/scss/modules/artist-card.scss
app/templates/base.html

index c5bb9dc872a2990e671e7b3e6695c5e9bc6d00fd..8e3d90e720172b6dec559a0ade014d10f6432ec0 100755 (executable)
@@ -1392,58 +1392,63 @@ th {
 /* line 40, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .header {
   background: #fff url("../img/bg_manzoni--center.jpg") no-repeat top;
-  padding: 1rem;
+  padding: 1rem 0;
 }
 
-/* line 46, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+/* line 45, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .header h1 {
   margin: 0;
 }
 
-/* line 50, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+/* line 49, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .header__baseline {
   display: block;
   width: 100%;
   text-align: center;
-  line-height: 85px;
   color: black;
   font-weight: 700;
   font-size: 1rem;
 }
 
-/* line 63, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+/* line 62, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .header__logo {
   display: block;
   float: left;
   max-width: 10rem;
+  line-height: 1;
 }
 
 /* line 68, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .header__logo--right {
-  float: right;
+  display: none;
 }
 
-/* line 72, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+/* line 76, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .header__logo__img {
   max-height: 45px;
   width: auto;
 }
 
-/* line 80, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+/* line 84, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .header__logo__text {
   position: absolute;
   top: -200%;
 }
 
 /* line 96, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+.navigation {
+  display: none;
+}
+
+/* line 106, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .menu {
   text-align: center;
 }
 
-/* line 106, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+/* line 116, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
 .menu__item__link {
   display: inline-block;
-  padding: 1rem 1rem;
+  padding: 0.5rem 1rem;
   margin: 0 auto;
   font-family: "Interstate", "Helvetica Neue", Helvetica, Arial, sans-serif;
   text-transform: uppercase;
@@ -1550,7 +1555,7 @@ th {
 .menu__toggle {
   display: block;
   float: right;
-  background: #8e702e;
+  background: #fff;
   width: 32px;
   height: 32px;
   border-radius: 3px;
@@ -1561,32 +1566,39 @@ th {
      -moz-user-select: none;
       -ms-user-select: none;
           user-select: none;
+  border: 1px solid #000;
+  margin: 0;
 }
 
 /* line 21, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
+.menu__toggle:hover {
+  background: #fff;
+}
+
+/* line 26, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
 .menu__toggle:checked span:first-child,
 .menu__toggle.toggled span:first-child {
   -webkit-transform: translateY(6px) rotate(45deg);
           transform: translateY(6px) rotate(45deg);
 }
 
-/* line 26, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
+/* line 31, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
 .menu__toggle:checked span:nth-child(2),
 .menu__toggle.toggled span:nth-child(2) {
   opacity: 0;
 }
 
-/* line 31, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
+/* line 36, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
 .menu__toggle:checked span:last-child,
 .menu__toggle.toggled span:last-child {
   -webkit-transform: translateY(-6px) rotate(-45deg);
           transform: translateY(-6px) rotate(-45deg);
 }
 
-/* line 36, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
+/* line 41, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
 .menu__toggle span {
   display: block;
-  background: white;
+  background: #8e702e;
   width: 20px;
   height: 2px;
   border-radius: 3px;
@@ -1595,7 +1607,7 @@ th {
   transition: 0.3s ease;
 }
 
-/* line 46, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
+/* line 51, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_menu-toggle.scss */
 .menu__toggle span:nth-child(2) {
   margin: 4px 0;
 }
@@ -2043,12 +2055,7 @@ th {
 /* line 16, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
 .artist__item {
   float: left;
-  padding: 1rem;
-}
-
-/* line 20, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
-.artist__item img {
-  display: block;
+  padding: 0.5rem;
 }
 
 /* line 24, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
@@ -2058,16 +2065,21 @@ th {
 }
 
 /* line 37, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
+.artist__item img {
+  display: block;
+}
+
+/* line 41, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
 .artist__item__name {
   display: block;
   width: 100%;
-  padding: 10px;
+  padding: 0.5rem;
   text-align: center;
   background: #8e702e;
   color: white;
-  font-size: 1rem;
   font-weight: 400;
   margin: 0;
+  font-size: 0.7rem;
 }
 
 /* line 5, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-detail.scss */
@@ -2137,13 +2149,21 @@ th {
   .sticked-form input[type=submit] {
     width: 30%;
     border-radius: 0 0px 0px 0;
-  }/* line 50, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+  }/* line 49, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
   .header__baseline {
+    line-height: 85px;
     font-size: 2rem;
-  }/* line 72, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+  }/* line 68, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+  .header__logo--right {
+    display: block;
+    float: right;
+  }/* line 76, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
   .header__logo__img {
     max-height: 85px;
-  }/* line 98, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+  }/* line 96, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
+  .navigation {
+    height: auto;
+  }/* line 108, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_headers.scss */
   .menu__item {
     display: inline-block;
     display: inline;
@@ -2155,6 +2175,9 @@ th {
   .artist__sizer,
   .artist__item {
     width: 33.33333%;
+  }/* line 16, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
+  .artist__item {
+    padding: 1rem;
   }/* line 24, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
   .artist__item__inner {
     transition: .3s;
@@ -2163,6 +2186,10 @@ th {
     box-shadow: 0px 1px 25px 0px rgba(142, 112, 46, 0.7);
     -webkit-transform: scale(1.02);
     transform: scale(1.02);
+  }/* line 41, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/modules/artist-card.scss */
+  .artist__item__name {
+    padding: 0.8rem;
+    font-size: 1rem;
   }
 }
 @media (min-width: 1200px) {/* line 5, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/base/_layout.scss */
index 670a30634651dbc6844cbf1ab8fd2a9b3fb6fc6c..f83e630904b08905559de3a0e2624693f8f1a0e4 100644 (file)
@@ -1,7 +1,10 @@
 $(function() {
-    // Masonry
-    var $grid = $('.artist__list');
 
+    /**
+     * Masonry
+     * @author Philippe Barbosa
+     */
+    var $grid = $('.artist__list');
     $grid.imagesLoaded( function(){
         $grid.masonry({
           itemSelector: '.artist__item',
@@ -9,4 +12,18 @@ $(function() {
           columnWidth: '.artist__sizer'
         });
     });
+
+    /**
+     * Rsponsive menu
+     * @author Philippe Barbosa
+     */
+
+    var toggleButton = $('.menu__toggle'),
+        navigation = $('.navigation');
+
+        toggleButton.on('click', function(event) {
+            event.preventDefault();
+            $(this).toggleClass('toggled');
+            navigation.slideToggle();
+        });
 });
\ No newline at end of file
index d5d65d069ff203b4dea6a36b5baaf9dfd03b469b..bcc9504dfc79353b6429b7b3fda289e0fe256ffe 100755 (executable)
@@ -40,8 +40,7 @@
 .header {
   @extend .clearfix;
   background: $base_background_color url('../img/bg_manzoni--center.jpg') no-repeat top;
-
-  padding: $base_font_size;
+  padding: $base_font_size 0;
 
   h1 {
     margin: 0;
     display: block;
     width: 100%;
     text-align: center;
-    line-height: 85px;
     color: black;
     font-weight: $bold;
     font-size: 1rem;
     @media (min-width : $desktop ) {
+        line-height: 85px;
         font-size: 2rem;
     }
   }
     display: block;
     float: left;
     max-width: 10rem;
+    line-height: 1;
 
     &--right {
-      float: right;
+      display: none;
+      @media (min-width : $desktop ) {
+        display: block;
+        float: right;
+      }
     }
 
     &__img {
 
 .navigation {
   @extend .clearfix;
+  // overflow: hidden;
+  // height: 0;
+  display: none;
+  @media (min-width : $desktop ) {
+      height: auto;
+  }
 }
 
 .menu {
 
     &__link {
       display: inline-block;
-      padding: $base_font_size 1rem;
+      padding: $base_font_size/2 1rem;
       margin: 0 auto;
       font-family: $header_font_family;
       text-transform: uppercase;
index e1d3c6a01f8e5c3869a750a84e0db2bc1db3f40c..6df6749382a7b83f60f5e81f6e6ad868177080e0 100755 (executable)
@@ -5,7 +5,7 @@
 .menu__toggle {
   display: block;
   float: right;
-  background: $main_color;
+  background: $white;
   width: 32px;
   height: 32px;
   border-radius: 3px;
   padding: 9px 6px;
   cursor: pointer;
   user-select: none;
+  border: 1px solid #000;
+  margin: 0;
   @media (min-width : $desktop ) {
       display: none;
   }
+  &:hover {
+    background: #fff;
+  }
 }
 
 .menu__toggle:checked span:first-child,
@@ -35,7 +40,7 @@
 
 .menu__toggle span {
   display: block;
-  background: white;
+  background: $main_color;
   width: 20px;
   height: 2px;
   border-radius: 3px;
index f176bf3b171eab60b7f4c65781faadcd8aed7d4b..3cc1039cb2db09926d3fb362ae80541da007796b 100644 (file)
 
 .artist__item {
   float: left;
-  padding: 1rem;
+  padding: 0.5rem;
 
-  img {
-    display: block;
+  @media (min-width : $desktop ) {
+     padding: 1rem;
   }
 
-    &__inner {
-        position: relative;
-        box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.4);
+  &__inner {
+      position: relative;
+      box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.4);
 
-        @media (min-width : $desktop ) {
-            transition: .3s;
-            &:hover {
-                box-shadow: 0px 1px 25px 0px transparentize($main_color, .3);
-                transform: scale(1.02);
-            }
-        }
-    }
+      @media (min-width : $desktop ) {
+          transition: .3s;
+          &:hover {
+              box-shadow: 0px 1px 25px 0px transparentize($main_color, .3);
+              transform: scale(1.02);
+          }
+      }
+  }
 
-    &__name {
-        display: block;
-        width: 100%;
-        padding: 10px;
-        text-align: center;
-        background: $main_color;
-        color: white;
-        font-size: 1rem;
-        font-weight: $regular;
-        margin: 0;
-    }
+  img {
+    display: block;
+  }
+
+  &__name {
+      display: block;
+      width: 100%;
+      padding: 0.5rem;
+      text-align: center;
+      background: $main_color;
+      color: white;
+      font-weight: $regular;
+      margin: 0;
+      font-size: 0.7rem;
+      @media (min-width : $desktop ) {
+          padding: 0.8rem;
+          font-size: 1rem;
+      }
+  }
 }
\ No newline at end of file
index 6551d9fced4a1083f92bcecec5a3a1a11cd087b2..0e521af6d1cdb208944183a0603a4ed8b2f20bdd 100644 (file)
                     </div>
                 {% endif %}
 
-                {% if settings.SITE_TAGLINE %}
-                <p class="header__baseline">{{ settings.SITE_TAGLINE }}</p>
-                {% endif %}
-
                 <button class="menu__toggle">
                     <span></span>
                     <span></span>
                     <span></span>
                 </button>
+
+                {% if settings.SITE_TAGLINE %}
+                <p class="header__baseline">{{ settings.SITE_TAGLINE }}</p>
+                {% endif %}
+
             </div>
         </div>