mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 11:11:10 -05:00
good stuff
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- [Previous head content remains unchanged...] -->
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="csrf-token" content="{{ csrf_token }}">
|
||||
<title>{% block title %}ThrillWiki{% endblock %}</title>
|
||||
|
||||
<!-- [Previous head content remains unchanged...] -->
|
||||
<!-- Google Fonts -->
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"
|
||||
@@ -42,9 +41,13 @@
|
||||
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
<body class="flex flex-col min-h-screen text-gray-900 bg-gradient-to-br from-white via-blue-50 to-indigo-50 dark:from-gray-950 dark:via-indigo-950 dark:to-purple-950 dark:text-white">
|
||||
<body
|
||||
class="flex flex-col min-h-screen text-gray-900 bg-gradient-to-br from-white via-blue-50 to-indigo-50 dark:from-gray-950 dark:via-indigo-950 dark:to-purple-950 dark:text-white"
|
||||
>
|
||||
<!-- Header -->
|
||||
<header class="border-b shadow-lg bg-white/90 dark:bg-gray-800/90 backdrop-blur-lg border-gray-200/50 dark:border-gray-700/50">
|
||||
<header
|
||||
class="border-b shadow-lg bg-white/90 dark:bg-gray-800/90 backdrop-blur-lg border-gray-200/50 dark:border-gray-700/50"
|
||||
>
|
||||
<nav class="container mx-auto nav-container">
|
||||
<div class="flex items-center justify-between">
|
||||
<!-- Logo -->
|
||||
@@ -97,31 +100,45 @@
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<!-- [Rest of the content remains unchanged...] -->
|
||||
<!-- User Menu -->
|
||||
{% if user.is_authenticated %}
|
||||
<div class="relative">
|
||||
<button
|
||||
id="userMenuBtn"
|
||||
class="flex items-center space-x-2 transition-transform hover:scale-105"
|
||||
>
|
||||
{% if user.profile.avatar %}
|
||||
<img
|
||||
src="{{ user.profile.avatar.url }}"
|
||||
alt="{{ user.username }}"
|
||||
class="w-8 h-8 rounded-full ring-2 ring-primary/20"
|
||||
/>
|
||||
{% else %}
|
||||
<div class="flex items-center justify-center w-8 h-8 text-white rounded-full bg-gradient-to-br from-primary to-secondary">
|
||||
{{ user.username.0|upper }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</button>
|
||||
{% if has_moderation_access %}
|
||||
<a href="{% url 'moderation:edit_submissions' %}" class="nav-link">
|
||||
<i class="fas fa-shield-alt"></i>
|
||||
<span>Moderation</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="relative" x-data="{ open: false }">
|
||||
<button
|
||||
@click="open = !open"
|
||||
class="flex items-center space-x-2 transition-transform hover:scale-105"
|
||||
>
|
||||
{% if user.profile.avatar %}
|
||||
<img
|
||||
src="{{ user.profile.avatar.url }}"
|
||||
alt="{{ user.username }}"
|
||||
class="w-8 h-8 rounded-full ring-2 ring-primary/20"
|
||||
/>
|
||||
{% else %}
|
||||
<div
|
||||
class="flex items-center justify-center w-8 h-8 text-white rounded-full bg-gradient-to-br from-primary to-secondary"
|
||||
>
|
||||
{{ user.username.0|upper }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<span>{{ user.username }}</span>
|
||||
</button>
|
||||
|
||||
<!-- Dropdown Menu -->
|
||||
<div id="userDropdown" class="dropdown-menu">
|
||||
<div class="py-1">
|
||||
<a href="{% url 'user_profile' user.username %}" class="menu-item">
|
||||
<!-- Dropdown Menu -->
|
||||
<div
|
||||
x-show="open"
|
||||
@click.away="open = false"
|
||||
class="absolute right-0 w-48 py-1 mt-2 bg-white rounded-md shadow-lg dark:bg-gray-800"
|
||||
>
|
||||
<a
|
||||
href="{% url 'profile' user.username %}"
|
||||
class="menu-item"
|
||||
>
|
||||
<i class="w-5 fas fa-user"></i>
|
||||
<span>Profile</span>
|
||||
</a>
|
||||
@@ -129,7 +146,7 @@
|
||||
<i class="w-5 fas fa-cog"></i>
|
||||
<span>Settings</span>
|
||||
</a>
|
||||
{% if user.is_staff or user.is_superuser %}
|
||||
{% if has_admin_access %}
|
||||
<a href="{% url 'admin:index' %}" class="menu-item">
|
||||
<i class="w-5 fas fa-shield-alt"></i>
|
||||
<span>Admin</span>
|
||||
@@ -144,19 +161,18 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<!-- Login/Register (Desktop) -->
|
||||
<div class="hidden space-x-3 lg:flex">
|
||||
<a href="{% url 'account_login' %}" class="btn-secondary">
|
||||
<i class="mr-2 fas fa-sign-in-alt"></i>
|
||||
Login
|
||||
</a>
|
||||
<a href="{% url 'account_signup' %}" class="btn-primary">
|
||||
<i class="mr-2 fas fa-user-plus"></i>
|
||||
Register
|
||||
</a>
|
||||
</div>
|
||||
<!-- Login/Register (Desktop) -->
|
||||
<div class="hidden space-x-3 lg:flex">
|
||||
<a href="{% url 'account_login' %}" class="btn-secondary">
|
||||
<i class="mr-2 fas fa-sign-in-alt"></i>
|
||||
Login
|
||||
</a>
|
||||
<a href="{% url 'account_signup' %}" class="btn-primary">
|
||||
<i class="mr-2 fas fa-user-plus"></i>
|
||||
Register
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Mobile Menu Button -->
|
||||
@@ -186,11 +202,17 @@
|
||||
{% if not user.is_authenticated %}
|
||||
<!-- Login/Register (Mobile) -->
|
||||
<div class="flex items-center space-x-3">
|
||||
<a href="{% url 'account_login' %}" class="flex-1 mobile-nav-link secondary">
|
||||
<a
|
||||
href="{% url 'account_login' %}"
|
||||
class="flex-1 mobile-nav-link secondary"
|
||||
>
|
||||
<i class="fas fa-sign-in-alt"></i>
|
||||
<span>Login</span>
|
||||
</a>
|
||||
<a href="{% url 'account_signup' %}" class="flex-1 mobile-nav-link primary">
|
||||
<a
|
||||
href="{% url 'account_signup' %}"
|
||||
class="flex-1 mobile-nav-link primary"
|
||||
>
|
||||
<i class="fas fa-user-plus"></i>
|
||||
<span>Register</span>
|
||||
</a>
|
||||
@@ -201,12 +223,13 @@
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- [Rest of the content remains unchanged...] -->
|
||||
<!-- Flash Messages -->
|
||||
{% if messages %}
|
||||
<div class="container px-6 mx-auto mt-4">
|
||||
{% for message in messages %}
|
||||
<div class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %}">
|
||||
<div
|
||||
class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %}"
|
||||
>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -219,7 +242,9 @@
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="mt-auto border-t bg-white/90 dark:bg-gray-800/90 backdrop-blur-lg border-gray-200/50 dark:border-gray-700/50">
|
||||
<footer
|
||||
class="mt-auto border-t bg-white/90 dark:bg-gray-800/90 backdrop-blur-lg border-gray-200/50 dark:border-gray-700/50"
|
||||
>
|
||||
<div class="container px-6 py-6 mx-auto">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="text-gray-600 dark:text-gray-400">
|
||||
@@ -229,11 +254,13 @@
|
||||
<a
|
||||
href="{% url 'terms' %}"
|
||||
class="text-gray-600 transition-colors hover:text-primary dark:text-gray-400 dark:hover:text-primary"
|
||||
>Terms</a>
|
||||
>Terms</a
|
||||
>
|
||||
<a
|
||||
href="{% url 'privacy' %}"
|
||||
class="text-gray-600 transition-colors hover:text-primary dark:text-gray-400 dark:hover:text-primary"
|
||||
>Privacy</a>
|
||||
>Privacy</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -241,6 +268,6 @@
|
||||
|
||||
<!-- Custom JavaScript -->
|
||||
<script src="{% static 'js/main.js' %}"></script>
|
||||
{% block extra_scripts %}{% endblock %}
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user