Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sidebar being too tall #1505

Merged
merged 5 commits into from
Nov 3, 2023
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
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SHELL := /usr/bin/env bash

define newline


Expand All @@ -14,7 +16,7 @@ endif

# Installs npm packages and gems.
install: ruby-version-check
npm install -g netlify-cli
npm install -g netlify-cli@16.5.1
yarn install
bundle install

Expand All @@ -33,3 +35,9 @@ serve:
clean:
-rm -rf dist
-rm -rf app/.jekyll-cache
-rm -rf app/.jekyll-metadata
-rm -rf .jekyll-cache/vite

kill-ports:
@JEKYLL_PROCESS=$$(lsof -ti:4000) && kill -9 $$JEKYLL_PROCESS || true
@VITE_PROCESS=$$(lsof -ti:3036) && kill -9 $$VITE_PROCESS || true
45 changes: 10 additions & 35 deletions app/_assets/styles/custom/components/_sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
//
// Sidebarm, sidebar button
//
//

$sidebar-width: $sidebarWidth; // comes from VuePress core styles
$sidebar-top-spacing: $navbar-height-large;
Expand All @@ -13,36 +13,20 @@ $sidebar-button-left-spacing: 1.5rem;

// Sidebar

.sidebar-wrapper {
position: relative;

&:after {
position: absolute;
top: 0; right: 0; bottom: 0;
z-index: 0;
display: block;
height: 100%;
width: 100vw;
content: "";
background-color: $gray-1;
}
}

.sidebar {
position: fixed;
top: 0;
bottom: 0;
overflow-y: auto;
left: auto;
overflow-x: visible !important;
background: none;
// background-color: #fff;
font-size: $base-font-size;
width: $sidebar-width;
padding-top: $sidebar-top-spacing;

.nav-item {
margin: 0;
> a {

>a {
padding: 1rem;
}
}
Expand All @@ -61,10 +45,6 @@ $sidebar-button-left-spacing: 1.5rem;
}
}

.sidebar-links {

}

a.sidebar-link {

&:hover {
Expand All @@ -80,7 +60,7 @@ a.sidebar-link {
// Sidebar button

.sidebar-button {
top: calc( (#{$navbarHeight} / 2) - (#{$sidebar-button-size} / 2) );
top: calc((#{$navbarHeight} / 2) - (#{$sidebar-button-size} / 2));
left: $sidebar-button-left-spacing;
display: none;
padding: 0;
Expand All @@ -105,14 +85,9 @@ a.sidebar-link {
@media (min-width: $MQNarrowMid + 1) {
.sidebar {
position: sticky;
// top: $navbarHeight;
left: auto;
bottom: auto;
// padding-top: $navbarHeight;
}

.page {
// padding-left: 15rem;
top: $navbarHeight;
bottom: 0;
height: calc(100vh - #{$navbarHeight});
}

.theme-container.no-sidebar .sidebar {
Expand Down
2 changes: 0 additions & 2 deletions app/_assets/styles/vuepress-core/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
}
& > .sidebar-links {
padding: 1.5rem 0;
overflow-y: scroll;
height: 100vh;

& > li > a.sidebar-link {
font-size: 1.1em;
Expand Down
7 changes: 7 additions & 0 deletions jekyll-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ mesh_product_name_path: kuma
mesh_namespace: kuma-system
mesh_cp_name: kuma-control-plane
mesh_base_url: https://kuma.io
# Prefix for the values of "--set" flag for "kumactl install [...]" or
# "helm install [...]" commands.
# It's useful for projects based on Kuma, which expects Kuma options
# to be prefixed with for example "kuma."
# kumactl install control-plane \
# --set "{{site.set_flag_values_prefix}}experimental.ebpf.enabled=true"
set_flag_values_prefix: ""

# Helm commands
mesh_helm_repo: kuma/kuma
Expand Down
2 changes: 1 addition & 1 deletion jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ include:
- installer.sh
- robots.txt

# Product name variables
mesh_product_name: Kuma
mesh_product_name_path: kuma
mesh_namespace: kuma-system
mesh_cp_name: kuma-control-plane
# Product name variables
# Prefix for the values of "--set" flag for "kumactl install [...]" or
# "helm install [...]" commands.
# It's useful for projects based on Kuma, which expects Kuma options
Expand Down
Loading