Mise à jour du thème et améliorations de la mise en page
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Supprime les partiels surchargés (nav, SEO structuré) au profit du thème amont, réécrit header.html sans Scratch pour la compatibilité Hugo moderne, adapte footer et CSS au Bootstrap 5 (offset-*, list-inline-item, dropdown). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ad3360e3f9
commit
3a1a890f67
8 changed files with 120 additions and 240 deletions
|
|
@ -14,11 +14,17 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1">
|
||||
<ul class="list-inline text-center footer-links">
|
||||
{{ range .Site.Data.beautifulhugo.social.social_icons }}
|
||||
{{- $data := dict -}}
|
||||
{{- if ge hugo.Version "0.156.0" -}}
|
||||
{{- $data = hugo.Data -}}
|
||||
{{- else -}}
|
||||
{{- $data = .Site.Data -}}
|
||||
{{- end -}}
|
||||
{{ range $data.beautifulhugo.social.social_icons }}
|
||||
{{- if isset $.Site.Params.author .id }}
|
||||
<li>
|
||||
<li class="list-inline-item">
|
||||
{{ if or ( hasPrefix ( index $.Site.Params.author .id ) "http://" ) ( hasPrefix ( index $.Site.Params.author .id ) "https://" ) }}
|
||||
<a {{ if .rel }}rel="{{ .rel }}"{{- end -}} href="{{ printf "%s" (index $.Site.Params.author .id) }}" title="{{ .title }}">
|
||||
{{ else }}
|
||||
|
|
@ -33,8 +39,8 @@
|
|||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.rss }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<li>
|
||||
{{ with .Site.Home.OutputFormats.Get "RSS" }}
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ .RelPermalink }}" title="RSS">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
|
|
@ -141,7 +147,7 @@
|
|||
</script>
|
||||
<noscript>
|
||||
<!-- Piwik Image Tracker -->
|
||||
<img src="http://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&rec=1" style="border:0" alt="" />
|
||||
<img src="https://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&rec=1" style="border:0" alt="" />
|
||||
<!-- End Piwik -->
|
||||
</noscript>
|
||||
<!-- End Piwik Code -->
|
||||
|
|
|
|||
|
|
@ -1,98 +1,42 @@
|
|||
{{- $title := "" }}
|
||||
{{- $subtitle := "" }}
|
||||
{{- $bigimg := slice }}
|
||||
{{- $headerImgStyle := "big" }}
|
||||
{{- $thumbs := slice }}
|
||||
{{- $contentColClass := cond .Params.fullWidth "col-12" "col-md-10 offset-md-1" }}
|
||||
{{- $mainSections := default (slice "post" "posts") site.Params.mainSections }}
|
||||
{{- $isMainContent := in $mainSections .Type }}
|
||||
{{ if .IsHome }}
|
||||
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ end }}
|
||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||
{{ if .Site.Params.thumb }}{{ $.Scratch.Set "thumb" .Site.Params.thumb }}{{ end }}
|
||||
{{- $title = .Site.Params.homeTitle | default .Site.Title }}
|
||||
{{- $subtitle = .Site.Params.subtitle }}
|
||||
{{- $bigimg = .Site.Params.bigimg }}
|
||||
{{- $headerImgStyle = .Site.Params.headerImgStyle | default "big" }}
|
||||
{{- $thumbs = .Site.Params.thumb }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "title" .Title }}
|
||||
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||
{{- $title = .Title }}
|
||||
{{- $subtitle = .Params.subtitle }}
|
||||
{{- $bigimg = .Params.bigimg }}
|
||||
{{- $headerImgStyle = .Params.headerImgStyle | default "big" }}
|
||||
{{ end }}
|
||||
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||
{{ $title := $.Scratch.Get "title" }}
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
{{ $thumbs := $.Scratch.Get "thumb" }}
|
||||
|
||||
{{ if or (or $bigimg $title) $thumbs }}
|
||||
{{ if $bigimg }}
|
||||
<div id="header-big-imgs" data-num-img={{len $bigimg}}
|
||||
{{range $i, $img := $bigimg}}
|
||||
{{ if (fileExists $img.src)}}
|
||||
data-img-src-{{add $i 1}}="{{$img.src | absURL }}"
|
||||
{{else}}
|
||||
data-img-src-{{add $i 1}}="{{$img.src}}"
|
||||
{{end}}
|
||||
data-img-src-{{add $i 1}}="{{ strings.TrimPrefix "/" $img.src | relURL }}"
|
||||
{{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}
|
||||
{{ if $img.position}}data-img-position-{{add $i 1}}="{{$img.position}}"{{end}}
|
||||
{{end}}></div>
|
||||
{{ end }}
|
||||
|
||||
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
||||
{{ if $bigimg }}
|
||||
<div class="intro-header big-img">
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<hr class="small">
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="img-desc" style="display: inline;"></span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ if $title }}
|
||||
<div class="intro-header no-img">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
{{ if eq .Type "list" }}
|
||||
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
|
||||
{{ else }}
|
||||
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ end }}
|
||||
{{ if ne .Type "post" }}
|
||||
<hr class="small">
|
||||
{{ end }}
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="intro-header no-img"></div>
|
||||
{{end}}
|
||||
|
||||
{{ if $thumbs }}
|
||||
<div class="container">
|
||||
<div class="container" style="margin-top: 160px;">
|
||||
<div class="thumbApps">
|
||||
{{range $i, $thumb := $thumbs}}
|
||||
<a href="{{ $thumb.link | absURL }}" target="_blank">
|
||||
<div class="thumbApp" style="background-image:url('{{ $thumb.src | absURL }}')">
|
||||
{{ if $thumb.desc }}<p><span>{{ $thumb.desc }}</span></p>{{end}}
|
||||
{{range $thumbs}}
|
||||
<a href="{{ .link | absURL }}" target="_blank">
|
||||
<div class="thumbApp" style="background-image:url('{{ .src | absURL }}')">
|
||||
{{ if .desc }}<p><span>{{ .desc }}</span></p>{{end}}
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
|
@ -100,6 +44,57 @@
|
|||
<hr class="small">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if $bigimg }}
|
||||
{{- $firstimg := index $bigimg 0 }}
|
||||
<div class="intro-header big-img{{ if eq $headerImgStyle "narrow" }} narrow-img{{ end }}" style="background-image: url('{{ strings.TrimPrefix "/" $firstimg.src | relURL }}');">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="{{$contentColClass}}">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if not $isMainContent }}
|
||||
<hr class="small">
|
||||
{{ end }}
|
||||
{{ partial "header-subtitle.html" (dict "Context" . "Subtitle" $subtitle) }}
|
||||
{{ if $isMainContent }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="img-desc" style="display: {{ cond (isset $firstimg "desc") "inline" "none"}};">{{$firstimg.desc}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ if and $title (not $thumbs) }}
|
||||
<div class="intro-header no-img">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="{{$contentColClass}}">
|
||||
<div class="{{ .Type }}-heading">
|
||||
{{ if $bigimg }}
|
||||
<span class="h1">{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</span>
|
||||
{{ else }}
|
||||
{{ if eq .Type "list" }}
|
||||
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
|
||||
{{ else }}
|
||||
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $isMainContent }}
|
||||
<hr class="small">
|
||||
{{ end }}
|
||||
{{ partial "header-subtitle.html" (dict "Context" . "Subtitle" $subtitle) }}
|
||||
{{ if $isMainContent }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "header_custom.html" . }}
|
||||
</header>
|
||||
{{ else }}
|
||||
<div class="intro-header"></div>
|
||||
|
|
|
|||
|
|
@ -1,105 +0,0 @@
|
|||
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse navbar-custom">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">
|
||||
<span class="sr-only">{{ i18n "toggleNavigation" }}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="main-navbar">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ range .Site.Menus.main.ByWeight }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="navlinks-container">
|
||||
<a class="navlinks-parent">{{ .Name }}</a>
|
||||
<div class="navlinks-children">
|
||||
{{ range .Children }}
|
||||
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a title="{{ .Name }}" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if hugo.IsMultilingual }}
|
||||
{{ if ge (len .Site.Languages) 3 }}
|
||||
<li class="navlinks-container">
|
||||
<a class="navlinks-parent">{{ i18n "languageSwitcherLabel" }}</a>
|
||||
<div class="navlinks-children">
|
||||
{{ range .Site.Languages }}
|
||||
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
{{ range .Site.Languages }}
|
||||
{{ $lang := .Lang }}
|
||||
{{ if not (eq $lang $.Site.Language.Lang) }}
|
||||
{{ $translatedPage := false }}
|
||||
{{ range $.Translations }}
|
||||
{{ if eq .Lang $lang }}{{ $translatedPage = . }}{{ end }}
|
||||
{{ end }}
|
||||
{{ if $translatedPage }}
|
||||
<a href="{{ $translatedPage.Permalink }}" lang="{{ $lang }}">{{ default $lang .LanguageName }}</a>
|
||||
{{ else }}
|
||||
<a href="/{{ $lang }}" lang="{{ $lang }}">{{ default $lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Site.Params "gcse" }}
|
||||
<li>
|
||||
<a href="#modalSearch" data-toggle="modal" data-target="#modalSearch" style="outline: none;">
|
||||
<span class="hidden-sm hidden-md hidden-lg">{{ i18n "gcseLabelShort" }}</span> <span id="searchGlyph" class="glyphicon glyphicon-search"></span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{ if isset .Site.Params "logo" }}
|
||||
<div class="avatar-container">
|
||||
<div class="avatar-img-border">
|
||||
<a title="{{ .Site.Title }}" href="{{ "" | absLangURL }}">
|
||||
<img class="avatar-img" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Search Modal -->
|
||||
{{ if isset .Site.Params "gcse" }}
|
||||
<div id="modalSearch" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">{{ i18n "gcseLabelLong" . }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<gcse:search></gcse:search>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ i18n "gcseClose" }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "Article",
|
||||
"author": {
|
||||
"name" : "{{ if .Params.author -}}{{ .Params.author }}{{- else if .Site.Params.author.name -}}{{ .Site.Params.author.name }}{{- end }}"
|
||||
},
|
||||
"headline": "{{ .Title }}",
|
||||
"description" : "{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}",
|
||||
"inLanguage" : "{{ .Lang }}",
|
||||
"wordCount": {{ .WordCount }},
|
||||
"datePublished" : "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }}",
|
||||
"dateModified" : "{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }}",
|
||||
"image" : "{{ .Params.share_img | default .Params.image | default .Site.Params.logo | absURL }}",
|
||||
"keywords" : [ "{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}" ],
|
||||
"mainEntityOfPage" : "{{ .Permalink }}",
|
||||
"publisher" : {
|
||||
"@type": "Organization",
|
||||
"name" : "{{ .Site.BaseURL }}",
|
||||
"logo" : {
|
||||
"@type" : "ImageObject",
|
||||
"url" : "{{ .Site.Params.logo | absURL }}",
|
||||
"height" : 60 ,
|
||||
"width" : 60
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [{
|
||||
"@type": "ListItem",
|
||||
"position": 1,
|
||||
"item": {
|
||||
"@id": "{{ .Site.BaseURL }}",
|
||||
"name": "home"
|
||||
}
|
||||
},{
|
||||
"@type": "ListItem",
|
||||
"position": 2,
|
||||
"item": {
|
||||
"@id": "{{ .Permalink }}",
|
||||
"name": "{{ .Title | humanize }}"
|
||||
}
|
||||
}]
|
||||
}
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue