From 541ede7fdc0403e8e62efc6583cba089ab79464f Mon Sep 17 00:00:00 2001 From: echarp Date: Tue, 29 Jul 2014 00:00:13 +0200 Subject: [PATCH] =?UTF-8?q?Le=20formulaire=20de=20recherche=20de=20lug=20e?= =?UTF-8?q?st=20presque=20complet,=20la=20banni=C3=A8re=20april=20est=20de?= =?UTF-8?q?scendue=20plus=20bas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/all.css.sass | 7 ++-- app/assets/stylesheets/events.css.sass | 17 +++++---- app/assets/stylesheets/lugs.sass | 50 +++++++++++++------------ app/assets/stylesheets/mobile.css.sass | 22 ++++++++--- app/views/events/index.html.haml | 9 +++++ app/views/layouts/application.html.haml | 6 --- app/views/lugs/_search.html.haml | 15 +++----- app/views/lugs/index.html.haml | 4 ++ app/views/lugs/show.html.haml | 4 ++ 9 files changed, 79 insertions(+), 55 deletions(-) diff --git a/app/assets/stylesheets/all.css.sass b/app/assets/stylesheets/all.css.sass index 80f4db11..aacf4d10 100644 --- a/app/assets/stylesheets/all.css.sass +++ b/app/assets/stylesheets/all.css.sass @@ -2,6 +2,7 @@ @import "font-awesome" * + height: auto margin: 0 auto padding: 0 max-width: 100% @@ -92,10 +93,8 @@ header.top font-weight: normal margin-bottom: 22px - #banner img - height: auto - main + position: relative * max-width: 80em h1 @@ -134,6 +133,7 @@ input, textarea, select, a.button color: black margin: 3px 0 border: 1px solid darkgray + outline: none padding: 2px 4px font-size: inherit font-family: inherit @@ -142,6 +142,7 @@ input, textarea, select, a.button @include border-radius(0.4em) &:focus background-color: #F0F8FF + @include box-shadow(1px 1px 4px gray) &[type=submit], &.button color: black border: none diff --git a/app/assets/stylesheets/events.css.sass b/app/assets/stylesheets/events.css.sass index 1eefbce3..946fe2a4 100644 --- a/app/assets/stylesheets/events.css.sass +++ b/app/assets/stylesheets/events.css.sass @@ -1,7 +1,8 @@ @import "compass" form.region_selector - width: 98% + left: 0 + width: 100% position: absolute max-width: 100% margin-top: 2.45em @@ -19,11 +20,10 @@ header.calendar-header a margin: 0 a - margin: 0 6px + margin: 0 0.3em font-weight: normal &.month_selector display: block - font-size: 0.8em font-weight: bolder margin-bottom: -2.1em &.year_selector @@ -110,13 +110,16 @@ body.events.index table color: black .formats - width: 90% - margin: 11px auto 28px - max-width: 100% + float: right font-size: smaller - text-align: right + margin-right: 5% padding-right: 2px +a#banner + float: left + margin-left: 5% + padding-left: 2px + sidebar#lug-list float: right width: 16em diff --git a/app/assets/stylesheets/lugs.sass b/app/assets/stylesheets/lugs.sass index 88b0e017..7d3a1103 100644 --- a/app/assets/stylesheets/lugs.sass +++ b/app/assets/stylesheets/lugs.sass @@ -1,32 +1,34 @@ @import "compass" -header - form#lug_search - top: 6em - right: 2em - position: absolute - font-size: x-large - h2 - margin: 0 - font-size: x-large - font-style: normal - label - display: none - input - border: solid thin #258 - img.favicon max-height: 2em vertical-align: middle @include border-radius(3px) -button.search - color: #258 - border: none - cursor: pointer +form#lug_search + right: 5% + position: absolute font-size: x-large - margin-top: 0.2em - margin-left: -1.3em - background-color: transparent - &:hover - color: #2E97FF + text-align: right + margin-top: -1.2em + padding-right: 2px + label + display: none + input + border: solid thin #258 + margin-left: -1.5em + padding-left: 1.5em + padding-right: 1.2em + background-color: transparent + button + margin-left: -1.4em + + button.search + color: #258 + border: none + cursor: pointer + font-size: larger + margin-top: 0.2em + background-color: transparent + &:hover + color: #2E97FF diff --git a/app/assets/stylesheets/mobile.css.sass b/app/assets/stylesheets/mobile.css.sass index f6db3872..6ce89b19 100644 --- a/app/assets/stylesheets/mobile.css.sass +++ b/app/assets/stylesheets/mobile.css.sass @@ -5,10 +5,18 @@ sidebar#lug-list width: auto + #advises + max-width: 60em + @media all and (max-width: 1024px) body.events.index table width: 100% + form#lug_search + right: 0 + .formats, a#banner + margin: 0 + @media all and (max-width: 900px) body border: none @@ -18,8 +26,8 @@ main ul margin-left: 0 - #advises - margin: 0 10% + form#lug_search + font-size: smaller body.events.index table font-size: smaller @@ -30,13 +38,17 @@ li list-style-type: none - #advises - margin: 0 - table tr td border-width: 0px !important +/* For small screen width */ @media all and (max-width: 34em) + form#lug_search + position: relative + + header.calendar-header + margin-top: 0 + body.events.index table font-size: inherit thead diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index 720f74a4..814ff371 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -1,3 +1,6 @@ += render '/lugs/search' unless controller.controller_name == 'lugs' + +-# Seems necessary, for the time being, to ensure calendar is changing days correctly - config.time_zone = 'Paris' %form.region_selector @@ -54,3 +57,9 @@ tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), ical: link_to('iCal', events_url(:rss, tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) + +%a#banner(href='http://april.org/campagne') + -#%img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png' + width='580' height='76' alt='Priorité au Logiciel Libre! Je soutiens l\'April.') + %img(src='http://april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april_2_m.png' + width='374' height='48' alt='Priorité au Logiciel Libre! Je soutiens l\'April.') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a698101f..5f1ff038 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -37,15 +37,9 @@ = image_tag 'suisse.png', alt: '' =t '.suisse' - = render '/lugs/search' unless controller.controller_name == 'lugs' - %h1= link_to t('.title'), root_url %h2=t '.subtitle' - %a#banner(href='http://april.org/campagne') - %img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png' - width='580' height='76' alt='Priorité au Logiciel Libre! Je soutiens l\'April.') - = render 'layouts/flash', flash: flash if flash.present? %main= yield diff --git a/app/views/lugs/_search.html.haml b/app/views/lugs/_search.html.haml index acba4968..709acd47 100644 --- a/app/views/lugs/_search.html.haml +++ b/app/views/lugs/_search.html.haml @@ -1,13 +1,8 @@ -- # So we can use the search form from any page -- @search = Lug.search params[:q] unless @search - -= search_form_for @search do |f| += search_form_for @search || Lug.search(params[:q]) do |f| = link_to lugs_path do - %h2 - %em.fa.fa-users - = title t '.title', entity: Lug.model_name.human - - = f.label :name_cont - = f.search_field :name_or_city_or_department_or_region_or_url_cont, size: 14 + = f.label :name_cont + %em.fa.fa-users + = f.search_field :name_or_city_or_department_or_related_region_name_or_url_cont, size: 13, + placeholder: t('.title', entity: Lug.model_name.human) = f.button class: :search do %em.fa.fa-search diff --git a/app/views/lugs/index.html.haml b/app/views/lugs/index.html.haml index bfe8128e..8e027766 100644 --- a/app/views/lugs/index.html.haml +++ b/app/views/lugs/index.html.haml @@ -1,3 +1,7 @@ +%h2 + %em.fa.fa-users + = title t 'lugs.search.title', entity: Lug.model_name.human + = render 'search' %table.list.autopagerize_page_element diff --git a/app/views/lugs/show.html.haml b/app/views/lugs/show.html.haml index e205afc9..0ebe7774 100644 --- a/app/views/lugs/show.html.haml +++ b/app/views/lugs/show.html.haml @@ -1,3 +1,7 @@ +%h2 + %em.fa.fa-users + = title t 'lugs.search.title', entity: Lug.model_name.human + = render 'search' %dl