shelfy/templates/media_list.pages.tmpl

84 lines
2.8 KiB
Cheetah
Raw Normal View History

2025-06-22 17:19:01 +00:00
<section class="section">
2025-06-21 18:16:20 +00:00
<div class="container">
2025-06-21 16:44:12 +00:00
2025-06-21 18:16:20 +00:00
<!-- Breadcrumb -->
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
{{if .CurrentSub}}
<li>
<a hx-get="/api/paths/{{.PathID}}/media"
2025-06-22 17:19:01 +00:00
hx-push-url="/api/paths/{{.PathID}}/media"
hx-target="#content"
hx-swap="innerHTML">
2025-06-21 18:16:20 +00:00
🔙 Racine
</a>
</li>
<li class="is-active"><a aria-current="page">{{.CurrentSub}}</a></li>
{{end}}
</ul>
</nav>
2025-06-21 16:44:12 +00:00
2025-06-21 18:16:20 +00:00
<!-- Sous-dossiers -->
{{if .Dirs}}
<div class="columns is-multiline">
{{range .Dirs}}
<div class="column is-one-quarter">
<div class="card">
<div class="card-content has-text-centered">
2025-06-22 17:19:01 +00:00
<a hx-get="/api/paths/{{$.PathID}}/media?sub={{.SubPath | urlquery}}"
hx-push-url="/api/paths/{{$.PathID}}/media?sub={{.SubPath | urlquery}}"
hx-target="#content"
hx-swap="innerHTML">
2025-06-21 18:16:20 +00:00
<span class="icon is-large">
<i class="fas fa-folder fa-2x"></i>
</span>
<p class="is-size-6">{{.Name}}</p>
</a>
</div>
</div>
</div>
2025-06-21 16:44:12 +00:00
{{end}}
2025-06-21 18:16:20 +00:00
</div>
{{end}}
2025-06-21 16:44:12 +00:00
2025-06-21 18:16:20 +00:00
<!-- Médias -->
{{if .MediaItems}}
<div class="columns is-multiline">
{{range .MediaItems}}
<div class="column is-one-quarter">
<div class="card">
<div class="card-image">
<figure class="image is-4by3">
2025-06-22 17:19:01 +00:00
<a hx-get="/media/{{.MediaPartID}}?path={{.FilePath | urlquery}}&pathID={{$.PathID}}&sub={{$.CurrentSub | urlquery}}"
hx-push-url="/media/{{.MediaPartID}}?path={{.FilePath | urlquery}}&pathID={{$.PathID}}&sub={{$.CurrentSub | urlquery}}"
hx-target="#content"
hx-swap="innerHTML">
2025-06-21 18:16:20 +00:00
<img src="{{.ThumbURL}}" alt="{{.Title}}">
</a>
</figure>
</div>
<div class="card-content">
2025-06-22 17:19:01 +00:00
<a hx-get="/media/{{.MediaPartID}}?path={{.FilePath | urlquery}}&pathID={{$.PathID}}&sub={{$.CurrentSub | urlquery}}"
hx-push-url="/media/{{.MediaPartID}}?path={{.FilePath | urlquery}}&pathID={{$.PathID}}&sub={{$.CurrentSub | urlquery}}"
hx-target="#content"
hx-swap="innerHTML">
2025-06-21 18:16:20 +00:00
<p class="title is-6 is-clipped">{{.Title}}</p>
2025-06-22 17:19:01 +00:00
{{if .DurationFmt}}<p class="subtitle is-7">{{.DurationFmt}}</p>{{end}}
2025-06-21 18:16:20 +00:00
</a>
</div>
</div>
</div>
{{end}}
</div>
{{end}}
2025-06-21 16:44:12 +00:00
2025-06-21 18:16:20 +00:00
<!-- Aucun contenu -->
{{if not .Dirs}}{{if not .MediaItems}}
<div class="notification is-light has-text-centered">
Aucun dossier ni média dans ce répertoire.
</div>
{{end}}{{end}}
2025-06-22 17:19:01 +00:00
2025-06-21 18:16:20 +00:00
</div>
</section>