changer le layout de la page livres, et ajouter du contenu pour avoir 3 colonnes
Some checks are pending
/ test (push) Waiting to run
Some checks are pending
/ test (push) Waiting to run
This commit is contained in:
parent
e4119f082c
commit
f497c74ef1
6 changed files with 217 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
||||||
title: Ishmael
|
title: Ishmael
|
||||||
date: 2024-10-21T09:58:00
|
date: 2024-10-21T09:58:00
|
||||||
draft: false
|
draft: false
|
||||||
|
ShowToc: false
|
||||||
cover:
|
cover:
|
||||||
hidden: false # hide everywhere but not in structured data
|
hidden: false # hide everywhere but not in structured data
|
||||||
hiddenInList: false # hide on list pages and home
|
hiddenInList: false # hide on list pages and home
|
||||||
|
@ -10,13 +11,19 @@ cover:
|
||||||
alt: "<alt text>"
|
alt: "<alt text>"
|
||||||
caption: "<text>"
|
caption: "<text>"
|
||||||
relative: true # To use relative path for cover image, used in hugo Page-bundles
|
relative: true # To use relative path for cover image, used in hugo Page-bundles
|
||||||
categories:
|
ShowBreadCrumbs: true
|
||||||
- Projet
|
ShowPostNavLinks: true
|
||||||
book-author:
|
ShowReadingTime: true
|
||||||
book-title :
|
tags:
|
||||||
book-isbn :
|
- test
|
||||||
|
BookData:
|
||||||
|
ISBN: "-"
|
||||||
|
Author: ""
|
||||||
|
Name: ""
|
||||||
|
PublishDate: ""
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# hello
|
||||||
Ishmael
|
Ishmael
|
||||||
|
|
||||||
(un bon livre)
|
(un bon livre)
|
BIN
content/livres/mecano/images/cover.png
Normal file
BIN
content/livres/mecano/images/cover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 166 KiB |
29
content/livres/mecano/index.md
Executable file
29
content/livres/mecano/index.md
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
title: Mécano
|
||||||
|
date: 2024-10-21T09:58:00
|
||||||
|
draft: false
|
||||||
|
ShowToc: false
|
||||||
|
cover:
|
||||||
|
hidden: false # hide everywhere but not in structured data
|
||||||
|
hiddenInList: false # hide on list pages and home
|
||||||
|
hiddenInSingle: true # hide on single page
|
||||||
|
image: "images/cover.png"
|
||||||
|
alt: "<alt text>"
|
||||||
|
caption: "<text>"
|
||||||
|
relative: true # To use relative path for cover image, used in hugo Page-bundles
|
||||||
|
ShowBreadCrumbs: true
|
||||||
|
ShowPostNavLinks: true
|
||||||
|
ShowReadingTime: true
|
||||||
|
tags:
|
||||||
|
- test
|
||||||
|
BookData:
|
||||||
|
ISBN: "-"
|
||||||
|
Author: ""
|
||||||
|
Name: ""
|
||||||
|
PublishDate: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# hello
|
||||||
|
Ishmael
|
||||||
|
|
||||||
|
(un bon livre)
|
BIN
content/livres/traite-tissage-lamoitier/images/cover.png
Normal file
BIN
content/livres/traite-tissage-lamoitier/images/cover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
29
content/livres/traite-tissage-lamoitier/index.md
Executable file
29
content/livres/traite-tissage-lamoitier/index.md
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
title: Traité théorique et pratique de tissage
|
||||||
|
date: 2024-10-21T09:58:00
|
||||||
|
draft: false
|
||||||
|
ShowToc: false
|
||||||
|
cover:
|
||||||
|
hidden: false # hide everywhere but not in structured data
|
||||||
|
hiddenInList: false # hide on list pages and home
|
||||||
|
hiddenInSingle: true # hide on single page
|
||||||
|
image: "images/cover.png"
|
||||||
|
alt: "<alt text>"
|
||||||
|
caption: "<text>"
|
||||||
|
relative: true # To use relative path for cover image, used in hugo Page-bundles
|
||||||
|
ShowBreadCrumbs: true
|
||||||
|
ShowPostNavLinks: true
|
||||||
|
ShowReadingTime: true
|
||||||
|
tags:
|
||||||
|
- test
|
||||||
|
BookData:
|
||||||
|
ISBN: "-"
|
||||||
|
Author: ""
|
||||||
|
Name: ""
|
||||||
|
PublishDate: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# hello
|
||||||
|
Ishmael
|
||||||
|
|
||||||
|
(un bon livre)
|
147
layouts/livres/list.html
Normal file
147
layouts/livres/list.html
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
{{- define "main" }}
|
||||||
|
|
||||||
|
{{- if (and site.Params.profileMode.enabled .IsHome) }}
|
||||||
|
{{- partial "index_profile.html" . }}
|
||||||
|
{{- else }} {{/* if not profileMode */}}
|
||||||
|
|
||||||
|
{{- if not .IsHome | and .Title }}
|
||||||
|
<header class="page-header">
|
||||||
|
{{- partial "breadcrumbs.html" . }}
|
||||||
|
<h1>
|
||||||
|
{{ .Title }}
|
||||||
|
{{- if and (or (eq .Kind `term`) (eq .Kind `section`)) (.Param "ShowRssButtonInSectionTermList") }}
|
||||||
|
{{- with .OutputFormats.Get "rss" }}
|
||||||
|
<a href="{{ .RelPermalink }}" title="RSS" aria-label="RSS">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round" height="23">
|
||||||
|
<path d="M4 11a9 9 0 0 1 9 9" />
|
||||||
|
<path d="M4 4a16 16 0 0 1 16 16" />
|
||||||
|
<circle cx="5" cy="19" r="1" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
</h1>
|
||||||
|
{{- if .Description }}
|
||||||
|
<div class="post-description">
|
||||||
|
{{ .Description | markdownify }}
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
</header>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.grid-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
|
||||||
|
gap: 10px; /* Space between grid items */
|
||||||
|
margin: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-entry {
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: var(--entry);
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-cover {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.entry-header {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 10px 16px 10px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-entry p {
|
||||||
|
margin: 0;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
{{- if .Content }}
|
||||||
|
<div class="post-content">
|
||||||
|
{{- if not (.Param "disableAnchoredHeadings") }}
|
||||||
|
{{- partial "anchored_headings.html" .Content -}}
|
||||||
|
{{- else }}{{ .Content }}{{ end }}
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="grid-container">
|
||||||
|
{{- range .Pages }}
|
||||||
|
<a href="{{ .Permalink }}" class="post-entry">
|
||||||
|
|
||||||
|
|
||||||
|
{{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }}
|
||||||
|
{{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }}
|
||||||
|
<header class="entry-header">
|
||||||
|
<h2 class="entry-hint-parent">
|
||||||
|
<span>{{ .Title }}</span>
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
{{- end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{{- $pages := union .RegularPages .Sections }}
|
||||||
|
|
||||||
|
{{- if .IsHome }}
|
||||||
|
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
|
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- $paginator := .Paginate $pages }}
|
||||||
|
|
||||||
|
{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
|
||||||
|
{{- partial "home_info.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- $term := .Data.Term }}
|
||||||
|
{{- range $index, $page := $paginator.Pages }}
|
||||||
|
|
||||||
|
{{- $class := "post-entry" }}
|
||||||
|
|
||||||
|
{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
|
||||||
|
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
|
||||||
|
{{- $class = "first-entry" }}
|
||||||
|
{{- else if $term }}
|
||||||
|
{{- $class = "post-entry tag-entry" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if gt $paginator.TotalPages 1 }}
|
||||||
|
<footer class="page-footer">
|
||||||
|
<nav class="pagination">
|
||||||
|
{{- if $paginator.HasPrev }}
|
||||||
|
<a class="prev" href="{{ $paginator.Prev.URL | absURL }}">
|
||||||
|
« {{ i18n "prev_page" }}
|
||||||
|
{{- if (.Param "ShowPageNums") }}
|
||||||
|
{{- sub $paginator.PageNumber 1 }}/{{ $paginator.TotalPages }}
|
||||||
|
{{- end }}
|
||||||
|
</a>
|
||||||
|
{{- end }}
|
||||||
|
{{- if $paginator.HasNext }}
|
||||||
|
<a class="next" href="{{ $paginator.Next.URL | absURL }}">
|
||||||
|
{{- i18n "next_page" }}
|
||||||
|
{{- if (.Param "ShowPageNums") }}
|
||||||
|
{{- add 1 $paginator.PageNumber }}/{{ $paginator.TotalPages }}
|
||||||
|
{{- end }} »
|
||||||
|
</a>
|
||||||
|
{{- end }}
|
||||||
|
</nav>
|
||||||
|
</footer>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end }}{{/* end profileMode */}}
|
||||||
|
|
||||||
|
{{- end }}{{- /* end main */ -}}
|
Loading…
Add table
Add a link
Reference in a new issue