-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Floating TOC bugfix: Scrollbar was not shown for wide code blocks
- Loading branch information
1 parent
2e9eeb2
commit bfc25ac
Showing
16 changed files
with
265 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<hr class="footer-separator" /> | ||
<div class="tags"> | ||
{{ if ne .Type "page" }} | ||
{{ if gt .Params.tags 0 }} | ||
<ul class="flat"> | ||
{{ range .Params.tags }} | ||
{{ $tagUrl := "/tags/"}} | ||
<li class="tag-li"><a href="{{ $tagUrl | relLangURL }}{{ . | urlize }}">{{ . }}</a> | ||
</li> | ||
{{ end }} | ||
</ul> | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
|
||
{{ if isset .Site.Params "github" }} | ||
<div class="back"> | ||
<a href="{{ .Site.Params.github }}/blob/master/content/{{ .File.Path }}" title="github"><i | ||
data-feather="github"></i> Edit this on GitHub</a> | ||
</div> | ||
{{ end }} | ||
|
||
<div class="back"> | ||
<a href="{{ $.Site.BaseURL }}"><span aria-hidden="true">← Back</span></a> | ||
</div> | ||
|
||
|
||
<div class="back"> | ||
{{ if isset .Site.Params "footers" }} | ||
{{ if ne .Type "page" }} | ||
Next time, we'll talk about <i>"{{ range .Site.Params.footers | shuffle | first 1 }}{{ . | ||
}}"</i>{{ end | ||
}} | ||
{{ end }} | ||
{{ end }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Inspired by https://iamsorush.com/posts/table-of-content-blog/ --> | ||
<div class="article-nav" id="article-nav-id"> | ||
<div class="post"> | ||
{{ partial "post_header.html" . }} | ||
|
||
<!-- The TOC will be static on mobile decides --> | ||
<aside class="show-on-mobile toc"> | ||
<header> | ||
<h3>Contents</h3> | ||
</header> | ||
{{.TableOfContents}} | ||
</aside> | ||
|
||
{{ .Content }} | ||
|
||
</div> | ||
<nav class="hide-on-mobile section-nav"> | ||
{{ .TableOfContents }} | ||
</nav> | ||
</div> | ||
<div class="post"> | ||
{{ partial "article_footer.html" . }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="post"> | ||
{{ partial "post_header.html" . }} | ||
|
||
<!-- Inline TOC --> | ||
{{ if and (gt .WordCount 400 ) (or (eq .Site.Params.toc "static") (eq .Site.Params.toc "true") )}} | ||
<aside class="toc"> | ||
<header> | ||
<h3>Contents</h3> | ||
</header> | ||
{{.TableOfContents}} | ||
</aside> | ||
{{ end }} | ||
{{ .Content }} | ||
{{ partial "article_footer.html" . }} | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.