From cd98b7390aad637779ac2b8eac23e795b3325c74 Mon Sep 17 00:00:00 2001 From: Jamie McCue Date: Wed, 12 Jun 2019 10:16:37 -0700 Subject: [PATCH 1/2] added version selector to always be visible closes gh-458 --- static/header.less | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/static/header.less b/static/header.less index 599a0b8c..732c7d30 100644 --- a/static/header.less +++ b/static/header.less @@ -35,6 +35,7 @@ width: 60px; height: @brand-height; cursor: pointer; + margin: 0 @gutter 0 0; &:hover > a { opacity: .7; } @@ -49,7 +50,41 @@ } } .version { - display: none; + display: flex; + align-items: center; + font-size: 12px; + height: @brand-height; + padding-top: 7px; + cursor: pointer; + .version-number::after { + display: inline-block; + width: 15px; + height: 15px; + vertical-align: bottom; + content: ''; + background-image: url(img/down_black.svg); + background-size: cover; + background-repeat: no-repeat; + } + &:hover > a { + opacity: .7; + } + &:hover .dropdown { + display: block; + } + .version-dropdown { + left: 100px; + width: 100px; + } + .version-dropdown a { + color: black; + padding: 5px 10px; + text-decoration: none; + display: block; + &:hover { + background-color: @light-gray-color; + } + } } } From 44f861aa5b6d8bda01e89b51396409a0b75d8142 Mon Sep 17 00:00:00 2001 From: Jamie McCue Date: Thu, 13 Jun 2019 08:45:04 -0700 Subject: [PATCH 2/2] revised the approach - removed the breakpoint control --- static/header.less | 108 +++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 72 deletions(-) diff --git a/static/header.less b/static/header.less index 732c7d30..1d5f89da 100644 --- a/static/header.less +++ b/static/header.less @@ -49,6 +49,41 @@ background-repeat: no-repeat; } } + .version { + display: none; + } +} + +// ----- DROPDOWNS ----- + +.brand { + .dropdown { + position: absolute; + top: 52px; + background-color: white; + border: 1px solid #ccc; + box-shadow: 0 6px 12px rgba(0,0,0,.175); + } + + .logo { + margin: 0 @gutter 0 0; + &:hover .dropdown { + display: block; + } + .project-dropdown { + width: 180px; + } + .project-dropdown a { + color: black; + font-size: 14px; + padding: 12px 16px; + text-decoration: none; + display: block; + &:hover { + background-color: @light-gray-color; + } + } + } .version { display: flex; align-items: center; @@ -56,6 +91,7 @@ height: @brand-height; padding-top: 7px; cursor: pointer; + margin: 0 @gutter/3 0 0; .version-number::after { display: inline-block; width: 15px; @@ -73,7 +109,6 @@ display: block; } .version-dropdown { - left: 100px; width: 100px; } .version-dropdown a { @@ -88,77 +123,6 @@ } } -// ----- CANJS LOGO AND VERSION DESKTOP ----- -@media screen and (min-width: @breakpoint) { - .brand { - .dropdown { - position: absolute; - top: 52px; - background-color: white; - border: 1px solid #ccc; - box-shadow: 0 6px 12px rgba(0,0,0,.175); - } - - .logo { - margin: 0 @gutter 0 0; - - &:hover .dropdown { - display: block; - } - .project-dropdown { - left: 20px; - width: 180px; - } - .project-dropdown a { - color: black; - font-size: 14px; - padding: 12px 16px; - text-decoration: none; - display: block; - &:hover { - background-color: @light-gray-color; - } - } - } - .version { - display: flex; - align-items: center; - font-size: 12px; - height: @brand-height; - padding-top: 7px; - cursor: pointer; - .version-number::after { - display: inline-block; - width: 15px; - height: 15px; - vertical-align: bottom; - content: ''; - background-image: url(img/down_black.svg); - background-size: cover; - background-repeat: no-repeat; - } - &:hover > a { - opacity: .7; - } - &:hover .dropdown { - display: block; - } - .version-dropdown { - left: 100px; - width: 100px; - } - .version-dropdown a { - color: black; - padding: 5px 10px; - text-decoration: none; - display: block; - &:hover { - background-color: @light-gray-color; - } - } - } - } -} // ----- CHAT, FORUM, GITHUB STAR, TWITTER ----- .top-right-links {