image hover effect
This commit is contained in:
@@ -1,4 +1,21 @@
|
|||||||
{% set image = resize_image(path=path, width=width, height=height, op="fit") %}
|
{% set image = resize_image(path=path, width=width, height=height, op="fit") %}
|
||||||
<a href="{{ get_url(path=path) }}" target="_blank">
|
<a href="{{ get_url(path=path) }}"
|
||||||
<img src="{{ image.url }}" />
|
style="position:relative; display:inline-block;"
|
||||||
|
target="_blank"
|
||||||
|
onmouseenter="this.querySelector('img').style.opacity='0.2'; this.querySelector('span').style.opacity='1';"
|
||||||
|
onmouseleave="this.querySelector('img').style.opacity='1'; this.querySelector('span').style.opacity='0';">
|
||||||
|
<img src="{{ image.url }}" style="display:block; transition:opacity 0.3s;">
|
||||||
|
<span style="
|
||||||
|
position:absolute;
|
||||||
|
inset:0;
|
||||||
|
display:flex;
|
||||||
|
align-items:center;
|
||||||
|
justify-content:center;
|
||||||
|
color:black;
|
||||||
|
font-size:20px;
|
||||||
|
opacity:0;
|
||||||
|
transition:opacity 0.3s;
|
||||||
|
">
|
||||||
|
Für besseres Foto klicken
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user