Compare commits
No commits in common. "a0415d2cda286eacd79fe528130a9f54cb37ea98" and "21b84c9e9e70e13cac87bbd90c4493257516c1eb" have entirely different histories.
a0415d2cda
...
21b84c9e9e
8 changed files with 112 additions and 4 deletions
33
hugo.toml
33
hugo.toml
|
@ -54,6 +54,13 @@ enableMissingTranslationPlaceholders = false
|
|||
"posts",
|
||||
]
|
||||
|
||||
# Algolia site search section
|
||||
# See https://www.algolia.com/doc/
|
||||
algolia_search_enable = true
|
||||
algolia_indexName = "stan-site"
|
||||
algolia_appId = "7W4SAN4PLK"
|
||||
algolia_apiKey = "cbf12a63ff72d9c5dc0c10c195cf9128" # Search-Only API Key
|
||||
|
||||
# Global menu section
|
||||
# See https://gohugo.io/content-management/menus/
|
||||
[menu]
|
||||
|
@ -84,7 +91,31 @@ enableMissingTranslationPlaceholders = false
|
|||
ordered = false
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS"]
|
||||
home = ["HTML", "RSS", "Algolia"]
|
||||
|
||||
# Algolia Search configure section
|
||||
[outputFormats.Algolia]
|
||||
baseName = "algolia"
|
||||
mediaType = "application/json"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
[params.algolia]
|
||||
vars = [
|
||||
"title",
|
||||
"summary",
|
||||
"content",
|
||||
"date",
|
||||
"publishdate",
|
||||
"description",
|
||||
"permalink",
|
||||
"keywords",
|
||||
"lastmod",
|
||||
]
|
||||
params = [
|
||||
"tags",
|
||||
"categories",
|
||||
]
|
||||
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
|
|
44
layouts/partials/pagination.html
Normal file
44
layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
{{- $currentNode := . -}}
|
||||
<nav class="pagination">
|
||||
{{- template "pagination" dict "menu" .Site.Home "currentnode" $currentNode "menu_exclusion" .Site.Params.menu_exclusion -}}
|
||||
{{- with ($.Scratch.Get "prevPage") -}}
|
||||
<a class="nav nav-prev" href="{{ .Permalink }}" title="{{ .Title }}"><i class="fas fa-arrow-left" aria-hidden="true"></i> Précédent - {{ .Title }}</a>
|
||||
{{ end -}}
|
||||
{{- with ($.Scratch.Get "nextPage") -}}
|
||||
<a class="nav nav-next" href="{{ .Permalink }}" title="{{ .Title }}">Suivant - {{ .Title }} <i class="fas fa-arrow-right" aria-hidden="true"></i></a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
|
||||
{{- define "pagination" -}}
|
||||
{{- $currentNode := .currentnode -}}
|
||||
{{- $menu_exclusion := .menu_exclusion -}}
|
||||
|
||||
{{- if hasPrefix $currentNode.Permalink .menu.Permalink -}}
|
||||
{{- $currentNode.Scratch.Set "NextPageOK" "OK" -}}
|
||||
{{- if .menu.IsHome -}}
|
||||
{{- $currentNode.Scratch.Set "prevPage" "" -}}
|
||||
{{- else -}}
|
||||
{{- $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if eq ($currentNode.Scratch.Get "NextPageOK") "OK" -}}
|
||||
{{- $currentNode.Scratch.Set "NextPageOK" nil -}}
|
||||
{{ if in $menu_exclusion .menu.Section }}
|
||||
{{- else -}}
|
||||
{{- $currentNode.Scratch.Set "nextPage" .menu -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $currentNode.Scratch.Set "prevPageTmp" .menu -}}
|
||||
{{- $currentNode.Scratch.Set "pages" .menu.Pages -}}
|
||||
{{- if .menu.IsHome -}}
|
||||
{{- $currentNode.Scratch.Set "pages" .menu.Sections -}}
|
||||
{{- else if .menu.Sections -}}
|
||||
{{- $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) -}}
|
||||
{{- end -}}
|
||||
{{- $pages := ($currentNode.Scratch.Get "pages") -}}
|
||||
{{- range $pages.ByWeight -}}
|
||||
{{- template "pagination" dict "menu" . "currentnode" $currentNode "menu_exclusion" $menu_exclusion -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -200,6 +200,10 @@ figure > figcaption {
|
|||
background: variable.$sidebar-active-color;
|
||||
}
|
||||
|
||||
.fa-layers .fa-circle {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
figure > figcaption h4 {
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
|
@ -239,6 +243,11 @@ figure > figcaption h4 {
|
|||
|
||||
}
|
||||
|
||||
.headerlink > .svg-inline--fa {
|
||||
margin-left: .4rem;
|
||||
width: .8rem;
|
||||
}
|
||||
|
||||
.ais-SearchBox {
|
||||
.ais-SearchBox-input {
|
||||
width: 70%;
|
||||
|
|
|
@ -67,6 +67,10 @@ header {
|
|||
}
|
||||
}
|
||||
|
||||
.fa-angle-right {
|
||||
margin-left: .4rem;
|
||||
font-size: 80%;
|
||||
}
|
||||
li.parent:hover > ul.sub-menu {
|
||||
@include flexbox-grid-mixins.grid($flex-flow: column nowrap);
|
||||
}
|
||||
|
@ -82,6 +86,10 @@ header {
|
|||
}
|
||||
}
|
||||
|
||||
.fa-angle-right {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.sub-menu {
|
||||
display: block;
|
||||
position: static;
|
||||
|
|
|
@ -949,6 +949,10 @@ main:only-child {
|
|||
background: #eee;
|
||||
}
|
||||
|
||||
.fa-layers .fa-circle {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
figure > figcaption h4 {
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
|
@ -985,6 +989,11 @@ figure > figcaption h4 {
|
|||
margin-left: 10rem;
|
||||
}
|
||||
|
||||
.headerlink > .svg-inline--fa {
|
||||
margin-left: 0.4rem;
|
||||
width: 0.8rem;
|
||||
}
|
||||
|
||||
.ais-SearchBox .ais-SearchBox-input {
|
||||
width: 70%;
|
||||
}
|
||||
|
@ -1159,6 +1168,10 @@ header .github {
|
|||
.global-menu ul.sub-menu li a {
|
||||
color: var(--custom-font-color, #fff);
|
||||
}
|
||||
.global-menu .fa-angle-right {
|
||||
margin-left: 0.4rem;
|
||||
font-size: 80%;
|
||||
}
|
||||
.global-menu li.parent:hover > ul.sub-menu {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
@ -1179,6 +1192,9 @@ header .github {
|
|||
.global-menu li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.global-menu .fa-angle-right {
|
||||
display: none;
|
||||
}
|
||||
.global-menu ul.sub-menu {
|
||||
display: block;
|
||||
position: static;
|
||||
|
|
2
static/css/theme.min.css
vendored
2
static/css/theme.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
Subproject commit abb02d4cc1c3ed2d1fdc2477fd5e16d838bc9bad
|
||||
Subproject commit d4d62577b9df9014d79d44bff2c9a4fa89088dc4
|
|
@ -1 +1 @@
|
|||
Subproject commit e1b378209b52edb48e4a67ff1f9e52a3fba8b357
|
||||
Subproject commit 50d2f96b2dbc8199529d1255183f2cee0ad8452e
|
Loading…
Add table
Add a link
Reference in a new issue