diff --git a/assets/auto-theme.css b/assets/auto-theme.css new file mode 100644 index 0000000..37a5355 --- /dev/null +++ b/assets/auto-theme.css @@ -0,0 +1,156 @@ +:root { + --size: 0.96rem; + --spacing: calc(var(--size) * 2); +} + +body { + font-family: "Nunito", "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", + Helvetica, Arial, sans-serif; + font-size: calc(var(--size) * 1.6); + line-height: 1.45; + padding: 0 2.8rem 2.8rem; +} + +header, +main, +footer { + max-width: 66ch; +} + +header, +footer { + position: relative; +} + +.mesh-wrap { + position: relative; + left: 50%; + width: 100vw; + transform: translateX(-50%); + pointer-events: none; + overflow: hidden; +} + +.mesh-image { + display: block; + width: auto; + height: auto; + max-width: none; + position: absolute; + left: 50%; + transform: translateX(-50%); +} + +.mesh-wrap-top { + height: 100px; + margin-bottom: 0.6rem; +} + +.mesh-image-top { + top: 0; +} + +.footer-copy { + padding-top: 0.5rem; +} + +h1, +h2, +h3, +h4 { + font-weight: 600; +} + +h1 { + font-size: calc(var(--size) * 3.4); +} + +h2 { + font-size: calc(var(--size) * 2.8); +} + +.title h1 { + font-size: calc(var(--size) * 2.9); +} + +nav a, +a.blog-tags { + margin-right: calc(var(--spacing) / 2.8); +} + +a { + text-decoration: none; +} + +a:hover, +a:focus-visible { + text-decoration: underline; +} + +ul.blog-posts li { + margin-bottom: 0.2rem; +} + +li { + margin-block-start: calc(var(--spacing) / 2.8); +} + +@media (prefers-color-scheme: light) { + body { + background-color: #ffffff; + color: #1f2328; + } + + h1, + h2, + h3, + h4, + h5, + h6, + strong, + b { + color: #111827; + } + + a { + color: #0969da; + } + + a:visited, + ul.blog-posts li a:visited { + color: #8250df; + } + + textarea, + input { + background-color: #f6f8fa; + color: #1f2328; + border: 1px solid #d0d7de; + } + + table, + th, + td { + border-color: #d0d7de; + } + + code { + color: #24292f; + background-color: #f6f8fa; + } + + pre code { + background-color: #f6f8fa; + } + + blockquote { + border-left-color: #8c959f; + color: #57606a; + } + + figcaption > p, + .helptext { + color: #57606a; + } + +} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2baecc4..0c85516 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,7 @@ {{ define "main" }} {{ if not .Params.menu }}

{{ .Title }}

+{{ if not .Params.hideDate }}

{{ end }} +{{ end }} {{ .Content }} diff --git a/layouts/index.html b/layouts/index.html index 9983b08..833cae1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,3 +1,19 @@ {{ define "main" }} -{{ .Content }} + + {{ .Content }} + +

My most recent posts

+ + +

All posts →

+ +
{{ end }} diff --git a/layouts/page/presentation.html b/layouts/page/presentation.html new file mode 100644 index 0000000..9eda755 --- /dev/null +++ b/layouts/page/presentation.html @@ -0,0 +1,5 @@ + diff --git a/layouts/partials/custom_head.html b/layouts/partials/custom_head.html index 4c53c40..74a4f70 100644 --- a/layouts/partials/custom_head.html +++ b/layouts/partials/custom_head.html @@ -1,3 +1,2 @@ - +{{ $autoTheme := resources.Get "auto-theme.css" | minify }} + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 9290715..e0d702a 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,4 @@ - - {{ .Site.Copyright }} | {{ markdownify .Site.Params.madeWith }} - \ No newline at end of file + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 42b5c10..804be55 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,6 @@ - +

{{ .Site.Title }}

diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 53be338..5a7ea58 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -2,21 +2,3 @@ {{ .Name }} {{ end }} RSS - - -{{ $translations := dict }} -{{ range .Translations }} - {{ $translations = merge $translations (dict .Language.Lang .) }} -{{ end }} - - -{{ range where .Site.Languages "Lang" "!=" .Page.Lang }} - {{ with (index $translations .Lang) }} - {{ .Language.LanguageName }} - {{ else }} - - {{ if not .Params.hideUntranslated }} - {{ .LanguageName }} - {{ end }} - {{ end }} -{{ end }} diff --git a/layouts/shortcodes/code.html b/layouts/shortcodes/code.html new file mode 100644 index 0000000..47be546 --- /dev/null +++ b/layouts/shortcodes/code.html @@ -0,0 +1,6 @@ +{{ .Page.Store.Set "hasCodeBlock" true }} +{{ $lang := .Get "language" | default "" }} +{{ with .Get "title" }} +

{{ . }}

+{{ end }} +{{ highlight (trim .Inner "\r\n") $lang "" }} diff --git a/layouts/shortcodes/fontawesome.html b/layouts/shortcodes/fontawesome.html new file mode 100644 index 0000000..7e68a9c --- /dev/null +++ b/layouts/shortcodes/fontawesome.html @@ -0,0 +1 @@ + diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 0000000..86148b3 --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,6 @@ +
+ +
diff --git a/layouts/shortcodes/presentations.html b/layouts/shortcodes/presentations.html new file mode 100644 index 0000000..9e7e7d8 --- /dev/null +++ b/layouts/shortcodes/presentations.html @@ -0,0 +1,6 @@ + diff --git a/layouts/shortcodes/publications.html b/layouts/shortcodes/publications.html new file mode 100644 index 0000000..ce11be6 --- /dev/null +++ b/layouts/shortcodes/publications.html @@ -0,0 +1,5 @@ + diff --git a/layouts/shortcodes/recent-articles.html b/layouts/shortcodes/recent-articles.html new file mode 100644 index 0000000..e69de29