Skip to content

Commit 8c31b93

Browse files
committed
Prevent overlap of toc with content
1 parent faf3542 commit 8c31b93

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

custom-modern.hbs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
{{!< default}}
1+
{{!< default}}
2+
{{#post}}
23
<div id="modern">
3-
{{#post}}
4-
<div class="{{post_class}}">
5-
<h1 class="title">{{title}}</h1>
6-
{{content}}
4+
<div class="{{post_class}}">
5+
<h1 class="title">{{title}}</h1>
6+
<aside class="gh-sidebar">
7+
<div class="gh-toc"></div>
8+
</aside>
9+
<div class="post-content">{{content}}</div>
710
</div>
8-
{{/post}}
911
</div>
12+
{{/post}}
13+
{{#contentFor 'scripts'}}
14+
<script src="{{asset 'dist/post.js'}}" defer></script>
15+
{{/contentFor}}

src/css/modern.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
.gh-toc {
234234
position: sticky;
235235
top: 4vmin;
236-
max-width: calc((100vw - 800px) / 2);
236+
max-width: calc((100vw - 900px) / 2);
237237
padding-right: 2rem;
238238
}
239239
}

0 commit comments

Comments
 (0)