From 3995e2204749462a91035ad58d0fd40dab93ecf4 Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 29 Nov 2014 19:48:10 +0100 Subject: [PATCH] Travail sur affichage mobile --- app/assets/javascripts/stats.js.coffee | 2 +- app/assets/stylesheets/list.css.sass | 1 + app/assets/stylesheets/mobile.css.sass | 26 ++++++++++++++++++++++---- app/views/stats/index.html.haml | 2 +- config/locales/views/en.yml | 2 +- config/locales/views/fr.yml | 2 +- 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/stats.js.coffee b/app/assets/javascripts/stats.js.coffee index ede0ac24..ce87433d 100644 --- a/app/assets/javascripts/stats.js.coffee +++ b/app/assets/javascripts/stats.js.coffee @@ -17,6 +17,6 @@ $(document).ready -> $(this).find('.sparkline').sparkline vals, type: 'bar' height: '3em' - barWidth: '80%' + barWidth: '100%' barColor: '#9CC5EE' barSpacing: 2 diff --git a/app/assets/stylesheets/list.css.sass b/app/assets/stylesheets/list.css.sass index 249e1a78..1e5da432 100644 --- a/app/assets/stylesheets/list.css.sass +++ b/app/assets/stylesheets/list.css.sass @@ -2,6 +2,7 @@ .quantity text-align: right + white-space: nowrap table margin: 1em auto diff --git a/app/assets/stylesheets/mobile.css.sass b/app/assets/stylesheets/mobile.css.sass index 5e618d92..9d96292c 100644 --- a/app/assets/stylesheets/mobile.css.sass +++ b/app/assets/stylesheets/mobile.css.sass @@ -17,7 +17,17 @@ form#lug_search right: 0 .formats, a#banner - margin: 0 + margin: 0.6em auto + + table, table.list, table.dates, table.list.dates + border-spacing: 0 + tbody th + overflow: hidden + max-width: 3em + th, td + padding: 0 !important + font-size: smaller + border-width: 0px !important @media all and (max-width: 900px) header.top @@ -42,13 +52,13 @@ td border-width: 0 - table tr td - border-width: 0px !important - /* For small screen width */ @media all and (max-width: 34em) body padding: 0 + p + padding-left: 0.4em + padding-right: 0.4em header.top ul.countries @@ -77,11 +87,19 @@ display: none .day_number float: right + margin: 0 // Enough space for tactile displays li a, .fa-li padding: 0.4em 0 +inline-block() + dl + dt + min-width: auto + text-align: left + dd, dd.quantity + padding-right: 1em + aside display: none diff --git a/app/views/stats/index.html.haml b/app/views/stats/index.html.haml index 73bfa473..51063d2f 100644 --- a/app/views/stats/index.html.haml +++ b/app/views/stats/index.html.haml @@ -56,7 +56,7 @@ %tbody - Region.all.each do |region| %tr - %th.month= region + %th.region= region - total = 0 - @years.each do |year| %td.quantity diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index a943a599..9c128bc4 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -142,7 +142,7 @@ it more readable or agreable. index: title: Statistics all: Validated events - allModeration: Events waiting for validation + allModeration: Waiting for validation dates: Per date regional: Per region city: Per city diff --git a/config/locales/views/fr.yml b/config/locales/views/fr.yml index 5efc097c..bf878a1b 100644 --- a/config/locales/views/fr.yml +++ b/config/locales/views/fr.yml @@ -138,7 +138,7 @@ fr: index: title: Statistiques all: Événements validés - allModeration: Événements en cours de modération + allModeration: En cours de modération dates: Par date regional: Par région city: Par ville