18 changed files with 129 additions and 251 deletions
@ -1,9 +1,19 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="{{ .Site.LanguageCode }}"> |
||||
{{- partial "head.html" . -}} |
||||
{{- partial "head" . -}} |
||||
|
||||
|
||||
<body> |
||||
{{- partial "header.html" . -}} |
||||
<div id="content">{{- block "main" . }}{{- end }}</div> |
||||
{{- partial "footer.html" . -}} |
||||
{{- partial "header" . -}} |
||||
|
||||
|
||||
<div id="content"> |
||||
{{- block "main" . }}{{- end }} |
||||
</div> |
||||
|
||||
{{- partial "footer" . -}} |
||||
{{- partial "footer_extra" . -}} |
||||
|
||||
{{- template "_internal/google_analytics_async.html" . -}} |
||||
</body> |
||||
</html> |
||||
|
@ -1,33 +0,0 @@
|
||||
{{ define "main" }} |
||||
{{ partial "header" . }} |
||||
|
||||
<div class="content"> |
||||
<div class="container"> |
||||
<div class="row justify-content-center"> |
||||
<div class="col-md-12 col-lg-10"> |
||||
<div class="markdown"> |
||||
<h1 class="mx-0 mx-md-4"> |
||||
{{ if eq .Title "Tags" }} |
||||
{{ i18n "title_tags" . }} |
||||
{{ else }} |
||||
{{ .Title }} |
||||
{{ end }} |
||||
</h1> |
||||
|
||||
<p class="h4"> |
||||
{{ $data := .Data }} |
||||
{{ range $key, $value := .Data.Terms.Alphabetical }} |
||||
<a href="{{ $value.Name | urlize }}" class="badge badge-light text-monospace"> |
||||
{{ $value.Name }} |
||||
<span class="badge badge-secondary">{{ $value.WeightedPages.Count }}</span> |
||||
</a> |
||||
{{ end }} |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
{{ partial "footer" . }} |
||||
{{ end }} |
@ -1,32 +0,0 @@
|
||||
{{ define "main" }} |
||||
{{ partial "header" . }} |
||||
|
||||
<div class="content"> |
||||
<div class="container"> |
||||
<div class="row justify-content-center"> |
||||
<div class="col-md-12 col-lg-10"> |
||||
<div class="markdown"> |
||||
{{ partial "content" . }} |
||||
</div> |
||||
|
||||
<div class="mx-0 mx-md-4 posts"> |
||||
<h1>{{ i18n "blog_posts" }}</h1> |
||||
|
||||
<ul class="mb-5 list-unstyled"> |
||||
{{ range (.Paginate (.Pages.GroupByDate "Jan, 2006" "desc")).PageGroups }} |
||||
<li class="groupby">{{ .Key }}</li> |
||||
{{ range sort .Pages "Date" "desc" }} |
||||
{{ partial "list" . }} |
||||
{{ end }} |
||||
{{ end }} |
||||
</ul> |
||||
|
||||
{{ template "_internal/pagination.html" . }} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
{{ partial "footer" . }} |
||||
{{ end }} |
@ -1,127 +0,0 @@
|
||||
{{ define "main" }} |
||||
{{ $isTocEnabled := or (.Params.toc) (and (.Site.Params.toc) (or (not (isset .Params "toc")) (.Params.toc))) }} |
||||
|
||||
{{ .Scratch.Set "isTocEnabled" $isTocEnabled }} |
||||
|
||||
{{ partial "header" . }} |
||||
|
||||
<div class="content"> |
||||
<div class="container"> |
||||
<div class="row justify-content-center"> |
||||
<div |
||||
{{ if $isTocEnabled }} |
||||
class="col-md-9 col-lg-9" |
||||
{{ else }} |
||||
class="col-md-12 col-lg-10" |
||||
{{ end }} |
||||
> |
||||
<h1 class="mx-0 mx-md-4"> |
||||
{{ .Title }} |
||||
</h1> |
||||
|
||||
<div class="mb-4 mb-md-5 meta"> |
||||
<span class="date" title='{{ .Date.Format "Mon Jan 2 2006 15:04:05 MST" }}'> |
||||
{{ .Date.Format "January 02, 2006" }} |
||||
</span> |
||||
|
||||
{{ if not .Params.noauthor }} |
||||
{{ if .Params.author }} |
||||
<span class="author middot" title="{{ .Params.Author }}"> |
||||
{{ .Params.author }} |
||||
</span> |
||||
{{ end }} |
||||
{{ end }} |
||||
|
||||
<span class="reading-time middot"> |
||||
{{ i18n "reading_time" .ReadingTime }} |
||||
</span> |
||||
|
||||
<div class="d-none d-md-inline tags"> |
||||
<ul class="list-unstyled d-inline"> |
||||
{{ range .Params.tags }} |
||||
<li class="d-inline middot"> |
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> |
||||
</li> |
||||
{{ end }} |
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="d-none d-md-inline tags"> |
||||
<ul class="list-unstyled d-inline"> |
||||
{{ if isset .Params "hacker_news_id" }} |
||||
{{ if ne .Params.hacker_news_id "" }} |
||||
<li class="d-inline middot"> |
||||
<a href="https://news.ycombinator.com/item?id={{ .Params.hacker_news_id }}">Hacker News</a> |
||||
</li> |
||||
{{ end }} |
||||
{{ end }} |
||||
{{ if isset .Params "lobsters_id" }} |
||||
{{ if ne .Params.lobsters_id "" }} |
||||
<li class="d-inline middot"> |
||||
<a href="https://lobste.rs/s/{{ .Params.lobsters_id }}">Lobsters</a> |
||||
</li> |
||||
{{ end }} |
||||
{{ end }} |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="markdown"> |
||||
{{ partial "content" . }} |
||||
</div> |
||||
</div> |
||||
|
||||
{{ if $isTocEnabled }} |
||||
<div class="col-sm-12 col-md-3"> |
||||
{{ replace .TableOfContents "id=\"TableOfContents\"" "id=\"TableOfContents\" class=\"sticky-top\"" | safeHTML }} |
||||
</div> |
||||
{{ end }} |
||||
</div> |
||||
|
||||
<div class="row{{ if not $isTocEnabled }} justify-content-center{{ end }}"> |
||||
<div |
||||
{{ if $isTocEnabled }} |
||||
class="col-md-9 col-lg-9" |
||||
{{ else }} |
||||
class="col-md-12 col-lg-10" |
||||
{{ end }} |
||||
> |
||||
{{ if .Site.Params.posts_navigation }} |
||||
<div class="navigation"> |
||||
<div class="row"> |
||||
<div class="col-12 col-md-6"> |
||||
{{ if .PrevInSection }} |
||||
<div class="mx-0 mx-md-4 mt-4 text-start"> |
||||
<a href="{{ .PrevInSection.Permalink }}"> |
||||
{{ partial "icon_back" . }} |
||||
<span class="text">{{ .PrevInSection.Title }}</span> |
||||
</a> |
||||
</div> |
||||
{{ end }} |
||||
</div> |
||||
<div class="col-12 col-md-6"> |
||||
{{ if .NextInSection }} |
||||
<div class="mx-0 mx-md-4 mt-4 text-end"> |
||||
<a href="{{ .NextInSection.Permalink }}"> |
||||
<span class="text">{{ .NextInSection.Title }}</span> |
||||
{{ partial "icon_next" . }} |
||||
</a> |
||||
</div> |
||||
{{ end }} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{{ end }} |
||||
|
||||
{{ if .Site.DisqusShortname }} |
||||
<div class="mt-5 mx-0 mx-md-4 disqus"> |
||||
{{ template "_internal/disqus.html" . }} |
||||
</div> |
||||
{{ end }} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
{{ partial "footer" . }} |
||||
{{ end }} |
@ -0,0 +1,13 @@
|
||||
{{- partial "script_bootstrap" . -}} |
||||
|
||||
{{ if .Site.Params.highlightjs }} |
||||
{{- partial "script_highlight" . -}} |
||||
{{ end }} |
||||
|
||||
{{ if .Site.Params.progressively }} |
||||
{{- partial "script_progressively" . -}} |
||||
{{ end }} |
||||
|
||||
{{ if .Site.Params.uselatex }} |
||||
{{- partial "script_latex" . -}} |
||||
{{ end }} |
@ -1,12 +1,11 @@
|
||||
<link |
||||
href="//fonts.googleapis.com/css?family=Fira+Code|Merriweather+Sans:400,700|Merriweather:400,700&display=swap" |
||||
rel="stylesheet" |
||||
/> |
||||
{{- partial "style_bootstrap" . -}} |
||||
|
||||
<style> |
||||
:root { |
||||
--font-code: "Fira Code", monospace; |
||||
--font-content: "Merriweather", serif; |
||||
--font-title: "Merriweather Sans", sans-serif; |
||||
} |
||||
</style> |
||||
{{- partial "style_main" . -}} |
||||
|
||||
{{ if .Site.Params.highlightjs }} |
||||
{{- partial "style_highlight" . -}} |
||||
{{ end }} |
||||
|
||||
{{ if .Site.Params.progressively }} |
||||
{{- partial "style_progressively" . -}} |
||||
{{ end }} |
||||
|
@ -0,0 +1,5 @@
|
||||
<script |
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" |
||||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" |
||||
crossorigin="anonymous" |
||||
></script> |
@ -0,0 +1,11 @@
|
||||
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> |
||||
|
||||
{{ range .Site.Params.highlightjslanguages }} |
||||
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/{{.}}.min.js" defer></script> |
||||
{{ end }} |
||||
|
||||
<script> |
||||
window.addEventListener('load', function() { |
||||
hljs.highlightAll(); |
||||
}, true); |
||||
</script> |
@ -0,0 +1,9 @@
|
||||
<script type="text/x-mathjax-config"> |
||||
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } }); |
||||
</script> |
||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> |
||||
<script |
||||
id="MathJax-script" |
||||
async |
||||
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" |
||||
></script> |
@ -0,0 +1,10 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/progressively/dist/progressively.min.js"></script> |
||||
<script> |
||||
window.addEventListener( |
||||
"load", |
||||
function () { |
||||
progressively.init({ delay: 30, throttle: 50 }); |
||||
}, |
||||
true |
||||
); |
||||
</script> |
@ -0,0 +1,6 @@
|
||||
<link |
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" |
||||
rel="stylesheet" |
||||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" |
||||
crossorigin="anonymous" |
||||
/> |
@ -0,0 +1,12 @@
|
||||
<link |
||||
rel="stylesheet" |
||||
href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/styles/github.min.css" |
||||
/> |
||||
<link |
||||
rel="stylesheet" |
||||
href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/styles/tomorrow-night-bright.min.css" |
||||
/> |
||||
|
||||
<style> |
||||
screen and (prefers-color-scheme: dark); |
||||
</style> |
@ -0,0 +1,13 @@
|
||||
<link |
||||
rel="stylesheet" |
||||
href="//fonts.googleapis.com/css?family=Fira+Code|Merriweather+Sans:400,700|Merriweather:400,700&display=swap" |
||||
/> |
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" /> |
||||
|
||||
<style> |
||||
:root { |
||||
--font-code: "Fira Code", monospace; |
||||
--font-content: "Merriweather", serif; |
||||
--font-title: "Merriweather Sans", sans-serif; |
||||
} |
||||
</style> |
@ -0,0 +1,4 @@
|
||||
<link |
||||
rel="stylesheet" |
||||
href="https://cdn.jsdelivr.net/npm/progressively/dist/progressively.min.css" |
||||
/> |
@ -1,3 +1,3 @@
|
||||
@import "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/styles/github.min.css"; |
||||
@import "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/styles/tomorrow-night-bright.min.css" |
||||
@import "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/styles/github.min.css"; |
||||
@import "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/styles/tomorrow-night-bright.min.css" |
||||
screen and (prefers-color-scheme: dark); |
||||
|
Loading…
Reference in new issue