Skip to content

Commit 184dca1

Browse files
committed
update
1 parent 709913d commit 184dca1

File tree

4 files changed

+44
-44
lines changed

4 files changed

+44
-44
lines changed

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bootstrapIntelliSense": {
3+
"enable": true,
4+
"bsVersion": "5.3.5",
5+
"showSuggestions": true,
6+
"autoComplete": true
7+
}
8+
}

_layouts/default.html

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -164,27 +164,27 @@
164164

165165
<body class="d-flex flex-column min-vh-100">
166166
{% capture logo_path %}{{ site.logo }}{% endcapture %}
167-
<header class="border-bottom sticky-top z-3 bg-body">
167+
<header class="border-bottom sticky-top bg-body">
168168
<nav class="navbar navbar-expand-sm">
169169
<div class="container-fluid">
170-
<a class="navbar-brand d-flex align-items-center gap-2" href="{{ '/' | relative_url }}" style="min-height: 64px;">
170+
<a class="navbar-brand d-flex align-items-center gap-2" href="{{ '/' | relative_url }}" style="min-height: 56px;">
171171
{% unless logo_path == empty %}
172172
<img width="32" height="32" src="{{ logo_path | relative_url }}" alt="{{ site.title }}">
173173
{% endunless %}
174174
<span class="fw-bold">{{ site.title | escape_once | strip }}</span>
175175
</a>
176-
<div>
176+
<div class="border rounded-3 overflow-hidden">
177177
{% if page.sidebar and page.sidebar.nav %}
178-
<button class="btn btn-outline-secondary d-xl-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#sidebar">
178+
<button class="border-0 btn btn-outline-secondary d-xl-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#sidebar">
179179
<i class="bi bi-list text-body"></i>
180180
</button>
181181
{% endif %}
182182
{% if page.toc %}
183-
<button class="btn btn-outline-secondary d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#toc">
183+
<button class="border-0 btn btn-outline-secondary d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#toc">
184184
<i class="bi bi-list-ul text-body"></i>
185185
</button>
186186
{% endif %}
187-
<button class="btn btn-outline-secondary d-sm-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbar">
187+
<button class="border-0 btn btn-outline-secondary d-sm-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbar">
188188
<i class="bi bi-three-dots text-body"></i>
189189
</button>
190190
</div>
@@ -205,44 +205,34 @@
205205

