Add slideshow
This commit is contained in:
parent
47b543bbb3
commit
38fa9ddf3f
4 changed files with 97 additions and 10 deletions
|
@ -88,7 +88,10 @@
|
|||
<div><a href="{{ photo.photo.url }}">{{ photo.width }}x{{ photo.height }}</a></div>
|
||||
</div>
|
||||
<div class="uk-grid-small" uk-grid>
|
||||
<button id="like-button" class="uk-button uk-button-primary">
|
||||
<a href="{% url 'gallery:photo_slideshow_url' photo.album.slug photo.slug %}" class="uk-button uk-button-secondary" target="_blank" rel="noopener">
|
||||
<span uk-icon="icon: play"></span> <span>Slideshow</span>
|
||||
</a>
|
||||
<button id="like-button" class="uk-button uk-button-secondary">
|
||||
<span id="heart-icon" uk-icon="icon: heart"></span> <span id="like-text">Like</span>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -157,7 +160,7 @@
|
|||
|
||||
if (data.status === "liked") {
|
||||
likeText.innerText = "Unlike";
|
||||
heartIcon.setAttribute("style", "color: red");
|
||||
heartIcon.setAttribute("style", "color: inherit");
|
||||
} else {
|
||||
likeText.innerText = "Like";
|
||||
heartIcon.setAttribute("style", "color: inherit");
|
||||
|
@ -171,7 +174,7 @@
|
|||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.getElementById('like-text').innerText = "Unlike";
|
||||
document.getElementById('heart-icon').setAttribute("style", "color: red");
|
||||
document.getElementById('heart-icon').setAttribute("style", "color: inherit");
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue