image hover effect
This commit is contained in:
@@ -1,4 +1,21 @@
|
||||
{% set image = resize_image(path=path, width=width, height=height, op="fit") %}
|
||||
<a href="{{ get_url(path=path) }}" target="_blank">
|
||||
<img src="{{ image.url }}" />
|
||||
<a href="{{ get_url(path=path) }}"
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user