diff options
| author | Bobby <[email protected]> | 2025-07-16 13:18:20 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-07-16 13:18:20 +0530 |
| commit | f13506cfba2da90764620dab2c624ac74767de62 (patch) | |
| tree | 1651ed298d3f7c9dc7f6a5ccc03da7f0d133f5d6 /templates | |
| parent | f352d2678f91e4f4ea6902d084fb9590e2819e92 (diff) | |
| download | imageboard-f13506cfba2da90764620dab2c624ac74767de62.tar.xz imageboard-f13506cfba2da90764620dab2c624ac74767de62.zip | |
constants and types refactor; next value for proper redirect on login
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/login.django | 3 | ||||
| -rw-r--r-- | templates/partials/navbar.django | 2 | ||||
| -rw-r--r-- | templates/posts.django | 34 | ||||
| -rw-r--r-- | templates/posts/list.django | 19 | ||||
| -rw-r--r-- | templates/posts/new.django | 4 |
5 files changed, 27 insertions, 35 deletions
diff --git a/templates/login.django b/templates/login.django index 01c6d28..f2136fc 100644 --- a/templates/login.django +++ b/templates/login.django @@ -7,6 +7,9 @@ <h1>Login to {{ Appname }}</h1> <p>Welcome back! Please enter your credentials to continue.</p> <form action="/login" method="POST" class="ibform"> + {% if Next %} + <input type="hidden" name="next" value="{{ Next }}" /> + {% endif %} {% if Error %} <div class="error">{{ Error|safe }}</div> {% endif %} diff --git a/templates/partials/navbar.django b/templates/partials/navbar.django index 7180e9c..2287302 100644 --- a/templates/partials/navbar.django +++ b/templates/partials/navbar.django @@ -13,7 +13,7 @@ {% if User %} <a href="/account" class="user-status">{{ User.Username }}</a> <a href="/posts/new">Upload</a> - <a href="/logout">Logout</a> + <a href="{{ LogoutURL }}">Logout</a> {% else %} <span class="user-status">Guest</span> <a href="/login">Login</a> diff --git a/templates/posts.django b/templates/posts.django deleted file mode 100644 index 111c959..0000000 --- a/templates/posts.django +++ /dev/null @@ -1,34 +0,0 @@ -{% extends 'layouts/main.django' %} -{% include 'partials/search.django' %} -{% block content %} - <h2>{{ Title }}</h2> - - <div class="posts-grid"> - {% if Posts %} - {% for post in Posts %} - <div class="post-cell"> - <img src="/uploads/thumbnails/{{ post.FileName }}" alt="{{ post.Title }}" class="post-img" /> - <div class="post-title"> - {% if post.Title %} - {{ post.Title }} - {% else %} - Post #{{ post.ID }} - {% endif %} - </div> - <div class="post-info">{{ post.Tags|length }} tags</div> - </div> - {% endfor %} - {% else %} - <div class="empty-state"> - <h3>NO POSTS FOUND!</h3> - <p>Be the first to share something awesome!</p> - <input type="button" value="UPLOAD IMAGE" onclick="location.href='/upload'" /> - </div> - {% endif %} - </div> - - <p class="center"> - <input type="button" value="UPLOAD IMAGE" onclick="location.href='/upload'" /> - </p> - <button class="secondary" onclick="location.href='/tags'">BROWSE TAGS</button> -{% endblock %} diff --git a/templates/posts/list.django b/templates/posts/list.django new file mode 100644 index 0000000..d4f933b --- /dev/null +++ b/templates/posts/list.django @@ -0,0 +1,19 @@ +{% extends 'layouts/main.django' %} +{% include 'partials/search.django' %} +{% block content %} + {% if Error %} + <div class="centered-main"> + <div class="error">{{ Error }}</div> + </div> + {% endif %} + {% if Posts %} + Will Show posts here + {% else %} + <div class="centered-main"> + <h1>No Posts Available</h1> + <p> + It seems there are no posts available at the moment. Check back later or <a href="/posts/new">upload a new post</a>. + </p> + </div> + {% endif %} +{% endblock %} diff --git a/templates/posts/new.django b/templates/posts/new.django new file mode 100644 index 0000000..d3a2e5e --- /dev/null +++ b/templates/posts/new.django @@ -0,0 +1,4 @@ +{% extends 'layouts/main.django' %} +{% block content %} + Upload a new post here +{% endblock %} |
