diff --git a/static/src/css/pylote.css b/static/src/css/pylote.css index df1239239fe0ca4f4b775aaa8679e0a7ddccdfe4..26d9a3c79325b9e914ec0302956ded449ab8d2e8 100644 --- a/static/src/css/pylote.css +++ b/static/src/css/pylote.css @@ -381,7 +381,7 @@ div#wrap{ .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus{ - font-weight: 500; + font-weight: 700; color: #56A099; } @@ -433,7 +433,7 @@ div#wrap{ #menu-news .nav-link span{ text-transform: uppercase; - font-weight: 900; + /*font-weight: 900;*/ border-right: none; border-left: none; padding: 0px; @@ -1195,7 +1195,7 @@ h2 span{ .text-carte h4{ text-transform: uppercase; - font-size: 29px; + font-size: 18px; } .text-carte span{ @@ -1590,6 +1590,7 @@ h2.o_default_snippet_text:after{ } .link-publi { + color: #fff; text-decoration: underline; display: inline-block; padding: 0px 10px; diff --git a/static/src/css/pylote_mobil.css b/static/src/css/pylote_mobil.css index 521a879288b5c9816b951b2679037c6a5acac57d..36457ff6bee67895f07aa251c95aa51718c06de4 100644 --- a/static/src/css/pylote_mobil.css +++ b/static/src/css/pylote_mobil.css @@ -273,60 +273,9 @@ .text-carte h4{ text-transform: uppercase; - font-size: 18px; - } - - - /*.carousel-text-right-inner{ - width: 400px; - } - - - .s_carousel .carousel-control-prev-icon, .s_carousel .carousel-control-next-icon, .s_quotes_carousel .carousel-control-prev-icon, .s_quotes_carousel .carousel-control-next-icon{ - margin-top: 0px; - } - - .carousel-right-partner{ - text-align: left; - } - - .carousel-right-inner .circle-home-border{ - width: 90px; - height: 90px; - } - - .carousel-text-right-inner p{ - font-size: 16px; - } - - .carousel-control-prev, .carousel-control-next{ - align-items: center; - top: 0; - margin: 0; - } - - - .circle-home-border p.o_default_snippet_text{ - font-size: 15px; - } - - - .link-bottom a{ - margin: 0; - display: initial; - margin-right: 10px; - } - - .link-bottom h5{ - margin-right: 10px; - display: inline-block; + font-size: 29px; } - .link-publi { - border-top: none ; - border-left: 1px solid #56A099; - }*/ - .mentions{ margin-top: 0; } diff --git a/static/src/img/._cleaner-img2.png b/static/src/img/._cleaner-img2.png index e9334bcf267ca58621e40721e599d6f91c8cb06c..246abd0b4e9881e7896cbaa4a92bb2a7d11e30c1 100644 Binary files a/static/src/img/._cleaner-img2.png and b/static/src/img/._cleaner-img2.png differ diff --git a/static/src/img/._img-techno2.png b/static/src/img/._img-techno2.png index f692e2cbbcdaa131f3962ec7b7708af1939f523f..00f59a74128dd581ff82480ab32eef8af7c4d23d 100644 Binary files a/static/src/img/._img-techno2.png and b/static/src/img/._img-techno2.png differ diff --git a/static/src/img/carousel/.DS_Store b/static/src/img/carousel/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..786bf10806e9ba837b93a35b5e419defc8d57e9f Binary files /dev/null and b/static/src/img/carousel/.DS_Store differ diff --git a/static/src/img/carousel/._.DS_Store b/static/src/img/carousel/._.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0d59154cf1e8b1355112a07ec90b84a1577dff49 Binary files /dev/null and b/static/src/img/carousel/._.DS_Store differ diff --git a/static/src/img/cleaner-img2.png b/static/src/img/cleaner-img2.png index e1298c896caffe6a6f67dda5f5866de99fcfa384..4c366d350d42d465a3ff2b2e89c348f6542680f3 100644 Binary files a/static/src/img/cleaner-img2.png and b/static/src/img/cleaner-img2.png differ diff --git a/static/src/img/img-techno2.png b/static/src/img/img-techno2.png index 16cd059a9621b3d59526cab0017269f12e2141e7..3df1d7023d2895173ffd9f76f58e5377d0435fd5 100644 Binary files a/static/src/img/img-techno2.png and b/static/src/img/img-techno2.png differ diff --git a/static/src/js/._menuspy.js b/static/src/js/._menuspy.js new file mode 100644 index 0000000000000000000000000000000000000000..5dcf2d26e8dc7d29664f8f8f7aa44e5d89e2ca72 Binary files /dev/null and b/static/src/js/._menuspy.js differ diff --git a/static/src/js/menuspy.js b/static/src/js/menuspy.js new file mode 100644 index 0000000000000000000000000000000000000000..f2e62960302325a449662d97eba22ca8990f308f --- /dev/null +++ b/static/src/js/menuspy.js @@ -0,0 +1,194 @@ +/*! MenuSpy v1.3.0 (Jan 31 2018) - http://leocs.me/menuspy/ - Copyright (c) 2018 Leonardo Santos; MIT License */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.MenuSpy = factory()); +}(this, (function () { 'use strict'; + +var utils = { + extend: function extend(a, b) { + for (var key in b) { + if (b.hasOwnProperty(key)) { + a[key] = b[key]; + } + } + + return a; + }, + + offset: function offset(el) { + var rect = el.getBoundingClientRect(); + + return { + top: rect.top + window.pageYOffset, + left: rect.left + window.pageXOffset + }; + }, + + scrollTop: function scrollTop() { + return window.pageYOffset || document.documentElement.scrollTop; + }, + + addClass: function addClass(el, className) { + if (el.classList) { + el.classList.add(className); + } else { + var classes = el.className.split(' '); + var existingIndex = classes.indexOf(className); + + if (existingIndex === -1) { + classes.push(className); + } + + el.className = classes.join(' '); + } + }, + + removeClass: function removeClass(el, className) { + if (el.classList) { + el.classList.remove(className); + } else { + el.className = el.className.replace(new RegExp(("(^|\\b)" + (className.split(' ').join('|')) + "(\\b|$)"), 'gi'), ' '); + } + }, + + debounce: function debounce(fn, delay) { + var timeout = null; + return function() { + var args = arguments; + var context = this; + if (!timeout) { + timeout = setTimeout(function () { + timeout = 0; + return fn.apply(context, args); + }, delay); + } + }; + } +}; + +var MenuSpy = function MenuSpy(element, options) { + var this$1 = this; + + if (!element) { + return; + } + + var defaults = { + menuItemSelector : 'a[href^="#"]', + activeClass : 'active', + threshold : 15, + enableLocationHash : true, + hashTimeout : 600, + callback : null + }; + + this.element = typeof element === 'string' ? document.querySelector(element) : element; + this.options = utils.extend(defaults, options); + + this.assignValues(); + this.debouncedAssignValuesFn = utils.debounce(function () { return this$1.assignValues(); }); + window.addEventListener('resize', this.debouncedAssignValuesFn); + + this.debouncedHashFn = utils.debounce(function () { + var hash = this$1.lastInViewElm ? ("#" + (this$1.lastInViewElm.id)) : '#'; + if (history.replaceState) { + history.replaceState(null, null, hash); + } else { + var st = utils.scrollTop(); + window.location.hash = hash; + window.scrollTo(0, st); + } + }, this.options.hashTimeout); + + this.cacheItems(); + this.scrollFn(); +}; + +MenuSpy.prototype.assignValues = function assignValues () { + this.currScrollTop = 0; + this.lastInViewElm = null; + this.menuHeight = this.element.offsetHeight + this.options.threshold; + this.menuItems = [].slice.call(this.element.querySelectorAll(this.options.menuItemSelector)); + this.raf = null; +}; + +MenuSpy.prototype.cacheItems = function cacheItems () { + this.scrollItems = this.menuItems.map(function (elm) { + var target = elm.dataset.target ? document.querySelector(elm.dataset.target) : document.getElementById(elm.hash.slice(1)); + if (target) { + var offset = Math.floor(utils.offset(target).top); + return { elm: elm, target: target, offset: offset }; + } + return false; + }); + this.scrollItems = this.scrollItems.filter(Boolean).sort(function (a, b) { return a.offset - b.offset; }); +}; + +MenuSpy.prototype.tick = function tick () { + var fromTop = this.currScrollTop + this.menuHeight; + var inViewElms = this.scrollItems.filter(function (item) { return item.offset < fromTop; }); + this.activateItem(inViewElms.pop()); +}; + +MenuSpy.prototype.activateItem = function activateItem (inViewElm) { + var this$1 = this; + + var ref = this.options; + var activeClass = ref.activeClass; + var callback = ref.callback; + + if (!inViewElm) { + this.scrollItems.forEach(function (item) { return utils.removeClass(item.elm.parentNode, activeClass); }); + this.lastInViewElm = null; + + if (this.options.enableLocationHash) { + this.debouncedHashFn(); + } + + return; + } + + if (this.lastInViewElm !== inViewElm.target) { + this.lastInViewElm = inViewElm.target; + + this.scrollItems.forEach(function (item) { + utils.removeClass(item.elm.parentNode, activeClass); + + if (item.target === inViewElm.target) { + utils.addClass(item.elm.parentNode, activeClass); + + if (typeof callback === 'function') { + callback.call(this$1, item); + } + + if (this$1.options.enableLocationHash) { + this$1.debouncedHashFn(); + } + } + }); + } +}; + +MenuSpy.prototype.scrollFn = function scrollFn () { + var st = utils.scrollTop(); + + if (this.currScrollTop !== st) { + this.currScrollTop = st; + this.tick(); + } + + this.raf = window.requestAnimationFrame(this.scrollFn.bind(this)); +}; + +MenuSpy.prototype.destroy = function destroy () { + if (this.raf) { + window.cancelAnimationFrame(this.raf); + } + + window.removeEventListener('resize', this.debouncedAssignValuesFn); +}; + +return MenuSpy; + +}))); diff --git a/static/src/js/script_to_top.js b/static/src/js/script_to_top.js index 3b665b69230c375c2f3108b6efac20932c9613f5..5183140181fb975c03a1ca5a1e5505264aa40003 100644 --- a/static/src/js/script_to_top.js +++ b/static/src/js/script_to_top.js @@ -3,6 +3,9 @@ odoo.define('pylote_website.scroll_totop', function (require) { $(document).ready(function () { + var elm = document.querySelector('#myNavbar'); + var ms = new MenuSpy(elm); + $( '#button-open-menu' ).on( 'click', function () { if($("#logo-mobile").hasClass("o_show")) { $("#logo-mobile").removeClass('o_show'); diff --git a/views/assets.xml b/views/assets.xml index 8ebabeba66f2b6809a16afe84380350cc4abc17a..eea60bc79dfd9531ea222bb27df66ee89d769882 100644 --- a/views/assets.xml +++ b/views/assets.xml @@ -11,6 +11,7 @@ <link href="/pylote_website/static/src/css/pylote_mobil.css" rel="stylesheet"/> <!--============================================= Javascript ========================================--> + <script type="text/javascript" src="/pylote_website/static/src/js/menuspy.js"></script> <script type="text/javascript" src="/pylote_website/static/src/js/script_to_top.js"></script> <button class="scrollButton" id="myBtn" title="Go to top"> <!-- <button onclick="topFunction()" id="myBtn" title="Go to top"> --> diff --git a/views/menu.xml b/views/menu.xml index 71c0658408f61bf6b091554c30001f29ccafe022..9dd1ad77aa606f4f2f24acd504319e213d4bca4e 100644 --- a/views/menu.xml +++ b/views/menu.xml @@ -48,7 +48,7 @@ <span data-oe-model="website.menu" data-oe-field="name" data-oe-type="char" data-oe-expression="submenu.name">Contact us</span> </a> </li> - <li class="lang"> + <!-- <li class="lang"> <div class="flex-lang"> <div class="lang-bloc js_language_selector mb0 list-inline"> <a class="js_change_lang" href="/en_US/" data-default-lang="true" data-lang="en_US"> @@ -60,7 +60,7 @@ </a> </div> </div> - </li> + </li> --> </xpath> </template> diff --git a/views/snippets.xml b/views/snippets.xml index f0744d09b3f1f705d8f445fa303c253faa1ad6a1..178700263444832dabfae2581611987a4b37a98c 100644 --- a/views/snippets.xml +++ b/views/snippets.xml @@ -46,7 +46,7 @@ <img src="/pylote_website/static/src/img/pictos_greener.png" class="img img-responsive" /> </div> <div class="carousel-text-right-inner"> - <p>Lighter, compact less material, recyclable, 16 times less waste</p> + <p>Lighter, compact less material, recyclable, 18 times less waste</p> </div> </div> </div> @@ -154,7 +154,7 @@ <p>You want to know more ?</p> <a href="/our-differenciation#our-techno" class="btn-primary">Our technology</a> <a href="/contact" class="btn-primary">Contact us</a> - <div class="link-publi"> + <div class="link-publi s_btn" data-name="Button"> <a href="#" class="btn-primary">Publication</a> </div> </div> @@ -394,7 +394,7 @@ <p>You want to know more ?</p> <a href="/our-differenciation#our-techno" class="btn-primary">Our technology</a> <a href="/contact" class="btn-primary">Contact us</a> - <div class="link-publi"> + <div class="link-publi s_btn" data-name="Button"> <a href="#" class="btn-primary">Publication</a> </div> </div> @@ -578,7 +578,7 @@ <p>You want to know more ?</p> <a href="/our-differenciation#our-techno" class="btn-primary">Our technology</a> <a href="/contact" class="btn-primary">Contact us</a> - <div class="link-publi"> + <div class="link-publi s_btn" data-name="Button"> <a href="#" class="btn-primary">Publication</a> </div> </div> @@ -705,7 +705,7 @@ <p>You want to know more ?</p> <a href="/our-differenciation#our-techno" class="btn-primary">Our technology</a> <a href="/contact" class="btn-primary">Contact us</a> - <div class="link-publi"> + <div class="link-publi s_btn" data-name="Button"> <a href="#" class="btn-primary">Publication</a> </div> </div>