Reverting back to admin pages as login and updates in the mobile api

This commit is contained in:
Vivek
2025-12-17 22:05:13 +05:30
parent 48c8abb366
commit 105da4a876
39 changed files with 2147 additions and 452 deletions

View File

@@ -1,9 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -26,36 +25,44 @@
.sidebar {
width: 260px;
background: linear-gradient(180deg, #1e3cfa, #1436c7);
color: white;
color: #fff;
padding: 30px 20px;
display: flex;
flex-direction: column;
}
.nav-item {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 30px;
border-radius: 12px;
margin-bottom: 8px;
font-size: 15px;
line-height: 1.5;
text-decoration: none;
color: #000000;
/* force white text */
background: transparent;
}
.nav-item:hover,
.nav-item.active {
background: #fff;
color: #000000;
padding: 16px 30px;
}
.nav-item:visited {
color: #000000;
}
.logo {
font-size: 28px;
font-weight: 700;
margin-bottom: 40px;
}
.nav-item {
padding: 12px 15px;
border-radius: 12px;
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
margin-bottom: 8px;
font-size: 15px;
transition: 0.2s;
}
.nav-item:hover,
.nav-item.active {
background: white;
color: #1436c7;
}
.bottom-nav {
margin-top: auto;
}
@@ -146,9 +153,14 @@
<div class="logo">EVENTIFY</div>
<div class="nav">
<div class="nav-item active">🏠 Home</div>
<div class="nav-item">📅 Calendar</div>
<div class="nav-item">👤 Profile</div>
<a class="nav-item {% if request.resolver_match.url_name == 'customer_dashboard' %}active{% endif %}"
href="{% url 'customer_dashboard' %}">🏠 Home</a>
<a class="nav-item {% if request.resolver_match.url_name == 'customer_calendar' %}active{% endif %}"
href="{% url 'customer_calendar' %}">📅 Calendar</a>
<a class="nav-item {% if request.resolver_match.url_name == 'customer_profile' %}active{% endif %}"
href="{% url 'customer_profile' %}">👤 Profile</a>
</div>
<div class="bottom-nav">

View File

@@ -0,0 +1,256 @@
{% extends "customer/base_dashboard.html" %}
{% load static %}
{% block content %}
<style>
.calendar-wrapper {
display: flex;
width: 100%;
padding: 40px;
gap: 30px;
}
/* LEFT CALENDAR PANEL */
.calendar-card {
flex: 0.58;
background: white;
border-radius: 22px;
padding: 30px;
box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
}
.calendar-header button {
background: none;
border: none;
font-size: 20px;
color: #555;
cursor: pointer;
}
.calendar-title h2 {
margin: 0;
font-size: 24px;
font-weight: 600;
}
.calendar-title p {
margin: 0;
color: #777;
font-size: 14px;
}
.weekday-row,
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
text-align: center;
}
.weekday-row {
font-weight: 600;
color: #666;
margin-bottom: 15px;
}
.calendar-day {
height: 65px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: #333;
}
.calendar-day.inactive {
color: #ccc;
}
.selected-day {
position: absolute;
inset: 0;
background: #e7f0ff;
border-radius: 14px;
z-index: 0;
}
.calendar-day span {
z-index: 2;
font-weight: 600;
color: #1a47d1;
}
.day-icons {
display: flex;
gap: -8px;
position: absolute;
bottom: 5px;
left: 50%;
transform: translateX(-50%);
}
.day-icons img {
width: 24px;
height: 24px;
border-radius: 50%;
border: 2px solid white;
}
/* RIGHT EVENTS PANEL */
.events-card {
flex: 0.42;
background: white;
border-radius: 22px;
padding: 25px;
box-shadow: 0 4px 20px rgba(0,0,0,0.05);
max-height: 80vh;
overflow-y: auto;
}
.events-header {
display: flex;
gap: 15px;
margin-bottom: 25px;
align-items: center;
}
.date-tag {
background: #1e3cfa;
color: white;
padding: 8px 14px;
text-align: center;
border-radius: 10px;
font-size: 13px;
font-weight: 600;
}
.event-card {
background: white;
border-radius: 16px;
margin-bottom: 20px;
border: 1px solid #eee;
box-shadow: 0 3px 10px rgba(0,0,0,0.05);
overflow: hidden;
}
.event-card img {
width: 100%;
height: 160px;
object-fit: cover;
}
.event-content {
padding: 12px 15px;
}
.event-content h4 {
margin: 0 0 5px 0;
font-size: 16px;
font-weight: 600;
color: #333;
}
.event-meta {
font-size: 14px;
color: #777;
display: flex;
gap: 10px;
align-items: center;
}
</style>
<div class="calendar-wrapper">
<!-- LEFT CALENDAR -->
<div class="calendar-card">
<div class="calendar-header">
<button>&lt;</button>
<div class="calendar-title">
<h2>{{ month_name }}</h2>
<p>{{ year }}</p>
</div>
<button>&gt;</button>
</div>
<!-- Weekdays -->
<div class="weekday-row">
<div>M</div><div>T</div><div>W</div><div>T</div><div>F</div>
<div style="color:red;">S</div>
<div style="color:red;">S</div>
</div>
<!-- Calendar Grid -->
<div class="calendar-grid">
{% for week in calendar_weeks %}
{% for day in week %}
{% if day.month == current_month %}
<div class="calendar-day">
{% if day.day == selected_day %}
<div class="selected-day"></div>
{% endif %}
<span>{{ day.day }}</span>
{% if day.events %}
<div class="day-icons">
{% for ev in day.events %}
<img src="{{ ev.icon }}">
{% endfor %}
</div>
{% endif %}
</div>
{% else %}
<div class="calendar-day inactive">{{ day.day }}</div>
{% endif %}
{% endfor %}
{% endfor %}
</div>
</div>
<!-- RIGHT EVENTS -->
<div class="events-card">
<div class="events-header">
<div class="date-tag">{{ selected_day }} {{ selected_month_short }}</div>
<div>
<h3 style="margin:0;font-size:18px;font-weight:700;">
{{ selected_date_verbose }}
</h3>
<p style="margin:0;color:#777;font-size:14px;">
{{ events|length }} Events
</p>
</div>
</div>
{% for event in events %}
<div class="event-card">
<img src="{{ event.image }}">
<div class="event-content">
<h4>{{ event.title }}</h4>
<div class="event-meta">
📅 {{ event.date }}
📍 {{ event.location }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,33 @@
{% extends "customer/base_dashboard.html" %}
{% load static %}
{% block content %}
<div class="card p-4">
<h2 class="mb-3">Profile</h2>
<form method="post" novalidate>
{% csrf_token %}
{% if form.non_field_errors %}
<div class="alert alert-danger">{{ form.non_field_errors }}</div>
{% endif %}
<div class="row g-3">
{% for field in form %}
<div class="col-md-6">
<div class="form-group">
<label class="form-label">{{ field.label }}</label>
{{ field }}
{% if field.errors %}
<div class="text-danger small">{{ field.errors|striptags }}</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class="mt-3">
<button type="submit" class="btn btn-primary">Save</button>
</div>
</form>
</div>
{% endblock %}

View File