Skip to content

Commit

Permalink
feat: hiden sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirrito-k423 committed Apr 11, 2024
1 parent 3d84d96 commit 70beb64
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
11 changes: 9 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ <h1 style="text-align:left; font-size: xx-large;color:black;">{{ .Params.title }
<!-- {{ (len .TableOfContents) }} -->
{{ if gt (len .TableOfContents) 32 }}
<div class="sidebar">
<div class="accordion" id="markdownToc">
{{ .TableOfContents }}
<div class="clickable" style="background-color: #afc8ff;">
<!-- <img src="/icons/pen-fill.svg" alt="Bootstrap Icons" class="icon"> -->
<span style="margin: 0 10px;">目录</span>
</div>
<div class="hidden" style="background-color: #cfdeff">
<div class="accordion" id="markdownToc">
{{ .TableOfContents }}
</div>
</div>

</div>
{{ else }}
<!-- <p>No table of contents available.</p> -->
Expand Down
11 changes: 9 additions & 2 deletions layouts/events/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ <h1 style="text-align:left; font-size: xx-large;color:black;">{{ .Params.title }

{{ if gt (len .TableOfContents) 32 }}
<div class="sidebar">
<div class="accordion" id="markdownToc">
{{ .TableOfContents }}
<div class="clickable" style="background-color: #afc8ff;">
<!-- <img src="/icons/pen-fill.svg" alt="Bootstrap Icons" class="icon"> -->
<span style="margin: 0 10px;">目录</span>
</div>
<div class="hidden" style="background-color: #cfdeff">
<div class="accordion" id="markdownToc">
{{ .TableOfContents }}
</div>
</div>

</div>
{{ else }}
<!-- <p>No table of contents available.</p> -->
Expand Down
11 changes: 9 additions & 2 deletions layouts/news/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,16 @@ <h1 style="text-align:left; font-size: xx-large; color:black;">{{ .Params.title

{{ if gt (len .TableOfContents) 32 }}
<div class="sidebar">
<div class="accordion" id="markdownToc">
{{ .TableOfContents }}
<div class="clickable" style="background-color: #afc8ff;">
<!-- <img src="/icons/pen-fill.svg" alt="Bootstrap Icons" class="icon"> -->
<span style="margin: 0 10px;">目录</span>
</div>
<div class="hidden" style="background-color: #cfdeff">
<div class="accordion" id="markdownToc">
{{ .TableOfContents }}
</div>
</div>

</div>
{{ else }}
<!-- <p>No table of contents available.</p> -->
Expand Down
2 changes: 1 addition & 1 deletion static/css/style4Publications.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.publications-column{
text-align: left;
padding: 1em calc(50% - 520px);
color: rgb(146, 157, 192);
color: rgb(88, 94, 116);
background-color: rgb(247, 247, 247);

}
Expand Down
6 changes: 6 additions & 0 deletions static/css/style6Events.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@
word-break: break-word; /* 为了兼容性,同时使用这两个属性 */
}

.accordion {
margin: 0 25px 0 0px;
/* 上下保持0,左右各10px空间 */
/* 如果需要,可以添加其他样式,比如宽度或背景色 */
}

.sidebar .accordion a{
text-decoration: none;
}
Expand Down
2 changes: 1 addition & 1 deletion static/css/style8Admonition.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ img {
.hidden{
display: none;
border-radius: 10px; /* 圆角半径 */
padding: 10px;
padding: 0px 10px 10px 10px;
background-color: white;
}

Expand Down

0 comments on commit 70beb64

Please sign in to comment.