Merge branch 'main' into tmp

This commit is contained in:
Francesco 2024-05-11 22:14:41 +02:00
commit bdee1c7d39
9 changed files with 56 additions and 42 deletions

View file

@ -104,7 +104,8 @@ The fonts in use are [Literata](https://fonts.google.com/specimen/Literata) and
Various miscellaneous features:
- Latex blocks overflows on mobile to prevent having strange alignments;
- Code blocks are displayed with ligatures.
- Code blocks are displayed with ligatures;
- [Giscus](https://giscus.app/) comments support.
### 2.6 Extending the theme
@ -193,15 +194,15 @@ url = "/posts"
name = "resume"
url = "/resume"
# giscus conf, for more detail, see https://giscus.app/
# Giscus conf, for more detail, see https://giscus.app/
[params.giscus]
enable = true
repo = ""
repoid = ""
category = ""
categoryid = ""
mapping = "pathname"
theme = "light"
enable = true
repo = ""
repoid = ""
category = ""
categoryid = ""
mapping = "pathname"
theme = "light"
# Syntax highlight on code blocks, all styles:
# https://xyproto.github.io/splash/docs/all.html

View file

@ -9,5 +9,4 @@
</div>
{{ end }}

View file

@ -2,36 +2,35 @@
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<head>
{{ partial "head.html" . }}
</head>
{{ $theme := "auto"}}
{{ $theme := "auto"}}
{{ with .Param "theme" }}
{{ $theme = .}}
{{ end }}
{{ with .Param "theme" }}
{{ $theme = .}}
{{ end }}
<body class="{{ $theme }}">
<body class="{{ $theme }}">
<div class="content">
<header>
{{ partial "header.html" . }}
</header>
<div class="content">
<header>
{{ partial "header.html" . }}
</header>
<main class="main">
{{ block "main" . }}{{ end }}
</main>
</div>
<main class="main">
{{ block "main" . }}{{ end }}
</main>
</div>
<footer>
{{ partial "footer.html" . }}
</footer>
<footer>
{{ partial "footer.html" . }}
</footer>
</body>
</body>
<script>
<script>
function isAuto() {
return document.body.classList.contains("auto");
@ -70,5 +69,4 @@
</script>
</html>

View file

@ -21,7 +21,8 @@
{{ with site.Params.social }}
<div class="social-icons">
{{- range . }}
<a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me"
<a href="{{ trim .url " " | safeURL }}" target="_blank"
rel="noopener noreferrer me"
title="{{ (.title | default .name) | title }}">
{{ partial "svg.html" . }}
</a>

View file

@ -14,5 +14,5 @@
data-loading="lazy"
crossorigin="anonymous"
async>
</script>
</script>
{{ end }}

View file

@ -1,6 +1,14 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
<title>
{{ if .IsHome }}
{{ site.Title }}
{{ else }}
{{ printf "%s | %s" .Title site.Title }}
{{ end }}
</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}

View file

@ -1,6 +1,7 @@
{{- with resources.Get "js/main.js" }}
{{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}"
crossorigin="anonymous"></script>
{{- end }}
{{- end }}

View file

@ -1,7 +1,10 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"></script>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css">
<script defer
src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js"
<script defer
src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js"
onload="renderMathInElement(document.body);"></script>
<script>

View file

@ -5,11 +5,14 @@
{{ $dateFormat = .}}
{{ end }}
<p class="line-date">{{ .Date.Format $dateFormat }} </p>
<div>
<p class="line-title"> <a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
<p class="line-title">
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</p>
{{ if .Site.Params.listSummaries }}
<p class="line-summary"> {{ .Summary }} </p>