]> git.parisson.com Git - mezzo.git/commitdiff
Fix the summary box shadow in event list
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Mon, 24 Oct 2016 13:01:37 +0000 (15:01 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Mon, 24 Oct 2016 13:01:37 +0000 (15:01 +0200)
app/static/src/sass/modules/navs/_nav-tree.scss
app/templates/agenda/event_list.html

index 6eac3682f3317080b24d694b959923ed327bcc8f..b48ff2ffac0032a73f3a9db4b60ecc16ac2a2d7c 100644 (file)
@@ -16,8 +16,18 @@ $module: ".nav-tree";
 
     }
 
+    .nav-tree-wrapper & {
+        position: static;
+    }
+
     .nav-tree & {
         position: relative;
+
+        #{$module}__item {
+            &:first-child {
+                margin-top: 2px;
+            }
+        }
     }
 
     opacity: 1;
@@ -41,6 +51,7 @@ $module: ".nav-tree";
         border-left: 2px solid white;
         border-right: 2px solid white;
         border-bottom: 2px solid white;
+        border-top: 2px solid white;
 
         @include mq($until: sm) {
             border-top: 1px solid white;
@@ -52,6 +63,10 @@ $module: ".nav-tree";
 
         margin-top: 2px;
 
+        &:first-child {
+            margin-top: 0;
+        }
+
     }
 
     &__separator {
index 2b326470f11bbf3b98d04c1c332bbab1ae9cbd6d..e2a513292ef8117e53ba98f8df69f13691820d71 100644 (file)
@@ -92,6 +92,7 @@
                 <div class="col-sm-3 col-lg-2 page__sidebar">
 
                     <div style="position: relative;" >
+
                         {% if tag and not tag|tag_is_excluded or not tag and not is_archive %}
                         <a class="banner banner--light banner--sidebar" href="{% url 'event_list_tag' 'tournees' %}" style="background-image:url({% static 'img/services/tours.jpg' %});">
 
                         </a>
                         {% endif %}
 
-                        <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="{% url 'event_list' %}">
-                                    {% if tag and tag|tag_is_excluded %}
-                                        {% trans "Tournées" %}
-                                    {% elif is_archive %}
-                                        {% trans 'Archives' %}
-                                    {% else %}
-                                        {% trans "Rendez-vous" %}
-                                    {% endif %}
-                                </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>
+                        <div class="nav-tree-wrapper" data-sticky data-sticky-parent="row" data-sticky-offset="100" data-sticky-detach-at="971">
 
-                            {% if is_archive %}
+                            <ul class="nav-tree nav-tree--level-{{ branch_level }}">
                                 <li class="nav-tree__item">
-                                    <a class="nav-tree__link" href="{% url 'event_list' %}">
-                                        {% trans "Rendez-vous" %}
+                                    <a class="nav-tree__link active" href="{% url 'event_list' %}">
+                                        {% if tag and tag|tag_is_excluded %}
+                                            {% trans "Tournées" %}
+                                        {% elif is_archive %}
+                                            {% trans 'Archives' %}
+                                        {% else %}
+                                            {% trans "Rendez-vous" %}
+                                        {% endif %}
                                     </a>
-                                </li>
-                            {% endif %}
 
-                            {% 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>
+                                    <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>
-                            {% else %}
-                                <li class="nav-tree__item">
-                                    <a class="nav-tree__link" href="{% url 'event_list_tag' 'tournees' %}">
-                                        {% trans "Tournées" %}
-                                    </a>
-                                </li>
-                            {% endif %}
 
-                            {% if not is_archive %}
-                                <li class="nav-tree__item">
-                                    <a class="nav-tree__link" href="{% url "event_list_year" CURRENT_SEASON %}" title="{% trans 'archive' %}">{% trans 'Archives' %}</a>
-                                </li>
-                            {% endif %}
+                                {% if is_archive %}
+                                    <li class="nav-tree__item">
+                                        <a class="nav-tree__link" href="{% url 'event_list' %}">
+                                            {% trans "Rendez-vous" %}
+                                        </a>
+                                    </li>
+                                {% endif %}
+
+                                {% 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 %}
 
-                            {% if tag and not tag|tag_is_excluded or not tag and not is_archive %}
+                                {% if not is_archive %}
+                                    <li class="nav-tree__item">
+                                        <a class="nav-tree__link" href="{% url "event_list_year" CURRENT_SEASON %}" title="{% trans 'archive' %}">{% trans 'Archives' %}</a>
+                                    </li>
+                                {% endif %}
 
-                                <li class="nav-tree__separator">
+                                </ul>
 
-                                </li>
+                                {% if tag and not tag|tag_is_excluded or not tag and not is_archive %}
+
+                                    <ul class="nav-tree nav-tree--level-{{ branch_level }}">
+
+                                    {% 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 %}
+
+                                    </ul>
 
-                                {% 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 %}
 
-                            {% endif %}
-                        </ul>
+                        </div>
 
                     </div>
                 </div>