Compare commits

...

14 commits

17 changed files with 216 additions and 41 deletions

29
i18n/en.yml Normal file
View file

@ -0,0 +1,29 @@
- id: prev_articles
translation: "Latest articles"
- id: next_articles
translation: "Oldest articles"
- id: prev_article
translation: "Previous article"
- id: next_article
translation: "Next article"
- id: toc
translation: "Table of Contents"
- id: posted_by
translation: "Posted by"
- id: updated_on
translation: "Last modified on"
- id: by
translation: "By"
- id: "on"
translation: "on"
- id: "date_fmt"
translation: "Jan 2 2006"

29
i18n/fr.yml Normal file
View file

@ -0,0 +1,29 @@
- id: prev_articles
translation: "Articles plus récents"
- id: next_articles
translation: "Articles plus anciens"
- id: prev_article
translation: "Article précédent"
- id: next_article
translation: "Article suivant"
- id: toc
translation: "Table des matières"
- id: posted_by
translation: "Posté par"
- id: updated_on
translation: "Mis à jour le"
- id: by
translation: "Par"
- id: "on"
translation: "le"
- id: "date_fmt"
translation: "2 Jan 2006"

View file

@ -14,21 +14,21 @@
</div>
<!-- Sidebar Container -->
<div class="
col-xl-8 offset-xl-2
col-xl-2
col-lg-10 offset-lg-1
sidebar-container">
<!-- Featured Tags -->
{{ if .Site.Params.featured_tags }}
<section>
<hr class="hidden-sm hidden-xs">
<hr class="d-none d-lg-block">
<h5><a href="/tags/">FEATURED TAGS</a></h5>
<div class="tags">
{{ $featured_condition_size := .Site.Params.featured_condition_size }}
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
{{ if gt (len $taxonomy.Pages) $featured_condition_size }}
<a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
{{ $name }}
<a class="badge badge-pill badge-secondary" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
#{{ $name }}
</a>
{{ end }}
{{ end }}

View file

@ -10,24 +10,26 @@
<div class="row">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<div class="post-heading">
<div class="tags">
{{ range .Params.tags }}
<a class="tag" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" title="{{ . }}">
{{ . }}
<h1 class="py-2">{{ .Title }}</h1>
{{ with .Params.subtitle }}<h2 class="subheading py-2 h4">{{ . }}</h2>{{ end }}
{{ with .Params.tags }}
<div class="tags py-2">
{{ range . }}
<a class="badge badge-pill badge-light" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" title="{{ . }}">
#{{ . }}
</a>
{{ end }}
</div>
<h1 class="py-2">{{ .Title }}</h1>
<h2 class="subheading py-2 h4">{{ .Params.subtitle }}</h2>
{{ end }}
<span class="meta">
Par
{{ i18n "by" }}
{{ if .Params.author }}
{{ .Params.author }}
{{ else }}
{{ .Site.Title }}
{{ end }}
le
{{ .Date.Format "2 Jan 2006" }}
{{ i18n "on" }}
{{ .Date.Format (i18n "date_fmt") }}
{{ if .Site.Params.page_view_conter }}
{{ partial "page_view_counter.html" . }}
{{ end }}
@ -57,26 +59,30 @@
{{ if not (eq (.Param "showtoc") false) }}
<header>
<h2>Sommaire</h2>
<h2>{{ i18n "toc" }}</h2>
</header>
{{.TableOfContents}}
{{ end }}
{{ .Content }}
<hr>
<div style="clear: both">
<div>
{{ if .PrevInSection }}
<a class="btn btn-outline-primary float-left" href="{{ .PrevInSection.URL }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">&larr;
Article précédent
<a class="mb-2 btn btn-outline-primary float-left" href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">&larr;
{{ i18n "prev_article" }}
</a>
{{ end }}
{{ if .NextInSection }}
<a class="btn btn-outline-primary float-right" href="{{ .NextInSection.URL }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title}}">
Article suivant &rarr;
<a class="mb-2 btn btn-outline-primary float-right" href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title}}">
{{ i18n "next_article" }} &rarr;
</a>
{{ end }}
</div>
<div class="mb-1" style="clear: both"></div>
{{ partial "comments.html" . }}
{{ partial "under_content.html" . }}
</div>
<!-- Sidebar Container -->
<div class="
@ -93,8 +99,8 @@
{{ $featured_condition_size := .Site.Params.featured_condition_size }}
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
{{ if gt (len $taxonomy.Pages) $featured_condition_size }}
<a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
{{ $name }}
<a class="badge badge-pill badge-secondary" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
#{{ $name }}
</a>
{{ end }}
{{ end }}

View file

@ -0,0 +1,2 @@
{{ $paginator := .Paginate (where .Data.Pages "Section" "post") }}
{{ partial "posts.html" . }}

View file

