Aggiornamento assets e tema

This commit is contained in:
loviuz 2024-12-17 23:56:45 +01:00
parent 34953b5827
commit d9f16c3cfd
5 changed files with 12 additions and 82 deletions

View File

@ -37,7 +37,7 @@ pygmentscodefencesguesssyntax = true
liberapay_username = "loviuz"
stripe_donation_link = "https://donate.stripe.com/bIY14hdxefdxdoceUU"
[params.socialshare]
[params.socialsshare]
mastodon = true
facebook = true
linkedin = true
@ -54,41 +54,41 @@ email = true
# Social links
[[params.social]]
[[params.socials]]
name = "Telegram"
icon = "fa fa-telegram fa-2x"
weight = 1
url = "https://t.me/loviuz"
[[params.social]]
[[params.socials]]
name = "Mastodon"
icon = "fa fa-mastodon fa-2x"
weight = 2
url = "https://mastodon.uno/web/@loviuz86"
[[params.social]]
[[params.socials]]
name = "Gitea.it"
icon = "fa fa-git fa-2x"
weight = 3
url = "https://gitea.it/loviuz"
[[params.social]]
[[params.socials]]
name = "Codeberg"
icon = "fa fa-code fa-2x"
weight = 4
url = "https://codeberg.com/loviuz"
[[params.social]]
[[params.socials]]
name = "Gitlab"
icon = "fa fa-gitlab fa-2x"
weight = 5
url = "https://gitlab.com/loviuz"
[[params.social]]
[[params.socials]]
name = "Github"
icon = "fa fa-github fa-2x"
weight = 6
url = "https://github.com/loviuz/"
[[params.social]]
[[params.socials]]
name = "Twitter"
icon = "fa fa-twitter fa-2x"
weight = 7
url = "https://twitter.com/loviuz/"
url = "https://x.com/loviuz/"
# Menu links
[[menu.main]]

View File

@ -1,45 +0,0 @@
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{- with $.Params.images -}}
{{- $image := $.Resources.GetMatch (index . 0) -}}
<meta property="og:image" content="{{ $image.Permalink | replaceRE ".webp" ".jpg" }}" />
{{- else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
<meta property="og:image" content="{{ $featured.Permalink | replaceRE ".webp" ".jpg" }}"/>
{{- else -}}
{{- with $.Site.Params.images }}<meta property="og:image" content="{{ index . 0 | absURL | replaceRE ".webp" ".jpg" }}"/>{{ end -}}
{{- end -}}
{{- end -}}
{{- if .IsPage }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
<meta property="article:section" content="{{ .Section }}" />
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
{{- end -}}
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
{{- with .Params.videos }}{{- range . }}
<meta property="og:video" content="{{ . | absURL }}" />
{{ end }}{{ end }}
{{- /* If it is part of a series, link to related articles */}}
{{- $permalink := .Permalink }}
{{- $siteSeries := .Site.Taxonomies.series }}
{{ with .Params.series }}{{- range $name := . }}
{{- $series := index $siteSeries ($name | urlize) }}
{{- range $page := first 6 $series.Pages }}
{{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
{{- end }}
{{ end }}{{ end }}
{{- /* Facebook Page Admin ID for Domain Insights */}}
{{- with .Site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}

View File

@ -1,25 +0,0 @@
{{- with $.Params.images -}}
{{- $image := $.Resources.GetMatch (index . 0) -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ $image.Permalink | replaceRE ".webp" ".jpg" }}"/>
{{ else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
{{- else -}}
{{- with $.Site.Params.images -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
{{ else -}}
<meta name="twitter:card" content="summary"/>
{{- end -}}
{{- end -}}
{{- end }}
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
{{ with .Site.Social.twitter -}}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end -}}

View File

@ -3,7 +3,7 @@
<a class="navigation-title" href="{{ .Site.BaseURL | relLangURL }}">
<i class="fa fa-terminal"></i> {{ .Site.Title }}
</a>
{{ if or .Site.Menus.main .Site.IsMultiLingual }}
{{ if or .Site.Menus.main hugo.IsMultiLingual }}
<input type="checkbox" id="menu-toggle" />
<label class="menu-button float-right" for="menu-toggle">
<i class="fa fa-bars fa-fw" aria-hidden="true"></i>
@ -16,7 +16,7 @@
</li>
{{ end }}
{{ end }}
{{ if .Site.IsMultiLingual }}
{{ if or .Site.Menus.main hugo.IsMultilingual }}
{{ $node := . }}
{{ .Scratch.Set "separator" true }}
{{ range (default .Site.Home.AllTranslations .Translations) }}

@ -1 +1 @@
Subproject commit d8155219709d59557d17f44a552617ea5a7c990a
Subproject commit 5607e44d8c8f56b8b0389a0fb05a3ec4fb31d9ef