From 92f7428ac8a1b0539ac54c83d5d1e4c0130c2093 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Mon, 14 Oct 2024 13:52:06 +0800 Subject: [PATCH 1/3] Replace download button with dropdown Signed-off-by: Egor Savkin --- sass/css/_base.scss | 121 +++++++++++++++++++++++++++++-------------- templates/index.html | 13 +++-- 2 files changed, 92 insertions(+), 42 deletions(-) diff --git a/sass/css/_base.scss b/sass/css/_base.scss index e834b86..1f8e134 100644 --- a/sass/css/_base.scss +++ b/sass/css/_base.scss @@ -90,28 +90,52 @@ a { } } -.navbar-light .navbar-nav .nav-link, -.dropdown-item { - outline: none; - color: $color-primary; - text-decoration: none; - - &:visited { +.navbar { + .navbar-light .navbar-nav .nav-link, + .dropdown-item { + outline: none; color: $color-primary; + text-decoration: none; + + &:visited { + color: $color-primary; + } + + &:hover { + color: $color-secondary; + } } - &:hover { + .navbar-light .navbar-nav .active>.nav-link, + .navbar-light .navbar-nav .nav-link.active, + .navbar-light .navbar-nav .nav-link.show, + .navbar-light .navbar-nav .show>.nav-link { color: $color-secondary; } -} -.navbar-light .navbar-nav .active>.nav-link, -.navbar-light .navbar-nav .nav-link.active, -.navbar-light .navbar-nav .nav-link.show, -.navbar-light .navbar-nav .show>.nav-link { - color: $color-secondary; -} + .dropdown-menu { + border: none; + } + .dropdown-item { + &:hover, + &:active { + background-color: transparent; + } + } + .dropdown-item.active { + color: $color-secondary; + background-color: transparent; + } + .navbar-toggler { + outline: none; + + &:focus, + &:hover { + outline: none; + } + } +} /** @@ -127,22 +151,6 @@ a { border: 1px solid transparent; } -.dropdown-menu { - border: none; - margin-top: 0; - padding-top: 0; -} -.dropdown-item { - &:hover, - &:active { - background-color: transparent; - } -} -.dropdown-item.active { - color: $color-secondary; - background-color: transparent; -} - .btn-primary { background-color: $btn-primary-2; color: #fff !important; @@ -155,18 +163,11 @@ a { border: 1px solid $btn-secondary-2 !important; } } + .btn-lg { font-size: 1rem; padding: 1rem 1.25rem; } -.navbar-toggler { - outline: none; - - &:focus, - &:hover { - outline: none; - } -} ul.th { list-style: none; @@ -200,6 +201,48 @@ ul:not(.navbar-nav) li { } +.download-selector { + display: inline-block; + + .dropdown-menu { + border: none; + margin-top: 0; + padding-top: 0; + } + + .btn { + background-color: $btn-primary-2; + &:hover { + background-color: $btn-secondary-2; + } + &:after { + align-self: center; + } + } + + ul { + list-style: none; + margin-left: 0!important; + width: 100%; + padding: 0; + + li { + padding: 0; + margin: 0; + + a { + padding: 0.75rem 0.5rem 0.75rem 1.25rem; + } + } + + li::before { + content: none; + display: none; + } + } +} + + .bg-white-shadow { background: url(../images/migen-links@2x.png); background-repeat: no-repeat; diff --git a/templates/index.html b/templates/index.html index e5c495a..7a23bb5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -53,10 +53,17 @@ Order hardware Manual Forum - + More... -- 2.44.2 From 9d9a4c9f5aae0920bf046c71cdd6e5f8cc4c4d91 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Mon, 21 Oct 2024 15:30:25 +0800 Subject: [PATCH 2/3] Split dropdown On main click it downloads stable, in dropdown there are two choices - stable and beta. Similar to the downloads on jetbrains website Signed-off-by: Egor Savkin --- sass/css/_base.scss | 15 ++++++++++++++- templates/index.html | 11 +++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/sass/css/_base.scss b/sass/css/_base.scss index 1f8e134..ac8f359 100644 --- a/sass/css/_base.scss +++ b/sass/css/_base.scss @@ -202,7 +202,14 @@ ul:not(.navbar-nav) li { .download-selector { - display: inline-block; + display: inline-flex; + + .divider { + border-right: solid 1px white; + margin: 0.125rem 0; + height: inherit; + z-index: 10; + } .dropdown-menu { border: none; @@ -218,6 +225,12 @@ ul:not(.navbar-nav) li { &:after { align-self: center; } + &[aria-expanded='true']:after { + transform: rotate(-180deg); + } + span { + margin-right: 0.5rem; + } } ul { diff --git a/templates/index.html b/templates/index.html index 7a23bb5..ce7ec9e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -53,13 +53,16 @@ Order hardware Manual Forum - -- 2.44.2