update
This commit is contained in:
parent
5d53a3d2d7
commit
b726671c60
82 changed files with 16057 additions and 11 deletions
163
layouts/livres/list.html
Executable file
163
layouts/livres/list.html
Executable file
|
@ -0,0 +1,163 @@
|
|||
{{- 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;
|
||||
}
|
||||
.post-entry h2 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
</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">
|
||||
<span>{{ .Date.Format "2006-01-02" }}</span>
|
||||
|
||||
<h2 class="entry-hint-parent">
|
||||
{{ .Title }}
|
||||
</h2>
|
||||
<span>{{ .Params.bookdata.author }}</span>
|
||||
{{ if isset .Params.bookdata "stargrade" }}
|
||||
{{ $stargrade := .Params.bookdata.stargrade }}
|
||||
<div class="book-stargrade">
|
||||
{{ range seq 1 $stargrade }}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 441" width="16px" height="16px">
|
||||
<path d="M 48 261 L 228 430 L 48 261 L 228 430 Q 240 441 256 441 Q 272 441 284 430 L 464 261 L 464 261 Q 511 217 512 152 L 512 146 L 512 146 Q 511 92 478 54 Q 445 15 393 5 Q 358 0 325 10 Q 293 20 268 45 L 256 57 L 256 57 L 244 45 L 244 45 Q 219 20 187 10 Q 154 0 119 5 Q 67 15 34 54 Q 1 92 0 146 L 0 152 L 0 152 Q 1 217 48 261 L 48 261 Z" />
|
||||
</svg>
|
||||
{{ end }}
|
||||
{{ if ne $stargrade 5 }}
|
||||
{{ range seq 1 (sub 5 $stargrade) }}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 445" width="16px" height="16px">
|
||||
<path d="M 226 433 L 223 431 L 226 433 L 223 431 L 48 268 L 48 268 Q 1 223 0 158 L 0 155 L 0 155 Q 1 101 34 61 Q 66 22 119 11 Q 181 0 231 35 Q 245 44 256 57 Q 262 50 270 44 Q 275 39 281 35 Q 281 35 281 35 Q 281 35 281 35 Q 331 0 393 10 Q 446 21 478 61 Q 511 101 512 155 L 512 158 L 512 158 Q 511 223 464 268 L 289 431 L 289 431 L 286 433 L 286 433 Q 273 445 256 445 Q 239 445 226 433 L 226 433 Z M 239 110 Q 239 110 238 109 L 238 109 L 238 109 Q 238 109 238 109 L 220 89 L 220 89 L 220 89 L 220 89 Q 220 89 220 89 Q 202 69 178 61 Q 154 53 128 58 Q 93 65 71 92 Q 49 118 48 155 L 48 158 L 48 158 Q 49 202 81 233 L 256 396 L 256 396 L 431 233 L 431 233 Q 463 202 464 158 L 464 155 L 464 155 Q 463 118 441 92 Q 419 65 384 58 Q 358 53 334 61 Q 310 69 292 89 Q 292 89 292 89 Q 292 89 292 89 L 274 109 L 274 109 Q 274 109 273 110 Q 273 110 273 110 Q 266 117 256 117 Q 246 117 239 110 L 239 110 Z" />
|
||||
</svg>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
</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