From c8c77c0b9c4437c862219597f0425da31ad0b07e Mon Sep 17 00:00:00 2001 From: benji Date: Fri, 11 Sep 2015 11:09:38 +0200 Subject: [PATCH] Add calendar icons to input fields --- .../stylesheets/{application.css => application.css.scss} | 2 ++ app/assets/stylesheets/tables.css.scss | 7 +++++++ app/views/users/show.html.haml | 8 +++++--- 3 files changed, 14 insertions(+), 3 deletions(-) rename app/assets/stylesheets/{application.css => application.css.scss} (93%) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css.scss similarity index 93% rename from app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.css.scss index 776ece0..cd3c800 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css.scss @@ -17,6 +17,8 @@ *= require_self *= require purecss */ +@import "font-awesome-sprockets"; +@import "font-awesome"; body { padding: 30px; } diff --git a/app/assets/stylesheets/tables.css.scss b/app/assets/stylesheets/tables.css.scss index d3d673d..0739d77 100644 --- a/app/assets/stylesheets/tables.css.scss +++ b/app/assets/stylesheets/tables.css.scss @@ -59,5 +59,12 @@ table.pure-table-striped { box-shadow: inset 0 1px 3px #ddd; border-radius: 4px; vertical-align: middle; + &[type="date"] { + height: 34px; + vertical-align: bottom; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } } } diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index dfbea28..85843c0 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -7,10 +7,12 @@ .pure-g .bound.input-listen.pure-u-1{ 'data-input-type': 'date-range' } %fieldset.pure-group-inline - %span.fa.fa-calendar.pure-group-addon - %input.lower-bound{type: 'date', placeholder: 'after'} + %i.fa.fa-calendar.pure-group-addon + %input.lower-bound{type: 'date', placeholder: 'after', class: 'pure-group-addon'} \- - %input.upper-bound{type: 'date', placeholder: 'before'} + %fieldset.pure-group-inline + %i.fa.fa-calendar.pure-group-addon + %input.upper-bound{type: 'date', placeholder: 'after', class: 'pure-group-addon'} .pure-g .bound.input-listen.pure-u-1{ 'data-input-type': 'number-range' } %fieldset.pure-group-inline