136 lines
5.6 KiB
HTML
136 lines
5.6 KiB
HTML
{% load tailwind_tags %}
|
|
{% load static %}
|
|
{% load avatar %}
|
|
{% load django_htmx %}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" class="bg-base-200">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta viewport="width=device-width, initial-scale=1.0">
|
|
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
<title>
|
|
{% if config.TF_CLUB_NAME != "TeamForge" %}{{ config.TF_CLUB_NAME }} - {% endif %}TeamForge
|
|
</title>
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js@11.1.0/public/assets/styles/choices.min.css"/>
|
|
<script src="https://cdn.jsdelivr.net/npm/choices.js@11.1.0/public/assets/scripts/choices.min.js"></script>
|
|
|
|
<link href="{% static "css/fontawesome.css" %}" rel="stylesheet"/>
|
|
<link href="{% static "css/solid.css" %}" rel="stylesheet"/>
|
|
<link href="{% static "css/regular.css" %}" rel="stylesheet"/>
|
|
<link href="{% static "css/brands.css" %}" rel="stylesheet"/>
|
|
|
|
{% tailwind_css %}
|
|
{% htmx_script %}
|
|
|
|
<style>
|
|
.navbar-shrink {
|
|
height: 3rem !important;
|
|
transition: height 0.2s ease;
|
|
}
|
|
|
|
.navbar-normal {
|
|
height: 6rem;
|
|
transition: height 0.2s ease;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="flex flex-col h-screen" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
|
<!-- NAVBAR -->
|
|
<header id="mainNavbar" class="navbar-normal navbar bg-base-100 sticky top-0 z-50 shadow">
|
|
<div class="flex-none lg:hidden">
|
|
<!-- Mobile sidebar toggle -->
|
|
<label for="sidebar-toggle" class="btn btn-square btn-ghost">
|
|
<i class="fa-solid fa-bars text-xl"></i>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="flex-1 flex items-center gap-3">
|
|
<img src="{% static config.TF_CLUB_LOGO %}" class="hidden lg:inline h-10 {% if config.TF_CLUB_LOGO != "teamforge/logo.png" %}mask mask-circle{% endif %}" alt="{{ config.TF_CLUB_NAME }} logo">
|
|
<span class="text-xl font-bold font-jersey">{{ config.TF_CLUB_NAME }}</span>
|
|
</div>
|
|
|
|
<div class="flex flex-row items-center gap-1 lg:gap-4">
|
|
<!-- Notifications -->
|
|
<button class="btn btn-ghost btn-circle">
|
|
<i class="fa-solid fa-bell text-xl"></i>
|
|
</button>
|
|
|
|
<!-- Avatar -->
|
|
<div class="dropdown dropdown-end">
|
|
{% avatar first_name=request.user.first_name last_name=request.user.last_name button=True %}
|
|
<ul tabindex="-1" class="menu menu-sm dropdown-content bg-base-100 rounded-box z-1 mt-3 w-52 p-2 shadow">
|
|
<li>
|
|
<a class="justify-between">
|
|
Profile
|
|
<span class="badge">New</span>
|
|
</a>
|
|
</li>
|
|
<li><a>Settings</a></li>
|
|
<li><a>Logout</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- Login/Logout -->
|
|
{% if user.is_authenticated %}
|
|
<a href="" class="btn btn-outline btn-sm hidden lg:flex">Logout</a>
|
|
{% else %}
|
|
<a href="" class="btn btn-outline btn-sm hidden lg:flex">Login</a>
|
|
{% endif %}
|
|
</div>
|
|
</header>
|
|
|
|
<div class="drawer lg:drawer-open flex-1">
|
|
<!-- Hidden checkbox for mobile sidebar -->
|
|
<input type="checkbox" id="sidebar-toggle" class="drawer-toggle">
|
|
|
|
<!-- SIDEBAR -->
|
|
<aside class="drawer-side z-60 lg:z-auto min-w-fit h-full lg:h-fit">
|
|
<label for="sidebar-toggle" class="drawer-overlay"></label>
|
|
|
|
<div class="w-64 bg-base-100 border-r p-4 h-full lg:h-fit lg:border lg:border-base-300 lg:m-4 lg:mr-2 lg:rounded-xl lg:min-h-full">
|
|
<ul class="menu w-full">
|
|
{% block sidebar %}{% endblock sidebar %}
|
|
</ul>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- MAIN CONTENT-->
|
|
<div class="drawer-content flex w-full">
|
|
<main class="bg-base-100 border border-base-300 rounded-xl m-4 ml-2 p-6 w-full">
|
|
{% block content %}
|
|
<h1 class="text-3xl font-bold">Welcome!</h1>
|
|
<p>This is your main content area.</p>
|
|
{% endblock %}
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- FOOTER -->
|
|
<footer class="footer footer-center p-4 bg-neutral text-neutral-content mt-auto">
|
|
<p>© {% now "Y" %} TeamForge — All rights reserved.</p>
|
|
</footer>
|
|
|
|
<script>
|
|
{% comment %}// Shrinking navbar on scroll
|
|
const navbar = document.getElementById("mainNavbar");
|
|
let lastScroll = 0; window.addEventListener("scroll", () => {
|
|
const current = window.scrollY;
|
|
|
|
if (current > lastScroll && current > 50) {
|
|
navbar.classList.add("navbar-shrink");
|
|
navbar.classList.remove("navbar-normal");
|
|
} else {
|
|
navbar.classList.add("navbar-normal");
|
|
navbar.classList.remove("navbar-shrink");
|
|
}
|
|
|
|
lastScroll = current;
|
|
});{% endcomment %}
|
|
</script>
|
|
</body>
|
|
</html> |