mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-02-13 17:00:05 +00:00
Create Macros
This commit is contained in:
parent
3e3598ae10
commit
1fade10c41
onlylegs/templates/macros
9
onlylegs/templates/macros/header.html
Normal file
9
onlylegs/templates/macros/header.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{% macro header_small(title, subtitle, buttons) %}
|
||||||
|
<div class="banner-small">
|
||||||
|
<div class="banner-content">
|
||||||
|
<h1 class="banner-header">{{ title }}</h1>
|
||||||
|
<p class="banner-info">{{ subtitle }}</p>
|
||||||
|
<div class="pill-row">{{ buttons }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
15
onlylegs/templates/macros/image.html
Normal file
15
onlylegs/templates/macros/image.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{% macro gallery_item(image) %}
|
||||||
|
<a id="image-{{ image.id }}" class="gallery-item square" href="{{ url_for('image.image', image_id=image.id) }}" style="background-color: rgb{{ image.colours.0 }}">
|
||||||
|
<div class="image-filter"><p class="image-title"><span class="time">{{ image.created_at }}</span></p></div>
|
||||||
|
<picture>
|
||||||
|
<source srcset="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=thumb&e=webp">
|
||||||
|
<source srcset="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=thumb&e=png">
|
||||||
|
<img
|
||||||
|
src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=thumb"
|
||||||
|
alt="{% if image.alt %}{{ image.alt }}{% else %}Image Thumbnail{% endif %}"
|
||||||
|
onload="imgFade(this)"
|
||||||
|
style="opacity:0;"
|
||||||
|
/>
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
{% endmacro %}
|
Loading…
Reference in a new issue