Squashed 'themes/codex/' content from commit da2d16a
git-subtree-dir: themes/codex git-subtree-split: da2d16a4f95fc37e71548dfc139d51e22ebb09bd
This commit is contained in:
51
layouts/_default/single.html
Normal file
51
layouts/_default/single.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{{ define "styles" }}
|
||||
{{ $.Scratch.Set "style_opts" (dict "src" "scss/pages/post.scss" "dest" "css/post.css") }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2 2006" }}
|
||||
|
||||
<div class="flex-wrapper">
|
||||
<div class="post__container">
|
||||
<div class="post">
|
||||
<header class="post__header">
|
||||
<h1 id="post__title">{{.Title}}</h1>
|
||||
{{ if .Date }}<time datetime="{{ .Date }}" class="post__date">{{ .Date.Format $dateFormat }}</time> {{ end }}
|
||||
</header>
|
||||
<article class="post__content">
|
||||
{{ partial "anchored-headings.html" .Content }}
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ partial "tags.html" .}} {{ partial "post-pagination.html" .}}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
<footer class="post__footer">
|
||||
{{ partial "social-icons.html" .}}
|
||||
<p>{{ replace .Site.Copyright "{year}" now.Year }}</p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
{{ if .Params.toc }}
|
||||
<div class="toc-container">
|
||||
{{ if .Site.Params.showPageTitleInTOC }} <div class="toc-post-title">{{ .Title }}</div> {{ end }}
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ define "scripts" }}
|
||||
{{/* Hardcode a specific prismjs version to avoid a redirect on every page load. */}}
|
||||
<script src="https://unpkg.com/prismjs@1.20.0/components/prism-core.min.js"></script>
|
||||
|
||||
{{/* Automatically loads the needed languages to highlight the code blocks. */}}
|
||||
<script src="https://unpkg.com/prismjs@1.20.0/plugins/autoloader/prism-autoloader.min.js"
|
||||
data-autoloader-path="https://unpkg.com/prismjs@1.20.0/components/"></script>
|
||||
|
||||
{{ if .Params.toc }}
|
||||
<script src="/js/table-of-contents.js"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user