From 9674a8155ec4cdace2f8e1eff798c36f54ba3dd5 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Tue, 13 Jan 2015 18:08:21 +0100 Subject: [PATCH] Main website responsiveness --- Gemfile | 2 +- Gemfile.lock | 26 +- .../javascripts/theme1/application.js.coffee | 2 + .../routes/application_route.js.coffee.erb | 1 + app/assets/stylesheets/application.css | 14 - .../stylesheets/theme1/_mixins.css.sass | 20 ++ .../stylesheets/theme1/_structure.css.sass | 110 +++++- .../stylesheets/theme1/application.css.sass | 13 +- .../theme1/elements/_footer.css.sass | 30 ++ .../theme1/elements/_header.css.sass | 76 ++++ .../stylesheets/theme1/elements/_nav.css.sass | 68 ++++ app/assets/stylesheets/theme1/home.css.sass | 10 - .../_cartoon.css.sass} | 0 .../stylesheets/theme1/pages/_home.css.sass | 58 +++ app/assets/stylesheets/theme1/theme1.css.sass | 330 ------------------ app/views/layouts/theme1-home.html.slim | 28 +- app/views/layouts/theme1.html.slim | 23 +- app/views/theme1/_footer.html.slim | 5 + app/views/theme1/_header.html.slim | 15 + app/views/theme1/_navigation.html.slim | 14 +- app/views/theme1/_social.html.slim | 6 +- bin/user_asset_corrections | 2 +- config/application.rb | 1 + config/version | 2 +- 24 files changed, 428 insertions(+), 428 deletions(-) delete mode 100644 app/assets/stylesheets/application.css create mode 100644 app/assets/stylesheets/theme1/_mixins.css.sass create mode 100644 app/assets/stylesheets/theme1/elements/_footer.css.sass create mode 100644 app/assets/stylesheets/theme1/elements/_header.css.sass create mode 100644 app/assets/stylesheets/theme1/elements/_nav.css.sass delete mode 100644 app/assets/stylesheets/theme1/home.css.sass rename app/assets/stylesheets/theme1/{cartoon.css.sass => pages/_cartoon.css.sass} (100%) create mode 100644 app/assets/stylesheets/theme1/pages/_home.css.sass delete mode 100644 app/assets/stylesheets/theme1/theme1.css.sass create mode 100644 app/views/theme1/_footer.html.slim create mode 100644 app/views/theme1/_header.html.slim diff --git a/Gemfile b/Gemfile index 07527b96..bddc5179 100644 --- a/Gemfile +++ b/Gemfile @@ -25,7 +25,7 @@ group :assets do #gem 'twitter-bootstrap-rails' # Only for mobile assets precompile, not used in this project gem 'bootstrap-sass', '~>2.3' - gem 'bourbon' + gem 'bourbon', '4.0.2' #gem 'compass-rails' gem 'js-routes' gem "font-awesome-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 6fa655e2..f04613b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/bterkuile/cmtool.git - revision: a4bef656ccf3ad434f13e458e2c96abe8636cfa0 + revision: 323e68bcad3b21cd580d3aff5771d99a805fc985 specs: cmtool (1.0.0) bourbon @@ -249,7 +249,7 @@ GEM js-routes (0.9.9) railties (>= 3.2) sprockets-rails - json (1.8.1) + json (1.8.2) jwt (1.2.0) kaminari (0.16.1) actionpack (>= 3.0.0) @@ -265,8 +265,8 @@ GEM method_source (0.8.2) mime-types (1.25.1) mini_magick (4.0.1) - mini_portile (0.6.1) - minitest (5.5.0) + mini_portile (0.6.2) + minitest (5.5.1) multi_json (1.10.1) multi_xml (0.5.5) multipart-post (2.0.0) @@ -310,7 +310,7 @@ GEM railties (>= 3.1, < 5.0) rack (1.6.0) rack-cors (0.3.0) - rack-test (0.6.2) + rack-test (0.6.3) rack (>= 1.0) rails (4.2.0.rc2) actionmailer (= 4.2.0.rc2) @@ -381,14 +381,14 @@ GEM multi_json (~> 1.0) simplecov-html (~> 0.8.0) simplecov-html (0.8.0) - slim (3.0.0) + slim (3.0.1) temple (~> 0.7.3) tilt (>= 1.3.3, < 2.1) - slim-rails (3.0.0) - actionmailer (>= 3.0, < 4.2) - actionpack (>= 3.0, < 4.2) - activesupport (>= 3.0, < 4.2) - railties (>= 3.0, < 4.2) + slim-rails (3.0.1) + actionmailer (>= 3.1, < 5.0) + actionpack (>= 3.1, < 5.0) + activesupport (>= 3.1, < 5.0) + railties (>= 3.1, < 5.0) slim (~> 3.0) slop (3.6.0) spring (1.2.0) @@ -407,7 +407,7 @@ GEM colorize (>= 0.7.0) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - temple (0.7.3) + temple (0.7.5) thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) @@ -444,7 +444,7 @@ DEPENDENCIES active_decorator active_model_serializers (= 0.9.0) bootstrap-sass (~> 2.3) - bourbon + bourbon (= 4.0.2) capistrano (~> 3.0) capistrano-local-precompile capistrano-rails (~> 1.1) diff --git a/app/assets/javascripts/theme1/application.js.coffee b/app/assets/javascripts/theme1/application.js.coffee index a89230aa..e78ef1b3 100644 --- a/app/assets/javascripts/theme1/application.js.coffee +++ b/app/assets/javascripts/theme1/application.js.coffee @@ -3,3 +3,5 @@ #= require_directory . #= require_self $(document).on 'click', '.flash-box', -> $(@).slideUp() +$ -> + $('.menu-secondary-toggle').click -> $('.nav.secondary').toggleClass('active') diff --git a/app/assets/javascripts/user/app/routes/application_route.js.coffee.erb b/app/assets/javascripts/user/app/routes/application_route.js.coffee.erb index ea847181..a8c871f8 100644 --- a/app/assets/javascripts/user/app/routes/application_route.js.coffee.erb +++ b/app/assets/javascripts/user/app/routes/application_route.js.coffee.erb @@ -50,6 +50,7 @@ App.ApplicationRoute = Ember.Route.extend controller = @controllerFor("modals/#{modalName}") catch error controller = @controllerFor("modals/base") + controller ||= @controllerFor("modals/base") controller.set 'model', options.model defaultModalOptions = closeOnOverlay: true diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index e065c82d..00000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -1,14 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_directory . - *= require 'theme1/application' - */ diff --git a/app/assets/stylesheets/theme1/_mixins.css.sass b/app/assets/stylesheets/theme1/_mixins.css.sass new file mode 100644 index 00000000..d4ebd6fa --- /dev/null +++ b/app/assets/stylesheets/theme1/_mixins.css.sass @@ -0,0 +1,20 @@ +=content-top-background + .left + position: absolute + bottom: 0 + left: 0 + background-image: image-url('theme1/floor-left.jpg') + background-position: right + height: $cth-height + width: 50% + .right + position: absolute + bottom: 0 + right: 0 + background-image: image-url('theme1/floor-right.jpg') + background-position: left + height: $cth-height + width: 50% + .content-container + position: relative + max-width: $content-max-width diff --git a/app/assets/stylesheets/theme1/_structure.css.sass b/app/assets/stylesheets/theme1/_structure.css.sass index d608c31c..59f7de3f 100644 --- a/app/assets/stylesheets/theme1/_structure.css.sass +++ b/app/assets/stylesheets/theme1/_structure.css.sass @@ -1,3 +1,107 @@ -.container - margin-left: auto - margin-right: auto +=linear-gradient($pos, $G1, $G2: null, $G3: null, $G4: null, $G5: null, $G6: null, $G7: null, $G8: null, $G9: null, $G10: null, $fallback: null) + // Detect what type of value exists in $pos + $pos-type: type-of(nth($pos, 1)) + $pos-spec: null + $pos-degree: null + // If $pos is missing from mixin, reassign vars and add default position + @if $pos-type == color or nth($pos, 1) == "transparent" + $G10: $G9 + $G9: $G8 + $G8: $G7 + $G7: $G6 + $G6: $G5 + $G5: $G4 + $G4: $G3 + $G3: $G2 + $G2: $G1 + $G1: $pos + $pos: null + @if $pos + $positions: _linear-positions-parser($pos) + $pos-degree: nth($positions, 1) + $pos-spec: nth($positions, 2) + $full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10 + // Set $G1 as the default fallback color + $fallback-color: nth($G1, 1) + // If $fallback is a color use that color as the fallback color + @if type-of($fallback) == color or $fallback == "transparent" + $fallback-color: $fallback + background-color: $fallback-color + background-image: -webkit-linear-gradient($pos-degree $full) + // Safari 5.1+, Chrome + background-image: unquote("linear-gradient(#{$pos-spec}#{$full})") +body + background-color: #333 + margin: 0 + padding: 0 + background-image: image-url('theme1/footer-bg.jpg') + background-position: center top + .header-nav-banner + background-image: image-url('theme1/header.jpg') + background-position: center 25px + #content-header + position: relative + height: $cth-height + +content-top-background + .container + height: $cth-height + margin: 0 auto + background-image: image-url("theme1/no-banner-bg-left.png"), image-url('theme1/no-banner-bg-right.png') + background-repeat: no-repeat, no-repeat + background-position: left bottom, right bottom + .top-ribbon + background-image: image-url("theme1/no-banner-bg-middle.png") + height: $cth-height + background-repeat: repeat-x + background-position: bottom + margin: 0 68px 0 42px + #main-wrap + font-size: 14px + font-family: $font-family-content + line-height: 1.5 + color: #848585 + position: relative + h1 + font-size: 28px + padding: 0.5em 0 0.2em 0 + line-height: 1.4 + font-family: $font-family-headers + color: #AE571F + h2 + font-size: 24px + padding: 0.5em 0 0.2em 0 + line-height: 1.2 + font-family: $font-family-headers + color: #AE571F + + background-image: image-url('theme1/wall-bg.jpg') + background-position: center top + overflow: visible + position: relative + .container + margin: 0 auto + max-width: $content-max-width + .main-inner + +linear-gradient(#d6d6d6 0, white 70px) + position: relative + padding: 10px 40px 30px 40px + margin-left: 2px + margin-right: 2px + min-height: 400px + @media (max-width: 680px) + padding: 8px 15px + h1.page-title + margin: 0 + padding: 0 + margin-bottom: 12px + a + color: $green + text-decoration: none + &:hover + color: darken($green, 20%) + .right + float: right + .left + float: left + .clearing + clear: both diff --git a/app/assets/stylesheets/theme1/application.css.sass b/app/assets/stylesheets/theme1/application.css.sass index 77a5e05f..1d7b0012 100644 --- a/app/assets/stylesheets/theme1/application.css.sass +++ b/app/assets/stylesheets/theme1/application.css.sass @@ -1,5 +1,14 @@ -//= require_self -//= require_directory . +@import constants +$font-family-navigation: Verdana,serif +$font-family-headers: Verdana,serif //'Pacifico', serif +$content-max-width: 962px +$cth-height: 48px +$green-original: #99CB23 +$green: #7BB459 //Heineken +$font-family-content: Georgia, serif +@import font-awesome +@import ./mixins @import ./foundation_and_overrides @import ./elements/* +@import ./pages/* @import ./structure diff --git a/app/assets/stylesheets/theme1/elements/_footer.css.sass b/app/assets/stylesheets/theme1/elements/_footer.css.sass new file mode 100644 index 00000000..494e85a6 --- /dev/null +++ b/app/assets/stylesheets/theme1/elements/_footer.css.sass @@ -0,0 +1,30 @@ +#footer-wrap + color: white + background-image: image-url('theme1/footer-bg.jpg') + background-position: center + overflow: visible + position: relative + .footer-shadow + height: 1px + //+box-shadow(0px 4px 10px #000) + .footer-content-container + max-width: 838px + margin: 0 auto + .footer-content + background-color: #420F03 + text-align: right + padding: 72px 30px 20px 10px + overflow: visible + margin: 0 auto + a + margin-left: 20px + .footer-bottom + background-image: image-url('theme1/footer-bottom.png') + position: relative + height: 35px + padding-left: 30px + padding-right: 30px + max-width: 838px + position: relative + overflow: visible + margin: 0 auto diff --git a/app/assets/stylesheets/theme1/elements/_header.css.sass b/app/assets/stylesheets/theme1/elements/_header.css.sass new file mode 100644 index 00000000..d4666a67 --- /dev/null +++ b/app/assets/stylesheets/theme1/elements/_header.css.sass @@ -0,0 +1,76 @@ +#header-wrap + #ceiling + position: relative + width: 100% + background-image: image-url('theme1/ceiling-center.jpg') + background-position: top center + background-repeat: no-repeat + overflow: hidden + .left + background-image: image-url('theme1/ceiling-left.jpg') + background-position: right top + background-repeat: repeat-x + height: 25px + position: absolute + left: 0 + width: 50% + .right + background-image: image-url('theme1/ceiling-right.jpg') + background-position: left top + background-repeat: repeat-x + height: 25px + position: absolute + right: 0 + width: 50% + .lights + position: absolute + height: 140px + width: 990px + left: 50% + margin-left: -495px + div + position: relative + background-repeat: no-repeat + width: 315px + height: 140px + float: left + &.light1 + background-image: image-url('theme1/light-1.jpg') + margin-left: 15px + margin-right: 2px + &.light2 + background-image: image-url('theme1/light-2.jpg') + margin-right: 3px + &.light3 + background-image: image-url('theme1/light-3.jpg') + .container + max-width: 960px + padding-top: 40px + position: relative + margin: 0 auto + #header + margin-bottom: 10px + #logo + max-width: 80% + a + margin: 20px + #header-right + padding-right: 30px + .social + float: right + width: 222px + text-align: right + a + background-image: image-url('theme1/social.png') + margin: 0 0 0 3px + width: 32px + height: 56px + display: inline-block + &.wsite-social-facebook + background-position: 0 0 + &.wsite-social-twitter + background-position: -35px 0 + &.wsite-social-linkedin + background-position: -70px 0 + &.wsite-social-rss + background-position: -141px 0 diff --git a/app/assets/stylesheets/theme1/elements/_nav.css.sass b/app/assets/stylesheets/theme1/elements/_nav.css.sass new file mode 100644 index 00000000..815c4712 --- /dev/null +++ b/app/assets/stylesheets/theme1/elements/_nav.css.sass @@ -0,0 +1,68 @@ +#nav-wrap + max-width: 960px + position: relative + margin: 0 auto + .navbar-inner + height: 48px + background-color: transparent + background-image: image-url('theme1/nav-bar-left.png'), image-url('theme1/nav-bar-right.png'), image-url('theme1/nav-bar-middle.png') + background-repeat: no-repeat, no-repeat, repeat-x + background-position: left center, right center, center center + border: 0 + -ms-filter: '' + .nav-collapse + &.in.collapse + background-color: rgba(0,0,0,0.4) + z-index: 400 + ul.nav + margin: 0 + padding: 0 + list-style: none + li + position: relative + list-style: none + float: left + a + border: 0 + color: white + display: block + font-family: $font-family-navigation + text-decoration: none + font-size: 18px + height: 46px + line-height: 46px + margin: 0 10px + padding: 0 20px + text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5) + &:hover + color: $green + @media (max-width: 480px) + font-size: 12px + margin: 0 5px + padding: 0 10px + &.active + a + color: $green + background-color: inherit + &.secondary + @media (max-width: 924px) + position: absolute + background-color: #555 + z-index: 5487 + top: 48px + width: 100% + opacity: 0.8 + display: none + li + float: none + &.active + display: block + .menu-secondary-toggle + float: right + display: none + margin-top: 8px + margin-right: 1em + span + @extend .fa, .fa-lg, .fa-bars + @media (max-width: 924px) + display: inline-block diff --git a/app/assets/stylesheets/theme1/home.css.sass b/app/assets/stylesheets/theme1/home.css.sass deleted file mode 100644 index 311a2138..00000000 --- a/app/assets/stylesheets/theme1/home.css.sass +++ /dev/null @@ -1,10 +0,0 @@ -.home-tablet-phone - right: 0 - top: -200px - position: absolute - z-index: 120 -.introduction - padding-top: 20px -.home-qr - float: left - margin: 0 20px 20px 0 diff --git a/app/assets/stylesheets/theme1/cartoon.css.sass b/app/assets/stylesheets/theme1/pages/_cartoon.css.sass similarity index 100% rename from app/assets/stylesheets/theme1/cartoon.css.sass rename to app/assets/stylesheets/theme1/pages/_cartoon.css.sass diff --git a/app/assets/stylesheets/theme1/pages/_home.css.sass b/app/assets/stylesheets/theme1/pages/_home.css.sass new file mode 100644 index 00000000..53a77d8a --- /dev/null +++ b/app/assets/stylesheets/theme1/pages/_home.css.sass @@ -0,0 +1,58 @@ +.home-tablet-phone + right: 0 + top: -200px + position: absolute + z-index: 120 +.introduction + padding-top: 20px +.home-qr + float: left + margin: 0 20px 20px 0 +#home-splash + height: 318px - 10px + position: relative + #home-splash-content + z-index: 12 + height: 318px - 61px - 10px + max-width: $content-max-width + margin: 0 auto + #home-splash-content-inner + background-color: white + height: 260px + margin-left: 49px + margin-right: 53px + position: relative + overflow: hidden + #home-splash-content-inner-bar + position: absolute + height: 260px + left: 10px + right: 10px + top: 10px + z-index: 20 + background-image: image-url("theme1/home_qwaiter_den_haag.png") + background-repeat: no-repeat + background-position: center top + #home-splash-footer + +content-top-background + #home-splash-footer-inner + background-color: transparent + background-repeat: no-repeat, no-repeat + margin: 0 auto + height: 61px + max-width: $content-max-width + background-position: left bottom, right bottom + background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png') + color: $green + border-width: 0 + border-radius: 0 + height: 61px + #home-splash-footer-inner-bar + margin-left: 49px + margin-right: 53px + background-color: white + background-repeat: repeat-x + background-position: center bottom + background-image: image-url('theme1/button-bar-middle.png') + //min-height: 61px + height: 61px diff --git a/app/assets/stylesheets/theme1/theme1.css.sass b/app/assets/stylesheets/theme1/theme1.css.sass deleted file mode 100644 index fbc40ab2..00000000 --- a/app/assets/stylesheets/theme1/theme1.css.sass +++ /dev/null @@ -1,330 +0,0 @@ -$cth-height: 48px -$green-original: #99CB23 -$green: #7BB459 //Heineken -$font-family-content: Georgia, serif -$font-family-navigation: Verdana,serif -$font-family-headers: Verdana,serif //'Pacifico', serif -$content-max-width: 962px -=linear-gradient($pos, $G1, $G2: null, $G3: null, $G4: null, $G5: null, $G6: null, $G7: null, $G8: null, $G9: null, $G10: null, $fallback: null) - // Detect what type of value exists in $pos - $pos-type: type-of(nth($pos, 1)) - $pos-spec: null - $pos-degree: null - // If $pos is missing from mixin, reassign vars and add default position - @if $pos-type == color or nth($pos, 1) == "transparent" - $G10: $G9 - $G9: $G8 - $G8: $G7 - $G7: $G6 - $G6: $G5 - $G5: $G4 - $G4: $G3 - $G3: $G2 - $G2: $G1 - $G1: $pos - $pos: null - @if $pos - $positions: _linear-positions-parser($pos) - $pos-degree: nth($positions, 1) - $pos-spec: nth($positions, 2) - $full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10 - // Set $G1 as the default fallback color - $fallback-color: nth($G1, 1) - // If $fallback is a color use that color as the fallback color - @if type-of($fallback) == color or $fallback == "transparent" - $fallback-color: $fallback - background-color: $fallback-color - background-image: -webkit-linear-gradient($pos-degree $full) - // Safari 5.1+, Chrome - background-image: unquote("linear-gradient(#{$pos-spec}#{$full})") -=content-top-background - .left - position: absolute - bottom: 0 - left: 0 - background-image: image-url('theme1/floor-left.jpg') - background-position: right - height: $cth-height - width: 50% - .right - position: absolute - bottom: 0 - right: 0 - background-image: image-url('theme1/floor-right.jpg') - background-position: left - height: $cth-height - width: 50% - .container - position: relative - max-width: $content-max-width -body - background-color: #333 - margin: 0 - padding: 0 - background-image: image-url('theme1/footer-bg.jpg') - background-position: center top - .header-nav-banner - background-image: image-url('theme1/header.jpg') - background-position: center 25px - #header-wrap - #ceiling - position: relative - width: 100% - background-image: image-url('theme1/ceiling-center.jpg') - background-position: top center - background-repeat: no-repeat - overflow: hidden - .left - background-image: image-url('theme1/ceiling-left.jpg') - background-position: right top - background-repeat: repeat-x - height: 25px - position: absolute - left: 0 - width: 50% - .right - background-image: image-url('theme1/ceiling-right.jpg') - background-position: left top - background-repeat: repeat-x - height: 25px - position: absolute - right: 0 - width: 50% - .lights - position: absolute - height: 140px - width: 990px - left: 50% - margin-left: -495px - div - position: relative - background-repeat: no-repeat - width: 315px - height: 140px - float: left - &.light1 - background-image: image-url('theme1/light-1.jpg') - margin-left: 15px - margin-right: 2px - &.light2 - background-image: image-url('theme1/light-2.jpg') - margin-right: 3px - &.light3 - background-image: image-url('theme1/light-3.jpg') - .container - max-width: 960px - padding-top: 40px - position: relative - margin: 0 auto - #header - margin-bottom: 10px - #logo - max-width: 80% - a - margin: 20px - #header-right - padding-right: 30px - .social - float: right - width: 222px - text-align: right - a - background-image: image-url('theme1/social.png') - margin: 0 0 0 3px - width: 32px - height: 56px - display: inline-block - &.wsite-social-facebook - background-position: 0 0 - &.wsite-social-twitter - background-position: -35px 0 - &.wsite-social-linkedin - background-position: -70px 0 - &.wsite-social-rss - background-position: -141px 0 - #nav-wrap - max-width: 960px - position: relative - .navbar-inner - height: 48px - background-color: transparent - background-image: image-url('theme1/nav-bar-left.png'), image-url('theme1/nav-bar-right.png'), image-url('theme1/nav-bar-middle.png') - background-repeat: no-repeat, no-repeat, repeat-x - background-position: left center, right center, center center - border: 0 - -ms-filter: '' - .nav-collapse - &.in.collapse - background-color: rgba(0,0,0,0.4) - z-index: 400 - ul.nav - margin: 0 - padding: 0 - list-style: none - li - position: relative - list-style: none - float: left - a - border: 0 - color: white - display: block - font-family: $font-family-navigation - text-decoration: none - font-size: 18px - height: 46px - line-height: 46px - margin: 0 10px - padding: 0 20px - text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5) - &:hover - color: $green - @media (max-width: 480px) - font-size: 12px - margin: 0 5px - padding: 0 10px - &.active - a - color: $green - background-color: inherit - #home-splash - height: 318px - 10px - position: relative - #home-splash-content - z-index: 12 - height: 318px - 61px - 10px - max-width: $content-max-width - #home-splash-content-inner - background-color: white - height: 260px - margin-left: 49px - margin-right: 53px - position: relative - overflow: hidden - #home-splash-content-inner-bar - position: absolute - height: 260px - left: 10px - right: 10px - top: 10px - z-index: 20 - background-image: image-url("theme1/home_qwaiter_den_haag.png") - background-repeat: no-repeat - background-position: center top - #home-splash-footer - +content-top-background - #home-splash-footer-inner - background-color: transparent - background-repeat: no-repeat, no-repeat - height: 61px - max-width: $content-max-width - background-position: left bottom, right bottom - background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png') - color: $green - border-width: 0 - border-radius: 0 - height: 61px - #home-splash-footer-inner-bar - margin-left: 49px - margin-right: 53px - background-color: white - background-repeat: repeat-x - background-position: center bottom - background-image: image-url('theme1/button-bar-middle.png') - //min-height: 61px - height: 61px - #content-header - position: relative - height: $cth-height - +content-top-background - .container - height: $cth-height - margin: 0 auto - background-image: image-url("theme1/no-banner-bg-left.png"), image-url('theme1/no-banner-bg-right.png') - background-repeat: no-repeat, no-repeat - background-position: left bottom, right bottom - .top-ribbon - background-image: image-url("theme1/no-banner-bg-middle.png") - height: $cth-height - background-repeat: repeat-x - background-position: bottom - margin: 0 68px 0 42px - #main-wrap - font-size: 14px - font-family: $font-family-content - line-height: 1.5 - color: #848585 - position: relative - h1 - font-size: 28px - padding: 0.5em 0 0.2em 0 - line-height: 1.4 - font-family: $font-family-headers - color: #AE571F - h2 - font-size: 24px - padding: 0.5em 0 0.2em 0 - line-height: 1.2 - font-family: $font-family-headers - color: #AE571F - - background-image: image-url('theme1/wall-bg.jpg') - background-position: center top - overflow: visible - position: relative - .container - margin: 0 auto - max-width: $content-max-width - .main-inner - +linear-gradient(#d6d6d6 0, white 70px) - position: relative - padding: 10px 40px 30px 40px - margin-left: 2px - margin-right: 2px - min-height: 400px - @media (max-width: 680px) - padding: 8px 15px - h1.page-title - margin: 0 - padding: 0 - margin-bottom: 12px - #footer-wrap - color: white - background-image: image-url('theme1/footer-bg.jpg') - background-position: center - overflow: visible - position: relative - .footer-shadow - height: 1px - //+box-shadow(0px 4px 10px #000) - .container - max-width: 838px - .footer-content - background-color: #420F03 - text-align: right - padding: 72px 30px 20px 10px - overflow: visible - margin: 0 auto - a - margin-left: 20px - .footer-bottom - background-image: image-url('theme1/footer-bottom.png') - position: relative - height: 35px - padding-left: 30px - padding-right: 30px - max-width: 838px - position: relative - overflow: visible - margin: 0 auto - a - color: $green - text-decoration: none - &:hover - color: darken($green, 20%) - .right - float: right - .left - float: left - .clearing - clear: both diff --git a/app/views/layouts/theme1-home.html.slim b/app/views/layouts/theme1-home.html.slim index c924e484..e77e3ca5 100644 --- a/app/views/layouts/theme1-home.html.slim +++ b/app/views/layouts/theme1-home.html.slim @@ -10,35 +10,20 @@ html lang="en" /[if lt IE 9] = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js" = stylesheet_link_tag "theme1/application", :media => "all" - = javascript_include_tag 'theme1/application' link href="/favicon.ico" rel="shortcut icon" link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css' body .header-nav-banner - #header-wrap - #ceiling - .left - .right - .lights - .light1 - .light2 - .light3 - .container - #header - #header-right= render 'theme1/social' - #logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path - #nav-wrap.container - .navbar - .navbar-inner= render 'theme1/navigation' + = render 'theme1/header' #home-splash - #home-splash-content.container + #home-splash-content #home-splash-content-inner #home-splash-content-inner-bar #home-splash-footer .left .right - #home-splash-footer-inner.container + #home-splash-footer-inner.content-container #home-splash-footer-inner-bar #main-wrap .container @@ -55,8 +40,5 @@ html lang="en" a.close data-dismiss="alert" × = yield :page_title = yield - #footer-wrap - .footer-shadow - .container - .footer-content= render 'footer' - .footer-bottom © mozo.bar 2014 + = render 'theme1/footer' + = javascript_include_tag 'theme1/application' diff --git a/app/views/layouts/theme1.html.slim b/app/views/layouts/theme1.html.slim index a1a2722c..f34a6c14 100644 --- a/app/views/layouts/theme1.html.slim +++ b/app/views/layouts/theme1.html.slim @@ -6,7 +6,6 @@ html lang="en" meta name="viewport" content="width=device-width, initial-scale=1.0" title= site_page_title = csrf_meta_tags - /! Le HTML5 shim, for IE6-8 support of HTML elements /[if lt IE 9] = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js" @@ -16,21 +15,7 @@ html lang="en" body .header-nav-banner - #header-wrap - #ceiling - .left - .right - .lights - .light1 - .light2 - .light3 - .container - #header - #header-right= render 'theme1/social' - #logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path - #nav-wrap.container - .navbar - .navbar-inner= render 'theme1/navigation' + = render 'theme1/header' #content-header .left .right @@ -50,9 +35,5 @@ html lang="en" - if @page && @page.title.present? h1.page-title= @page.title = yield - #footer-wrap - .footer-shadow - .container - .footer-content= render 'footer' - .footer-bottom © mozo.bar 2014 + = render 'theme1/footer' = javascript_include_tag "theme1/application" diff --git a/app/views/theme1/_footer.html.slim b/app/views/theme1/_footer.html.slim new file mode 100644 index 00000000..fd33daa9 --- /dev/null +++ b/app/views/theme1/_footer.html.slim @@ -0,0 +1,5 @@ +#footer-wrap + .footer-shadow + .footer-content-container + .footer-content= render 'footer' + .footer-bottom © mozo.bar 2014 diff --git a/app/views/theme1/_header.html.slim b/app/views/theme1/_header.html.slim new file mode 100644 index 00000000..821c96fd --- /dev/null +++ b/app/views/theme1/_header.html.slim @@ -0,0 +1,15 @@ +#header-wrap + #ceiling + .left + .right + .lights + .light1 + .light2 + .light3 + .container + #header + #header-right= render 'theme1/social' + #logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path +#nav-wrap + .navbar + .navbar-inner= render 'theme1/navigation' diff --git a/app/views/theme1/_navigation.html.slim b/app/views/theme1/_navigation.html.slim index d46ed853..a126f719 100644 --- a/app/views/theme1/_navigation.html.slim +++ b/app/views/theme1/_navigation.html.slim @@ -1,6 +1,8 @@ -.container - ul.nav - li[class=(current_page?(controller: '/pages', action: 'home') ? :active : nil)]= link_to find_page('home').try(:menu_text), locale_root_path - li[class=(current_page?(controller: '/pages', action: 'show', name: 'about') ? :active : nil)]= link_to find_page('about').try(:menu_text), page_path('about') - - Page.menu_roots.each do |page| - li[class=(current_page?(controller: '/pages', action: 'show', name: page.name) ? :active : nil)]= link_to page.menu_text, page_path(page.name) +a.menu-secondary-toggle href="#" + span +ul.nav + li[class=(current_page?(controller: '/pages', action: 'home') ? :active : nil)]= link_to find_page('home').try(:menu_text), locale_root_path + li[class=(current_page?(controller: '/pages', action: 'show', name: 'about') ? :active : nil)]= link_to find_page('about').try(:menu_text), page_path('about') +ul.nav.secondary + - Page.menu_roots.each do |page| + li[class=(current_page?(controller: '/pages', action: 'show', name: page.name) ? :active : nil)]= link_to page.menu_text, page_path(page.name) diff --git a/app/views/theme1/_social.html.slim b/app/views/theme1/_social.html.slim index 106ab857..5a2dd33d 100644 --- a/app/views/theme1/_social.html.slim +++ b/app/views/theme1/_social.html.slim @@ -1,9 +1,9 @@ .social a.wsite-social-facebook href="https://www.facebook.com/mozo.bar" target=:_blank span.wsite-social-inner - a.wsite-social-twitter href="https://twitter.com/mozo.bar" target=:_blank + /a.wsite-social-twitter href="https://twitter.com/mozo.bar" target=:_blank span.wsite-social-inner - a.wsite-social-linkedin href="http://www.linkedin.com/company/2801351" target=:_blank + /a.wsite-social-linkedin href="http://www.linkedin.com/company/2801351" target=:_blank span.wsite-social-inner - a.wsite-social-rss + /a.wsite-social-rss span.wsite-social-inner diff --git a/bin/user_asset_corrections b/bin/user_asset_corrections index 59343240..9ba2a132 100755 --- a/bin/user_asset_corrections +++ b/bin/user_asset_corrections @@ -43,7 +43,7 @@ remove 'user/app/application.js' # embedded in flat/application gsub_file 'user/foundation/application.css', /url\(("?)\/assets/, 'url(\1../..' gsub_all_scripts 'src="/assets', 'src="./assets' -#compress_js 'user/flat/application.js' +compress_js 'user/flat/application.js' end_time = Time.now puts "Converted assets for mobile in #{(end_time - start_time).round} seconds" diff --git a/config/application.rb b/config/application.rb index 01420739..95a57ad5 100644 --- a/config/application.rb +++ b/config/application.rb @@ -75,6 +75,7 @@ module Qwaiter # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = :nl + config.i18n.available_locales = [:nl, :en] # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" diff --git a/config/version b/config/version index 2d72c8d3..a75b09ef 100644 --- a/config/version +++ b/config/version @@ -1 +1 @@ -0.9.48 +0.9.51