Compare commits

..

No commits in common. "3a1a890f67e78b74c44c17a58625c808cd7a164e" and "d96e905723a7e44cf9c5cad808018d4fd3788e83" have entirely different histories.

8 changed files with 240 additions and 120 deletions

View file

@ -29,8 +29,6 @@ Le blog contient deux types d'articles qui n'obéissent pas aux mêmes règles :
## Corrections à appliquer systématiquement
N'utilise pas de tiret quadratin. Emploie de la ponctuation classique : deux-points, point-virgule, point, virgule ou encore parenthèses en dernier recours.
### 1. Pronom personnel
**Dans les articles d'opinion** : remplacer le "on" par "je" quand c'est l'auteur qui parle.

View file

@ -13,8 +13,6 @@ params:
selfHosted: true
rss: true
readingTime: true
toc: false
colorScheme: "light"
thumb:
- src: "/img/happyDomain-domains-list.webp"

View file

@ -14,17 +14,11 @@
</div>
{{ end }}
<div class="row">
<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center footer-links">
{{- $data := dict -}}
{{- if ge hugo.Version "0.156.0" -}}
{{- $data = hugo.Data -}}
{{- else -}}
{{- $data = .Site.Data -}}
{{- end -}}
{{ range $data.beautifulhugo.social.social_icons }}
{{ range .Site.Data.beautifulhugo.social.social_icons }}
{{- if isset $.Site.Params.author .id }}
<li class="list-inline-item">
<li>
{{ 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 }}
@ -39,8 +33,8 @@
{{- end -}}
{{ end }}
{{ if .Site.Params.rss }}
{{ with .Site.Home.OutputFormats.Get "RSS" }}
<li class="list-inline-item">
{{ with .OutputFormats.Get "RSS" }}
<li>
<a href="{{ .RelPermalink }}" title="RSS">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
@ -147,7 +141,7 @@
</script>
<noscript>
<!-- Piwik Image Tracker -->
<img src="https://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&amp;rec=1" style="border:0" alt="" />
<img src="http://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<!-- End Piwik Code -->

View file

@ -1,91 +1,80 @@
{{- $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 }}
{{- $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 }}
{{ 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 }}
{{ else }}
{{- $title = .Title }}
{{- $subtitle = .Params.subtitle }}
{{- $bigimg = .Params.bigimg }}
{{- $headerImgStyle = .Params.headerImgStyle | default "big" }}
{{ $.Scratch.Set "title" .Title }}
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
{{ 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}}
data-img-src-{{add $i 1}}="{{ strings.TrimPrefix "/" $img.src | relURL }}"
{{ if (fileExists $img.src)}}
data-img-src-{{add $i 1}}="{{$img.src | absURL }}"
{{else}}
data-img-src-{{add $i 1}}="{{$img.src}}"
{{end}}
{{ 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 $thumbs }}
<div class="container" style="margin-top: 160px;">
<div class="thumbApps">
{{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 }}
</div>
<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="intro-header big-img">
{{ $subtitle := $.Scratch.Get "subtitle" }}
<div class="container">
<div class="row">
<div class="{{$contentColClass}}">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<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 }}
<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: {{ cond (isset $firstimg "desc") "inline" "none"}};">{{$firstimg.desc}}</span>
<span class="img-desc" style="display: inline;"></span>
</div>
{{end}}
{{ if and $title (not $thumbs) }}
{{ if $title }}
<div class="intro-header no-img">
<div class="container">
<div class="row">
<div class="{{$contentColClass}}">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<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 }}
{{ if ne .Type "post" }}
<hr class="small">
{{ end }}
{{ partial "header-subtitle.html" (dict "Context" . "Subtitle" $subtitle) }}
{{ if $isMainContent }}
{{ 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>
@ -93,8 +82,24 @@
</div>
</div>
</div>
{{ end }}
{{ partial "header_custom.html" . }}
{{ else }}
<div class="intro-header no-img"></div>
{{end}}
{{ if $thumbs }}
<div class="container">
<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}}
</div>
</a>
{{ end }}
</div>
<hr class="small">
</div>
{{ end }}
</header>
{{ else }}
<div class="intro-header"></div>

105
layouts/partials/nav.html Normal file
View file

@ -0,0 +1,105 @@
<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">&times;</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 }}

View file

@ -0,0 +1,28 @@
<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>

View file

@ -0,0 +1,21 @@
<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>

View file

@ -43,17 +43,10 @@ a:focus,
background: #00a185;
}
p:has(.about-icon) {
position: relative;
padding-left: 2em;
}
.about-icon {
margin-top: 5px;
position: absolute;
left: 0;
top: 0.25em;
width: 1.5em;
text-align: center;
left: -12px;
}
.navbar-custom {
@ -68,8 +61,7 @@ p:has(.about-icon) {
font-family: "Linux Biolinum O", 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.navbar-custom .nav-link,
.navbar-custom .navbar-nav .nav-link {
.navbar-custom .nav li a {
font-size: 14px;
}
@ -78,40 +70,33 @@ p:has(.about-icon) {
}
.navbar-custom .navbar-brand,
.navbar-custom .nav-link,
.navbar-custom .navbar-nav .nav-link,
.navbar-custom .theme-toggle {
.navbar-custom .nav li a {
font-weight: 800;
color: #fafafa;
}
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus,
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus,
.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link:focus {
.navbar-custom .navbar-brand:focus ,
.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus {
color: #00a185;
}
.navbar-custom .navbar-toggler {
border-color: #fafafa;
}
.navbar-custom .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28250, 250, 250, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-custom .dropdown-menu {
.navbar-custom .nav .navlinks-container .navlinks-children a {
background: #232323;
border: 1px solid #323232;
}
.navbar-custom .dropdown-item {
color: #fafafa;
@media only screen and (max-width: 767px) {
.navbar-custom .nav .navlinks-container.show-children {
background: #131313;
}
}
.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
background: #131313;
color: #00a185;
@media only screen and (min-width: 768px) {
.navbar-custom .nav .navlinks-container:hover {
background: #131313;
}
.navbar-custom .nav .navlinks-container .navlinks-children a {
border: 1px solid #323232;
}
}
footer {
@ -122,20 +107,6 @@ footer {
background-image: -webkit-linear-gradient(top, rgb(0,0,0) 4%, rgb(12,12,12) 42%, rgb(42,42,42) 100%);
background-image: -ms-linear-gradient(top, rgb(0,0,0) 4%, rgb(12,12,12) 42%, rgb(42,42,42) 100%);
}
footer .credits,
footer .theme-by,
footer .text-muted {
color: #aaaaaa !important;
}
footer .footer-links .fa-circle {
color: #00a185;
transition: color 0.2s ease;
}
footer .footer-links a:hover .fa-circle {
color: #0085a1;
}
footer a {
color: inherit;
}