-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy over my changes from the theme until they can be upstreamed
- Loading branch information
Showing
2 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<head> | ||
{{ if .Site.Params.forceRedirect }} | ||
<script> | ||
if (location.host != new URL("{{ .Site.BaseURL }}").host) location.href = "{{ .Site.BaseURL }}" | ||
</script> | ||
{{ end }} | ||
<meta name="viewport" content="width=device-width" /> | ||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=7" /> | ||
|
||
{{ if .OutputFormats.Get "RSS" }} | ||
{{ with .OutputFormats.Get "RSS" }} | ||
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" /> | ||
<link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" /> | ||
{{ end }} | ||
{{ end }} | ||
|
||
{{- partial "head_icons.html" . -}} | ||
|
||
<title> | ||
{{ if and (.Title) (ne .Title .Site.Title) }} | ||
{{ .Title }} – | ||
{{ end }} | ||
{{ .Site.Title | default "Ficurinia" }} | ||
</title> | ||
|
||
{{/* | ||
how to update these hashes: | ||
https://gitlab.com/gabmus/hugo-ficurinia/-/merge_requests/5 | ||
*/}} | ||
<link href="/symbols-nerd-font/symbols-nerd-font.css" rel="stylesheet" | ||
integrity="sha512-lydow8GLOLlYNOtHlksNCmGWWCBsbIEtikXpHzfWqx78HLlyQZHOzyLwPpKol4Th6aCwLUXOfODVYgwrd3nwKQ==" /> | ||
{{ if .Site.Params.replaceJetBrainsMono }} | ||
<link href="/{{ .Site.Params.replaceJetBrainsMono }}/{{ .Site.Params.replaceJetBrainsMono }}.css" | ||
rel="stylesheet" /> | ||
{{ else }} | ||
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet" | ||
integrity="sha512-tJxlgL6v1Y7kFf+qB8SloaAMKnOAw6WouknxXtIjkBux9Y/9aX81EUWOJO8c/3l98DmjG8brr4to7zaez606Fg==" /> | ||
{{ end }} | ||
|
||
{{ if and site.Params.cactusCommentsSiteName (.Params.comments | default true) }} | ||
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css"> | ||
{{ end }} | ||
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS | ||
(dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint | ||
"sha512" }} | ||
<link type="text/css" rel="stylesheet" href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" /> | ||
{{- partial "inject/head.html" . -}} | ||
{{- partial "head_meta_seo.html" . -}} | ||
{{- partial "head_meta_opengraph.html" . -}} | ||
{{- partial "head_meta_twitter.html" . -}} | ||
<link rel="manifest" href="/manifest/index.json" /> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{{- partial "inject/content-before.html" . -}} | ||
<article class="card single"> | ||
{{ if .Params.showTitle | default true }} | ||
<h1>{{ .Title }}</h1> | ||
{{ end }} | ||
{{ if (.Params.showDate | default true) }} | ||
<p class="date"> | ||
<span title='{{ i18n "date" }}'> </span> | ||
{{- partial "date.html" .Date -}} | ||
{{- if .Site.Params.showLastmod | default false -}} | ||
{{- if ne (.Date | time.Format "Jan 02, 2006 3:04 PM Z07:00") (.Lastmod.Format "Jan 02, 2006 3:04 PM Z07:00") | ||
-}} | ||
- updated: {{- partial "date.html" .Lastmod -}} | ||
{{ end }} | ||
{{ end }} | ||
</p> | ||
{{ end }} | ||
{{ if and (.Params.toc | default false) (.Site.Params.tocBeforeImage | default false) }} | ||
{{- partial "toc.html" . -}} | ||
{{ end }} | ||
{{ if .Params.Image }} | ||
<figure style="margin: 0"> | ||
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }} | ||
<img src="{{ .Params.Image }}" alt="{{ .Params.Alt }}" /> | ||
{{ else }} | ||
<img src="{{ .Permalink }}/{{ .Params.Image }}" alt="{{ .Params.Alt }}" /> | ||
{{ end }} | ||
{{ if .Params.ImageCaption }} | ||
<figcaption> | ||
<p>{{ .Params.ImageCaption | markdownify }}</p> | ||
</figcaption> | ||
{{ end }} | ||
</figure> | ||
{{ end }} | ||
{{ if and (.Params.toc | default false) (not (.Site.Params.tocBeforeImage | default false)) }} | ||
{{- partial "toc.html" . -}} | ||
{{ end }} | ||
<div>{{ .Content }}</div> | ||
</article> | ||
{{ if .Params.tags }} | ||
{{ if not .Site.Params.paperCards }}<hr />{{ end }} | ||
<p class="articleTagsContainer"> | ||
<span> </span> | ||
<strong>{{ i18n "tagsColumn" }}</strong> | ||
{{ range sort .Params.tags }} | ||
<a | ||
{{ if site.Params.buttonTags | default false }} | ||
class="buttonTag" | ||
{{ end }} | ||
href="/tags/{{ . | urlize }}">#{{ . }}</a> | ||
{{ end }} | ||
</p> | ||
{{ end }} | ||
{{- partial "inject/content-after.html" . -}} | ||
{{ if .Params.showShare | default true }} | ||
{{- partial "share_on_fediverse.html" . -}} | ||
{{ end }} | ||
{{- partial "commento.html" . -}} | ||
{{- partial "cactus_chat.html" . -}} | ||
{{- partial "related_articles.html" . -}} |