From dd45186a6818e142fa1d688244627e800f4dd397 Mon Sep 17 00:00:00 2001 From: madalin0b <83428650+madalin0b@users.noreply.github.com> Date: Tue, 24 Aug 2021 12:02:23 +0200 Subject: [PATCH] small banner left section fix (#1002) --- static/css/layout/banner.css | 38 +++-------- templates/layout.html | 125 ++++++++++++++++------------------- 2 files changed, 65 insertions(+), 98 deletions(-) diff --git a/static/css/layout/banner.css b/static/css/layout/banner.css index 60eea1a718..f1ede7e800 100644 --- a/static/css/layout/banner.css +++ b/static/css/layout/banner.css @@ -3,7 +3,7 @@ height: 46px; z-index: 999; width: 100%; - min-width: 300px; + min-width: 320px; background-color: var(--banner-background); color: var(--banner-text); /* font-size: 90%; */ @@ -27,6 +27,12 @@ font-weight: 500; } +@media (max-width: 1440px) { + .currency-symbol { + display: none; + } +} + .k-formatted-price { display: inline-block; } @@ -35,7 +41,7 @@ display: none; } -@media (min-width: 800px) { +@media (min-width: 1440px) { .k-formatted-price { display: none; } @@ -303,24 +309,6 @@ color: var(--banner-text); } } -.currency-symbol { - font-weight: 500; -} - -@media (max-width: 350px) { - .currency-symbol { - display: none; - } -} - -.k-formatted-price { - display: inline-block; -} - -.price { - display: none; -} - .currency-dropdown-toggle { display: flex; align-items: center; @@ -367,15 +355,7 @@ color: var(--banner-text); font-weight: 500; } -@media (min-width: 800px) { - .k-formatted-price { - display: none; - } - - .price { - display: inline-block; - } - +@media (min-width: 900px) { .currency-name { display: inline-block; } diff --git a/templates/layout.html b/templates/layout.html index 7cccb68f3e..4b13d19772 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -37,30 +37,26 @@ - - - - {{end}} @@ -931,11 +918,11 @@
Links
@@ -945,30 +932,30 @@
Links
window.dataLayer = window.dataLayer || []; function gtag() { - dataLayer.push(arguments); + dataLayer.push(arguments) } - gtag('js', new Date()); + gtag('js', new Date()) - gtag('config', {{.Meta.GATag}}); + gtag('config', {{.Meta.GATag}}) function createFunctionWithTimeout(callback, opt_timeout) { - var called = false; + var called = false function fn() { if (!called) { - called = true; - callback(); + called = true + callback() } } setTimeout(fn, opt_timeout || 1000); - return fn; + return fn } function handleOutboundLinkClicks(event) { var link = event.currentTarget.href - event.preventDefault(); + event.preventDefault() var fallback = setTimeout(function () { window.location = link @@ -988,7 +975,7 @@
Links
var outbounds = document.querySelectorAll('[ga-outbound]') for (var i = 0; i < outbounds.length; i++) { - var element = outbounds[i]; + var element = outbounds[i] element.addEventListener('click', handleOutboundLinkClicks) }