@ -0,0 +1,19 @@
{{ if .Site.Params.disqus_proxy }}
<div id="disqus-comment"></div>
<script src="{{ "js/iDisqus.js" | relURL }}"></script>
<script>
var disq = new iDisqus('disqus-comment', {
forum: '{{ site.Config.Services.Disqus.Shortname }}',
api: '{{ .Site.Params.disqus_proxy }}',
site: '{{ .Site.Params.disqus_site }}',
mode: 1,
timeout: 5000,
init: true
});
</script>
{{ else if site.Config.Services.Disqus.Shortname }}
<div id="disqus-comment"></div>
{{ template "_internal/disqus.html" . }}
{{ else if .Site.Params.Commento }}
<div id="commento"></div>
{{ end }}

View file

@ -5,8 +5,9 @@
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<ul class="list-inline text-center">
{{ if .Site.Params.social.rss }}
{{ with .OutputFormats.Get "rss" -}}
<li class="list-inline-item">
<a href='{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}' rel="alternate" type="application/rss+xml" title="{{ .Site.Title | default "" }}" >
<a href='{{ .RelPermalink }}' rel="alternate" type="application/rss+xml" title="{{ $.Site.Title | default "" }}" >
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-rss fa-stack-1x fa-inverse"></i>
@ -14,7 +15,8 @@
</a>
</li>
{{ end }}
{{ with .Site.Params.social.email }}
{{ end }}
{{ with .Site.Params.social.email }}
<li class="list-inline-item">
<a href="mailto:{{ . }}">
<span class="fa-stack fa-lg">
@ -200,8 +202,8 @@
{{ end }}
</ul>
<p class="copyright text-muted">
Copyright &copy; ArmaVirumque {{ now.Year }} |
<a href="https://www.armavirumque.fr/mentions-legales">Mentions légales</a>
Copyright &copy; {{ .Site.Copyright }} {{ now.Year }} |
<a href="{{ .Site.Params.legal_href }}">{{ .Site.Params.legal_txt }}</a>
</p>
</div>
</div>

View file

@ -49,7 +49,11 @@
<title>{{ if .Title }}{{ .Title }} - {{ .Site.Params.SEOTitle }}{{ else }}{{ .Site.Params.SEOTitle }}{{ end }}</title>
<link rel="canonical" href="{{ .URL | relURL }}">
<link rel="canonical" href="{{ .RelPermalink }}">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="{{ "css/bootstrap.min.css" | relURL }}">
@ -79,7 +83,7 @@
<script type="text/javascript" src="{{"js/lunr.min.js" | relURL}}"></script>
<script type="text/javascript" src="{{"js/auto-complete.js" | relURL}}"></script>
<script type="text/javascript">
{{ if .Site.IsMultiLingual }}
{{ if hugo.IsMultilingual }}
var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
{{ else }}
var baseurl = "{{.Site.BaseURL}}";
@ -87,6 +91,11 @@
</script>
<script type="text/javascript" src="{{"js/search.js" | relURL}}"></script>
{{ with .Site.Params.Commento }}
<!-- Commento JavaScript -->
<script defer src="{{ .scheme | default "https" }}://{{ .host }}/{{ .path | default "js/commento.js" }}"></script>
{{ end }}
<!-- Custom JS -->
{{ range .Site.Params.custom_js }}
<script src="{{ . | absURL }}"></script>
@ -98,5 +107,7 @@
})
</script>
<script async defer data-website-id="55cc7d60-2443-45ac-ab74-21ece8d3b7ed" src="https://pythagore.p0m.fr/pythagore.js"></script>
{{ with .Site.Params.Umami }}
<script async defer data-website-id="{{ .website_id }}" src="//{{ .host }}/{{ .path | default "umami.js" }}"></script>
{{ end }}
</head>

View file

@ -6,7 +6,7 @@
<div class="navbar-collapse">
<div class="navbar-nav mr-auto"></div>
<form class="flex-grow-1 mx-3 mx-md-4 mx-lg-5 pr-3" onsubmit="return false;">
<input id="search-by" class="form-control" placeholder="Rechercher un article&hellip;">
<input id="search-by" class="form-control" placeholder="{{ .Site.Params.search_txt }}">
</form>
<div class="navbar-nav mr-auto"></div>
<ul class="nav navbar-nav navbar-right">
@ -22,6 +22,18 @@
<li><a href="{{.href | relLangURL}}">{{.title}}</a></li>
{{ end }}
{{ if gt (len .Site.Home.AllTranslations) 1 }}
<div class="nav-item dropdown pr-1 pr-md-2 pr-lg-3 pr-xl-4">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ .Language }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{{ range .Site.Home.AllTranslations }}
<a href="{{ .Permalink }}" class="dropdown-item">{{ .Language }}</a>
{{ end }}
</div>
</div>
{{ end }}
{{ if .Site.Params.cta_nav }}
<li>
<a href="{{ .Site.Params.cta_nav_href | relLangURL }}" class="btn btn-primary">{{ .Site.Params.cta_nav_txt }}</a>

