feat: add favicons
This commit is contained in:
parent
0fb027cc94
commit
a421c812a5
36 changed files with 101 additions and 29 deletions
|
|
@ -20,9 +20,23 @@
|
|||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="shortcut icon" href="{{ . }}" />
|
||||
{{ end }}
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/icons/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/icons/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#025E73">
|
||||
<meta name="msapplication-TileImage" content="/icons/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#025E73">
|
||||
|
||||
<!-- Note: j'ai galérer à rajouter du scss car en fait y'avait déja une variable $style de définit plus haut... -->
|
||||
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS | resources.Fingerprint }}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
<nav class="site-header__nav desktop-nav">
|
||||
{{ if eq .File.Dir "/" }}
|
||||
<ul class="inline-menu-list">
|
||||
<li><a href="#association">L'association</a></li>
|
||||
<li><a href="#histoires">Histoire</a></li>
|
||||
<li><a href="#images">Galerie</a></li>
|
||||
<li><a href="#actualites">Actualités</a></li>
|
||||
<li><a href="#section-history">Histoire</a></li>
|
||||
<li><a href="#section-organization">L'association</a></li>
|
||||
<li><a href="#section-news">Actualités</a></li>
|
||||
<li><a href="/images">Galerie</a></li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if not (eq .File.Dir "/") }}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
{{ $result := dict "exists" false "permalink" nil "resource" nil "isDefault" false }}
|
||||
{{ $imageField := "featured_image" }}
|
||||
{{ $imageValue := index .Context.Params $imageField }}
|
||||
{{ printf "%#v" "hello debu" }}
|
||||
|
||||
{{ if $imageValue }}
|
||||
{{ $imageValue := index $imageValue "src" }}
|
||||
|
|
@ -33,7 +32,7 @@
|
|||
|
||||
{{ else }}
|
||||
<!-- Type arg is set, check for defaultImage setting -->
|
||||
{{ $defaultImageSetting := .Context.Site.Params.defaultImage }}
|
||||
{{ $defaultImageSetting := .Context.Site.Params.defaultCoverImage }}
|
||||
|
||||
{{ $result = merge $result (dict "isDefault" true) }}
|
||||
{{ $result = merge $result (dict "exists" true) }}
|
||||
|
|
@ -55,8 +54,6 @@
|
|||
<!-- External image -->
|
||||
{{ $result = merge $result (dict "permalink" (relURL $defaultImageSetting.src)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ return $result }}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,19 @@
|
|||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
|
||||
<meta property='og:title' content='{{ $title }}'>
|
||||
<meta property='og:description' content='{{ $description }}'>
|
||||
<meta property='og:url' content='{{ .Permalink }}'>
|
||||
<meta property='og:site_name' content='{{ .Site.Title }}'>
|
||||
<meta property='og:type' content='
|
||||
{{/* OpenGraph protocol reference https://ogp.me/ */}}
|
||||
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:description" content="{{ $description }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
<meta property="og:type" content="
|
||||
{{- if .IsPage -}}
|
||||
article
|
||||
{{- else -}}
|
||||
website
|
||||
{{- end -}}
|
||||
'>
|
||||
">
|
||||
|
||||
<meta property='og:locale' content='{{ .Site.LanguageCode }}'>
|
||||
|
||||
|
|
@ -24,19 +26,19 @@
|
|||
|
||||
{{- if .IsPage -}}
|
||||
{{- if not .Date.IsZero -}}
|
||||
<meta property='article:published_time' content='{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
|
||||
<meta property="article:published_time" content="{{- .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}" />
|
||||
{{- end -}}
|
||||
{{- if not .Lastmod.IsZero -}}
|
||||
<meta property='article:modified_time' content='{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
|
||||
<meta property="article:modified_time" content="{{- .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}" />
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if not .Site.LastChange.IsZero -}}
|
||||
<meta property='og:updated_time' content='{{ .Site.LastChange.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
|
||||
{{ if not .Site.LastChange.IsZero }}
|
||||
<meta property="og:updated_time" content="{{- .Site.LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}" />
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $image := partialCached "helpers/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
|
||||
{{- if $image.exists -}}
|
||||
<meta property='og:image' content='{{ absURL $image.permalink }}' />
|
||||
{{ if $image.exists }}
|
||||
<meta property='og:image' content='{{ absURL $image.permalink }}' />
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue