Skip to content

Commit 218f696

Browse files
committed
Add "play" button
1 parent 77138f3 commit 218f696

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

src/main/handlebars/feed.handlebars

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,8 @@
4444

4545
<a class="images is-preview" href="{{route this}}">
4646
{{#with images.0}}
47-
<div class="image">
48-
{{#if is.video}}
49-
<video controls playsinline preload="metadata" width="100%" poster="/image/{{slug}}/thumb-{{name}}.webp">
50-
<source src="/image/{{slug}}/video-{{name}}.mp4" type="video/mp4">
51-
</video>
52-
{{else}}
53-
<img alt="{{title}}, {{date meta.dateTime format='d.m.Y H:i'}}" {{#unless first}}loading="lazy"{{/unless}} {{&dataset meta}} src="/image/{{slug}}/thumb-{{name}}.webp" width="1024">
54-
{{/if}}
47+
<div class="{{#if is.video}}is-video{{/if}} image">
48+
<img alt="{{title}}, {{date meta.dateTime format='d.m.Y H:i'}}" {{#unless first}}loading="lazy"{{/unless}} {{&dataset meta}} src="/image/{{slug}}/thumb-{{name}}.webp" width="1024">
5549
</div>
5650
{{/with}}
5751
<div class="more">

src/main/handlebars/layout.handlebars

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,16 @@
574574
box-shadow: .25rem .25rem 1rem rgb(0 0 0 / .2);
575575
}
576576
577+
.is-video::after {
578+
content: url('/static/play.svg');
579+
position: absolute;
580+
inset: 0;
581+
margin: auto;
582+
width: max(5%, 2rem);
583+
aspect-ratio: 1 / 1;
584+
filter: drop-shadow(.25rem .25rem .25rem rgb(0 0 0 / .5));
585+
}
586+
577587
.more {
578588
--_size: 10rem;
579589
--_overlap: 8rem;

src/main/webapp/static/play.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)