From f904c67db9bdd926f1973005be2f1bf2a7efea70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Thu, 9 Feb 2017 17:23:54 +0100 Subject: [PATCH] Update search results page --- app/static/src/sass/modules/_page.scss | 12 ++- app/static/src/sass/modules/_pagination.scss | 11 ++- app/static/src/sass/modules/_search.scss | 5 +- .../src/sass/modules/boxes/_search-box.scss | 43 +++++++++- .../agenda/includes/event_search.html | 11 ++- app/templates/core/inc/search_card.html | 7 +- app/templates/includes/pagination.html | 2 +- .../magazine/article/article_list.html | 6 +- app/templates/media/inc/playlist_search.html | 6 +- .../pages/page/includes/page_search.html | 24 ++---- app/templates/search_results.html | 80 +++++++++---------- 11 files changed, 119 insertions(+), 88 deletions(-) diff --git a/app/static/src/sass/modules/_page.scss b/app/static/src/sass/modules/_page.scss index 2ed9aef0..c57a4ef7 100644 --- a/app/static/src/sass/modules/_page.scss +++ b/app/static/src/sass/modules/_page.scss @@ -349,17 +349,23 @@ $module: ".page"; &--organization { - margin-top: -327px; + margin-top: -80px; @include mq($until: xs) { - margin-top: -123px; + } .map { width: 100%; - height: 900px; + height: 950px; } } + &--search { + + margin-top: 8rem; + + } + } diff --git a/app/static/src/sass/modules/_pagination.scss b/app/static/src/sass/modules/_pagination.scss index cd15a61e..d8188e73 100644 --- a/app/static/src/sass/modules/_pagination.scss +++ b/app/static/src/sass/modules/_pagination.scss @@ -25,6 +25,7 @@ $module: ".pagination"; list-style-type: none; margin: 0; padding: 0; + text-align: right; @include typeface(sans-serif); @@ -49,15 +50,17 @@ $module: ".pagination"; font-weight: weight(regular); display: block; - background: $color-main; - color: $color-black; + background: #001B42; + color: white; + + border: 1px solid black; @include padding(.15 .5); @include transition(all .25s ease-in-out); &.active, &:hover { - background: $color-black; - color: $color-main; + background: #002C6B; + color: white; } } diff --git a/app/static/src/sass/modules/_search.scss b/app/static/src/sass/modules/_search.scss index bd460203..8b9059b3 100644 --- a/app/static/src/sass/modules/_search.scss +++ b/app/static/src/sass/modules/_search.scss @@ -84,10 +84,11 @@ $module: ".search"; border: 0; outline: none; background: none; - border-bottom: 1px solid $color-black; + border-bottom: 1px solid $color-main; padding: 1rem 3rem 1rem 0; width: 100%; + color: white; @include font-size(xxl); @include typeface(serif); @@ -110,6 +111,8 @@ $module: ".search"; outline: 0; cursor: pointer; + color: white; + @include font-size(xxl); } diff --git a/app/static/src/sass/modules/boxes/_search-box.scss b/app/static/src/sass/modules/boxes/_search-box.scss index 69e35549..628dc45a 100644 --- a/app/static/src/sass/modules/boxes/_search-box.scss +++ b/app/static/src/sass/modules/boxes/_search-box.scss @@ -26,10 +26,20 @@ $module: ".search-box"; @include clearfix; @include margin-bottom(2); + &:hover { + + #{$module}__title { + color: $color-main; + } + + } + &__title { - @include margin(0 0 1 0); + @include margin(0 0 0 0); font-weight: weight(bold); text-transform: uppercase; + color: white; + @include transition(color 0.25s ease-in-out); i { display: inline-block; @@ -43,11 +53,35 @@ $module: ".search-box"; &__subtitle { @include font-size(m); - @include line-height(1); + @include line-height(.75); @include typeface(sans-serif); + @include margin-top(.25); + font-weight: weight(bold); + color: white; + text-transform: uppercase; + @include transition(color 0.5s ease-in-out); + + span { + @include typeface(serif); + @include font-size(s); + font-weight: weight(regular); + text-transform: none; + display: block; + @include margin-top(.25); + } + + } + + &__tags { - @include margin-top(-.5); - @include margin-bottom(1); + text-transform: uppercase; + @include font-size(s); + @include line-height(1.25); + @include typeface(sans-serif); + @include margin(0 0 0 0); + font-weight: weight(regular); + color: $color-main; + @include transition(color 0.5s ease-in-out); } @@ -57,6 +91,7 @@ $module: ".search-box"; @include line-height(1); @include typeface(serif); font-weight: weight(light); + @include transition(color 0.5s ease-in-out); } diff --git a/app/templates/agenda/includes/event_search.html b/app/templates/agenda/includes/event_search.html index 1ecdf8ce..45f304d7 100644 --- a/app/templates/agenda/includes/event_search.html +++ b/app/templates/agenda/includes/event_search.html @@ -44,13 +44,16 @@ {% keywords_for event as tags %} {% if event.departments.all.0 or tags %} {% if event.departments.all.0 %} -
-
- {{ event.departments.all.0.department.name }} -
+
+ {{ event.departments.all.0.department.name }}
{% endif %} {% endif %} + {% if event.category %} +
+ {{ event.category|truncatechars:15 }} +
+ {% endif %} {% endblock %} {% block url %} diff --git a/app/templates/core/inc/search_card.html b/app/templates/core/inc/search_card.html index 5081ac32..036dd095 100644 --- a/app/templates/core/inc/search_card.html +++ b/app/templates/core/inc/search_card.html @@ -4,17 +4,18 @@ {% endblock %}
- {% block tags %} - {% endblock %} -

