initial commit
This commit is contained in:
parent
2012aa8834
commit
9ddfa58ace
2289 changed files with 11217 additions and 0 deletions
7
themes/hugo-ficurinia/layouts/404.html
Normal file
7
themes/hugo-ficurinia/layouts/404.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>
|
||||
{{ i18n "404message" }}
|
||||
</h1>
|
||||
</article>
|
||||
{{ end }}
|
21
themes/hugo-ficurinia/layouts/_default/baseof.html
Normal file
21
themes/hugo-ficurinia/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="{{ if .IsHome }}home{{ end }}" lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
{{- partial "build_assets.html" . -}}
|
||||
<body>
|
||||
<div id="baseContainer">
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="contentContainer">
|
||||
<div id="content">
|
||||
<main>
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- partial "plausible.html" . -}}
|
||||
{{- partial "umami.html" . -}}
|
||||
{{- partial "inject/body.html" . -}}
|
||||
</body>
|
||||
</html>
|
1
themes/hugo-ficurinia/layouts/_default/baseof.json
Normal file
1
themes/hugo-ficurinia/layouts/_default/baseof.json
Normal file
|
@ -0,0 +1 @@
|
|||
{{- block "main" . }}{{- end }}
|
8
themes/hugo-ficurinia/layouts/_default/list.html
Normal file
8
themes/hugo-ficurinia/layouts/_default/list.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{ define "main" }}
|
||||
{{ if in (site.Params.extraContentDirs | default (slice)) .Section }}
|
||||
<h1>{{ .Section | humanize }}</h1>
|
||||
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" .Pages) -}}
|
||||
{{ else }}
|
||||
{{- partial "simple_posts_list.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
37
themes/hugo-ficurinia/layouts/_default/manifest.json
Normal file
37
themes/hugo-ficurinia/layouts/_default/manifest.json
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/web-manifest-combined.json",
|
||||
"name": "{{ .Site.Title }}",
|
||||
"short_name": "{{ .Site.Title }}",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
{{ $bg := (.Site.Data.colors.dark.bg | default "#242629") }}
|
||||
{{ $accent := (.Site.Data.colors.dark.accent | default "#db5793") }}
|
||||
{{ if eq .Site.Data.colors.default "light" }}
|
||||
{{ $bg = (.Site.Data.colors.light.bg | default "#f5f5f5") }}
|
||||
{{ $accent = (.Site.Data.colors.light.accent | default "#db5793") }}
|
||||
{{ end }}
|
||||
"background_color": "{{ $bg }}",
|
||||
"theme_color": "{{ $accent }}"
|
||||
{{ if .Site.Params.description }}
|
||||
,
|
||||
"description": "{{ .Site.Params.description }}"
|
||||
{{ end }}
|
||||
{{ if .Site.Params.icon512 }}
|
||||
,
|
||||
"icons": [
|
||||
{
|
||||
"src": "{{ .Site.Params.icon512 }}",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "{{ .Site.Params.icon512 }}",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
}
|
||||
]
|
||||
{{ end }}
|
||||
}
|
||||
|
46
themes/hugo-ficurinia/layouts/_default/rss.xml
Normal file
46
themes/hugo-ficurinia/layouts/_default/rss.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
{{- printf "<?xml-stylesheet href=\"/feed_style.xsl\" type=\"text/xsl\"?>" | safeHTML -}}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="https://www.rssboard.org/media-rss">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
<icon>{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}</icon>
|
||||
{{ range $pages }}
|
||||
{{ if not ( .Params.norss | default false) }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ printf "<![CDATA[" | safeHTML }}{{ .Content | safeHTML }}{{ printf "]]>" | safeHTML }}</description>
|
||||
{{ if .Params.image }}
|
||||
<media:thumbnail url="{{ .Params.image | absURL }}" />
|
||||
{{ end }}
|
||||
</item>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
45
themes/hugo-ficurinia/layouts/_default/search.html
Normal file
45
themes/hugo-ficurinia/layouts/_default/search.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
{{ define "main" }}
|
||||
<noscript>
|
||||
You need to enable JavaScript to be able to search.
|
||||
</noscript>
|
||||
{{- partial "searchbar.html" . -}}
|
||||
<div class="postlist {{ if .Site.Params.gridView }}gridView{{ end }}" id="postlist">
|
||||
</div>
|
||||
{{- partial "js_paginator.html" . -}}
|
||||
<script>
|
||||
const noResFoundStr = {{ i18n "noResultsFound" }}
|
||||
function matchTags(page, term) {
|
||||
for (let tag of page.tags) {
|
||||
if (tag.includes(term)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function performSearch(term) {
|
||||
document.getElementById('postlist').innerHTML = '';
|
||||
term = term.toLowerCase();
|
||||
fetch('/search/index.json').then(res => res.json())
|
||||
.then(res => {
|
||||
let articles = res.pages.filter(page => (
|
||||
page.title.toLowerCase().includes(term) ||
|
||||
matchTags(page, term) ||
|
||||
page.text.includes(term)
|
||||
));
|
||||
if (articles.length > 0) renderArticles(articles);
|
||||
else document.getElementById('postlist').innerHTML = `
|
||||
<h3>${noResFoundStr}</h3>
|
||||
`;
|
||||
});
|
||||
}
|
||||
var url = location.href;
|
||||
var baseUrl = url.split('?')[0];
|
||||
var searchbar = document.getElementById('searchbar');
|
||||
if (url.includes('?')) {
|
||||
var urlParams = new URLSearchParams(url.split('?')[1]);
|
||||
if (urlParams.has('q')) {
|
||||
let searchTerm = urlParams.get('q');
|
||||
searchbar.value = searchTerm;
|
||||
performSearch(searchTerm);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
27
themes/hugo-ficurinia/layouts/_default/search.json
Normal file
27
themes/hugo-ficurinia/layouts/_default/search.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{{ define "main" }}
|
||||
{
|
||||
{{ $mscratch := newScratch }}
|
||||
{{ $mscratch.Add "articles" slice }}
|
||||
{{ $pages := where .Site.RegularPages "Params.nosearch" "!=" "true" }}
|
||||
{{ range $pages }}
|
||||
{{ $image := "" }}
|
||||
{{ if .Params.Image }}
|
||||
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
|
||||
{{ $image = .Params.Image }}
|
||||
{{ else }}
|
||||
{{ $image = print .Permalink "/" .Params.Image }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $mscratch.Add "articles" (dict
|
||||
"title" .Title
|
||||
"date" (.Date.Format "2006-01-02")
|
||||
"tags" (sort (or .Params.tags slice))
|
||||
"summary" (or .Params.description .Summary)
|
||||
"text" (lower .Plain)
|
||||
"link" .Permalink
|
||||
"image" $image
|
||||
"imageAlt" (or .Params.Alt "")) }}
|
||||
{{ end }}
|
||||
"pages": {{ $mscratch.Get "articles" | jsonify }}
|
||||
}
|
||||
{{ end }}
|
3
themes/hugo-ficurinia/layouts/_default/single.html
Normal file
3
themes/hugo-ficurinia/layouts/_default/single.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ define "main" }}
|
||||
{{- partial "single_post.html" . -}}
|
||||
{{ end }}
|
16
themes/hugo-ficurinia/layouts/index.html
Normal file
16
themes/hugo-ficurinia/layouts/index.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{/* get all the pages that are regular posts and not pages */}}
|
||||
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
|
||||
{{ $allPostsList := where (where site.RegularPages "Section" "in" $postsDir) "Section" "!=" "" }}
|
||||
{{- partial "showcase.html" . -}}
|
||||
{{ if and .Site.Params.showSinglePageAsHome (ne .Site.Params.homeSinglePage "") }}
|
||||
{{ with .Site.GetPage .Site.Params.homeSinglePage }}
|
||||
{{- partial "single_post.html" . -}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" $allPostsList) -}}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
38
themes/hugo-ficurinia/layouts/index.json
Normal file
38
themes/hugo-ficurinia/layouts/index.json
Normal file
|
@ -0,0 +1,38 @@
|
|||
{{ define "main" }}
|
||||
{
|
||||
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
|
||||
{{ $allPostsList := where .Site.RegularPages "Section" "in" $postsDir }}
|
||||
{{ $featuredPostsList := slice }}
|
||||
{{ $postsList := $allPostsList }}
|
||||
{{ if .Site.Params.enableFeatured | default false }}
|
||||
{{ $featuredPostsList = where $allPostsList "Params.featured" true }}
|
||||
{{ $postsList = union (where $allPostsList "Params.featured" false) (where $allPostsList "Params.featured" nil) }}
|
||||
{{ end }}
|
||||
{{ $mscratch := newScratch }}
|
||||
{{ $mscratch.Add "articles" slice }}
|
||||
{{ range (.Paginate $postsList).Pages }}
|
||||
{{ $image := "" }}
|
||||
{{ if .Params.Image }}
|
||||
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
|
||||
{{ $image = .Params.Image }}
|
||||
{{ else }}
|
||||
{{ $image = print .Permalink "/" .Params.Image }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $mscratch.Add "articles" (dict
|
||||
"title" .Title
|
||||
"date" (.Date.Format "2006-01-02")
|
||||
"tags" (sort (or .Params.tags slice))
|
||||
"summary" (or .Params.description .Summary)
|
||||
"link" .Permalink
|
||||
"image" $image
|
||||
"imageAlt" (or .Params.Alt "")) }}
|
||||
{{ end }}
|
||||
"articles": {{ $mscratch.Get "articles" | jsonify }},
|
||||
"test": "{{range $postsList}}{{.Title}} {{end}}",
|
||||
"page": "{{ .Paginator.PageNumber }}",
|
||||
"next": {{ if .Paginator.HasNext }}
|
||||
{{ .Paginator.Next.URL | absURL | jsonify }}
|
||||
{{ else }}""{{ end }}
|
||||
}
|
||||
{{ end }}
|
46
themes/hugo-ficurinia/layouts/index.xml
Normal file
46
themes/hugo-ficurinia/layouts/index.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
{{- printf "<?xml-stylesheet href=\"/feed_style.xsl\" type=\"text/xsl\"?>" | safeHTML -}}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="https://www.rssboard.org/media-rss">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
<icon>{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}</icon>
|
||||
{{ range $pages }}
|
||||
{{ if not ( .Params.norss | default false) }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ printf "<![CDATA[" | safeHTML }}{{ .Content | safeHTML }}{{ printf "]]>" | safeHTML }}</description>
|
||||
{{ if .Params.image }}
|
||||
<media:thumbnail url="{{ .Params.image | absURL }}" />
|
||||
{{ end }}
|
||||
</item>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
46
themes/hugo-ficurinia/layouts/partials/article_card.html
Normal file
46
themes/hugo-ficurinia/layouts/partials/article_card.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<article class="card postlistitem">
|
||||
<div>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</h2>
|
||||
<p class="date">
|
||||
<span title='{{ i18n "date" }}'> </span>
|
||||
{{- partial "date.html" .Date -}}
|
||||
{{- 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 }}
|
||||
{{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
|
||||
| <!-- Pipe character as visual separator between date and tags-->
|
||||
<span title='{{ i18n "tags" }}'> </span>
|
||||
{{ range sort .Params.tags }}
|
||||
<a href="/tags/{{ . | urlize }}">#{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ if .Site.Params.imageInArticlePreview }}
|
||||
{{ if .Params.Image }}
|
||||
<a class="unstyledLink" href="{{ .Permalink }}">
|
||||
{{ 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 }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
{{ if (site.Params.articleSummary | default true) }}
|
||||
<div class="articlePreview">
|
||||
<p>
|
||||
{{ if .Params.description }}
|
||||
{{ .Params.description }}
|
||||
{{ else }}
|
||||
{{.Summary }}
|
||||
{{ end }}
|
||||
</p>
|
||||
<p><a href="{{ .Permalink }}">{{ i18n "continueReading" }} </a></p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<hr />
|
||||
</article>
|
10
themes/hugo-ficurinia/layouts/partials/build_assets.html
Normal file
10
themes/hugo-ficurinia/layouts/partials/build_assets.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{/*
|
||||
This partial builds non-standard assets (like xsl files) with the template
|
||||
engine. It is necessary to do it this way to reduce user friction and
|
||||
ensure that the file is there.
|
||||
*/}}
|
||||
{{ if .IsHome }}
|
||||
{{ $feed_style_xsl_template := resources.Get "feed_style.xsl" }}
|
||||
{{ $feed_style_xsl := $feed_style_xsl_template | resources.ExecuteAsTemplate "feed_style.xsl" . }}
|
||||
{{ $noop := $feed_style_xsl.Permalink }}
|
||||
{{ end }}
|
15
themes/hugo-ficurinia/layouts/partials/cactus_chat.html
Normal file
15
themes/hugo-ficurinia/layouts/partials/cactus_chat.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ if and site.Params.cactusCommentsSiteName (.Params.comments | default true) }}
|
||||
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
|
||||
|
||||
<div id="ficurinia-cactus-comments"></div>
|
||||
|
||||
<script>
|
||||
initComments({
|
||||
node: document.getElementById("ficurinia-cactus-comments"),
|
||||
defaultHomeserverUrl: '{{ site.Params.cactusCommentsHomeserver | default "https://matrix.cactus.chat:8448" }}',
|
||||
serverName: '{{ site.Params.cactusCommentsServerName | default "cactus.chat" }}',
|
||||
siteName: "{{ site.Params.cactusCommentsSiteName }}",
|
||||
commentSectionId: "{{ .File.UniqueID }}"
|
||||
})
|
||||
</script>
|
||||
{{ end }}
|
8
themes/hugo-ficurinia/layouts/partials/commento.html
Normal file
8
themes/hugo-ficurinia/layouts/partials/commento.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{ if and .Site.Params.commento (.Params.comments | default true) }}
|
||||
<script
|
||||
defer
|
||||
src="{{ .Site.Params.commento }}"
|
||||
data-no-fonts="true"
|
||||
></script>
|
||||
<div id="commento"></div>
|
||||
{{ end }}
|
5
themes/hugo-ficurinia/layouts/partials/date.html
Normal file
5
themes/hugo-ficurinia/layouts/partials/date.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ if site.Params.dateFormat }}
|
||||
{{ .Format site.Params.dateFormat }}
|
||||
{{ else }}
|
||||
{{ .Format "02-01-2006" }}
|
||||
{{ end }}
|
|
@ -0,0 +1,40 @@
|
|||
<div class="featured postlist gridView">
|
||||
{{ range . }}
|
||||
{{ $image := "" }}
|
||||
{{ if .Params.Image }}
|
||||
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
|
||||
{{ $image = .Params.Image }}
|
||||
{{ else }}
|
||||
{{ $image = print .Permalink "/" .Params.Image }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<a class="featuredCardLink" href="{{ .Permalink }}">
|
||||
<article class="featuredCard"
|
||||
style="
|
||||
background-image: linear-gradient(to bottom,
|
||||
rgba(0, 0, 0, 0) 0%,
|
||||
rgba(0, 0, 0, 0.1) 45%,
|
||||
rgba(0, 0, 0, 0.7) 100%
|
||||
), url('{{ $image }}');
|
||||
">
|
||||
<div class="contentArea">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<p class="date">
|
||||
<span title='{{ i18n "date" }}'> </span>
|
||||
{{- partial "date.html" .Date -}}
|
||||
{{- 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 }} {{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
|
||||
<br />
|
||||
<span title='{{ i18n "tags" }}'> </span>
|
||||
{{ range sort .Params.tags }}
|
||||
#{{ . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
11
themes/hugo-ficurinia/layouts/partials/footer.html
Normal file
11
themes/hugo-ficurinia/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<footer>
|
||||
<hr />
|
||||
{{- partial "inject/footer.html" . -}}
|
||||
{{- partial "footer_columns.html" . -}}
|
||||
<p><small>
|
||||
{{ now.Format "2006" }} © {{ .Site.Copyright | markdownify }}
|
||||
</small></p>
|
||||
<p><small>
|
||||
{{ i18n "themeCopyrightNotice" | safeHTML }}
|
||||
</small></p>
|
||||
</footer>
|
12
themes/hugo-ficurinia/layouts/partials/footer_columns.html
Normal file
12
themes/hugo-ficurinia/layouts/partials/footer_columns.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ if (and (.Site.Params.enableFooterColumns | default false) .Site.Data.footer_columns) }}
|
||||
<div class="footerColumns">
|
||||
{{ range .Site.Data.footer_columns }}
|
||||
<ul class="notlist">
|
||||
<li><strong>{{ .title }}</strong></li>
|
||||
{{ range .links }}
|
||||
<li><a target="_blank" href="{{ .link }}">{{ .title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
46
themes/hugo-ficurinia/layouts/partials/head.html
Normal file
46
themes/hugo-ficurinia/layouts/partials/head.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<head>
|
||||
{{ if .Site.Params.forceRedirect }}
|
||||
<script>
|
||||
if (location.host != new URL("{{ .Site.BaseURL }}").host) location.href = "{{ .Site.BaseURL }}"
|
||||
</script>
|
||||
{{ end }}
|
||||
<meta name="robots" content="noai, noimageai">
|
||||
<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" />
|
||||
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||
|
||||
{{ 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" . | css.Sass (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>
|
20
themes/hugo-ficurinia/layouts/partials/head_icons.html
Normal file
20
themes/hugo-ficurinia/layouts/partials/head_icons.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<link
|
||||
rel="icon"
|
||||
href='{{ .Site.Params.favicon | default "/favicon.png" }}'
|
||||
/>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href='{{ .Site.Params.faviconIco | default "/favicon.ico" }}'
|
||||
type="image/x-icon"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
href='{{ .Site.Params.appletouch | default "/apple-touch-icon.png" }}'
|
||||
/>
|
||||
{{ if .Site.Params.svgicon }}
|
||||
<link
|
||||
rel="icon"
|
||||
href='{{ .Site.Params.svgicon | default "/logo.svg" }}'
|
||||
type="image/svg+xml"
|
||||
/>
|
||||
{{ end }}
|
|
@ -0,0 +1,42 @@
|
|||
<meta property="og:site_name"
|
||||
content='{{ .Site.Title | default "Ficurinia" }}' />
|
||||
{{ if .IsPage }}
|
||||
<meta property="og:title" content="{{ .Title }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
|
||||
<meta
|
||||
property="article:author" content="{{ .Site.Params.Author }}" />
|
||||
<meta
|
||||
property="article:published_time"
|
||||
content='{{ .Date.Format "2006-01-02T15:04:05Z-0700" }}' />
|
||||
{{ if .Params.tags }}
|
||||
{{ range sort .Params.tags }}
|
||||
<meta property="article:tag" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
{{ $image := .Site.Params.icon512 | default "/img/icon.svg" }}
|
||||
{{ if .Params.Image }}
|
||||
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
|
||||
{{ $image = .Params.Image }}
|
||||
{{ else }}
|
||||
{{ $image = print .Permalink "/" .Params.Image }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<meta property="og:image"
|
||||
content="{{ $image | absURL }}" />
|
||||
{{ if .Params.description }}
|
||||
<meta property="og:description" content="{{ .Params.description }}" />
|
||||
{{ else }}
|
||||
<meta property="og:description" content="{{ substr .Summary 0 160 }}" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<meta property="og:title"
|
||||
content='{{ .Site.Title | default "Ficurinia" }}' />
|
||||
{{ if .Site.Params.description }}
|
||||
<meta property="og:description" content="{{ .Site.Params.description }}" />
|
||||
{{ end }}
|
||||
<meta property="og:type" content="blog" />
|
||||
<meta property="og:image"
|
||||
content='{{ .Site.Params.icon512 | default "/img/icon.svg" | absURL }}' />
|
||||
{{ end }}
|
15
themes/hugo-ficurinia/layouts/partials/head_meta_seo.html
Normal file
15
themes/hugo-ficurinia/layouts/partials/head_meta_seo.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<meta name="author" content="{{ .Site.Params.Author }}" />
|
||||
{{ if .IsPage }}
|
||||
{{ if .Params.tags }}
|
||||
<meta name="keywords" content='{{ delimit (sort .Params.tags) ", "}}' />
|
||||
{{ end }}
|
||||
{{ if .Params.description }}
|
||||
<meta name="description" content="{{ .Params.description }}" />
|
||||
{{ else }}
|
||||
<meta name="description" content="{{ substr .Summary 20 }}" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if .Site.Params.description }}
|
||||
<meta name="description" content="{{ .Site.Params.description }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -0,0 +1,33 @@
|
|||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:domain"
|
||||
content='{{ trim (trim .Site.BaseURL "http://") "https://" }}'
|
||||
/>
|
||||
<meta property="twitter:url" content="{{ .Permalink | absURL }}" />
|
||||
|
||||
{{ if .IsPage }}
|
||||
<meta name="twitter:title" content="{{ .Title }}" />
|
||||
|
||||
{{ $image := .Site.Params.icon512 | default "/img/icon.svg" }}
|
||||
{{ if .Params.Image }}
|
||||
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
|
||||
{{ $image = .Params.Image }}
|
||||
{{ else }}
|
||||
{{ $image = print .Permalink "/" .Params.Image }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<meta name="twitter:image"
|
||||
content="{{ $image | absURL }}" />
|
||||
{{ if .Params.description }}
|
||||
<meta name="twitter:description" content="{{ .Params.description }}" />
|
||||
{{ else }}
|
||||
<meta name="twitter:description" content="{{ substr .Summary 0 160 }}" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<meta name="twitter:title"
|
||||
content='{{ .Site.Title | default "Ficurinia" }}' />
|
||||
{{ if .Site.Params.description }}
|
||||
<meta name="twitter:description" content="{{ .Site.Params.description }}" />
|
||||
{{ end }}
|
||||
<meta name="twitter:image"
|
||||
content='{{ .Site.Params.icon512 | default "/img/icon.svg" | absURL }}' />
|
||||
{{ end }}
|
63
themes/hugo-ficurinia/layouts/partials/header.html
Normal file
63
themes/hugo-ficurinia/layouts/partials/header.html
Normal file
|
@ -0,0 +1,63 @@
|
|||
<header class="{{ if .IsHome }}jumbotronContainer{{ end }}">
|
||||
{{- partial "inject/header-before.html" . -}}
|
||||
<div class="titleAndSearchContainer">
|
||||
<div id="titleContainer">
|
||||
{{ if not (.Site.Params.logoRightOfTitle | default false) }}
|
||||
<a class="unstyledLink" href="/">
|
||||
<img src='{{ .Site.Params.Logo | default "/logo.svg" }}' alt='{{ .Site.Params.LogoAltText | default "Logo" }}'/>
|
||||
</a>
|
||||
{{ end }}
|
||||
<div class="rightOfLogo">
|
||||
<div class="titleAndHamburger">
|
||||
<h1>
|
||||
<a class="unstyledLink" href="/">{{ .Site.Title | default "Ficurinia" }}</a>
|
||||
{{ if .Site.Params.logoRightOfTitle | default false }}
|
||||
<img src='{{ .Site.Params.Logo | default "/logo.svg" }}' alt='{{ .Site.Params.LogoAltText | default "Logo" }}'/>
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ if (.Site.Params.mobileHamburgerNav | default false) }}
|
||||
<label id="hamburger-menu" for="main-nav-toggler">
|
||||

|
||||
</label>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div id="wide_nav">
|
||||
{{- partial "header_navigation.html" . -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ if and (.Site.Params.searchbarEverywhere | default true) (and (.Site.Params.enableSearch | default true) (not (eq .Title "Search"))) }}
|
||||
{{- partial "searchbar.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div id="links">
|
||||
{{ if .Site.Params.showRss | default true }}
|
||||
{{- partial "iconlink" (dict "Identifier" "rss" "Name" "RSS" "URL" "/index.xml") -}}
|
||||
{{ end }}
|
||||
{{ range .Site.Params.links }}
|
||||
{{- partial "nerdlink" . -}}
|
||||
{{ end }}
|
||||
{{ range .Site.Menus.icons }}
|
||||
{{- partial "iconlink" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if and
|
||||
(.Site.Params.enableSidebarLayout | default false)
|
||||
(or
|
||||
(not (.Site.Params.enableJumbotron | default false))
|
||||
(not .IsHome)
|
||||
)
|
||||
}}
|
||||
<div id="sidebar_nav">
|
||||
{{- partial "header_navigation.html" . -}}
|
||||
</div>
|
||||
{{ if and .IsPage .Params.toc }}
|
||||
<div class="sidebarToc">
|
||||
<hr />
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- partial "inject/header-after.html" . -}}
|
||||
{{- partial "jumbotron.html" . -}}
|
||||
</header>
|
|
@ -0,0 +1,30 @@
|
|||
<nav>
|
||||
{{ if (.Site.Params.mobileHamburgerNav | default false) }}
|
||||
<input type="checkbox" id="main-nav-toggler" />
|
||||
{{ end }}
|
||||
<ul id="main-nav">
|
||||
<li><a href="/">{{ i18n "home" }}</a></li>
|
||||
{{ if (.Site.Params.showPostsLink | default true) }}
|
||||
<li><a href="/posts/">{{ i18n "posts" }}</a></li>
|
||||
{{ end }}
|
||||
{{ range site.Params.extraContentDirs }}
|
||||
<li><a href="/{{ . }}/">{{ . | humanize }}</a></li>
|
||||
{{ end }}
|
||||
{{ $pagesDir := .Site.Params.Pages | default (slice "pages") }}
|
||||
{{ $pagesList := where .Site.RegularPages "Section" "in" $pagesDir }}
|
||||
{{ range $pagesList }}
|
||||
<li><a href="{{ .Permalink }}">
|
||||
{{ or .Params.Button .Title }}
|
||||
</a></li>
|
||||
{{ end }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<li><a href="{{ .URL | safeURL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ if (.Site.Params.showTags | default true) }}
|
||||
<li><a href="/tags/">{{ i18n "tags" }}</a></li>
|
||||
{{ end }}
|
||||
{{ if and (.Site.Params.searchMenuLink | default false) (.Site.Params.enableSearch | default true) }}
|
||||
<li><a href="/search/">{{ i18n "search" }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
23
themes/hugo-ficurinia/layouts/partials/home_post_list.html
Normal file
23
themes/hugo-ficurinia/layouts/partials/home_post_list.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{ $allPostsList := .AllPostsList }}
|
||||
{{ $postsList := $allPostsList }}
|
||||
{{ $featuredPostsList := slice }}
|
||||
{{ $pagination := slice }}
|
||||
{{ if site.Params.enableFeatured | default false }}
|
||||
{{ $featuredPostsList = where $allPostsList "Params.featured" true }}
|
||||
{{ $postsList = union (where $allPostsList "Params.featured" false) (where $allPostsList "Params.featured" nil) }}
|
||||
{{ $pagination = (.Ctx.Paginate $postsList).Pages }}
|
||||
{{ if eq .Ctx.Paginator.PageNumber 1 }}
|
||||
{{- partial "featured_articles.html" $featuredPostsList -}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $pagination = (.Ctx.Paginate $postsList).Pages }}
|
||||
{{ end }}
|
||||
|
||||
{{/* pagination */}}
|
||||
<div class="postlist {{ if site.Params.gridView }}gridView{{ end }}" id="postlist">
|
||||
{{ range $pagination }}
|
||||
{{- partial "article_card.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div id="getNextBtnContainer"></div>
|
||||
{{- partial "paginator.html" .Ctx -}}
|
19
themes/hugo-ficurinia/layouts/partials/iconlink.html
Normal file
19
themes/hugo-ficurinia/layouts/partials/iconlink.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<a
|
||||
{{ if eq (lower .Identifier) "mastodon" }}
|
||||
rel="me"
|
||||
{{ else }}
|
||||
rel="noreferrer"
|
||||
{{ end }}
|
||||
target="_blank"
|
||||
class="nerdlink"
|
||||
href="{{ .URL | safeURL }}">
|
||||
{{ $icon := index site.Data.supported_icons (lower .Identifier) | safeHTML }}
|
||||
{{ if $icon }}
|
||||
{{ $icon | safeHTML }}
|
||||
{{ else }}
|
||||
{{ .Name }}
|
||||
{{ end }}
|
||||
<span>
|
||||
{{ .Name }}
|
||||
</span>
|
||||
</a>
|
1
themes/hugo-ficurinia/layouts/partials/inject/body.html
Normal file
1
themes/hugo-ficurinia/layouts/partials/inject/body.html
Normal file
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected before closing the body tag -->
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected after a post or page content -->
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected before a post or page content -->
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected at the beginning of the footer -->
|
1
themes/hugo-ficurinia/layouts/partials/inject/head.html
Normal file
1
themes/hugo-ficurinia/layouts/partials/inject/head.html
Normal file
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected before closing the head tag -->
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected before closing the header -->
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected just after opening the header -->
|
64
themes/hugo-ficurinia/layouts/partials/js_paginator.html
Normal file
64
themes/hugo-ficurinia/layouts/partials/js_paginator.html
Normal file
|
@ -0,0 +1,64 @@
|
|||
<script>
|
||||
const tagsStr = '{{ i18n "tags" | safeJS }}'
|
||||
|
||||
function renderTags(tags) {
|
||||
if (tags.length <= 0) return '';
|
||||
let res = `| <span title=''> </span>`;
|
||||
for (let tag of tags) {
|
||||
// regular space
|
||||
res += `<a href="/tags/${tag}/">#${tag}</a> `;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
function renderImage(image, link, alt) {
|
||||
if (!image) return '';
|
||||
return `<a href="${link}"><img src="${image}" alt="${alt}" /></a>`;
|
||||
}
|
||||
function renderSingleArticle(article) {
|
||||
{{ if (.Site.Params.tagsInArticlePreview | default true) }}
|
||||
const tags = renderTags(article.tags)
|
||||
{{ else }}
|
||||
const tags = ''
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.imageInArticlePreview }}
|
||||
const img = renderImage(article.image, article.link, article.imageAlt)
|
||||
{{ else }}
|
||||
const img = ''
|
||||
{{ end }}
|
||||
|
||||
{{ if (site.Params.articleSummary | default true) }}
|
||||
const continueReadingStr = '{{ i18n "continueReading" | safeJS }}'
|
||||
const summ = `<div class="articlePreview">
|
||||
<p>${article.summary}</p>
|
||||
<p><a href="${article.link}">${continueReadingStr} </a></p>
|
||||
</div>`
|
||||
{{ else }}
|
||||
const summ = ''
|
||||
{{ end }}
|
||||
|
||||
const dateStr = '{{ i18n "date" | safeJS }}'
|
||||
|
||||
return `
|
||||
<article class="card postlistitem">
|
||||
<div>
|
||||
<h2>
|
||||
<a href="${article.link}">${article.title}</a>
|
||||
</h2>
|
||||
<p class="date">
|
||||
<span title='${dateStr}'> </span>
|
||||
${article.date}
|
||||
${tags}
|
||||
</p>
|
||||
${img}
|
||||
${summ}
|
||||
</div>
|
||||
<hr />
|
||||
</article>
|
||||
`;
|
||||
}
|
||||
function renderArticles(articles) {
|
||||
let rendered = articles.map(a => renderSingleArticle(a)).join('\n');
|
||||
document.getElementById('postlist').innerHTML += rendered;
|
||||
}
|
||||
</script>
|
89
themes/hugo-ficurinia/layouts/partials/jumbotron.html
Normal file
89
themes/hugo-ficurinia/layouts/partials/jumbotron.html
Normal file
|
@ -0,0 +1,89 @@
|
|||
{{ if and .IsHome (and (.Site.Params.enableJumbotron | default false) .Site.Data.jumbotron) }}
|
||||
{{
|
||||
$jumbo_fullscreen := (or
|
||||
(.Site.Data.jumbotron.fullscreen | default false)
|
||||
(.Site.Data.jumbotron.backgroundVideo)
|
||||
)
|
||||
}}
|
||||
{{ if .Site.Data.jumbotron.backgroundVideo }}
|
||||
<div class="video_container">
|
||||
<video
|
||||
class="jumbotron_video"
|
||||
id="jumbotron_video"
|
||||
src="{{ .Site.Data.jumbotron.backgroundVideo }}"
|
||||
playsinline
|
||||
autoplay mute loop>
|
||||
{{ if .Site.Data.jumbotron.backgroundVideoMp4 }}
|
||||
<source src="{{ .Site.Data.jumbotron.backgroundVideoMp4 }}" type="video/mp4">
|
||||
{{ end }}
|
||||
{{ if .Site.Data.jumbotron.backgroundVideoWebm }}
|
||||
<source src="{{ .Site.Data.jumbotron.backgroundVideoWebm }}" type="video/webm">
|
||||
{{ end }}
|
||||
</video>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="jumbotron">
|
||||
{{ if .Site.Data.jumbotron.image }}
|
||||
<img src="{{ .Site.Data.jumbotron.image }}" />
|
||||
{{ end }}
|
||||
<div class="main_box">
|
||||
<h2 class="
|
||||
{{ if (.Site.Data.jumbotron.hugeTitle | default false) }}
|
||||
huge
|
||||
{{ end }}
|
||||
">{{ .Site.Data.jumbotron.title }}</h2>
|
||||
<h3>{{ .Site.Data.jumbotron.subtitle }}</h3>
|
||||
{{ if .Site.Data.jumbotron.backgroundVideo }}
|
||||
<ul id="play_button_container" style="display: none">
|
||||
<li>
|
||||
<a title="Play" style="border-radius: 100%; width: 32px; height: 32px; display: flex; justify-content: center; align-items: center;" class="shareBtn" onclick="playvideo();"> </a>
|
||||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
var jumbotron_video = document.getElementById('jumbotron_video');
|
||||
var play_button_container = document.getElementById('play_button_container');
|
||||
window.onload = function() {
|
||||
setTimeout(function() {
|
||||
if (jumbotron_video.paused) {
|
||||
play_button_container.style.display = 'block';
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
function playvideo() {
|
||||
jumbotron_video.play();
|
||||
play_button_container.style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ if .Site.Data.jumbotron.links }}
|
||||
<ul>
|
||||
{{ range .Site.Data.jumbotron.links }}
|
||||
<li>
|
||||
<a class="{{ if .huge }}huge{{ end }}" href="{{ .link | safeURL }}">
|
||||
{{ .title }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ if (
|
||||
and
|
||||
$jumbo_fullscreen
|
||||
(.Site.Data.jumbotron.downArrow | default false)
|
||||
) }}
|
||||
<div class="arrow" onclick="jumpdown();">
|
||||
<svg version="1.1" viewBox="0 0 33.867 33.867" xmlns="http://www.w3.org/2000/svg">
|
||||
<path transform="scale(.26459)" d="m16 34.346v8c0 2.3545 1.0067 4.4663 2.6152 5.9277l45.385 45.385 45.385-45.385c1.6086-1.4614 2.6152-3.5732 2.6152-5.9277v-8h-8c-2.335 0-4.4287 0.99084-5.8887 2.5762l-0.037109 0.039063-34.074 34.074-34.074-34.074c-0.012103-0.013323-0.024917-0.025824-0.037109-0.039063-1.4599-1.5853-3.5537-2.5762-5.8887-2.5762h-8z" />
|
||||
</svg>
|
||||
</div>
|
||||
<script>
|
||||
function jumpdown() {
|
||||
window.scrollTo({
|
||||
top: window.innerHeight, left: 0, behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
55
themes/hugo-ficurinia/layouts/partials/nerdlink.html
Normal file
55
themes/hugo-ficurinia/layouts/partials/nerdlink.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
<!-- NOTE: this is deprecated in favor of iconlink -->
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
class="nerdlink"
|
||||
href="{{ index . 1 }}">
|
||||
{{ if eq (lower (index . 0)) "gitlab" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "gnome" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "youtube" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "email" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "twitter" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "instagram" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "facebook" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "github" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "linkedin" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "telegram" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "xmpp" }}
|
||||
ﳽ
|
||||
{{ else if eq (lower (index . 0)) "pleroma" }}
|
||||
<svg class="pseudofont" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m4.2344 3.1826e-6a1.2455 1.2455 0 0 0-1.2404 1.2455 1.2455 1.2455 0 0 0 0 0.00515v14.749h3.976v-16h-2.7305a1.2455 1.2455 0 0 0-0.00515 0zm4.7477 0v8h2.7784a1.2455 1.2455 0 0 0 1.2455-1.2455 1.2455 1.2455 0 0 0 0-0.00515v-6.7493zm0 12.024v3.976h2.7784a1.2455 1.2455 0 0 0 1.2455-1.2455 1.2455 1.2455 0 0 0 0-0.0051v-2.7254z" />
|
||||
</svg>
|
||||
{{ else if eq (lower (index . 0)) "peertube" }}
|
||||
<svg class="pseudofont" width="16" height="16" version="1.1" viewBox="2799 -911 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m2801-911v8l5.9998-3.9996zm5.9998 4.0004v7.9993l5.9998-3.9996-5.9998-4.0004zm-5.9998 3.9996v8l5.9998-3.9996z"/>
|
||||
</svg>
|
||||
{{ else if eq (lower (index . 0)) "matrix" }}
|
||||
<svg class="pseudofont" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m0.61133 0v16h1.6498v-0.52679h-1.0762v-14.946h1.0762v-0.52679zm13.128 0v0.52679h1.0762v14.946h-1.0762v0.52679h1.6498v-16zm-6.8306 5.0527c-0.36785 0-0.69557 0.080576-0.98047 0.24219-0.28509 0.1618-0.52842 0.38949-0.73047 0.68359h-0.021484v-0.77148h-1.4512v5.7051h1.5371v-3.3105c-1e-7 -0.27957 0.039729-0.50668 0.11914-0.67969 0.079365-0.17278 0.17514-0.30442 0.28711-0.39648 0.11173-0.091827 0.22666-0.15439 0.3457-0.1875 0.11891-0.033206 0.21487-0.050781 0.28711-0.050781 0.24522 0 0.43037 0.042632 0.55664 0.12695 0.12617 0.084749 0.21736 0.19823 0.27148 0.33789 0.054214 0.1399 0.084431 0.29138 0.091797 0.45703 0.00694 0.16546 0.00977 0.33274 0.00977 0.50195v3.2012h1.5371v-3.1777c0-0.17658 0.013679-0.35257 0.039063-0.52539 0.025197-0.17301 0.074658-0.3266 0.15039-0.46289 0.075685-0.13596 0.18087-0.24728 0.31445-0.33203 0.13349-0.08432 0.309-0.12695 0.52539-0.12695 0.21639 0 0.38741 0.038028 0.51367 0.11133 0.12608 0.073632 0.22214 0.17384 0.28711 0.29883 0.06493 0.12527 0.1026 0.27229 0.11719 0.44141 0.01445 0.16935 0.02344 0.34786 0.02344 0.53906v3.2344h1.5371v-3.8184c0-0.36802-0.05142-0.68189-0.15234-0.94336-0.10121-0.26099-0.24168-0.47277-0.42188-0.63477-0.18039-0.16185-0.39609-0.27993-0.64844-0.35352-0.25272-0.073585-0.52842-0.10938-0.82422-0.10938-0.38965 0-0.72682 0.093949-1.0117 0.28516-0.28509 0.1913-0.50997 0.41395-0.67578 0.66406-0.15151-0.35325-0.3738-0.60033-0.66602-0.74023-0.29212-0.13966-0.61338-0.20898-0.9668-0.20898z" />
|
||||
</svg>
|
||||
{{ else if eq (lower (index . 0)) "mastodon" }}
|
||||
<svg class="pseudofont" xmlns:svg="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16">
|
||||
<path d="M 7.4779094,-1.598624e-6 C 5.5602384,0.0156984 3.7155894,0.2233384 2.6405814,0.7170384 c 0,0 -2.13206093,0.9537 -2.13206093,4.20766 0,0.74512 -0.01448,1.63603 0.0091,2.58084 0.07742,3.1821946 0.58336693,6.3183886 3.52553593,7.0971276 1.356568,0.359063 2.521335,0.434289 3.45936,0.382729 1.701085,-0.09431 2.6560206,-0.607063 2.6560206,-0.607063 l -0.05611,-1.234252 c 0,0 -1.2156316,0.383272 -2.5808476,0.33656 -1.352609,-0.04639 -2.780561,-0.145832 -2.999328,-1.80651 -0.0202,-0.145872 -0.03031,-0.301902 -0.03031,-0.465714 0,-10e-7 1.327834,0.324572 3.010574,0.40167 1.028943,0.0472 1.993827,-0.06028 2.9738766,-0.177218 1.879445,-0.224425 3.515901,-1.382448 3.721577,-2.4405646 0.32407,-1.666815 0.297376,-4.067605 0.297376,-4.067605 0,-3.25396 -2.131943,-4.20766 -2.131943,-4.20766 C 11.288476,0.2233384 9.4426784,0.0156784 7.5250084,-1.598624e-6 Z M 5.3076104,2.5424984 c 0.798781,0 1.403595,0.30701 1.803551,0.92113 l 0.388886,0.65181 0.388884,-0.65181 c 0.399875,-0.61412 1.00469,-0.92113 1.803551,-0.92113 0.6903266,0 1.2465526,0.24267 1.6713186,0.71609 0.411755,0.47342 0.61677,1.11337 0.61677,1.91862 v 3.939988 h -1.560986 v -3.824218 c 0,-0.80613 -0.339166,-1.21531 -1.0176126,-1.21531 -0.750129,0 -1.126049,0.48533 -1.126049,1.44509 v 2.09324 h -1.551753 v -2.09324 c 0,-0.95976 -0.376039,-1.44509 -1.126168,-1.44509 -0.678446,0 -1.017613,0.40918 -1.017613,1.21531 v 3.824218 h -1.560985 v -3.939988 c 0,-0.80525 0.205053,-1.4452 0.616889,-1.91862 0.424685,-0.47342 0.980911,-0.71609 1.671317,-0.71609 z" />
|
||||
</svg>
|
||||
{{ else if eq (lower (index . 0)) "phone" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "rss" }}
|
||||

|
||||
{{ else }}
|
||||
{{ index . 0 }}
|
||||
{{ end }}
|
||||
<span>
|
||||
{{ index . 0 }}
|
||||
</span>
|
||||
</a>
|
66
themes/hugo-ficurinia/layouts/partials/paginator.html
Normal file
66
themes/hugo-ficurinia/layouts/partials/paginator.html
Normal file
|
@ -0,0 +1,66 @@
|
|||
{{ if .Site.Params.infiniteScrolling }}
|
||||
{{- partial "js_paginator.html" . -}}
|
||||
<script>
|
||||
var nextPage = '/index.json';
|
||||
function getNext(first=false) {
|
||||
if (!nextPage) return;
|
||||
fetch(nextPage).then(res => res.json())
|
||||
.then(res => {
|
||||
nextPage = res['next'];
|
||||
if (first) {
|
||||
document.getElementById('getNextBtnContainer').innerHTML += `
|
||||
<div class="loadMoreButton {{ if eq .Site.Params.navtype "circles"}}buttonLike{{ end }}">
|
||||
<a style="cursor: pointer" onclick="getNext();">
|
||||
Load more articles
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
if (!nextPage) document.getElementById('getNextBtnContainer').innerHTML = '';
|
||||
renderArticles(res['articles']);
|
||||
});
|
||||
}
|
||||
getNext(true);
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.infiniteScrolling }}<noscript>{{ end }}
|
||||
{{ if gt .Paginator.TotalPages 1 }}
|
||||
{{ $navtype := .Site.Params.Navtype }}
|
||||
<div id="pageNavigation" class='
|
||||
{{ if eq $navtype "circles" }}
|
||||
nav-circles
|
||||
{{ end }}
|
||||
'>
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}" title='{{ i18n "previousPage" }}'>
|
||||
{{ if eq $navtype "circles" }}
|
||||
←
|
||||
{{ else }}
|
||||
<<<
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ $currentPage := .Paginator.PageNumber }}
|
||||
{{ range .Paginator.Pagers }}
|
||||
{{ if ne .PageNumber $currentPage }}
|
||||
<a href="{{ .URL }}">{{ .PageNumber }}</a>
|
||||
{{ else }}
|
||||
<span>
|
||||
{{ if eq $navtype "circles" }}{{ .PageNumber }}
|
||||
{{ else }}[{{ .PageNumber }}]{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}" title='{{ i18n "nextPage" }}'>
|
||||
{{ if eq $navtype "circles" }}
|
||||
→
|
||||
{{ else }}
|
||||
>>>
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.infiniteScrolling }}</noscript>{{ end }}
|
10
themes/hugo-ficurinia/layouts/partials/plausible.html
Normal file
10
themes/hugo-ficurinia/layouts/partials/plausible.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ if .Site.Params.plausibleScriptUrl }}
|
||||
{{ if .Site.Params.plausibleDomain }}
|
||||
<script
|
||||
async
|
||||
defer
|
||||
data-domain="{{ .Site.Params.plausibleDomain }}"
|
||||
src="{{ .Site.Params.plausibleScriptUrl }}"
|
||||
></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
23
themes/hugo-ficurinia/layouts/partials/related_articles.html
Normal file
23
themes/hugo-ficurinia/layouts/partials/related_articles.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{ if and (.Site.Params.enableRelatedArticles | default false) .Params.tags }}
|
||||
{{ $postsList :=
|
||||
where (
|
||||
where (
|
||||
where site.RegularPages "Params.tags" "!=" nil
|
||||
) "Params.tags" "intersect" .Params.tags
|
||||
) "Permalink" "ne" .Permalink
|
||||
}}
|
||||
{{ if $postsList }}
|
||||
{{ if site.Params.randomRelated | default false }}
|
||||
{{ $postsList = shuffle $postsList }}
|
||||
{{ end }}
|
||||
<div class="relatedArticlesContainer">
|
||||
<hr />
|
||||
<h2>{{ i18n "morePostsLikeThis" }}</h2>
|
||||
<div class="postlist {{ if .Site.Params.gridView }}gridView{{ end }}">
|
||||
{{ range first (.Site.Params.relatedArticlesNum | default 2) $postsList }}
|
||||
{{- partial "article_card.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
12
themes/hugo-ficurinia/layouts/partials/searchbar.html
Normal file
12
themes/hugo-ficurinia/layouts/partials/searchbar.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="search">
|
||||
<input id="searchbar" type="text" placeholder='{{ i18n "searchbarTxt" }}' />
|
||||
<span class="nerdlink" onclick="newSearch();"></span>
|
||||
</div>
|
||||
<script>
|
||||
function newSearch() {
|
||||
let term = searchbar.value.trim();
|
||||
if (!term) return;
|
||||
location.href = `/search/?q=${term}`;
|
||||
}
|
||||
searchbar.onkeyup = (ev) => {if (ev.keyCode == 13) newSearch()};
|
||||
</script>
|
|
@ -0,0 +1,45 @@
|
|||
{{ if site.Params.enableShareOnFediverse | default false }}
|
||||
<a style="margin-bottom: 24px; display: inline-block;" class="shareBtn" onclick="openFediInstanceDialog();">
|
||||
{{ i18n "shareOnTheFediverse" }}
|
||||
</a>
|
||||
<div id="fediInstanceDialog">
|
||||
<div class="bg" onclick="closeFediInstanceDialog();"></div>
|
||||
<div class="dialog">
|
||||
<h2>{{ i18n "enterFediverseInstanceAddress" }}</h2>
|
||||
<input id="fediInstanceInput" placeholder='{{ i18n "fediverseInstanceExample" }}' type="text" />
|
||||
<div class="buttons">
|
||||
<a class="shareBtn" onclick="closeFediInstanceDialog();">{{ i18n "cancel" }}</a>
|
||||
<a class="shareBtn" onclick="shareOnFedi();">{{ i18n "share" }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var articleTitle = '{{ .Title }}';
|
||||
var articleLink = '{{ .Permalink }}';
|
||||
var fediInstanceDialog = document.getElementById('fediInstanceDialog');
|
||||
var fediInstanceInput = document.getElementById('fediInstanceInput');
|
||||
function openFediInstanceDialog() {
|
||||
fediInstanceDialog.classList.add('open');
|
||||
}
|
||||
function closeFediInstanceDialog() {
|
||||
fediInstanceDialog.classList.remove('open');
|
||||
}
|
||||
function fixURL(url) {
|
||||
if (url.substr(0, 8) == 'https://') return url;
|
||||
if (url.substr(0, 7) == 'http://') return url;
|
||||
return 'https://' + url;
|
||||
}
|
||||
function shareOnFedi() {
|
||||
let instance = fediInstanceInput.value.trim();
|
||||
if (!instance) {
|
||||
return;
|
||||
}
|
||||
instance = fixURL(instance);
|
||||
window.open(
|
||||
`${instance}/share?text=${articleTitle}%20${articleLink}`,
|
||||
'__blank'
|
||||
);
|
||||
closeFediInstanceDialog();
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
19
themes/hugo-ficurinia/layouts/partials/showcase.html
Normal file
19
themes/hugo-ficurinia/layouts/partials/showcase.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ if .Site.Params.showcaseDir }}
|
||||
{{ $showcasePosts := where site.RegularPages "Section" "in" .Site.Params.showcaseDir }}
|
||||
<div class="postlist gridView">
|
||||
{{ range (sort $showcasePosts "File.LogicalName") }}
|
||||
{{ if in .File.Dir .Site.Params.showcaseDir }}
|
||||
<article class="card postlistitem">
|
||||
<div>
|
||||
<h2>{{ .Title }}</h2>
|
||||
{{ if .Params.image }}
|
||||
<img src="{{ .Params.image }}" />
|
||||
{{ end }}
|
||||
<div>{{ .Content }}</div>
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<hr />
|
||||
{{ end }}
|
|
@ -0,0 +1,38 @@
|
|||
<h2>
|
||||
{{ $title := .Title }}
|
||||
{{ $section := .Section | humanize }}
|
||||
{{ if and (ne $section $title) (ne $section "Tags") (ne $title (printf "%ss" $section)) }}
|
||||
{{ $section }}:
|
||||
{{ end }}
|
||||
{{ if and (eq $section "Tags") (eq $section $title) }}
|
||||
{{ i18n "tagsColumn" }}
|
||||
{{ else }}
|
||||
{{ if and (eq $section "Tags") (ne $section $title) }}{{ i18n "tagColumn" }} #{{ end }}{{ $title }}
|
||||
{{ end }}
|
||||
</h2>
|
||||
<ul class="list">
|
||||
{{ if and (eq $section "Tags") (eq $section $title) }}
|
||||
{{/* if we're in the Tags section, sort alphabetically and don't show the date */}}
|
||||
{{ range (sort .Pages "Title") }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">#{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<div>
|
||||
<span class="date">
|
||||
{{- partial "date.html" .Date -}}
|
||||
</span>
|
||||
<span>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{- 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 }} </span>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
58
themes/hugo-ficurinia/layouts/partials/single_post.html
Normal file
58
themes/hugo-ficurinia/layouts/partials/single_post.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
{{- 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 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 }}
|
||||
</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" . -}}
|
4
themes/hugo-ficurinia/layouts/partials/toc.html
Normal file
4
themes/hugo-ficurinia/layouts/partials/toc.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<div class="articleToc">
|
||||
{{ .TableOfContents }}
|
||||
<hr />
|
||||
</div>
|
10
themes/hugo-ficurinia/layouts/partials/umami.html
Normal file
10
themes/hugo-ficurinia/layouts/partials/umami.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ if .Site.Params.umamiScriptUrl }}
|
||||
{{ if .Site.Params.umamiWebsiteId }}
|
||||
<script
|
||||
async
|
||||
defer
|
||||
data-website-id="{{ .Site.Params.umamiWebsiteId }}"
|
||||
src="{{ .Site.Params.umamiScriptUrl }}"
|
||||
></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
1
themes/hugo-ficurinia/layouts/shortcodes/imgwwidth.html
Normal file
1
themes/hugo-ficurinia/layouts/shortcodes/imgwwidth.html
Normal file
|
@ -0,0 +1 @@
|
|||
<img src='{{ .Get "src" }}' alt='{{ .Get "alt" }}' style='max-width: {{ .Get "width" }};' />
|
33
themes/hugo-ficurinia/layouts/shortcodes/video.html
Normal file
33
themes/hugo-ficurinia/layouts/shortcodes/video.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{{ $h265 := .Get "h265" }}
|
||||
{{ $h264 := .Get "h264" }}
|
||||
{{ $vp9 := .Get "vp9" }}
|
||||
{{ $vp8 := .Get "vp8" }}
|
||||
{{ $caption := .Get "caption" }}
|
||||
{{ $attr := .Get "attr" }}
|
||||
{{ $attrlink := .Get "attrlink" }}
|
||||
<figure>
|
||||
<video autoplay loop controls style="max-width: 100%;">
|
||||
{{ if $h265 }}
|
||||
<source src='{{ $h265 }}' type="video/mp4" />
|
||||
{{ end }}
|
||||
{{ if $h264 }}
|
||||
<source src='{{ $h264 }}' type="video/mp4" />
|
||||
{{ end }}
|
||||
{{ if $vp9 }}
|
||||
<source src='{{ $vp9 }}' type="video/webm" />
|
||||
{{ end }}
|
||||
{{ if $vp8 }}
|
||||
<source src='{{ $vp8 }}' type="video/webm" />
|
||||
{{ end }}
|
||||
</video>
|
||||
{{ if or $caption $attr }}
|
||||
<figcaption>
|
||||
{{ if $caption }}
|
||||
<p>{{ . }}</p>
|
||||
{{ end }}
|
||||
<p>
|
||||
{{ if $attrlink }}<a href="{{ $attrlink }}">{{ end }}{{ $attr }}{{ if $attrlink }}</a>{{ end }}
|
||||
</p>
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
Loading…
Add table
Add a link
Reference in a new issue