206206
<main class="flex-fill">
207207
<div class="d-flex">
208-
{% if page.sidebar and page.sidebar.nav %}
209-
<aside class="z-2 offcanvas-xl offcanvas-start flex-shrink-0 sticky-xl-top overflow-auto border-end" data-bs-backdrop="false" data-bs-scroll="true" id="sidebar" style="width: 240px; height: calc(100vh - 80px); top: 80px;">
210-
<div class="list-group list-group-flush small">
211-
{% for navname in page.sidebar.nav %}
212-
{% assign navigation = site.data.navigation[navname] %}
213-
{% for nav in navigation %}
214-
{% if nav.url %}
215-
<a class="list-group-item list-group-item-action fw-semibold{% if nav.url == page.url %} active{% endif %}" href="{{ nav.url | relative_url }}">{{ nav.title }}</a>
216-
{% else %}
217-
<span class="list-group-item fw-semibold">{{ nav.title }}</span>
218-
{% endif %}
219-
{% if nav.children != null %}
220-
<div class="list-group-item py-0 pe-0 list-group list-group-flush small">
221-
{% for child in nav.children %}
222-
<a class="list-group-item list-group-item-action{% if child.url == page.url %} active{% endif %}" href="{{ child.url | relative_url }}">{{ child.title }}</a>
223-
{% endfor %}
224-
</div>
225-
{% endif %}
226-
{% endfor %}
208+
<aside class="offcanvas-xl offcanvas-start flex-shrink-0 sticky-xl-top overflow-auto border-end d-flex flex-column" data-bs-backdrop="true" data-bs-scroll="false" id="sidebar" style="width: 240px; height: calc(100vh - 73px); top: 73px;">
209+
<div class="flex-fill list-group list-group-flush small">
210+
{% for nav in site.data.navigation.docs %}
211+
{% if nav.url %}
212+
<a class="list-group-item list-group-item-action fw-semibold{% if nav.url == page.url %} active{% endif %}" href="{{ nav.url | relative_url }}">{{ nav.title }}</a>
213+
{% else %}
214+
<span class="list-group-item fw-semibold">{{ nav.title }}</span>
215+
{% endif %}
216+
{% if nav.children != null %}
217+
<div class="list-group-item py-0 pe-0 list-group list-group-flush small">
218+
{% for child in nav.children %}
219+
<a class="list-group-item list-group-item-action{% if child.url == page.url %} active{% endif %}" href="{{ child.url | relative_url }}">{{ child.title }}</a>
220+
{% endfor %}
221+
</div>
222+
{% endif %}
227223
{% endfor %}
228224
</div>
225+
<div class="p-2 small">
226+
<div class="small">
227+
<div>Copyright &copy; {% assign site_time = site.time | date: '%Y' %}{% if site.footer.since and site_time != site.footer.since %}{{ site.footer.since }} - {% endif %}{{ site_time }} <a class="text-body text-decoration-none" href="{{ site.copyright_url | default: site.url }}">{{ site.copyright | default: site.title | escape_once | strip }}</a>.</div>
228+
<div>Powered by <a class="text-body text-decoration-none" href="https://jekyllrb.com">Jekyll</a> &amp; <a class="text-body text-decoration-none" href="https://getbootstrap.com">Bootstrap</a>.</div>
229+
<div><a class="text-body text-decoration-none" href="{{ site.icp.url }}">{{ site.icp.name }}</a></div>
230+
</div>
231+
</div>
229232
</aside>
230-
{% endif %}
231233
<article class="flex-fill pt-3">{{ content }}</article>
232234
</div>
233235
</main>
234-
235-
<footer class="bg-body-tertiary border-top">
236-
<div class="container-fluid py-3 py-md-4 text-body-secondary">
237-
<div class="small d-flex gap-2 flex-wrap justify-content-between">
238-
<div>
239-
Copyright &copy; {% assign site_time = site.time | date: '%Y' %}{% if site.footer.since and site_time != site.footer.since %}{{ site.footer.since }} - {% endif %}{{ site_time }} <a class="text-body text-decoration-none" href="{{ site.copyright_url | default: site.url }}">{{ site.copyright | default: site.title | escape_once | strip }}</a>.
240-
Powered by <a class="text-body text-decoration-none" href="https://jekyllrb.com">Jekyll</a> &amp; <a class="text-body text-decoration-none" href="https://getbootstrap.com">Bootstrap</a>.
241-
</div>
242-
<div><a class="text-body text-decoration-none" href="{{ site.icp.url }}">{{ site.icp.name }}</a></div>
243-
</div>
244-
</div>
245-
</footer>
246236
<script src="{{ '/assets/js/bootstrap.bundle.min.js' | relative_url }}"></script>
247237
</body>
248238

_layouts/single.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ <h1><a class="text-body text-decoration-none" href="{{ page.url | absolute_url }
1313
{{ content }}
1414
</section>
1515
{% if page.toc %}
16-
<div class="z-2 offcanvas-md offcanvas-end flex-shrink-0 sticky-md-top border-top border-start d-flex flex-column" data-bs-scroll="true" data-bs-backdrop="false" id="toc" style="width: 240px; height: calc(100vh - 80px); top: 80px;">
17-
<div class="container-fluid py-2 border-bottom fw-semibold">目录</div>
18-
<nav id="tocnav" class="overflow-auto small flex-fill">
19-
{% include toc.html class="list-unstyled list-group-item p-0 border-0 list-group small" submenu_class="list-unstyled list-group-item border-0 py-0 pe-0 list-group" anchor_class="border-0 list-group-item list-group-item-action" sanitize=true html=content h_min=1 h_max=6 skip_no_ids=true %}
20-
</nav>
16+
<div>
17+
<div class="offcanvas-md offcanvas-end flex-shrink-0 sticky-md-top border border-end-0 d-flex flex-column" data-bs-scroll="true" data-bs-backdrop="true" id="toc" style="width: 240px; max-height: calc(100vh - 72px); top: 72px;">
18+
<div class="container-fluid py-2 border-bottom fw-semibold">目录</div>
19+
<nav id="tocnav" class="overflow-auto small flex-fill">
20+
{% include toc.html class="list-unstyled list-group-item p-0 border-0 list-group small" submenu_class="list-unstyled list-group-item border-0 py-0 pe-0 list-group" anchor_class="border-0 list-group-item list-group-item-action" sanitize=true html=content h_min=1 h_max=6 skip_no_ids=true %}
21+
</nav>
22+
</div>
2123
</div>
2224
{% endif %}
2325
</div>

_sass/theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$theme-header-height: 80px;
1+
$theme-header-height: 73px;
22

33
img {
44
max-width: 100%;

0 commit comments

Comments
 (0)