Implement avatar rendering logic: add custom tags, template, and styles; update base.html integration and revamp member filter and list designs.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{% load tailwind_tags %}
|
||||
{% load static %}
|
||||
{% load avatar %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<html lang="en" class="bg-base-200">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta viewport="width=device-width, initial-scale=1.0">
|
||||
@@ -38,7 +39,7 @@
|
||||
|
||||
<body class="flex flex-col h-screen">
|
||||
<!-- NAVBAR -->
|
||||
<header id="mainNavbar" class="navbar-normal navbar bg-base-200 sticky top-0 z-50 shadow">
|
||||
<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">
|
||||
@@ -47,11 +48,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex-1 flex items-center gap-3">
|
||||
<img src="{% static config.TF_CLUB_LOGO %}" class="h-10" alt="{{ config.TF_CLUB_NAME }} logo">
|
||||
<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-none flex items-center gap-4">
|
||||
<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>
|
||||
@@ -59,11 +60,7 @@
|
||||
|
||||
<!-- Avatar -->
|
||||
<div class="dropdown dropdown-end">
|
||||
<div tabindex="0" role="button" class="btn btn-ghost btn-circle avatar avatar-placeholder">
|
||||
<div class="w-10 rounded-full bg-neutral text-neutral-content">
|
||||
<span class="font-jersey">BS</span>
|
||||
</div>
|
||||
</div>
|
||||
{% 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">
|
||||
@@ -78,35 +75,31 @@
|
||||
|
||||
<!-- Login/Logout -->
|
||||
{% if user.is_authenticated %}
|
||||
<a href="" class="btn btn-outline btn-sm">Logout</a>
|
||||
<a href="" class="btn btn-outline btn-sm hidden lg:flex">Logout</a>
|
||||
{% else %}
|
||||
<a href="" class="btn btn-outline btn-sm">Login</a>
|
||||
<a href="" class="btn btn-outline btn-sm hidden lg:flex">Login</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="flex flex-1 drawer lg:drawer-open h-[calc(100vh-7.5rem)]">
|
||||
<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">
|
||||
<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-200 border-r p-4 h-full lg:h-fit lg:border-none lg:m-4 lg:rounded-md">
|
||||
<ul class="menu">
|
||||
<li class="menu-title">Navigation</li>
|
||||
<li><a href="#"><i class="fa-solid fa-house"></i> Dashboard</a></li>
|
||||
<li><a href="#"><i class="fa-solid fa-calendar"></i> Calendar</a></li>
|
||||
<li><a href="#"><i class="fa-solid fa-users"></i> Members</a></li>
|
||||
<li><a href="#"><i class="fa-solid fa-gear"></i> Settings</a></li>
|
||||
<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 flex-col">
|
||||
<main class="flex-1 p-6 bg-base-100">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user