+

{% block title %} {% endblock %}

+ {% block tags %} + {% endblock %} + {% block subtitle %} {% endblock %} diff --git a/app/templates/includes/pagination.html b/app/templates/includes/pagination.html index 5725d867..2c5bfaf5 100644 --- a/app/templates/includes/pagination.html +++ b/app/templates/includes/pagination.html @@ -3,7 +3,7 @@ {% if current_page.has_previous or current_page.has_next %}
-
+
    {% if current_page.has_previous %} diff --git a/app/templates/magazine/article/article_list.html b/app/templates/magazine/article/article_list.html index 6f4d325f..a1b64444 100644 --- a/app/templates/magazine/article/article_list.html +++ b/app/templates/magazine/article/article_list.html @@ -50,16 +50,12 @@
{% endfor %}
-
-
- {% pagination_for objects %} -
-
+ {% pagination_for objects %} {% endblock %} diff --git a/app/templates/media/inc/playlist_search.html b/app/templates/media/inc/playlist_search.html index d4e0fb86..898892bf 100644 --- a/app/templates/media/inc/playlist_search.html +++ b/app/templates/media/inc/playlist_search.html @@ -8,10 +8,8 @@ {% block icon %}file-{{playlist.type}}-o{% endblock %} {% block tags %} -
-
- {{playlist.type}} -
+
+ {{playlist.type}}
{% endblock %} diff --git a/app/templates/pages/page/includes/page_search.html b/app/templates/pages/page/includes/page_search.html index 6bb6205e..7a8544ab 100644 --- a/app/templates/pages/page/includes/page_search.html +++ b/app/templates/pages/page/includes/page_search.html @@ -10,28 +10,20 @@ {% block tags %} {% with page.get_ascendants|last as top_level_parent %} {% if top_level_parent.get_content_model.title %} -
-
- {{ top_level_parent.get_content_model.title }} -
+
+ {{ top_level_parent.get_content_model.title }}
{% elif page.departmentpage %} -
-
- {{ page.departmentpage.title }} -
+
+ {{ page.departmentpage.title }}
{% elif page|classname == "Project" %} -
-
- {% trans 'Project' %} -
+
+ {% trans 'Project' %}
{% else %} -
-
- {% trans 'Page' %} -
+
+ {% trans 'Page' %}
{% endif %} {% endwith %} diff --git a/app/templates/search_results.html b/app/templates/search_results.html index 8d52dc5c..0e822224 100644 --- a/app/templates/search_results.html +++ b/app/templates/search_results.html @@ -8,34 +8,24 @@ {% endblock %} -{% block breadcrumb_menu %} - - -{% endblock %} - {% block main %} - -
+