View file

@ -3,13 +3,13 @@
{{ if gt $pag.TotalPages 1 }}
<div style="clear: both">
{{ if $pag.HasPrev }}
<a class="btn btn-outline-primary float-left" href="{{ $pag.Prev.URL }}">
&larr; Articles plus récents
<a class="mb-2 btn btn-outline-primary float-left" href="{{ $pag.Prev.URL }}">
&larr; {{ i18n "prev_articles" }}
</a>
{{ end }}
{{ if $pag.HasNext }}
<a class="btn btn-outline-primary float-right" href="{{ $pag.Next.URL }}">
Articles plus anciens &rarr;
<a class="mb-2 btn btn-outline-primary float-right" href="{{ $pag.Next.URL }}">
{{ i18n "next_articles" }} &rarr;
</a>
{{ end }}
</div>

View file

@ -19,10 +19,10 @@
</div>
</a>
<p class="post-meta text-right">
Posté par {{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} le {{ .Date.Format "2 Jan 2006" }}
{{ i18n "posted_by" }} {{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} {{ i18n "on" }} {{ .Date.Format (i18n "date_fmt") }}
<!-- Don't show "Last Modified on" if update happened on the same day. -->
{{ if (and (not .Lastmod.IsZero) (not (eq (dateFormat "2006-01-02" .Lastmod) (dateFormat "2006-01-02" .Date)))) }}
<br>Mise à jour le {{ dateFormat "2 Jan 2006" .Params.LastMod }}
<br>{{ i18n "updated_on" }} {{ dateFormat (i18n "date_fmt") .Params.LastMod }}
{{ end }}
</p>

View file

@ -2,7 +2,7 @@
<div class="row">
<!-- USE SIDEBAR -->
<!-- Post Container -->
<div class="
<div class="
col-xl-8 offset-xl-1
col-lg-8 offset-lg-1
col-12

View file

@ -16,8 +16,8 @@
{{ $featured_condition_size := .Site.Params.featured_condition_size }}
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
{{ if gt (len $taxonomy.Pages) $featured_condition_size }}
<a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
{{ $name }}
<a class="badge badge-pill badge-secondary" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
#{{ $name }}
</a>
{{ end }}
{{ end }}
@ -28,11 +28,11 @@
<!-- Short About -->
{{ if .Site.Params.about_me }}
<section class="d-none d-lg-block">
<hr><h5 class="text-sc"><a href="{{ "/top/about" | relLangURL }}">À propos d'AVQ</a></h5>
<hr><h5 class="text-sc"><a href="{{ .Site.Params.about_link }}">{{ .Site.Params.about_txt }}</a></h5>
<div class="short-about">
{{ with .Site.Params.sidebar_avatar }}
<div class="text-center">
<a href="{{ "/top/about" | relLangURL }}">
<div class="text-center mb-2">
<a href="{{ $.Site.Params.about_link }}">
<img src="{{ . | relURL }}" alt="avatar" style="cursor: pointer" />
</a>
</div>

View file

View file

@ -0,0 +1,3 @@
{{ define "main" }}
{{ partial "category.html" . }}
{{ end }}

View file

@ -0,0 +1,6 @@
{{ define "main" }}
<div class="container">
<h2>Tag <span class="font-italic text-muted">#{{ .Data.Term }}</span></h2>
</div>
{{ partial "category.html" . }}
{{ end }}

View file

@ -0,0 +1,56 @@
{{ define "main" }}
<!-- Post Content -->
<article>
<div class="container">
<div class="row">
<!-- Post Container -->
<div class="
col-xl-7 offset-xl-1
col-lg-10 offset-lg-1
post-container">
{{ .Content }}
</div>
<!-- Sidebar Container -->
<div class="
col-xl-2
col-lg-10 offset-lg-1
sidebar-container">
<!-- Featured Tags -->
{{ if .Site.Params.featured_tags }}
<section>
<hr class="d-block d-xl-none">
<h5><a href="/tags/">Tags</a></h5>
<div class="tags">
{{ $featured_condition_size := .Site.Params.featured_condition_size }}
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
{{ if gt (len $taxonomy.Pages) $featured_condition_size }}
<a class="badge badge-pill badge-secondary" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
#{{ $name }}
</a>
{{ end }}
{{ end }}
</div>
</section>
{{ end }}
<!-- Friends Blog -->
{{ if .Site.Params.friends }}
<section>
<hr>
<h5>FRIENDS</h5>
<ul class="list-inline">
{{ range .Site.Params.friend_link }}
<li><a target="_blank" href="{{.href}}">{{.title}}</a></li>
{{ end }}
</ul>
</section>
{{ end }}
</div>
</div>
</div>
</article>
{{ end }}