]> git.parisson.com Git - mezzo.git/commitdiff
Add Tournees banner to events list sidebar
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Tue, 18 Oct 2016 12:50:05 +0000 (14:50 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Tue, 18 Oct 2016 12:50:05 +0000 (14:50 +0200)
app/static/src/sass/modules/_banner.scss
app/templates/agenda/event_list.html

index 39cc834a3579eecc923ea30a6d8a0d5e48ac0679..9bdc5a75ae970374f1589c72bd9402221de4330f 100644 (file)
@@ -99,20 +99,20 @@ $module: ".banner";
 
     }
 
-    &--small {
+    &--sidebar {
 
-        height: 150px;
         margin-top: 0;
+        @include margin-bottom(2);
 
-        @include mq($until: lg) {
+        #{$module}__title {
 
-            height: 150px;
+            @include line-height(2);
 
         }
 
         #{$module}__content {
 
-            padding-top: 40px;
+            @include padding(1);
 
         }
 
index a8162bca924d628c92de0365be1e93eb4f31f7f1..1142f0eca2b09eb177ec482e4248db0161781de1 100644 (file)
 
                 <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 }}">
-                                {% if tag and tag|tag_is_excluded %}
-                                    {% trans "Tournées" %}
-                                {% else %}
-                                    {% trans "Rendez-vous" %}
-                                {% endif %}
-                            </a>
+                    <div style="position: relative;" >
 
-                            <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>
+                        {% if tag and not tag|tag_is_excluded or not tag %}
+                        <a class="banner banner--light banner--sidebar" href="{% url 'event_list_tag' 'tournees' %}" style="background-image:url({% static 'img/services/tours.jpg' %});">
 
-                        {% if tag and tag|tag_is_excluded %}
-                            <li class="nav-tree__item">
-                                <a class="nav-tree__link" href="{% url 'event_list' %}">
-                                    {% trans "Rendez-vous" %}
-                                </a>
-                            </li>
-                        {% else %}
-                            <li class="nav-tree__item">
-                                <a class="nav-tree__link" href="{% url 'event_list_tag' 'tournees' %}">
-                                    {% trans "Tournées" %}
-                                </a>
-                            </li>
-                        {% endif %}
+                            <div class="banner__content">
 
-                        <li class="nav-tree__separator">
+                                <div class="banner__title fsxxxl">
+                                    Tournées 16.17
+                                </div>
+                                <div class="banner__desc fss">
+                                    Campo Santo, Songes et Métamorphoses, Providences, UM souverain moteur de toutes choses...
+                                </div>
 
-                        </li>
+                            </div>
 
-                        {% if tag and not tag|tag_is_excluded or not tag %}
+                        </a>
+                        {% endif %}
 
-                            {% keywords_for mezzanine_agenda.event as tags %}
-                            {# {% all_events as all_events %}#}
-                            {% if tags %}
-                                {% comment %}
-                                    <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 %}
-                                    {% if not t|tag_is_excluded %}
-                                        <li class="nav-tree__item">
-                                            <a class="nav-tree__link--filter 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>
+                        <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 }}">
+                                    {% if tag and tag|tag_is_excluded %}
+                                        {% trans "Tournées" %}
+                                    {% else %}
+                                        {% trans "Rendez-vous" %}
                                     {% endif %}
-                                {% endfor %}
-                            {% endif %}
+                                </a>
 
-                        {% endif %}
-                    </ul>
+                                <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>
 
-                </div>
+                            {% if tag and tag|tag_is_excluded %}
+                                <li class="nav-tree__item">
+                                    <a class="nav-tree__link" href="{% url 'event_list' %}">
+                                        {% trans "Rendez-vous" %}
+                                    </a>
+                                </li>
+                            {% else %}
+                                <li class="nav-tree__item">
+                                    <a class="nav-tree__link" href="{% url 'event_list_tag' 'tournees' %}">
+                                        {% trans "Tournées" %}
+                                    </a>
+                                </li>
+                            {% endif %}
 
-                <div class="mb2 col-sm-9 col-lg-10 white-bg page__content" data-summary-content>
+                            <li class="nav-tree__separator">
 
-                    <div class="white-bg page__content">
-                        <div class="container">
+                            </li>
 
                             {% if tag and not tag|tag_is_excluded or not tag %}
-                                <div class="row">
-                                    <div class="col-lg-12">
-                                        <a class="banner banner--light banner--small" href="{% url 'event_list_tag' 'tournees' %}" style="background-image:url({% static 'img/services/tours.jpg' %});">
 
-                                            <div class="banner__content">
+                                {% keywords_for mezzanine_agenda.event as tags %}
+                                {# {% all_events as all_events %}#}
+                                {% if tags %}
+                                    {% comment %}
+                                        <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 %}
+                                        {% if not t|tag_is_excluded %}
+                                            <li class="nav-tree__item">
+                                                <a class="nav-tree__link--filter 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 class="banner__title fsxxxl">
-                                                    Tournées 16.17
-                                                </div>
-                                                <div class="banner__desc fss">
-                                                    Campo Santo, Songes et Métamorphoses, Providences, UM souverain moteur de toutes choses...
-                                                </div>
+                            {% endif %}
+                        </ul>
 
-                                            </div>
+                    </div>
+                </div>
 
-                                        </a>
-                                    </div>
-                                </div>
-                            {% endif %}
+                <div class="mb2 col-sm-9 col-lg-10 white-bg page__content" data-summary-content>
 
+                    <div class="white-bg page__content">
+                        <div class="container">
 
                             {% for event in events.object_list %}
                                 {% include 'agenda/includes/event_linecard.html' %}
                             {% endfor %}
+
                         </div>
                     </div>