diff options
| author | eltrac <hi@eltr.ac> | 2026-05-13 15:12:35 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-05-13 15:12:35 +0800 |
| commit | a1afd3f041bbdfa61820311216ca9418ef5b1fa3 (patch) | |
| tree | 96ee689fcc1a658048b1b3d95cb4a5bb5c4ff494 | |
| parent | c1ed09c61fc2390fc29c5e70fe703a96339766ab (diff) | |
refactor(partials): move items/book to components/book
We need NoViewTransition attribute to be passed to this partial and
Content View (.Render) does not support that. book partial cannot be
refactored to view_book, it needs to stay. But since there are no other
"items" partials (they're all content views now), items/book is now
moved under components.
| -rw-r--r-- | layouts/_partials/components/book.html (renamed from layouts/_partials/items/book.html) | 0 | ||||
| -rw-r--r-- | layouts/_partials/term/term-books.html | 2 | ||||
| -rw-r--r-- | layouts/library/page.html | 2 | ||||
| -rw-r--r-- | layouts/library/section.html | 4 |
4 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_partials/items/book.html b/layouts/_partials/components/book.html index d9fee4f..d9fee4f 100644 --- a/layouts/_partials/items/book.html +++ b/layouts/_partials/components/book.html diff --git a/layouts/_partials/term/term-books.html b/layouts/_partials/term/term-books.html index 2bd4829..3f7e82e 100644 --- a/layouts/_partials/term/term-books.html +++ b/layouts/_partials/term/term-books.html @@ -3,7 +3,7 @@ <h2>{{ T "termPage.books" }}</h2> <div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4"> {{ range $books }} - {{ partial "items/book" (dict "ctx" .) }} + {{ partial "components/book" (dict "ctx" .) }} {{ end }} </div> {{ end }} diff --git a/layouts/library/page.html b/layouts/library/page.html index 00bb94f..eb5f152 100644 --- a/layouts/library/page.html +++ b/layouts/library/page.html @@ -45,7 +45,7 @@ {{ range $term.Pages }} {{ if ne .File.UniqueID $.File.UniqueID }} <div data-tooltip="{{ .Title }}"> - {{ partial "items/book" (dict "ctx" .) }} + {{ partial "components/book" (dict "ctx" .) }} </div> {{ end }} {{ end }} diff --git a/layouts/library/section.html b/layouts/library/section.html index bb297a0..fa84631 100644 --- a/layouts/library/section.html +++ b/layouts/library/section.html @@ -34,7 +34,7 @@ {{ end }} {{ range $i, $book := $booksToShow }} <div class="{{ if gt $i 15 }}hidden md:block{{ end }}"> - {{ partial "items/book" (dict + {{ partial "components/book" (dict "ctx" $book ) }} </div> @@ -70,7 +70,7 @@ )}} <div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4"> {{ range $goodBooks }} - {{ partial "items/book" (dict + {{ partial "components/book" (dict "ctx" . "NoViewTransition" true ) }} |
