Added Cloudflare R2 media storage support
Build and Publish / Build and Publish Docker Image (push) Successful in 1m44s

This commit is contained in:
Aleksandr Bogomiakov
2026-08-09 01:05:47 +01:00
parent 9ee5048a43
commit 15c9528f47
14 changed files with 885 additions and 116 deletions
+12 -10
View File
@@ -28,12 +28,16 @@
<div class="media-card">
{% if item.media.file_type == "photo" %}
<a href="{{ item.media.url }}" data-lightbox="photo">
<img src="{{ item.media.thumbnail_url }}" alt="" loading="lazy">
<span class="photo-thumb media-loading-frame is-loading">
<img src="{{ item.media.thumbnail_url }}" alt="" loading="lazy" data-media-load>
</span>
</a>
{% else %}
<a href="{{ item.media.url }}" data-lightbox="video">
<div class="video-thumb">
<video src="{{ item.media.url }}#t=0.1" preload="metadata" muted playsinline></video>
<div class="video-thumb media-loading-frame{% if !item.media.thumbnail_url.is_empty() %} is-loading{% endif %}" data-video-preview>
{% if !item.media.thumbnail_url.is_empty() %}
<img class="video-preview-sprite" src="{{ item.media.thumbnail_url }}" alt="" loading="lazy" data-media-load data-preview-frames="4">
{% endif %}
<span class="video-play"></span>
</div>
</a>
@@ -88,18 +92,16 @@
object-fit: cover;
display: block;
}
.media-card .photo-thumb {
width: 100%;
height: 160px;
}
.media-card .video-thumb {
position: relative;
width: 100%;
height: 160px;
background: #111;
}
.media-card .video-thumb video {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.media-card .video-play {
position: absolute;
top: 50%;
@@ -132,7 +134,7 @@
.media-grid {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.media-card img, .media-card .video-thumb {
.media-card img, .media-card .photo-thumb, .media-card .video-thumb {
height: 120px;
}
}