diff --git a/app/assets/stylesheets/custom.scss b/app/assets/stylesheets/inside/custom.scss similarity index 100% rename from app/assets/stylesheets/custom.scss rename to app/assets/stylesheets/inside/custom.scss diff --git a/app/assets/stylesheets/inside/mobile.scss b/app/assets/stylesheets/inside/mobile.scss new file mode 100644 index 0000000..6116aa4 --- /dev/null +++ b/app/assets/stylesheets/inside/mobile.scss @@ -0,0 +1,82 @@ +@import "bootstrap-sprockets"; +@import "bootstrap"; + +/* mixins, variables, etc. */ + +@mixin box_sizing { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +/* universal */ + +body { + padding-top: 30px; + background-color: #FFFAF0; +} + +section { + overflow: auto; +} + +textarea { + resize: vertical; +} + +.center { + text-align: center; + h1 { + margin-bottom: 10px; + } +} + +.container { + width: 900px; +} + + +/* typography */ + +h1, h2, h3, h4, h5, h6 { + line-height: 1; +} + +h1 { + font-size: 3em; + letter-spacing: -2px; + margin-bottom: 30px; + text-align: center; +} + +h2 { + font-size: 40px; + letter-spacing: -1px; + margin-bottom: 30px; + text-align: center; + font-weight: normal; + color: gray; +} + +p { + font-size: 1.1em; + line-height: 1.7em; +} + +small { + font-size: 32px; +} + + +/* header */ + +#logo { + font-size: 64px; + color: #FA8072; + letter-spacing: -1px; + font-weight: bold; + &:hover { + color: #FFA07A; + text-decoration: none; + } +} diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 47c2473..076d7d6 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -4,8 +4,11 @@ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ %title= full_title(yield(:title)) = csrf_meta_tags - = stylesheet_link_tag 'application', media: 'all', | - 'data-turbolinks-track': 'reload' | + = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' + - if request.smart_phone? || request.mobile? + = stylesheet_link_tag 'inside/mobile', media: 'all' + - else + = stylesheet_link_tag 'inside/custom', media: 'all' = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' = render 'layouts/shim' %body diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index c1f948d..0daf1fa 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -11,4 +11,4 @@ # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) +Rails.application.config.assets.precompile += %w( inside/custom.css inside/mobile.css )