From: vincent@cubedesigners.com Date: Wed, 22 Jun 2016 17:25:53 +0000 (+0000) Subject: wip #480 @3 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=feef13fa5d8f05e3b2ded3bb3f734d13b7283528;p=fluidbook-v3.git wip #480 @3 --- diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 02b88f1..d89c2c1 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -19,8 +19,6 @@ timezone = 'Europe/Paris' session.lifetime = 31536000 ;1 year session.adapter = cache -webhost = www.fluidbook.com - database.adapter = pdo_mysql database.params.host = localhost database.params.username = fluidbookwebv3 @@ -45,6 +43,8 @@ navigation.containers[] = -2; navigation.containers[] = -3; navigation.containers.Sitemap = -4; +webhost = www.fluidbook.com + locales.fr = www.fluidbook.com locales.en = en.fluidbook.com @@ -63,7 +63,6 @@ dev = true firephp = true minify.js = false -minify.css = false seo.universalAnalytics = @@ -74,7 +73,7 @@ httpauth.ip_whitelist[] = 82.216.164.184 robots = false -webhost = fluidbookwebv3.dev.cubedesigners.com +webhost = dev.fluidbook.com -locales.fr = fluidbookwebv3.dev.cubedesigners.com -locales.en = en.fluidbookwebv3.dev.cubedesigners.com \ No newline at end of file +locales.fr = dev.fluidbook.com +locales.en = en.dev.fluidbook.com \ No newline at end of file diff --git a/framework/application/views/helpers/HeaderContactNav.php b/framework/application/views/helpers/HeaderContactNav.php new file mode 100644 index 0000000..1b56cd7 --- /dev/null +++ b/framework/application/views/helpers/HeaderContactNav.php @@ -0,0 +1,16 @@ +linkInternal(null, 'internal:agences',array('class'=>'agencies')); + $res[] = $this->linkQuote('Demandez un devis'); + + return $this->htmlElement($this->listUnordered($res), 'nav', array('id' => 'contactnav', 'role' => 'navigation')); + } +} \ No newline at end of file diff --git a/framework/application/views/helpers/HeaderLogo.php b/framework/application/views/helpers/HeaderLogo.php new file mode 100644 index 0000000..acb6d32 --- /dev/null +++ b/framework/application/views/helpers/HeaderLogo.php @@ -0,0 +1,16 @@ +image('/images/logo/leave.svg', "", -1, -1, array('class' => 'leave')); + $logos .= $this->image('/images/logo/text-white.svg', 'Fluidbook', -1, -1, array('class' => 'text-white')); + $logos .= $this->image('/images/logo/text-dark.svg', '', -1, -1, array('class' => 'text-dark')); + + return $this->link($logos, '/', array('class' => 'logo')); + } +} \ No newline at end of file diff --git a/framework/application/views/helpers/HeaderNav.php b/framework/application/views/helpers/HeaderNav.php new file mode 100644 index 0000000..512653b --- /dev/null +++ b/framework/application/views/helpers/HeaderNav.php @@ -0,0 +1,12 @@ +navigation()->findOneById($this->localeDefault() . '/' . CubeIT_Navigation::MAIN); + $res = $this->navigation()->menu()->renderMenu($mainMenu, array('maxDepth' => 0)); + return $this->htmlElement($res, 'nav', array('id' => 'menu', 'role' => 'navigation')); + } +} \ No newline at end of file diff --git a/framework/application/views/helpers/LinkQuote.php b/framework/application/views/helpers/LinkQuote.php new file mode 100644 index 0000000..d3f1195 --- /dev/null +++ b/framework/application/views/helpers/LinkQuote.php @@ -0,0 +1,10 @@ +linkInternal($label, 'internal:contact', array('class' => 'quoteLink')); + } +} \ No newline at end of file diff --git a/framework/application/views/scripts/common/content.phtml b/framework/application/views/scripts/common/content.phtml index d6b5ab2..4e06e18 100644 --- a/framework/application/views/scripts/common/content.phtml +++ b/framework/application/views/scripts/common/content.phtml @@ -2,5 +2,7 @@ $content = $this->layout()->content . "\n"; echo $this->render('common/header.phtml'); +echo '
'; echo $content; +echo '
'; echo $this->render('common/footer.phtml'); diff --git a/framework/application/views/scripts/common/header.phtml b/framework/application/views/scripts/common/header.phtml index a0bf5be..e3c8dc5 100644 --- a/framework/application/views/scripts/common/header.phtml +++ b/framework/application/views/scripts/common/header.phtml @@ -12,23 +12,11 @@ if (!is_null($homepage)) {
\ No newline at end of file diff --git a/images/logo/leave.svg b/images/logo/leave.svg new file mode 100644 index 0000000..584a3f0 --- /dev/null +++ b/images/logo/leave.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/logo/text-dark.svg b/images/logo/text-dark.svg new file mode 100644 index 0000000..f067651 --- /dev/null +++ b/images/logo/text-dark.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/images/logo/text-white.svg b/images/logo/text-white.svg new file mode 100644 index 0000000..69466b1 --- /dev/null +++ b/images/logo/text-white.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/js/002-common.js b/js/002-common.js index e69de29..40f5236 100644 --- a/js/002-common.js +++ b/js/002-common.js @@ -0,0 +1,18 @@ +registerLoader(load_common, true); + +function load_common() { + $(window).on('cubeitresize', resize); + resize(); +} + +function resize() { + var ww = $(window).width(); + var wh = $(window).height(); + + var mainHeight = wh; + $("footer").each(function () { + mainHeight -= $(this).outerHeight(); + }); + + $('main').css('min-height', mainHeight); +} \ No newline at end of file diff --git a/js/101-header.js b/js/101-header.js new file mode 100644 index 0000000..4c5b0c0 --- /dev/null +++ b/js/101-header.js @@ -0,0 +1,18 @@ +registerLoader(load_header, true); + +function load_header() { + $(window).on('cubeitresize', resizeHeader()); + resizeHeader(); + +} + +function resizeHeader() { + var ww = $(window).width(); + var wh = $(window).height(); + + var nav = $("header nav#menu"); + var menuLeft = (ww - $(nav).outerWidth()) / 2; + $(nav).data('centeroffset', menuLeft).css('left',menuLeft); + + +} diff --git a/less/001-variables.less b/less/001-variables.less index 339d97a..3a4bb96 100644 --- a/less/001-variables.less +++ b/less/001-variables.less @@ -11,6 +11,8 @@ //-- Colours @color-footer-bg-primary: #263340; @color-footer-bg-secondary: #161e26; +@color-green: #8aab41; +@color-header-grey: #2a3743; //-- Content and breakpoints @mobile-breakpoint: 1024px; \ No newline at end of file diff --git a/less/002-common.less b/less/002-common.less index 25d6843..8a03dcb 100644 --- a/less/002-common.less +++ b/less/002-common.less @@ -1,5 +1,13 @@ @import "000-imports"; +*{ + box-sizing: border-box; +} + body { font-family: @body-font; } + +main{ + background-color: #fff; +} \ No newline at end of file diff --git a/less/003-mixins.less b/less/003-mixins.less index adacd16..e15e61d 100644 --- a/less/003-mixins.less +++ b/less/003-mixins.less @@ -2,11 +2,43 @@ // See: https://maximilianhoffmann.com/posts/better-font-rendering-on-osx // also: http://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/ .font-thinning() { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } .font-thinning-off() { - -webkit-font-smoothing: auto; - -moz-osx-font-smoothing: auto; + -webkit-font-smoothing: auto; + -moz-osx-font-smoothing: auto; +} + +.border-button(@base-color,@border-color) { + transition: all 200ms; + + border-color: @border-color; + color: @base-color; + + &:hover { + border-color: lighten(@border-color, 5%); + color: lighten(@base-color, 5%); + } + &:active { + border-color: darken(@border-color, 2%); + color: darken(@base-color, 2%); + } +} + +.background-button(@base-color) { + transition: all 200ms; + + background-color: @base-color; + border-color: @base-color; + + &:hover { + background-color: lighten(@base-color, 5%); + border-color: lighten(@base-color, 5%); + } + &:active { + background-color: darken(@base-color, 2%); + border-color: darken(@base-color, 2%); + } } \ No newline at end of file diff --git a/less/101-header.less b/less/101-header.less index c958f3b..657f9e4 100644 --- a/less/101-header.less +++ b/less/101-header.less @@ -1,26 +1,121 @@ @import "000-imports"; header { - color: #2a3743; + position: fixed; + top: 0px; + left: 0px; - nav#menu { + height: 90px; + width: 100%; + + color: @color-header-grey; + padding: 0 5%; + vertical-align: bottom; + border: 1px solid #f00; + + #header { + height: 90px; + width: 100%; + position: relative; + + } + + nav { + font-family: @montserrat; + font-weight: 300; + a { + text-transform: uppercase; + text-decoration: none; + font-size: 12px; + color: @color-header-grey; + } ul { list-style: none; li { display: inline-block; } } + } + + nav#menu { + position: relative; + top: 54px; + + display: inline-block; + text-align: center; + + li { + margin: 0 25px; + } + a { - color: #2a3743; + line-height: 9px; + border: 1px solid transparent; + padding-bottom: 13px; + } + + li.active a, a:hover { + border-bottom-color: @color-header-grey; + } + } + + nav#contactnav { + position: absolute; + right: 0; + bottom: 1px; + + li { + margin-left: 19px; + } + a { + display: inline-block; + border: 1px solid @color-header-grey; + padding: 13px 29px 14px; + line-height: 9px; + border-radius: 19px; + &.quoteLink { + .background-button(@color-green); + color: #fff; + } + &.agencies{ + .border-button(@color-header-grey,#c2c4c7); + } } } &.light { color: #fff; nav #menu { + li.active a, a:hover { + border-bottom-color: #fff; + } a { color: #fff; } } } + + .logo { + position: absolute; + display: inline-block; + top: 35px; + height: 50px; + width: 220px; + + .leave { + position: absolute; + top: 0; + left: 0; + } + + .text-white, .text-dark { + position: absolute; + left: 35px; + top: 13px; + } + + .text-white { + opacity: 0; + } + } } \ No newline at end of file