Skip to content

Commit

Permalink
change sidebar header size (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
CritasWang authored Feb 26, 2025
1 parent f238ae0 commit 3817457
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 40 deletions.
43 changes: 3 additions & 40 deletions src/.vuepress/components/Sidevar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Sidebar>
<Sidebar class="iotdb-sidebar">
<template #top>
<p class="vp-sidebar-header" style="margin-top: 1rem;">
<p class="vp-sidebar-header iotdb-sidebar-header">
<span class="vp-sidebar-title">{{(sidebarItems && sidebarItems.length>0) ? sidebarItems[0]?.text: ''}}</span>
</p>
<div class="sidebar-top-wrapper">
Expand Down Expand Up @@ -72,41 +72,4 @@ watch(
},
{ immediate: true },
);
</script>

<style lang="scss">
.vp-sidebar > ul > li:nth-child(1){
display: none;
}
.vp-sidebar > .vp-sidebar-links {
padding: 0.25rem 0;
}
.switch-list {
display: flex;
text-align: center;
width: 150px;
margin-right: 12px;
border-radius: 16px;
background-color: #f0f1fa;
list-style-type: none;
padding: 4px;
margin: 0;
margin-left: 16px;
.switch-type {
padding: 1px 9px;
flex: 1;
cursor: pointer;
border-radius: 16px;
background-color: transparent;
font-size: 1.1em;
line-height: 1.5;
color: #656a85;
}
.switch-active {
background-color: #495ad4;
color: #fff;
}
}
</style>
</script>
45 changes: 45 additions & 0 deletions src/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,51 @@ div[class*='language-'] pre code {
color: var(--code-c-text);
}

.iotdb-sidebar {
.iotdb-sidebar-header {
margin-top: 1rem;
margin-bottom: 0.25rem;
font-size: 1.35rem;
font-weight: 500;
white-space: nowrap;
}
&.vp-sidebar > ul > li:nth-child(1){
display: none;
}
&.vp-sidebar > .vp-sidebar-links {
padding: 0.25rem 0;
}
.switch-list {
display: flex;
text-align: center;
width: 150px;
margin-right: 12px;
border-radius: 16px;
background-color: #f0f1fa;
list-style-type: none;
padding: 4px;
margin: 0 0 0 16px;

.switch-type {
padding: 1px 9px;
flex: 1;
cursor: pointer;
border-radius: 16px;
background-color: transparent;
font-size: 1.1em;
line-height: 1.5;
color: #656a85;
font-weight: 400;
white-space: nowrap;
}

.switch-active {
background-color: #495ad4;
color: #fff;
}
}
}

.home {
.vp-hero-title {
background: linear-gradient(90deg, rgb(158, 40, 120) 0%, rgb(103, 56, 189) 100%);
Expand Down

0 comments on commit 3817457

Please sign in to comment.