Optimize #search-toggle display

This commit is contained in:
Unisko PENG, 2023-03-30 11:50:56 +08:00
parent 748c53530a
commit 95cf266d2b
2 changed files with 60 additions and 57 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML>
<html lang="zh-CN" class="sidebar-visible no-js light">
<html lang="zh" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">

View File

@ -1,62 +1,65 @@
@media only screen and (max-width:1439px) {
.sidetoc {
display: none;
}
#menu-bar {
position: fixed !important;
}
.sidetoc {
display: none;
}
#menu-bar {
position: fixed !important;
}
#search-toggle {
display: none;
}
}
@media only screen and (min-width:1440px) {
main {
position: relative;
margin-left: calc((100% - var(--content-max-width))/2 - 120px) !important;
}
.sidetoc {
margin-left: auto;
margin-right: auto;
left: calc(100% + (var(--content-max-width))/4 - 160px);
position: absolute;
}
.pagetoc {
position: fixed;
width: 320px;
height: calc(100vh - var(--menu-bar-height) - 0.67em * 4);
overflow: auto;
}
.pagetoc a {
border-left: 1px solid var(--sidebar-bg);
color: var(--fg) !important;
display: block;
padding-bottom: 5px;
padding-top: 5px;
padding-left: 10px;
text-align: left;
text-decoration: none;
}
.pagetoc a:hover,
.pagetoc a.active {
background: var(--sidebar-bg);
color: var(--sidebar-fg) !important;
}
.pagetoc .active {
background: var(--sidebar-bg);
color: var(--sidebar-fg);
}
.pagetoc .pagetoc-H2 {
padding-left: 20px;
}
.pagetoc .pagetoc-H3 {
padding-left: 40px;
}
.pagetoc .pagetoc-H4 {
padding-left: 60px;
}
.pagetoc .pagetoc-H5 {
display: none;
}
.pagetoc .pagetoc-H6 {
display: none;
}
main {
position: relative;
margin-left: calc((100% - var(--content-max-width))/2 - 120px) !important;
}
.sidetoc {
margin-left: auto;
margin-right: auto;
left: calc(100% + (var(--content-max-width))/4 - 160px);
position: absolute;
}
.pagetoc {
position: fixed;
width: 320px;
height: calc(100vh - var(--menu-bar-height) - 0.67em * 4);
overflow: auto;
}
.pagetoc a {
border-left: 1px solid var(--sidebar-bg);
color: var(--fg) !important;
display: block;
padding-bottom: 5px;
padding-top: 5px;
padding-left: 10px;
text-align: left;
text-decoration: none;
}
.pagetoc a:hover,
.pagetoc a.active {
background: var(--sidebar-bg);
color: var(--sidebar-fg) !important;
}
.pagetoc .active {
background: var(--sidebar-bg);
color: var(--sidebar-fg);
}
.pagetoc .pagetoc-H2 {
padding-left: 20px;
}
.pagetoc .pagetoc-H3 {
padding-left: 40px;
}
.pagetoc .pagetoc-H4 {
padding-left: 60px;
}
.pagetoc .pagetoc-H5 {
display: none;
}
.pagetoc .pagetoc-H6 {
display: none;
}
}