Add: furaffinity home template

This commit is contained in:
Aroy-Art 2023-10-21 16:23:58 +02:00
parent 0a0b5eec56
commit 582a12335f
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -0,0 +1,62 @@
<!-- home.html -->
{% extends "base.html" %}
{% block title %}Home | Furaffinity Archive{% endblock %}
{% load custom_filters %}
{% load static %}
{% block content %}
<div class="row mt-2">
<h1>New Archive's</h1>
<div class="gallery-container">
{% for submission in new_archives %}
<a class="img-holder img-holder-small" href="{% url 'fa:submission_detail' submission_id=submission.submission_id %}">
<div class="layer">
<h3>{{ submission.title }}</h3>
<p>{{ submission.date |date:'Y-m-d H:i' }}</p>
</div>
{% if submission.file %}
{% if submission.file.file.url|is_image %}
{% if submission.mature_rating.mature == "Adult" or submission.mature_rating.mature == "Mature" %}
<img class="blur" src="{{ submission.file.file.url }}" alt="{{ submission.title }}">
{% else %}
<img src="{{ submission.file.file.url }}" alt="{{ submission.title }}">
{% endif %}
{% else %}
<img src="{% static 'img/no-image-dark.webp' %}" alt="No image">
{% endif %}
{% else %}
<img src="{% static 'img/no-image-dark.webp' %}" alt="No image">
{% endif %}
</a>
{% endfor %}
</div>
<h1>New Submission's</h1>
<div class="gallery-container">
{% for submission in new_submissions %}
<a class="img-holder img-holder-small" href="{% url 'fa:submission_detail' submission_id=submission.submission_id %}">
<div class="layer">
<h3>{{ submission.title }}</h3>
<p>{{ submission.date |date:'Y-m-d H:i' }}</p>
</div>
{% if submission.file %}
{% if submission.file.file.url|is_image %}
{% if submission.mature_rating.mature == "Adult" or submission.mature_rating.mature == "Mature" %}
<img class="blur" src="{{ submission.file.file.url }}" alt="{{ submission.title }}">
{% else %}
<img src="{{ submission.file.file.url }}" alt="{{ submission.title }}">
{% endif %}
{% else %}
<img src="{% static 'img/no-image-dark.webp' %}" alt="No image">
{% endif %}
{% else %}
<img src="{% static 'img/no-image-dark.webp' %}" alt="No image">
{% endif %}
</a>
{% endfor %}
</div>
</div>
{% endblock %}