feat: add favicons

This commit is contained in:
Matthieu Bessat 2023-07-10 13:01:05 +02:00
parent 35c5977f47
commit eecc11878e
36 changed files with 101 additions and 29 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -17,7 +17,11 @@ dateFmt = "02.01.2006 15:04"
facebook = "https://www.facebook.com/groups/bethleemaubevoye"
twitter = "https://www.helloasso.com/associations/l-etoile-de-bethleem-association-des-amis-de-la-chapelle-de-bethleem-d-aubevoye/"
[params.defaultImage]
[params.defaultLogoImage]
local = true
src = "images/default_logo.png"
[params.defaultCoverImage]
local = true
src = "cover/cover.jpg"

View file

@ -1,5 +1,8 @@
---
title: "En attendant la campagne d'adhésion"
title: "Campagne d'adhésion l'Étoile de Bethléem - 2023-2024"
with_header: false
with_footer: false
description: Ouverture de la campagne d'adhésion le 14 juillet 2023
featured_image:
src: ./images/default_logo.png
---

View file

@ -36,7 +36,7 @@
*/}}
{{ $slides_count := 4 }}
<section class="history-container">
<section class="history-container" id="section-history">
<div class="page-container">
<h2>Une histoire mouvementée...</h2>
</div>
@ -223,7 +223,7 @@
<!-- <h2 class="page-container">Images</h2> -->
<!-- </section> -->
<section class="compare-section">
<section class="compare-section" id="section-compare">
<div class="page-container">
<h2>Un petit bout de palestine en Normandie...</h2>
<div class="compare-items compare-items-dynamic">
@ -311,7 +311,7 @@
</div>
</section>
<section class="organization-section">
<section class="organization-section" id="section-organization">
<div class="page-container">
<!-- <div class="organization__image"> -->
<!-- <!-1- {{ $image := resources.Get "images/assemblee_constitutive_ensemble.jpg" }} -1-> -->
@ -329,7 +329,7 @@
</div>
</section>
<section class="news-section">
<section class="news-section" id="section-news">
<div class="news-presentation">
{{ $pages := where .Site.RegularPages "Type" "in" "actualites" }}
{{ $pag := .Paginate ($pages) }}

View file

@ -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 }}

View file

@ -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 "/") }}

View file

@ -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 }}

View file

@ -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 -}}

11
static/browserconfig.xml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/icons/ms-icon-70x70.png" />
<square150x150logo src="/icons/ms-icon-150x150.png" />
<square310x310logo src="/icons/ms-icon-310x310.png" />
<TileColor>#ffffff</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
static/icons/apple-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/icons/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/icons/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

41
static/manifest.json Normal file
View file

@ -0,0 +1,41 @@
{
"name": "App",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}