Remove main page, add parallax

This commit is contained in:
Nyymix 2025-03-02 23:46:40 +02:00
parent 669f9b999b
commit 3f5efe8f81
7 changed files with 53 additions and 43 deletions

View file

@ -4,6 +4,10 @@
<!-- Title -->
{% block title %} Gallery : Albums {% endblock %}
<!-- Parallax -->
{% block parallax %}
{% include "./partials/parallax.html" %}
{% endblock %}
<!-- Content -->
{% block content %}

View file

@ -1,27 +0,0 @@
{% extends "base_dark.html" %}
{% load top_tags %}
<!-- Title -->
{% block title %} Gallery {% endblock %}
<!-- Content -->
{% block content %}
Hello World!
<ul>
{% last_albums as albums %}
{% for album in albums %}
<li>{{ album.name }}</li>
{% endfor %}
</ul>
<ul>
{% top_photos as photos %}
{% for photo in photos %}
<li>{{ photo.views }} {{ photo.likes }} {{ photo.is_favorite }} {{ photo }}</li>
{% endfor %}
</ul>
<p>Istunto vanhenee: {{ session_expiry|date:"d.m.Y H:i" }}</p>
{% endblock %}

View file

@ -0,0 +1,21 @@
{% load top_tags %}
{% load static %}
<div class="uk-position-relative uk-visible-toggle uk-light" tabindex="-1" uk-slideshow="ratio: 7:3; autoplay: true; animation: fade">
<ul class="uk-slideshow-items">
{% random_photos_landscape as top_photos %}
{% if top_photos %}
{% for photo in top_photos %}
<li>
<img src="{{ photo.photo_bg.url }}" alt="{{ photo.album.name }} - {{ photo.slug }}" loading="lazy" uk-cover />
</li>
{% endfor %}
{% else %}
<li>
<img src="{% static 'img/placeholder.png' %}" alt="" uk-cover />
</li>
{% endif %}
</ul>
<a class="uk-position-center-left uk-position-small uk-hidden-hover" href="#" uk-slidenav-previous uk-slideshow-item="previous"></a>
<a class="uk-position-center-right uk-position-small uk-hidden-hover" href="#" uk-slidenav-next uk-slideshow-item="next"></a>
</div>

View file

@ -1,16 +1,22 @@
{% extends "base_dark.html" %}
{% load static %}
<!-- Title -->
{% block title %} Gallery : Photostream {% endblock %}
<!-- Parallax -->
{% block parallax %}
{% include "./partials/parallax.html" %}
{% endblock %}
<!-- Content -->
{% block content %}
{% load link_tags %}
<ul class="uk-tab uk-flex-left uk-margin-remove-top">
<ul class="uk-subnav uk-subnav-divider uk-margin-remove-top" uk-margin>
<li {% if order == 'latest' %}class="uk-active" {% endif %}><a href="{% search_link 'latest' request.GET %}">Latest</a></li>
<li {% if order == 'liked' %}class="uk-active" {% endif %}><a href="{% search_link 'liked' request.GET %}">Top Liked</a></li>
<li {% if order == 'liked' %}class="uk-active" {% endif %}><a href="{% search_link 'liked' request.GET %}">Liked</a></li>
<li {% if order == 'popular' %}class="uk-active" {% endif %}><a href="{% search_link 'popular' request.GET %}">Popular</a></li>
</ul>