]> git.parisson.com Git - mezzo.git/commitdiff
New events filters (sidebar)
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Fri, 14 Oct 2016 10:36:30 +0000 (12:36 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Fri, 14 Oct 2016 10:36:30 +0000 (12:36 +0200)
app/static/src/sass/modules/boxes/_event-line-box.scss
app/static/src/sass/modules/navs/_nav-tree.scss
app/templates/agenda/event_list.html
app/templates/agenda/includes/event_linecard.html

index e47dcc99fe80f5178a3b4e916bf968aac7b84a85..63eb8302e54a44da418c0e393b30d05261a21bd4 100644 (file)
@@ -28,10 +28,9 @@ $module: ".event-line-box";
         @include line-height(1);
         @include typeface(serif);
         font-weight: weight(heavy);
-
-        @include mq($until: sm) {
-            display: none;
-        }
+        
+        visibility: hidden;
+        height: 0;
 
     }
 
@@ -58,6 +57,16 @@ $module: ".event-line-box";
         margin-top: 0;
         @include margin-bottom(1);
 
+        a:not(.button) {
+
+            border: 0;
+
+            &:hover {
+                box-shadow: none;
+            }
+
+        }
+
     }
 
     &__desc {
index 0b2f4fe4cde213d304a8b0f46bfbcf6aaad74b39..ee48e10678ec3769ae10a22cd79efb37f80e4d07 100644 (file)
@@ -29,6 +29,12 @@ $module: ".nav-tree";
 
     }
 
+    &__separator {
+
+        @include margin(2 0);
+
+    }
+
     &__link {
 
         display: block;
@@ -50,6 +56,14 @@ $module: ".nav-tree";
             @include padding-left(2);
             background: lighten($color_main, 20%);
             color: $color-black-light;
+
+            &.active {
+                padding: 4px 20px;
+                @include padding-left(2);
+                color: $color-black-light;
+                background: lighten($color_main, 20%);
+                font-weight: weight(bold);
+            }
         }
 
     }
index a512dd78c151767cf786e4be099c04c181b9c98e..c9117768ce8c029eb2e44e49e8a5298fa32337f4 100644 (file)
@@ -62,6 +62,7 @@
             <div class="row">
 
                 <div class="col-sm-9 col-sm-push-3 col-lg-8 col-lg-push-2 white-bg">
+
                     <h1 class="dotted">
                         {% if page %}
                             {{ page.richtextpage.meta_title }}
                         {% endif %}
                     </h1>
 
-                    <div class="page__filters">
+                </div>
+
+            </div>
+
+            <div class="row">
+
+                <div class="col-sm-3 col-lg-2 page__sidebar">
+
+                    <ul class="nav-tree nav-tree--level-{{ branch_level }}" data-sticky data-sticky-parent="row" data-sticky-offset="100" data-sticky-detach-at="971">
+                        <li class="nav-tree__item">
+                            <a class="nav-tree__link active" href="{{ page.get_absolute_url }}">{% trans 'Agenda' %}</a>
+
+                            <ul class="nav-tree" data-summary>
+                                <li class="nav-tree__item nav-tree__item--sub hide">
+                                    <a class="nav-tree__link nav-tree__link--sub" href="#"></a>
+                                </li>
+                            </ul>
+                        </li>
+
+                        <li class="nav-tree__separator">
+
+                        </li>
+
                         {% keywords_for mezzanine_agenda.event as tags %}
                         {# {% all_events as all_events %}#}
                         {% if tags %}
                                 <a href="{% url 'event_list' %}" class="button{% if not tag %} button--black{% else %} button--white{% endif %}">{% trans "All events" %}</a>
                             {% endcomment %}
                             {% for t in tags %}
-                                <a href="{% if tag == t %}{% url 'event_list' %}{% else %}{% url "event_list_tag" t.slug %}{% endif %}" class="button{% if tag == t %} button--black{% else %} button--white{% endif %}{% if t|tag_is_excluded %} button--tournees{% endif %}">
-                                    {{ t }} {% if tag == t %}<i class="fa fa-times"></i>{% endif %}
-                                </a>
+                                {% if not t|tag_is_excluded %}
+                                    <li class="nav-tree__item">
+                                        <a class="nav-tree__link{% if tag == t %} active{% endif %}" href="{% if tag == t %}{% url 'event_list' %}{% else %}{% url "event_list_tag" t.slug %}{% endif %}">
+                                            {{ t }} {% if tag == t %}<i class="fa fa-times"></i>{% endif %}
+                                        </a>
+                                    </li>
+                                {% endif %}
                             {% endfor %}
                         {% endif %}
-                    </div>
+                    </ul>
 
                 </div>
 
-            </div>
-
-            <div class="row">
-
-                <div class="col-xs-12">
+                <div class="mb2 col-sm-9 col-lg-8 white-bg page__content" data-summary-content>
 
                     <div class="white-bg page__content">
                         <div class="container">
index e8199f67ce54c3e2f8e8d84e4b600d07a6568d58..c6a5a5b6b262207e9e3533ed005e5470f1ccdb25 100644 (file)
@@ -2,15 +2,17 @@
 
 <div class="row event-line-box">
 
-    <div class="col-sm-2 col-md-3 col-lg-3 event-line-box__month">
+    {% ifchanged event.start.month %}
 
-        {% ifchanged event.start.month %}
-            {{ event.start|date:'F' }}
-        {% endifchanged %}
+        <div class="col-sm-12 col-md-12 col-lg-12 event-line-box__month">
 
-    </div>
+            <h2>{{ event.start|date:'F' }}</h2>
+
+        </div>
+
+    {% endifchanged %}
 
-    <div class="col-sm-10 col-md-9 col-lg-9 event-line-box__content">
+    <div class="col-sm-12 col-md-12 col-lg-12 event-line-box__content">
 
         <div class="row">
 
@@ -52,9 +54,9 @@
                         {% endif %}
                     </div>
                 {% endif %}
-                <h2 class="event-line-box__title">
+                <h3 class="event-line-box__title">
                     <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
-                </h2>
+                </h3>
                 <div class="event-line-box__desc">
                     {{ event.description|slice:":100" }}
                 </div>