Fix issue with multiline plant display when hovering

main
trivernis 1 year ago
parent 9c63b9f261
commit 4cb5e577a5
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -4,10 +4,17 @@
width: 100%; width: 100%;
display: block; display: block;
.plant-item { .plant-item-wrapper {
display: flex; margin: 0;
display: block;
float: left; float: left;
height: calc(128px + 2em);
width: calc(256px + 2em);
}
.plant-item {
margin: 1em; margin: 1em;
display: flex;
border-radius: 0.5em; border-radius: 0.5em;
box-shadow: 0.5em 0.5em $highlight; box-shadow: 0.5em 0.5em $highlight;
transition-duration: 0.25s; transition-duration: 0.25s;

@ -12,6 +12,7 @@
<div class="plants-list"> <div class="plants-list">
<!-- If you are using pagination, section.pages will be empty. You need to use the paginator object --> <!-- If you are using pagination, section.pages will be empty. You need to use the paginator object -->
{% for page in section.pages %} {% for page in section.pages %}
<div class="plant-item-wrapper">
<div class="plant-item"> <div class="plant-item">
{% set data = load_data(path="/static/plants/" ~ page.extra.data ~ "/metadata.toml") %} {% set data = load_data(path="/static/plants/" ~ page.extra.data ~ "/metadata.toml") %}
{% set image = resize_image(path=data.image.url, width=256, height=128, op="fill") %} {% set image = resize_image(path=data.image.url, width=256, height=128, op="fill") %}
@ -20,6 +21,7 @@
<h2 class="plant-title">{{ page.title }}</h2> <h2 class="plant-title">{{ page.title }}</h2>
</a> </a>
</div> </div>
</div>
{% endfor %} {% endfor %}
</div> </div>
{% endblock content %} {% endblock content %}
Loading…
Cancel
Save