From 5a12e7aefa84635e03041163ba79943a96a13010 Mon Sep 17 00:00:00 2001 From: spitkov Date: Fri, 20 Sep 2024 17:13:37 +0200 Subject: [PATCH] part idk --- template/index.html | 221 +++++++++++++++++++++++++++++++++++++ template/login.html | 18 +++ template/manage_group.html | 24 ++++ template/post.html | 139 +++++++++++++++++++++++ template/post_detail.html | 162 +++++++++++++++++++++++++++ 5 files changed, 564 insertions(+) create mode 100644 template/index.html create mode 100644 template/login.html create mode 100644 template/manage_group.html create mode 100644 template/post.html create mode 100644 template/post_detail.html diff --git a/template/index.html b/template/index.html new file mode 100644 index 0000000..30436d6 --- /dev/null +++ b/template/index.html @@ -0,0 +1,221 @@ +{% extends "base.html" %} + +{% block title %}Home{% endblock %} + +{% block content %} +
+

TechTalks

+ + +
+ + +
+ + +
+ {% for post in posts %} +
+
+
+ {% if post.author %} + {% if post.author.profile_picture %} + Profile Picture + {% else %} +
+ {{ post.author.username[0].upper() }} +
+ {% endif %} + + {{ post.author.username }} + + {% else %} + {{ post.anonymous_username }} + {% endif %} + {{ post.timestamp.strftime('%Y-%m-%d %H:%M:%S') }} +
+

{{ post.content|safe }}

+ {% if post.image_url %} + Post image + {% endif %} +
+
+ + +
+
+ + Open in new tab + + + {% if current_user.is_authenticated and current_user.id == post.author.id %} + + Edit + + {% endif %} +
+
+
+ +
+ {% endfor %} +
+
+{% endblock %} + +{% block scripts %} +{{ super() }} + +{% endblock %} + +{% block styles %} +{{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/template/login.html b/template/login.html new file mode 100644 index 0000000..eafc255 --- /dev/null +++ b/template/login.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %}Login{% endblock %} + +{% block content %} +

Login

+
+
+ + +
+
+ + +
+ +
+{% endblock %} \ No newline at end of file diff --git a/template/manage_group.html b/template/manage_group.html new file mode 100644 index 0000000..eb369b0 --- /dev/null +++ b/template/manage_group.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block title %}Manage {{ group.name }}{% endblock %} + +{% block content %} +

Manage {{ group.name }}

+ +

Join Requests

+{% if join_requests %} +
+ {% for request in join_requests %} +
+

{{ request.user.username }} wants to join the group

+
+ + +
+
+ {% endfor %} +
+{% else %} +

No pending join requests.

+{% endif %} +{% endblock %} \ No newline at end of file diff --git a/template/post.html b/template/post.html new file mode 100644 index 0000000..0c416aa --- /dev/null +++ b/template/post.html @@ -0,0 +1,139 @@ +{% extends "base.html" %} + +{% block title %}Create Post{% endblock %} + +{% block content %} +

Create a New Post

+
+
+ + +
+
+ + +
+ {% if not current_user.is_authenticated %} +
+ + +
+ {% endif %} +
+ +
+
+{% endblock %} + +{% block styles %} +{{ super() }} + + +{% endblock %} + +{% block scripts %} +{{ super() }} + + +{% endblock %} \ No newline at end of file diff --git a/template/post_detail.html b/template/post_detail.html new file mode 100644 index 0000000..0203a29 --- /dev/null +++ b/template/post_detail.html @@ -0,0 +1,162 @@ +{% extends "base.html" %} + +{% block title %}Post Detail{% endblock %} + +{% block content %} +
+
+
+
+ {% if post.author %} + {% if post.author.profile_picture %} + Profile Picture + {% else %} +
+ {{ post.author.username[0].upper() }} +
+ {% endif %} + + {{ post.author.username }} + + {% else %} + {{ post.anonymous_username }} + {% endif %} + {{ post.timestamp.strftime('%Y-%m-%d %H:%M:%S') }} +
+

{{ post.content|safe }}

+ {% if post.image_url %} + Post image + {% endif %} +
+
+ + +
+
+ + {% if current_user.is_authenticated and current_user.id == post.author.id %} + + Edit + + {% endif %} +
+
+
+
+ +
+
+
Comments
+
    + {% for comment in post.comments %} + {% include 'comment.html' %} + {% endfor %} +
+
+
+ + +
+
+
+
+
+{% endblock %} + +{% block scripts %} +{{ super() }} + +{% endblock %} \ No newline at end of file