Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc83393e

Browse files
committed
fix: Fix scrolling totoc item, content being behind navbar (#6)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
1 parentfd65333 commitc83393e

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

‎sass/rustic.scss‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,26 @@
33
@import"_markdown.scss";
44
@import"_open-props.scss";
55

6+
html {
7+
scroll-padding-top:var(--size-10);
8+
}
9+
610
.layout {
7-
height:100vh;
11+
min-height:100vh;
812
display:grid;
913
grid-template-rows:auto1frauto;
1014
min-height:100vh;
1115
}
1216

13-
.header-menu {
14-
position:fixed;
17+
header {
18+
position:sticky;
1519
top:0;
16-
width:100%;
1720
z-index:var(--layer-important);
21+
}
22+
23+
.header-menu {
1824
display:flex;
25+
grid-area:1;
1926
align-items:center;
2027
background-color:var(--primary-color);
2128
justify-content:space-between;
@@ -146,7 +153,6 @@
146153
align-items:center;
147154
background-color:var(--primary-color);
148155
justify-content:center;
149-
padding-top:var(--size-8);
150156
padding-left:var(--size-5);
151157
padding-right:var(--size-5);
152158

@@ -202,10 +208,10 @@
202208
}
203209

204210
.main-content {
211+
grid-area:2;
205212
background-color:var(--grey-6);
206213
display:flex;
207214
flex-direction:row;
208-
padding-top:var(--size-10);
209215
margin-bottom:var(--size-5);
210216

211217
.content {
@@ -273,6 +279,7 @@
273279

274280

275281
footer {
282+
grid-area:3;
276283
display:block;
277284
text-align:center;
278285
background-color:var(--primary-color);

‎templates/index.html‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@
2222
</head>
2323

2424
<bodyclass="layout">
25-
<headerclass="header-menu">
26-
{% block header %}
27-
{{ macros::render_header() }}
28-
{% endblock header %}
25+
<header>
26+
<divclass="header-menu">
27+
{% block header %}
28+
{{ macros::render_header() }}
29+
{% endblock header %}
30+
</div>
31+
2932
</header>
3033
<main>
3134
{% block hero %}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp