From 24131d7410a8e783a7dc876b0dabdf31cf4123a1 Mon Sep 17 00:00:00 2001 From: echarp Date: Wed, 1 May 2019 15:31:16 +0200 Subject: [PATCH] Region filter should be, a bit, better displayed on its full width --- app/assets/stylesheets/all.sass | 15 +++++++++++++-- app/assets/stylesheets/events.sass | 1 + app/assets/stylesheets/mobile.sass | 7 ------- app/assets/stylesheets/orgas.sass | 2 -- app/assets/stylesheets/region.sass | 11 +---------- app/views/layouts/application.html.haml | 10 +++++----- app/views/regions/_filter.haml | 3 +-- 7 files changed, 21 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/all.sass b/app/assets/stylesheets/all.sass index 8339d373..c331dd86 100644 --- a/app/assets/stylesheets/all.sass +++ b/app/assets/stylesheets/all.sass @@ -18,14 +18,14 @@ html padding: 0 background-color: transparent & > header, & > footer, - h2, nav, .region_filter, .orga_search, #banner + h2, nav, .orga_search, #banner display: none body border: 1px solid #68A6E5 margin: 0.2% padding: 1% - font-size: calc(8px + 1vw) + font-size: calc(6px + 0.8vw) min-height: 99.1% text-align: center font-family: sans-serif @@ -87,6 +87,17 @@ header.top weight: normal margin-top: 0.2em + nav + float: right + font-size: smaller + margin-top: -3.1em + form + margin-top: 1.9em + &:hover nav + margin-top: 0 + form + margin-top: 0 + main, body.mce-content-body clear: both position: relative diff --git a/app/assets/stylesheets/events.sass b/app/assets/stylesheets/events.sass index 369302b3..6d140640 100644 --- a/app/assets/stylesheets/events.sass +++ b/app/assets/stylesheets/events.sass @@ -118,6 +118,7 @@ html.iframe main #advises border: 1px solid #FFB578 + max-width: 60em border-radius: 0.2em padding-left: 10px padding-right: 10px diff --git a/app/assets/stylesheets/mobile.sass b/app/assets/stylesheets/mobile.sass index b5878823..e3de8e89 100644 --- a/app/assets/stylesheets/mobile.sass +++ b/app/assets/stylesheets/mobile.sass @@ -129,10 +129,3 @@ padding: 1px 0 .mce-btn-group .mce-btn margin-left: 0 !important - -@media all and (min-width: 1600px) - body - font-size: larger - - #advises - max-width: 60em diff --git a/app/assets/stylesheets/orgas.sass b/app/assets/stylesheets/orgas.sass index d42c1abb..841780b0 100644 --- a/app/assets/stylesheets/orgas.sass +++ b/app/assets/stylesheets/orgas.sass @@ -4,10 +4,8 @@ img.favicon vertical-align: middle form#orga_search - clear: right float: right font-size: larger - margin-top: 0.9em margin-left: 1em label display: none diff --git a/app/assets/stylesheets/region.sass b/app/assets/stylesheets/region.sass index db992afd..a88b8fe7 100644 --- a/app/assets/stylesheets/region.sass +++ b/app/assets/stylesheets/region.sass @@ -1,13 +1,4 @@ -header - nav - max-width: calc(99% - 91px) - margin-top: -3.1em - &:hover nav - margin-top: 0 - -.region_filter - float: right - font-size: smaller +header nav & > ul > li float: left ul diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 0bbab8ee..8943d431 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -19,12 +19,12 @@ - sub = request.domain ? request.domain.split('.')[0] : '' %body{ class: [sub, controller_name, action_name, params[:tag]] } %header.top + %nav + = render '/regions/filter' + = render '/orgas/search' + = render '/pages/search' + = image_tag 'baby_gnu_adl.png', alt: '', class: :logo - - = render '/regions/filter' - = render '/orgas/search' - = render '/pages/search' - %h1= link_to t('.title'), root_path %h2= t '.subtitle' diff --git a/app/views/regions/_filter.haml b/app/views/regions/_filter.haml index 7ebdbd8f..9789c5b9 100644 --- a/app/views/regions/_filter.haml +++ b/app/views/regions/_filter.haml @@ -1,3 +1,2 @@ -# Choose a region to filter events with -%nav.region_filter - %ul= render partial: '/regions/filter_region', collection: Region.top +%ul= render partial: '/regions/filter_region', collection: Region.top