From 59def7382eadda28f01f7f245434846243425d28 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Fri, 27 Dec 2024 20:58:28 +0100 Subject: [PATCH] Add basic submissions template --- .../apps/templates/sites/submission.html | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 archivist/apps/templates/sites/submission.html diff --git a/archivist/apps/templates/sites/submission.html b/archivist/apps/templates/sites/submission.html new file mode 100644 index 0000000..0a067b4 --- /dev/null +++ b/archivist/apps/templates/sites/submission.html @@ -0,0 +1,147 @@ +{% extends "layouts/base-electric.html" %} + +{% load static %} + +{% load media_filters %} + +{% load string_helper %} + +{% block title %} + {% if submission.content_object.title %} + {{ submission.content_object.title }} + {% else %} + {% if submission.content_object.description|length > 16 %} + {{ submission.content_object.description|slice:"0:16"|add:"..." }} + {% else %} + {{ submission.content_object.description }} + {% endif %} + {% endif %} + + by {{ submission.content_object.author.artist }} + {% if submission.category.name == "twitter" %} + (@{{ submission.content_object.author.artist_url }}) from Twitter + + {% elif submission.category.name == "furaffinity" %} + {{ submission.content_object.artist }} from FurAffinity + {% endif %} + +{% endblock title %} + +{% block content %} + + {% include "includes/navigation-transparent.html" %} + +
+
+ +
+
+
+ {% if submission.content_object.files.exists %} + + {% if submission.content_object.files.all|length == 1 %} + + + {% elif submission.content_object.files.first.file_mime|is_image %} + {{ submission.content_object.title }} + + + class="border-0 m-auto flex-grow-1 p-0"> + {% endif %} + {% endif %} + {% else %} +
+

No content

+
+

This submission has no media or is missing media.

+
+ {% endif %} + +
+
+
+ +
+
+
+ {% include "sites/partials/post-info.html" with submission=submission %} +
+
+
+ +
+ +
+
+ + {% if submission.content_object.title %} +

{{ submission.content_object.title }}

+
+ {% endif %} + +
+ {% if next_submission %} + Next + {% else %} + Next + {% endif %} + + View Artist + + {% if prev_submission %} + Prev + {% else %} + Prev + {% endif %} + + {% if submission.category.name == "twitter" %} + + View Source + + {% elif submission.category.name == "furaffinity" %} + + View Source + + {% endif %} + + {% if request.user.is_staff or request.user.is_superuser %} + + {% endif %} + +
+ +
+ + {% if submission.content_object.description %} + {% if submission.category.name == "twitter" %} +

{{ submission.content_object.description|clickable_urls|get_twitter_username_from_str|get_tags_from_str|safe }}

+ {% else %} +

{{ submission.content_object.description|stylizeDescription|clickable_urls|safe }}

+ {% endif %} + {% else %} +

No description

+ {% endif %} + +
+
+
+
+
+ {% include "sites/partials/post-info.html" with submission=submission %} +
+
+ +
+ +{% endblock content %}