Skip to content

Commit

Permalink
Merge branch 'main' into tmp
Browse files Browse the repository at this point in the history
Former-commit-id: f769a71
  • Loading branch information
tomfran committed May 11, 2024
2 parents f74dd9d + fbf2522 commit aa09456
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 42 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ <h1> typo? </h1>

</div>


{{ end }}
44 changes: 21 additions & 23 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -70,5 +69,4 @@

</script>


</html>
3 changes: 2 additions & 1 deletion layouts/_default/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ <h1>{{ . }}</h1>
{{ 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>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
data-loading="lazy"
crossorigin="anonymous"
async>
</script>
</script>
{{ end }}
10 changes: 9 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -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" . }}

Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/head/js.html
Original file line number Diff line number Diff line change
@@ -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 }}
9 changes: 6 additions & 3 deletions layouts/partials/math.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"></script>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
<script defer
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"></script>

<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
<script defer
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
onload="renderMathInElement(document.body);"></script>

<script>
Expand Down
7 changes: 5 additions & 2 deletions layouts/partials/post-entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit aa09456

Please sign in to comment.