Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 68 additions & 18 deletions assets/css/v2/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
--color-footer-text: #E2E2E2;
--color-product-title: #8D8D8D;

--sidebar-margin: 48px;
--sidebar-margin: 24px;
--sidebar-line-box-side-length: 8px;
--sidebar-line-box-top: 6px;
--sidebar-line-box-left: 12px;
--sidebar-width: 24rem;
--sidebar-line-width: 11.5px;
--side-gutter-width: 20rem;
--text-content-width-iphone-13: 30rem;
--text-content-width-mbp-14: 40rem;
Expand Down Expand Up @@ -350,6 +351,7 @@ nav {
width: 24rem;
position: sticky;
top: 0;
height: 100vh;
}

.sidebar .product-selector-button {
Expand All @@ -366,7 +368,7 @@ nav {
}

.sidebar .product-selector-button .selector-icon {
height:24px;
height: 24px;
width: 24px;
}

Expand Down Expand Up @@ -400,8 +402,19 @@ nav {
font-size: 1rem;
}

.sidebar .sidebar-navigation {
/* Sidebar scroller */
.sidebar .scrollbar-container {
width: 100%;
max-height: 100vh;
overflow: hidden;
scrollbar-gutter: stable;
}

.sidebar .scrollbar-container:hover {
overflow: auto;
}

.sidebar .sidebar-navigation {
margin-left: var(--sidebar-margin);
}

Expand All @@ -410,7 +423,6 @@ nav {
margin-left: 0;
padding-left: 0;
list-style-type: none;
padding-right: 1.5rem;
}

.sidebar ul :not(.sidebar-navigation) ul {
Expand All @@ -435,10 +447,12 @@ nav {
position: relative;
}

.sidebar .sidebar-navigation .parent-box.opened,
.sidebar .sidebar-navigation .box.opened {
display: none;
}

.toggle-checkbox:checked ~ .collapsible-header .parent-box.expand,
.toggle-checkbox:checked ~ .collapsible-header .box.expand {
display: none;
}
Expand All @@ -447,6 +461,10 @@ nav {
display: block;
}

.toggle-checkbox:checked ~ .collapsible-header .parent-box.opened {
display: inline-block;
}

.toggle-checkbox:checked ~ .collapsible-header .box.opened {
display: block;
}
Expand All @@ -457,8 +475,8 @@ nav {
position: absolute;
border-left: black 1px solid;
left: -8.5px;
top: -21.5px;
height: calc(100% + 12.5px);
top: -22.5px;
height: calc(100% + 13.5px);
}

/* Every other Sidebar Partial Horizontal Lines */
Expand All @@ -471,7 +489,7 @@ nav {
position: absolute;
border-top: black 1px solid;
left: -11.5px;
width: 11.5px;
width: var(--sidebar-line-width);
top: 50%;
}

Expand All @@ -480,7 +498,7 @@ nav {
position: absolute;
border-top: black 1px solid;
left: -12.5px;
width: 11.5px;
width: var(--sidebar-line-width);
top: 50%;
}

Expand All @@ -489,7 +507,7 @@ nav {
position: absolute;
border-top: black 1px solid;
left: -11.5px;
width: 11.5px;
width: var(--sidebar-line-width);
top: 50%;
}

Expand All @@ -501,6 +519,16 @@ nav {
margin-top: 16px;
}

.sidebar .sidebar-navigation ul li .parent-box-link {
content: '';
background-color: black;
position: absolute;
width: 1px;
height: var(--sidebar-line-box-side-length);
margin-top: var(--sidebar-line-box-top);
left: calc(0px - var(--sidebar-line-box-left));
}

.sidebar .sidebar-navigation ul li .box-link {
content: '';
background-color: black;
Expand All @@ -511,6 +539,16 @@ nav {
left: var(--sidebar-line-box-left);
}

.sidebar .sidebar-navigation ul li .parent-box {
content: '';
display: inline-block;
width: var(--sidebar-line-box-side-length);
height: var(--sidebar-line-box-side-length);
vertical-align: middle;
margin-left: -12px;
margin-top: -4px;
}

.sidebar .sidebar-navigation ul li .box {
content: '';
position: absolute;
Expand Down Expand Up @@ -544,24 +582,36 @@ nav {
}

/* First Sidebar Nav Vertical Line */
.sidebar .sidebar-navigation .parent-collapsible-content::before{
.sidebar .sidebar-navigation .parent-collapsible-content {
position: relative;
}

.sidebar .sidebar-navigation .parent-collapsible-content::before {
content: '';
position: absolute;
border-left: black 1px solid;
left: 0;
bottom: 1.55rem;
height: calc(100% - 5.65rem);
left: -24px;
top: 10px;
height: calc(100% - 9px - 10px);
}

/* First Sidebar Nav Horizontal Lines */
.sidebar .sidebar-navigation .parent-collapsible-content .parent-collapsible-content-item::before,
.sidebar .sidebar-navigation .parent-collapsible-content .parent-collapsible-content-item::after {
.sidebar .sidebar-navigation .parent-collapsible-content .parent-box::before {
content: '';
display: block;
border-top: black 1px solid;
margin-left: -12px;
margin-top: 50%;
width: var(--sidebar-line-width);
}

.parent-collapsible-content .parent-box-link::after {
content: '';
position: absolute;
border-top: black 1px solid;
left: 0;
margin-top: 0.6rem;
width: 0.75rem;
left: -11.5px;
width: var(--sidebar-line-width);
top: 50%;
}

.row {
Expand Down
50 changes: 26 additions & 24 deletions layouts/partials/sidebar-v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,31 @@
</div>
{{ end }}
</div>
<div class="sidebar-navigation">
<ul class="parent-collapsible-content">
{{ range .FirstSection.Pages.ByWeight }}
<li class="parent-collapsible-content-item">
{{ if eq .Kind "section" }}
<input type="checkbox" id="toggle-{{ .File.UniqueID }}" class="toggle-checkbox" style="display: none;">
<label for="toggle-{{ .File.UniqueID }}" class="collapsible-header">
{{ if .Pages }}
<span class="box expand"></span>
<span class="box opened"></span>
<div class="scrollbar-container">
<div class="sidebar-navigation">
<ul class="parent-collapsible-content">
{{ range .FirstSection.Pages.ByWeight }}
<li class="parent-collapsible-content-item">
{{ if eq .Kind "section" }}
<input type="checkbox" id="toggle-{{ .File.UniqueID }}" class="toggle-checkbox" style="display: none;">
<label for="toggle-{{ .File.UniqueID }}" class="collapsible-header">
{{ if .Pages }}
<span class="parent-box expand"></span>
<span class="parent-box opened"></span>
{{ end }}
{{ .Title }}
</label>
{{ partial "sidebar-list-pages.html" (dict "context" . "currentUrl" $.Permalink) }}
{{ else if eq .Kind "page" }}
{{ if eq $.Permalink .Permalink }}
<span class="parent-box current"></span>
{{ else }}
<span class="parent-box-link"></span>
{{ end }}
{{ .Title }}
</label>
{{ partial "sidebar-list-pages.html" (dict "context" . "currentUrl" $.Permalink) }}
{{ else if eq .Kind "page" }}
{{ if eq $.Permalink .Permalink }}
<span class="box current"></span>
{{ else }}
<span class="box-link"></span>
<a href="{{ .Permalink }}" style="{{if eq $.Permalink .Permalink}}font-weight: bold;{{end}}">{{ .Title }} </a>
{{ end }}
<a href="{{ .Permalink }}" style="{{if eq $.Permalink .Permalink}}font-weight: bold;{{end}}">{{ .Title }} </a>
{{ end }}
</li>
{{ end }}
</ul>
</div>
</li>
{{ end }}
</ul>
</div>
</div>