From 3a72094fdab532c57785e5dfe94dcac7e0315f09 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Mon, 19 Oct 2020 12:10:07 -0400 Subject: [PATCH 01/14] initial trial Signed-off-by: Yi Liu --- config.toml | 113 ++++++++++++----------- layouts/_default/baseof.html | 30 ++++++ layouts/partials/mobile-sidebar.html | 63 +++++++++++++ less/_components/classes-typography.less | 2 +- less/_components/mobile-sidebar.less | 80 ++++++++++++++++ less/_components/sidebar.less | 4 + less/styles.less | 3 +- static/assets/css/styles.min.css | 2 +- 8 files changed, 238 insertions(+), 59 deletions(-) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/partials/mobile-sidebar.html create mode 100644 less/_components/mobile-sidebar.less diff --git a/config.toml b/config.toml index c42992b83..cf21e598d 100644 --- a/config.toml +++ b/config.toml @@ -79,50 +79,50 @@ themesDir = "node_modules/" weight = 5 -[[menu.sidebar]] - name = "Adopters" - url = "/adopters/" - weight = 1 - identifier = "adopters" +# [[menu.sidebar]] +# name = "Adopters" +# url = "/adopters/" +# weight = 1 +# identifier = "adopters" -[[menu.sidebar]] - parent ="adopters" - name = "How to be Listed as an Adopter" - url = "/adopters/how-to-be-listed-as-an-adopter" - pre = "" - weight = "1" +# [[menu.sidebar]] +# parent ="adopters" +# name = "How to be Listed as an Adopter" +# url = "/adopters/how-to-be-listed-as-an-adopter" +# pre = "" +# weight = "1" -[[menu.sidebar]] - parent ="adopters" - name = "Eclipse IoT Open Testbeds" - url = "/adopters/testbeds/" - pre = "" - weight = "2" +# [[menu.sidebar]] +# parent ="adopters" +# name = "Eclipse IoT Open Testbeds" +# url = "/adopters/testbeds/" +# pre = "" +# weight = "2" -[[menu.sidebar]] - parent ="adopters" - name = "Testbeds" - url = "/adopters/testbeds/" - weight = "2" - identifier = "testbeds" +# [[menu.sidebar]] +# parent ="adopters" +# name = "Testbeds" +# url = "/adopters/testbeds/" +# weight = "2" +# identifier = "testbeds" -[[menu.sidebar]] - parent ="testbeds" - name = "Asset Tracking" - url = "/adopters/testbeds/asset-tracking/" - weight = "1" +# [[menu.sidebar]] +# parent ="testbeds" +# name = "Asset Tracking" +# url = "/adopters/testbeds/asset-tracking/" +# weight = "1" -[[menu.sidebar]] - parent ="testbeds" - name = "Production Performance Management" - url = "/adopters/testbeds/production-performance-management/" - weight = "2" +# [[menu.sidebar]] +# parent ="testbeds" +# name = "Production Performance Management" +# url = "/adopters/testbeds/production-performance-management/" +# weight = "2" -[[menu.sidebar]] - parent ="testbeds" - name = "Propose a new Testbed" - url = "/adopters/testbeds/propose-a-new-testbed/" - weight = "3" +# [[menu.sidebar]] +# parent ="testbeds" +# name = "Propose a new Testbed" +# url = "/adopters/testbeds/propose-a-new-testbed/" +# weight = "3" [[menu.sidebar]] name = "Members" @@ -177,31 +177,32 @@ themesDir = "node_modules/" url = "/community/resources" pre = "" weight = 4 + +# [[menu.sidebar]] +# name = "Projects" +# url = "/projects/" +# weight = 6 +# identifier = "projects" -[[menu.sidebar]] - name = "Projects" - url = "/projects/" - weight = 6 - identifier = "projects" - -[[menu.sidebar]] - parent ="projects" - name = "Sandboxes" - url = "/projects/sandboxes" - pre = "" - weight = 1 +# [[menu.sidebar]] +# parent ="projects" +# name = "Sandboxes" +# url = "/projects/sandboxes" +# pre = "" +# weight = 1 -[[menu.sidebar]] - parent ="projects" - name = "Getting Started" - url = "/projects/getting-started/" - pre = "" - weight = 2 +# [[menu.sidebar]] +# parent ="projects" +# name = "Getting Started" +# url = "/projects/getting-started/" +# pre = "" +# weight = 2 [[menu.sidebar]] parent ="community" name = "Resources" url = "/community/resources/" + pre = "" weight = 7 identifier = "resources" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 000000000..6c6b607d4 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,30 @@ + + + + + {{ block "head" . }}{{ partial "head.html" . }}{{ end }} + {{ block "head-custom" . }}{{ partial "head_custom.html" . }}{{ end }} + {{ block "head-suffix" . }}{{ partial "head_suffix.html" . }}{{ end }} + + + {{ block "header" . }}{{ partial "header.html" . }}{{ end }} + {{ block "breadcrumbs" . }}{{ if ne .Page.Params.hide_breadcrumb true }}{{ partial "breadcrumbs.html" . }}{{end}}{{ end }} + {{ block "featured_story" . }}{{ partial "featured_story.html" . }}{{ end }} + {{ block "mobile-sidebar" . }}{{ partial "mobile-sidebar.html" . }}{{ end }} + {{ block "main_prefix" . }}{{ partial "main_prefix.html" . }}{{ end }} + {{ block "main" . }}{{ .Content }}{{ end }} + {{ block "main_suffix" . }}{{ partial "main_suffix.html" . }}{{ end }} + {{ block "footer-custom" . }}{{- partial "footer_custom.html" . }}{{ end }} + {{ block "featured_footer" . }}{{ partial "featured_footer.html" . }}{{ end }} + {{ block "footer" . }}{{ partial "footer.html" . }}{{ end }} + {{ block "footer-suffix" . }}{{ partial "footer_suffix.html" . }}{{ end }} + + \ No newline at end of file diff --git a/layouts/partials/mobile-sidebar.html b/layouts/partials/mobile-sidebar.html new file mode 100644 index 000000000..9b204984f --- /dev/null +++ b/layouts/partials/mobile-sidebar.html @@ -0,0 +1,63 @@ + + +{{ if isset .Site.Menus "sidebar" }} +
+
+
+
+ + {{ $currentPage := . }} + {{ .Scratch.Set "currentSection" "home" }} + {{ if $currentPage.Section }} + {{ .Scratch.Set "currentSection" $currentPage.Section }} + {{ end }} + {{$currentSection := .Scratch.Get "currentSection" }} + {{ range .Site.Menus.sidebar }} + {{$parentItem := . }} + {{ if and (.HasChildren) (eq $currentSection $parentItem.Identifier) }} + + {{ end }} + {{ end }} +
+
+
+
+{{ end }} \ No newline at end of file diff --git a/less/_components/classes-typography.less b/less/_components/classes-typography.less index 6504ac09d..b2bc5d990 100755 --- a/less/_components/classes-typography.less +++ b/less/_components/classes-typography.less @@ -11,6 +11,6 @@ * SPDX-License-Identifier: EPL-2.0 */ -p, li, { +p, li { font-weight:300; } \ No newline at end of file diff --git a/less/_components/mobile-sidebar.less b/less/_components/mobile-sidebar.less new file mode 100644 index 000000000..0cf48b54a --- /dev/null +++ b/less/_components/mobile-sidebar.less @@ -0,0 +1,80 @@ + +#mobile-sidebar { + margin-top:50px; + + a, a:hover { + color: #526F7D; + } + + .related-content { + color: #526F7D; + } + + .sidebar-item { + margin-bottom:20px; + background-color: #f1f1f1; + padding:17px 0 10px; + &.active { + background-color: @brand-secondary; + a { + color:#fff; + } + &:hover { + background-color: darken(@brand-secondary, 15%); + } + } + &:hover:not(.active) { + background-color: darken(#f1f1f1, 15%); + a { + color:darken(@main-sidebar-color, 20%); + } + } + } + .sidebar-sub-items { + background-color:#fff; + margin-top:-20px; + a { + &:hover { + font-weight:bold; + } + } + } + .sidebar-sub-item { + padding:0 0 8px 15px; + margin-bottom:0; + a.active { + .sidebar-text { + font-weight:bold; + } + } + &:first-child { + margin-top:15px; + } + &:last-child { + margin-bottom:15px; + } + } + a { + display: block; + .feather { + width:40px; + height:40px; + stroke-width: 1; + margin: 0 20px 0 0px; + } + .sidebar-text { + padding:8px 0 0; + } + } +} + + +.mobile-sidebar-container { + @media screen and (min-width: 768px) { + display: none; + } + + @media screen and (max-width: 767px) { + display: block; + } +} diff --git a/less/_components/sidebar.less b/less/_components/sidebar.less index c960aeb27..a7abf7ac6 100644 --- a/less/_components/sidebar.less +++ b/less/_components/sidebar.less @@ -70,4 +70,8 @@ padding:8px 0 0; } } + + @media screen and (max-width: 767px) { + display: none; + } } \ No newline at end of file diff --git a/less/styles.less b/less/styles.less index 178856ba5..816b8f482 100644 --- a/less/styles.less +++ b/less/styles.less @@ -34,6 +34,7 @@ @import '_components/projects.less'; @import '_components/resources.less'; @import '_components/sidebar.less'; +@import '_components/mobile-sidebar.less'; @import 'transient.less'; main { @@ -42,4 +43,4 @@ main { .featured-footer.featured-story-dark { &:extend(.featured-newsletter); -} \ No newline at end of file +} diff --git a/static/assets/css/styles.min.css b/static/assets/css/styles.min.css index bb6436a0c..f4f4572a2 100644 --- a/static/assets/css/styles.min.css +++ b/static/assets/css/styles.min.css @@ -269,7 +269,7 @@ * Eric Poirier * * SPDX-License-Identifier: EPL-2.0 -*/#main-sidebar{margin-top:50px}#main-sidebar .sidebar-item{margin-bottom:20px;background-color:#f1f1f1;padding:17px 0 10px}#main-sidebar .sidebar-item.active{background-color:#536a75}#main-sidebar .sidebar-item.active a{color:#fff}#main-sidebar .sidebar-item.active:hover{background-color:#334148}#main-sidebar .sidebar-item:hover:not(.active){background-color:#cbcbcb}#main-sidebar .sidebar-item:hover:not(.active) a{color:#2a383f}#main-sidebar .sidebar-sub-items{background-color:#fff;margin-top:-20px}#main-sidebar .sidebar-sub-items a:hover{font-weight:700}#main-sidebar .sidebar-sub-item{padding:0 0 8px 15px;margin-bottom:0}#main-sidebar .sidebar-sub-item a.active .sidebar-text{font-weight:700}#main-sidebar .sidebar-sub-item:first-child{margin-top:15px}#main-sidebar .sidebar-sub-item:last-child{margin-bottom:15px}#main-sidebar a{display:block}#main-sidebar a .feather{width:40px;height:40px;stroke-width:1;margin:0 20px 0 0}#main-sidebar a .sidebar-text{padding:8px 0 0} +*/#main-sidebar{margin-top:50px}#main-sidebar .sidebar-item{margin-bottom:20px;background-color:#f1f1f1;padding:17px 0 10px}#main-sidebar .sidebar-item.active{background-color:#536a75}#main-sidebar .sidebar-item.active a{color:#fff}#main-sidebar .sidebar-item.active:hover{background-color:#334148}#main-sidebar .sidebar-item:hover:not(.active){background-color:#cbcbcb}#main-sidebar .sidebar-item:hover:not(.active) a{color:#2a383f}#main-sidebar .sidebar-sub-items{background-color:#fff;margin-top:-20px}#main-sidebar .sidebar-sub-items a:hover{font-weight:700}#main-sidebar .sidebar-sub-item{padding:0 0 8px 15px;margin-bottom:0}#main-sidebar .sidebar-sub-item a.active .sidebar-text{font-weight:700}#main-sidebar .sidebar-sub-item:first-child{margin-top:15px}#main-sidebar .sidebar-sub-item:last-child{margin-bottom:15px}#main-sidebar a{display:block}#main-sidebar a .feather{width:40px;height:40px;stroke-width:1;margin:0 20px 0 0}#main-sidebar a .sidebar-text{padding:8px 0 0}@media screen and (max-width:767px){#main-sidebar{display:none}}#mobile-sidebar{margin-top:50px}#mobile-sidebar .related-content,#mobile-sidebar a,#mobile-sidebar a:hover{color:#526f7d}#mobile-sidebar .sidebar-item{margin-bottom:20px;background-color:#f1f1f1;padding:17px 0 10px}#mobile-sidebar .sidebar-item.active{background-color:#536a75}#mobile-sidebar .sidebar-item.active a{color:#fff}#mobile-sidebar .sidebar-item.active:hover{background-color:#334148}#mobile-sidebar .sidebar-item:hover:not(.active){background-color:#cbcbcb}#mobile-sidebar .sidebar-item:hover:not(.active) a{color:#2a383f}#mobile-sidebar .sidebar-sub-items{background-color:#fff;margin-top:-20px}#mobile-sidebar .sidebar-sub-items a:hover{font-weight:700}#mobile-sidebar .sidebar-sub-item{padding:0 0 8px 15px;margin-bottom:0}#mobile-sidebar .sidebar-sub-item a.active .sidebar-text{font-weight:700}#mobile-sidebar .sidebar-sub-item:first-child{margin-top:15px}#mobile-sidebar .sidebar-sub-item:last-child{margin-bottom:15px}#mobile-sidebar a{display:block}#mobile-sidebar a .feather{width:40px;height:40px;stroke-width:1;margin:0 20px 0 0}#mobile-sidebar a .sidebar-text{padding:8px 0 0}@media screen and (min-width:768px){.mobile-sidebar-container{display:none}}@media screen and (max-width:767px){.mobile-sidebar-container{display:block}} /*! * Copyright (c) 2020 Eclipse Foundation, Inc. * From 3e4faca3a63310ef40d1477f6085432d7b430110 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Tue, 20 Oct 2020 09:50:36 -0400 Subject: [PATCH 02/14] update the sidebar and mobile-sidebar Signed-off-by: Yi Liu --- config.toml | 120 ++++++++++++++------------- layouts/membership/section.html | 4 - layouts/partials/footer_suffix.html | 11 +++ layouts/partials/mobile-sidebar.html | 102 +++++++++++++++-------- layouts/partials/sidebar.html | 47 ++++++----- less/_components/mobile-sidebar.less | 12 +-- less/_components/sidebar.less | 1 + static/assets/css/styles.min.css | 2 +- 8 files changed, 171 insertions(+), 128 deletions(-) diff --git a/config.toml b/config.toml index cf21e598d..ad637d38f 100644 --- a/config.toml +++ b/config.toml @@ -79,25 +79,26 @@ themesDir = "node_modules/" weight = 5 -# [[menu.sidebar]] -# name = "Adopters" -# url = "/adopters/" -# weight = 1 -# identifier = "adopters" +[[menu.sidebar]] + name = "Adopters" + url = "/adopters/" + weight = 1 + identifier = "adopters" -# [[menu.sidebar]] -# parent ="adopters" -# name = "How to be Listed as an Adopter" -# url = "/adopters/how-to-be-listed-as-an-adopter" -# pre = "" -# weight = "1" +[[menu.sidebar]] + parent ="adopters" + name = "How to be Listed as an Adopter" + url = "/adopters/how-to-be-listed-as-an-adopter" + pre = "" + weight = "1" -# [[menu.sidebar]] -# parent ="adopters" -# name = "Eclipse IoT Open Testbeds" -# url = "/adopters/testbeds/" -# pre = "" -# weight = "2" +[[menu.sidebar]] + parent ="adopters" + name = "Eclipse IoT Open Testbeds" + url = "/adopters/testbeds/" + pre = "" + weight = "2" + identifier = "testbeds" # [[menu.sidebar]] # parent ="adopters" @@ -106,23 +107,23 @@ themesDir = "node_modules/" # weight = "2" # identifier = "testbeds" -# [[menu.sidebar]] -# parent ="testbeds" -# name = "Asset Tracking" -# url = "/adopters/testbeds/asset-tracking/" -# weight = "1" +[[menu.sidebar]] + parent ="testbeds" + name = "Asset Tracking" + url = "/adopters/testbeds/asset-tracking/" + weight = "1" -# [[menu.sidebar]] -# parent ="testbeds" -# name = "Production Performance Management" -# url = "/adopters/testbeds/production-performance-management/" -# weight = "2" +[[menu.sidebar]] + parent ="testbeds" + name = "Production Performance Management" + url = "/adopters/testbeds/production-performance-management/" + weight = "2" -# [[menu.sidebar]] -# parent ="testbeds" -# name = "Propose a new Testbed" -# url = "/adopters/testbeds/propose-a-new-testbed/" -# weight = "3" +[[menu.sidebar]] + parent ="testbeds" + name = "Propose a new Testbed" + url = "/adopters/testbeds/propose-a-new-testbed/" + weight = "3" [[menu.sidebar]] name = "Members" @@ -171,41 +172,48 @@ themesDir = "node_modules/" pre = "" weight = 3 -[[menu.sidebar]] - parent ="community" - name = "Resources" - url = "/community/resources" - pre = "" - weight = 4 - # [[menu.sidebar]] -# name = "Projects" -# url = "/projects/" -# weight = 6 -# identifier = "projects" +# parent ="community" +# name = "Resources" +# url = "/community/resources" +# pre = "" +# weight = 4 + +[[menu.sidebar]] + name = "Projects" + url = "/projects/" + weight = 6 + identifier = "projects" -# [[menu.sidebar]] -# parent ="projects" -# name = "Sandboxes" -# url = "/projects/sandboxes" -# pre = "" -# weight = 1 +[[menu.sidebar]] + parent ="projects" + name = "Sandboxes" + url = "/projects/sandboxes" + pre = "" + weight = 1 -# [[menu.sidebar]] -# parent ="projects" -# name = "Getting Started" -# url = "/projects/getting-started/" -# pre = "" -# weight = 2 +[[menu.sidebar]] + parent ="projects" + name = "Getting Started" + url = "/projects/getting-started/" + pre = "" + weight = 2 [[menu.sidebar]] parent ="community" name = "Resources" url = "/community/resources/" pre = "" - weight = 7 + weight = 4 identifier = "resources" +[[menu.sidebar]] + parent ="Open IoT Challenge" + name = "test" + url = "/community/resources/test/" + weight = 1 + identifier="open-iot-challenge" + [[menu.sidebar]] parent ="resources" name = "Videos" diff --git a/layouts/membership/section.html b/layouts/membership/section.html index 01bc1c066..af45e3686 100644 --- a/layouts/membership/section.html +++ b/layouts/membership/section.html @@ -20,8 +20,4 @@

Member Testimonials

-{{ end }} - -{{ define "footer-suffix" }} - {{ end }} \ No newline at end of file diff --git a/layouts/partials/footer_suffix.html b/layouts/partials/footer_suffix.html index 0c6fa7020..b98dfbb04 100644 --- a/layouts/partials/footer_suffix.html +++ b/layouts/partials/footer_suffix.html @@ -14,4 +14,15 @@ type: "filteredEvents" }); })(jQuery, document); + +jQuery(document).ready(function($){ + $('#sub-menu').on('change', function () { + var url = $(this).val(); // get selected value + if (url) { // require a URL + window.location = url; // redirect + } + return false; + }); +}); + \ No newline at end of file diff --git a/layouts/partials/mobile-sidebar.html b/layouts/partials/mobile-sidebar.html index 9b204984f..b36f80e57 100644 --- a/layouts/partials/mobile-sidebar.html +++ b/layouts/partials/mobile-sidebar.html @@ -12,52 +12,88 @@ --> {{ if isset .Site.Menus "sidebar" }} -
-
-
-
- -
{{ end }} \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index f6a0f24f8..d2f7aa57d 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -20,30 +20,31 @@ {{$currentSection := .Scratch.Get "currentSection" }} {{ range .Site.Menus.sidebar }} {{$parentItem := . }} - {{ if and (.HasChildren) (eq $currentSection $parentItem.Identifier) }} - + {{ end }} {{ end }} {{ end }} \ No newline at end of file diff --git a/less/_components/mobile-sidebar.less b/less/_components/mobile-sidebar.less index 0cf48b54a..4164ee09f 100644 --- a/less/_components/mobile-sidebar.less +++ b/less/_components/mobile-sidebar.less @@ -33,6 +33,7 @@ .sidebar-sub-items { background-color:#fff; margin-top:-20px; + margin-bottom: 20px; a { &:hover { font-weight:bold; @@ -67,14 +68,3 @@ } } } - - -.mobile-sidebar-container { - @media screen and (min-width: 768px) { - display: none; - } - - @media screen and (max-width: 767px) { - display: block; - } -} diff --git a/less/_components/sidebar.less b/less/_components/sidebar.less index a7abf7ac6..14beb6312 100644 --- a/less/_components/sidebar.less +++ b/less/_components/sidebar.less @@ -37,6 +37,7 @@ .sidebar-sub-items { background-color:#fff; margin-top:-20px; + margin-bottom: 20px; a { &:hover { font-weight:bold; diff --git a/static/assets/css/styles.min.css b/static/assets/css/styles.min.css index f4f4572a2..896aeaabd 100644 --- a/static/assets/css/styles.min.css +++ b/static/assets/css/styles.min.css @@ -269,7 +269,7 @@ * Eric Poirier * * SPDX-License-Identifier: EPL-2.0 -*/#main-sidebar{margin-top:50px}#main-sidebar .sidebar-item{margin-bottom:20px;background-color:#f1f1f1;padding:17px 0 10px}#main-sidebar .sidebar-item.active{background-color:#536a75}#main-sidebar .sidebar-item.active a{color:#fff}#main-sidebar .sidebar-item.active:hover{background-color:#334148}#main-sidebar .sidebar-item:hover:not(.active){background-color:#cbcbcb}#main-sidebar .sidebar-item:hover:not(.active) a{color:#2a383f}#main-sidebar .sidebar-sub-items{background-color:#fff;margin-top:-20px}#main-sidebar .sidebar-sub-items a:hover{font-weight:700}#main-sidebar .sidebar-sub-item{padding:0 0 8px 15px;margin-bottom:0}#main-sidebar .sidebar-sub-item a.active .sidebar-text{font-weight:700}#main-sidebar .sidebar-sub-item:first-child{margin-top:15px}#main-sidebar .sidebar-sub-item:last-child{margin-bottom:15px}#main-sidebar a{display:block}#main-sidebar a .feather{width:40px;height:40px;stroke-width:1;margin:0 20px 0 0}#main-sidebar a .sidebar-text{padding:8px 0 0}@media screen and (max-width:767px){#main-sidebar{display:none}}#mobile-sidebar{margin-top:50px}#mobile-sidebar .related-content,#mobile-sidebar a,#mobile-sidebar a:hover{color:#526f7d}#mobile-sidebar .sidebar-item{margin-bottom:20px;background-color:#f1f1f1;padding:17px 0 10px}#mobile-sidebar .sidebar-item.active{background-color:#536a75}#mobile-sidebar .sidebar-item.active a{color:#fff}#mobile-sidebar .sidebar-item.active:hover{background-color:#334148}#mobile-sidebar .sidebar-item:hover:not(.active){background-color:#cbcbcb}#mobile-sidebar .sidebar-item:hover:not(.active) a{color:#2a383f}#mobile-sidebar .sidebar-sub-items{background-color:#fff;margin-top:-20px}#mobile-sidebar .sidebar-sub-items a:hover{font-weight:700}#mobile-sidebar .sidebar-sub-item{padding:0 0 8px 15px;margin-bottom:0}#mobile-sidebar .sidebar-sub-item a.active .sidebar-text{font-weight:700}#mobile-sidebar .sidebar-sub-item:first-child{margin-top:15px}#mobile-sidebar .sidebar-sub-item:last-child{margin-bottom:15px}#mobile-sidebar a{display:block}#mobile-sidebar a .feather{width:40px;height:40px;stroke-width:1;margin:0 20px 0 0}#mobile-sidebar a .sidebar-text{padding:8px 0 0}@media screen and (min-width:768px){.mobile-sidebar-container{display:none}}@media screen and (max-width:767px){.mobile-sidebar-container{display:block}} +*/#main-sidebar{margin-top:50px}#main-sidebar .sidebar-item{margin-bottom:20px;background-color:#f1f1f1;padding:17px 0 10px}#main-sidebar .sidebar-item.active{background-color:#536a75}#main-sidebar .sidebar-item.active a{color:#fff}#main-sidebar .sidebar-item.active:hover{background-color:#334148}#main-sidebar .sidebar-item:hover:not(.active){background-color:#cbcbcb}#main-sidebar .sidebar-item:hover:not(.active) a{color:#2a383f}#main-sidebar .sidebar-sub-items{background-color:#fff;margin-top:-20px;margin-bottom:20px}#main-sidebar .sidebar-sub-items a:hover{font-weight:700}#main-sidebar .sidebar-sub-item{padding:0 0 8px 15px;margin-bottom:0}#main-sidebar .sidebar-sub-item a.active .sidebar-text{font-weight:700}#main-sidebar .sidebar-sub-item:first-child{margin-top:15px}#main-sidebar .sidebar-sub-item:last-child{margin-bottom:15px}#main-sidebar a{display:block}#main-sidebar a .feather{width:40px;height:40px;stroke-width:1;margin:0 20px 0 0}#main-sidebar a .sidebar-text{padding:8px 0 0}@media screen and (max-width:767px){#main-sidebar{display:none}}#mobile-sidebar{margin-top:50px}#mobile-sidebar .related-content,#mobile-sidebar a,#mobile-sidebar a:hover{color:#526f7d}#mobile-sidebar .sidebar-item{margin-bottom:20px;background-color:#f1f1f1;padding:17px 0 10px}#mobile-sidebar .sidebar-item.active{background-color:#536a75}#mobile-sidebar .sidebar-item.active a{color:#fff}#mobile-sidebar .sidebar-item.active:hover{background-color:#334148}#mobile-sidebar .sidebar-item:hover:not(.active){background-color:#cbcbcb}#mobile-sidebar .sidebar-item:hover:not(.active) a{color:#2a383f}#mobile-sidebar .sidebar-sub-items{background-color:#fff;margin-top:-20px;margin-bottom:20px}#mobile-sidebar .sidebar-sub-items a:hover{font-weight:700}#mobile-sidebar .sidebar-sub-item{padding:0 0 8px 15px;margin-bottom:0}#mobile-sidebar .sidebar-sub-item a.active .sidebar-text{font-weight:700}#mobile-sidebar .sidebar-sub-item:first-child{margin-top:15px}#mobile-sidebar .sidebar-sub-item:last-child{margin-bottom:15px}#mobile-sidebar a{display:block}#mobile-sidebar a .feather{width:40px;height:40px;stroke-width:1;margin:0 20px 0 0}#mobile-sidebar a .sidebar-text{padding:8px 0 0} /*! * Copyright (c) 2020 Eclipse Foundation, Inc. * From 4a301e2574551213e5a654edd0a9edd25dc1c47b Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Thu, 22 Oct 2020 13:34:48 -0400 Subject: [PATCH 03/14] style the dropdown Signed-off-by: Yi Liu --- layouts/partials/mobile-sidebar.html | 17 +++++++++-------- less/_components/mobile-sidebar.less | 6 ++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/layouts/partials/mobile-sidebar.html b/layouts/partials/mobile-sidebar.html index b36f80e57..30caff169 100644 --- a/layouts/partials/mobile-sidebar.html +++ b/layouts/partials/mobile-sidebar.html @@ -22,24 +22,25 @@
- +
+
+ - + - {{ end }} -{{ end }} \ No newline at end of file +
+ + + {{ end }} +{{ end }} \ No newline at end of file From 3d681ae9656fdda6838f9da73eb64fa3c4c390e7 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Fri, 20 Nov 2020 16:02:49 -0500 Subject: [PATCH 06/14] updates according to comments Signed-off-by: Yi Liu --- layouts/_default/baseof.html | 30 ---------------------------- layouts/partials/mobile-sidebar.html | 2 +- less/_components/mobile-sidebar.less | 6 ++++++ 3 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 layouts/_default/baseof.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html deleted file mode 100644 index 6c6b607d4..000000000 --- a/layouts/_default/baseof.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {{ block "head" . }}{{ partial "head.html" . }}{{ end }} - {{ block "head-custom" . }}{{ partial "head_custom.html" . }}{{ end }} - {{ block "head-suffix" . }}{{ partial "head_suffix.html" . }}{{ end }} - - - {{ block "header" . }}{{ partial "header.html" . }}{{ end }} - {{ block "breadcrumbs" . }}{{ if ne .Page.Params.hide_breadcrumb true }}{{ partial "breadcrumbs.html" . }}{{end}}{{ end }} - {{ block "featured_story" . }}{{ partial "featured_story.html" . }}{{ end }} - {{ block "mobile-sidebar" . }}{{ partial "mobile-sidebar.html" . }}{{ end }} - {{ block "main_prefix" . }}{{ partial "main_prefix.html" . }}{{ end }} - {{ block "main" . }}{{ .Content }}{{ end }} - {{ block "main_suffix" . }}{{ partial "main_suffix.html" . }}{{ end }} - {{ block "footer-custom" . }}{{- partial "footer_custom.html" . }}{{ end }} - {{ block "featured_footer" . }}{{ partial "featured_footer.html" . }}{{ end }} - {{ block "footer" . }}{{ partial "footer.html" . }}{{ end }} - {{ block "footer-suffix" . }}{{ partial "footer_suffix.html" . }}{{ end }} - - \ No newline at end of file diff --git a/layouts/partials/mobile-sidebar.html b/layouts/partials/mobile-sidebar.html index 76b7a3ac4..1d5016e1d 100644 --- a/layouts/partials/mobile-sidebar.html +++ b/layouts/partials/mobile-sidebar.html @@ -59,7 +59,7 @@