This commit is contained in:
2025-05-18 05:21:16 -05:00
parent 132073ca19
commit c19bedc54a
65 changed files with 705 additions and 575 deletions

View File

@ -0,0 +1 @@
# core_ui media patch

View File

@ -0,0 +1 @@
{ "name": "core_ui", "version": "1.1", "description": "Media rendering macros and styling helpers" }

View File

@ -0,0 +1,14 @@
{% macro render_media_list(media_list, thumb_width=150) -%}
{% if media_list %}
<ul class="media-thumbnails">
{% for media in media_list %}
<li>
<img src="{{ url_for('media.media_file', filename=media.file_url) }}" width="{{ thumb_width }}">
{% if media.caption %}
<p>{{ media.caption }}</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{%- endmacro %}

View File

@ -0,0 +1,18 @@
<style>
.media-thumbnails {
list-style-type: none;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.media-thumbnails li {
display: inline-block;
text-align: center;
}
.media-thumbnails img {
border: 1px solid #ccc;
border-radius: 4px;
padding: 2px;
}
</style>