diff options
author | PortableProgrammer <[email protected]> | 2025-01-08 18:00:18 +0000 |
---|---|---|
committer | PortableProgrammer <[email protected]> | 2025-01-08 18:00:18 +0000 |
commit | 2c4522bef5c2f7b223b69d910a428c9c0eabb3d5 (patch) | |
tree | cf25e72c8e71a9cd48874f6719ad7a4149405091 /src/mixins | |
parent | 3cd139f528f6c8d8186843e800672d16fd1c5558 (diff) |
Remove `card`-specific `post` elements
Diffstat (limited to 'src/mixins')
-rw-r--r-- | src/mixins/post.pug | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/src/mixins/post.pug b/src/mixins/post.pug index 36ea1b8..df499e2 100644 --- a/src/mixins/post.pug +++ b/src/mixins/post.pug | |||
@@ -77,31 +77,28 @@ mixin post(p, currentUrl) | |||
77 | | #{p.domain} | 77 | | #{p.domain} |
78 | | ↗ | 78 | | ↗ |
79 | 79 | ||
80 | if (isPostGallery(p) || isPostImage(p) || isPostVideo(p)) | 80 | if query.view == "compact" && (isPostGallery(p) || isPostImage(p) || isPostVideo(p)) |
81 | details(id=`${p.id}`,class=`${query.view}`) | 81 | details(id=`${p.id}`) |
82 | summary.expand-post expand media | 82 | summary.expand-post expand media |
83 | div.image-viewer(class=`${query.view}`) | 83 | div.image-viewer |
84 | if isPostGallery(p) | 84 | if isPostGallery(p) |
85 | div.gallery(class=`${query.view}`) | 85 | div.gallery |
86 | each item in postGalleryItems(p) | 86 | each item in postGalleryItems(p) |
87 | div.gallery-item(class=`${query.view}`) | 87 | div.gallery-item |
88 | div.gallery-item-idx(class=`${query.view}`) | 88 | div.gallery-item-idx |
89 | | #{`${item.idx}/${item.total}`} | 89 | | #{`${item.idx}/${item.total}`} |
90 | a(href=`/media/${item.url}`) | 90 | a(href=`/media/${item.url}`) |
91 | img(src=item.url loading="lazy") | 91 | img(src=item.url loading="lazy") |
92 | else if isPostImage(p) | 92 | else if isPostImage(p) |
93 | a(href=`/media/${p.url}`) | 93 | a(href=`/media/${p.url}`) |
94 | img(src=p.url loading="lazy").post-media | 94 | img(src=p.url loading="lazy").post-media |
95 | else if isPostVideo(p) | 95 | else if isPostVideo(p) |
96 | video(controls="" muted="" data-dashjs-player="" preload="metadata" playsinline="" poster=decodedVideos[4] objectfit="contain" loading="lazy").post-media | 96 | video(controls="" muted="" data-dashjs-player="" preload="metadata" playsinline="" poster=decodedVideos[4] objectfit="contain" loading="lazy").post-media |
97 | //HLS | 97 | //HLS |
98 | source(src=decodedVideos[0]) | 98 | source(src=decodedVideos[0]) |
99 | // Dash | 99 | // Dash |
100 | source(src=decodedVideos[1]) | 100 | source(src=decodedVideos[1]) |
101 | // Fallback | 101 | // Fallback |
102 | source(src=decodedVideos[2]) | 102 | source(src=decodedVideos[2]) |
103 | button(onclick=`toggleDetails('${p.id}')`,class=`${query.view}`) | 103 | button(onclick=`toggleDetails('${p.id}')`) |
104 | if (query.view == 'card') | 104 | | close |
105 | | ╳ | ||
106 | else | ||
107 | | close | ||