mirror of
https://github.com/tomfran/typo.git
synced 2025-04-26 13:39:55 +03:00
Merge branch 'main' into tmp
This commit is contained in:
commit
bdee1c7d39
9 changed files with 56 additions and 42 deletions
19
README.md
19
README.md
|
@ -104,7 +104,8 @@ The fonts in use are [Literata](https://fonts.google.com/specimen/Literata) and
|
||||||
|
|
||||||
Various miscellaneous features:
|
Various miscellaneous features:
|
||||||
- Latex blocks overflows on mobile to prevent having strange alignments;
|
- 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
|
### 2.6 Extending the theme
|
||||||
|
|
||||||
|
@ -193,15 +194,15 @@ url = "/posts"
|
||||||
name = "resume"
|
name = "resume"
|
||||||
url = "/resume"
|
url = "/resume"
|
||||||
|
|
||||||
# giscus conf, for more detail, see https://giscus.app/
|
# Giscus conf, for more detail, see https://giscus.app/
|
||||||
[params.giscus]
|
[params.giscus]
|
||||||
enable = true
|
enable = true
|
||||||
repo = ""
|
repo = ""
|
||||||
repoid = ""
|
repoid = ""
|
||||||
category = ""
|
category = ""
|
||||||
categoryid = ""
|
categoryid = ""
|
||||||
mapping = "pathname"
|
mapping = "pathname"
|
||||||
theme = "light"
|
theme = "light"
|
||||||
|
|
||||||
# Syntax highlight on code blocks, all styles:
|
# Syntax highlight on code blocks, all styles:
|
||||||
# https://xyproto.github.io/splash/docs/all.html
|
# https://xyproto.github.io/splash/docs/all.html
|
||||||
|
|
|
@ -9,5 +9,4 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -2,36 +2,35 @@
|
||||||
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
|
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
|
||||||
dir="{{ or site.Language.LanguageDirection `ltr` }}">
|
dir="{{ or site.Language.LanguageDirection `ltr` }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
{{ $theme := "auto"}}
|
{{ $theme := "auto"}}
|
||||||
|
|
||||||
{{ with .Param "theme" }}
|
{{ with .Param "theme" }}
|
||||||
{{ $theme = .}}
|
{{ $theme = .}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<body class="{{ $theme }}">
|
<body class="{{ $theme }}">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<header>
|
<header>
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="main">
|
<main class="main">
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script>
|
||||||
<script>
|
|
||||||
|
|
||||||
function isAuto() {
|
function isAuto() {
|
||||||
return document.body.classList.contains("auto");
|
return document.body.classList.contains("auto");
|
||||||
|
@ -70,5 +69,4 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -21,7 +21,8 @@
|
||||||
{{ with site.Params.social }}
|
{{ with site.Params.social }}
|
||||||
<div class="social-icons">
|
<div class="social-icons">
|
||||||
{{- range . }}
|
{{- 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 }}">
|
title="{{ (.title | default .name) | title }}">
|
||||||
{{ partial "svg.html" . }}
|
{{ partial "svg.html" . }}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -14,5 +14,5 @@
|
||||||
data-loading="lazy"
|
data-loading="lazy"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
async>
|
async>
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -1,6 +1,14 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<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/css.html" . }}
|
||||||
{{ partialCached "head/js.html" . }}
|
{{ partialCached "head/js.html" . }}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{{- with resources.Get "js/main.js" }}
|
{{- with resources.Get "js/main.js" }}
|
||||||
{{- $opts := dict "minify" true }}
|
{{- $opts := dict "minify" true }}
|
||||||
{{- with . | js.Build $opts | fingerprint }}
|
{{- 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 }}
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -1,7 +1,10 @@
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css">
|
<link rel="stylesheet"
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"></script>
|
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>
|
onload="renderMathInElement(document.body);"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -5,11 +5,14 @@
|
||||||
{{ $dateFormat = .}}
|
{{ $dateFormat = .}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<p class="line-date">{{ .Date.Format $dateFormat }} </p>
|
<p class="line-date">{{ .Date.Format $dateFormat }} </p>
|
||||||
|
|
||||||
<div>
|
<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 }}
|
{{ if .Site.Params.listSummaries }}
|
||||||
<p class="line-summary"> {{ .Summary }} </p>
|
<p class="line-summary"> {{ .Summary }} </p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue