top bar update

This commit is contained in:
Mann Patel
2025-08-29 16:49:13 -06:00
parent f1b5cdc806
commit 2136dd6759
19 changed files with 1257 additions and 438 deletions

View File

@@ -75,11 +75,11 @@ func VolunteerAppointmentHandler(w http.ResponseWriter, r *http.Request) {
// Set button properties based on poll response status
a.HasPollResponse = pollResponseExists
if pollResponseExists {
a.PollButtonText = "Poll Taken"
a.PollButtonClass = "px-3 py-1 bg-green-600 text-white text-sm rounded cursor-not-allowed"
a.PollButtonText = "Poll"
a.PollButtonClass = "px-1 py-1 bg-green-600 text-white text-sm rounded cursor-not-allowed"
} else {
a.PollButtonText = "Ask Poll"
a.PollButtonClass = "px-3 py-1 bg-blue-600 text-white text-sm hover:bg-blue-700 rounded"
a.PollButtonText = "Ask"
a.PollButtonClass = "px-1 py-1 bg-blue-600 text-white text-sm hover:bg-blue-700 rounded"
}
appointments = append(appointments, a)

View File

@@ -150,7 +150,6 @@ func getVolunteerStatistics(userID int) (*VolunteerStatistics, error) {
if err != nil {
return nil, err
}
fmt.Print("Stats: ", stats.AppointmentsThisWeek," Today's date: " , today ,"fasd", weekStart)
// Total appointments

View File

@@ -1,25 +1,5 @@
{{ define "content" }}
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-map-marker-alt{{end}} text-green-600"
></i>
<span class="text-sm font-medium"> Address Database </span>
</div>
</div>
{{if .Pagination}}
<div class="text-sm text-gray-600">
Showing {{.Pagination.StartRecord}}-{{.Pagination.EndRecord}} of
{{.Pagination.TotalRecords}} addresses
</div>
{{end}}
</div>
</div>
<!-- Toolbar -->
<div class="bg-gray-50 border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">

View File

@@ -1,19 +1,5 @@
{{ define "content" }}
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-calendar-alt{{end}} text-green-600"
></i>
<span class="text-sm font-medium">Appointments</span>
</div>
</div>
</div>
</div>
<!-- Toolbar -->
<div class="bg-gray-50 border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
@@ -41,16 +27,28 @@
<tr
class="text-left text-gray-700 font-medium border-b border-gray-200"
>
<th class="px-6 py-3 whitespace-nowrap">Poll</th>
<th class="px-6 py-3 whitespace-nowrap">Address</th>
<th class="px-6 py-3 whitespace-nowrap">Coordinates</th>
<th class="px-6 py-3 whitespace-nowrap">Appointment Date</th>
<th class="px-6 py-3 whitespace-nowrap">Appointment Time</th>
<th class="px-6 py-3 whitespace-nowrap">Poll Question</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
{{ range .Appointments }}
<tr class="hover:bg-gray-50">
<td class="px-6 py-3 whitespace-nowrap">
{{ if .HasPollResponse }}
<span class="{{ .PollButtonClass }}"> {{ .PollButtonText }} </span>
{{ else }}
<a
href="/poll?address_id={{ .AddressID }}"
class="{{ .PollButtonClass }}"
>
{{ .PollButtonText }}
</a>
{{ end }}
</td>
<td class="px-6 py-3 whitespace-nowrap">{{ .Address }}</td>
<td class="px-6 py-3 whitespace-nowrap">
<a
@@ -67,18 +65,6 @@
<td class="px-6 py-3 whitespace-nowrap">
{{ .AppointmentTime.Format "15:04" }}
</td>
<td class="px-6 py-3 whitespace-nowrap">
{{ if .HasPollResponse }}
<span class="{{ .PollButtonClass }}"> {{ .PollButtonText }} </span>
{{ else }}
<a
href="/poll?address_id={{ .AddressID }}"
class="{{ .PollButtonClass }}"
>
{{ .PollButtonText }}
</a>
{{ end }}
</td>
</tr>
{{ else }}
<tr>

View File

@@ -18,40 +18,6 @@
<body class="bg-gray-50">
<!-- Full Width Container -->
<div class="min-h-screen w-full flex flex-col">
<!-- Top Navigation Bar -->
<div class="bg-white border-b border-gray-200 w-full">
<div class="px-8 py-6">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="w-8 h-8 bg-blue-600 flex items-center justify-center">
<i class="fas fa-chart-bar text-white text-sm"></i>
</div>
<span class="text-xl font-semibold text-gray-900">
Dashboard Overview
</span>
</div>
<div class="flex items-center gap-4">
<button
class="px-6 py-2.5 bg-blue-600 text-white text-sm font-medium hover:bg-blue-700 transition-colors"
>
<i class="fas fa-download mr-2"></i>Export Data
</button>
<button
class="px-6 py-2.5 bg-green-600 text-white text-sm font-medium hover:bg-green-700 transition-colors"
onclick="window.location.href='/addresses/upload-csv'"
>
<i class="fas fa-upload mr-2"></i>Import Data
</button>
<button
class="px-6 py-2.5 border border-gray-300 text-gray-700 text-sm font-medium hover:bg-gray-50 transition-colors"
>
<i class="fas fa-filter mr-2"></i>Filter
</button>
</div>
</div>
</div>
</div>
<!-- Main Dashboard Content -->
<div class="w-full">
<!-- Stats Grid - Full Width -->

View File

@@ -1,29 +1,18 @@
{{ define "content" }}
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-4 sm:px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i class="fas fa-tachometer-alt text-green-600"></i>
<span class="text-sm font-medium">Volunteer Dashboard</span>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 overflow-hidden bg-gray-50">
<div class="h-full flex flex-col lg:flex-row gap-6 p-4 sm:p-6">
<div class="h-screen flex flex-col lg:flex-row gap-6 p-4 sm:p-6">
<!-- Left Column - Posts -->
<div class="flex-1 lg:flex-none lg:w-2/3 space-y-0">
<div class="flex-1 lg:flex-none lg:w-1/3 overflow-y-auto pr-2">
{{ if .Posts }}{{range .Posts}}
<!-- Posts Feed -->
<article class="bg-white border-b border-gray-200">
<!-- Post Header -->
<div class="flex items-center px-4 sm:px-6 py-4">
<div class="flex items-center px-6 py-4">
<div class="flex-shrink-0">
<div
class="w-10 h-10 bg-blue-500 flex items-center justify-center text-white font-semibold rounded-full"
class="w-10 h-10 bg-blue-500 flex items-center justify-center text-white font-semibold"
>
{{slice .AuthorName 0 1}}
</div>
@@ -50,7 +39,7 @@
<!-- Post Content -->
{{if .Content}}
<div class="px-4 sm:px-6 pt-2 pb-4">
<div class="px-6 pt-2 pb-4">
<p class="text-gray-900 leading-relaxed">
<span class="font-semibold">{{.AuthorName}}</span> {{.Content}}
</p>
@@ -58,7 +47,7 @@
{{end}}
</article>
{{else}}
<div class="bg-white p-8 sm:p-12 text-center border-b border-gray-200">
<div class="bg-white p-12 text-center">
<div class="max-w-sm mx-auto">
<svg
class="w-16 h-16 mx-auto text-gray-300 mb-4"
@@ -74,6 +63,9 @@
></path>
</svg>
<h3 class="text-lg font-medium text-gray-900 mb-2">No posts yet</h3>
<p class="text-gray-500">
Be the first to share something with the community!
</p>
</div>
</div>
{{ end }} {{ else }}
@@ -94,7 +86,163 @@
</div>
<!-- Right Column - Statistics -->
<div class="w-full lg:w-1/3 flex flex-col gap-4 sm:gap-6">
<div
class="w-full lg:w-1/3 flex flex-col gap-4 sm:gap-6 sticky top-0 self-start h-fit"
>
<!-- Today's Overview -->
<div class="bg-white border-b border-gray-200">
<div class="px-4 sm:px-6 py-4">
<h3 class="text-sm font-semibold text-gray-900 mb-4">
Today's Overview
</h3>
<div class="space-y-4">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center flex-shrink-0"
>
<i class="fas fa-calendar-day text-gray-600 text-xs"></i>
</div>
<span class="text-sm text-gray-700">Appointments Today</span>
</div>
<span class="text-lg font-semibold text-gray-900">
{{ .Statistics.AppointmentsToday }}
</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center flex-shrink-0"
>
<i class="fas fa-calendar-week text-gray-600 text-xs"></i>
</div>
<span class="text-sm text-gray-700"
>Appointments Tomorrow</span
>
</div>
<span class="text-lg font-semibold text-gray-900">
{{ .Statistics.AppointmentsTomorrow }}
</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center flex-shrink-0"
>
<i class="fas fa-calendar-week text-gray-600 text-xs"></i>
</div>
<span class="text-sm text-gray-700">This Week</span>
</div>
<span class="text-lg font-semibold text-gray-900">
{{ .Statistics.AppointmentsThisWeek }}
</span>
</div>
</div>
</div>
</div>
<!-- Polling Progress -->
<div class="bg-white border-b border-gray-200">
<div class="px-4 sm:px-6 py-4">
<h3 class="text-sm font-semibold text-gray-900 mb-4">
Polling Progress
</h3>
<div class="space-y-4">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center flex-shrink-0"
>
<i class="fas fa-check-circle text-green-600 text-xs"></i>
</div>
<span class="text-sm text-gray-700">Polls Completed</span>
</div>
<span class="text-lg font-semibold text-green-600">
{{ .Statistics.PollsCompleted }}
</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center flex-shrink-0"
>
<i class="fas fa-clock text-orange-600 text-xs"></i>
</div>
<span class="text-sm text-gray-700">Polls Remaining</span>
</div>
<span class="text-lg font-semibold text-orange-600">
{{ .Statistics.PollsRemaining }}
</span>
</div>
<!-- Progress Bar -->
{{ if gt .Statistics.TotalAppointments 0 }}
<div class="mt-4">
<div class="flex justify-between text-xs text-gray-600 mb-2">
<span>Progress</span>
<span
>{{ .Statistics.PollsCompleted }}/{{
.Statistics.TotalAppointments }}</span
>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div
class="bg-gray-600 h-2 rounded-full transition-all duration-300"
style="width: {{ .Statistics.PollCompletionPercent }}%"
></div>
</div>
</div>
{{ end }}
</div>
</div>
</div>
<!-- Signs Summary -->
<div class="bg-white border-b border-gray-200">
<div class="px-4 sm:px-6 py-4">
<h3 class="text-sm font-semibold text-gray-900 mb-4">
Signs Requested
</h3>
<div class="space-y-4">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center flex-shrink-0"
>
<i class="fas fa-sign text-gray-600 text-xs"></i>
</div>
<span class="text-sm text-gray-700">Lawn Signs</span>
</div>
<span class="text-lg font-semibold text-gray-900">
{{ .Statistics.LawnSignsRequested }}
</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center flex-shrink-0"
>
<i class="fas fa-flag text-gray-600 text-xs"></i>
</div>
<span class="text-sm text-gray-700">Banner Signs</span>
</div>
<span class="text-lg font-semibold text-gray-900">
{{ .Statistics.BannerSignsRequested }}
</span>
</div>
</div>
</div>
</div>
</div>
<!-- Right Column - Statistics -->
<div
class="w-full lg:w-1/3 flex flex-col gap-4 sm:gap-6 sticky top-0 self-start h-fit"
>
<!-- Today's Overview -->
<div class="bg-white border-b border-gray-200">
<div class="px-4 sm:px-6 py-4">

View File

@@ -14,172 +14,185 @@
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
/>
</head>
<body class="bg-white font-sans">
<body class="bg-gray-50 font-sans">
{{ if .IsAuthenticated }}
<!-- Authenticated User Interface -->
<div class="w-full h-screen bg-white overflow-hidden" x-data="{ sidebarOpen: false }">
<!-- Mobile Header -->
<div class="lg:hidden bg-gray-100 px-4 py-3 flex items-center justify-between border-b border-gray-200">
<div class="flex items-center gap-2">
<div class="w-5 h-5 bg-orange-500 rounded text-white text-xs flex items-center justify-center font-bold">
L
</div>
<span class="text-sm font-medium">Poll System</span>
</div>
<div class="flex items-center gap-2">
<button @click="sidebarOpen = !sidebarOpen" class="p-2 hover:bg-gray-200 rounded">
<i class="fas fa-bars text-gray-600"></i>
</button>
<span class="text-sm font-medium text-gray-600">{{.UserName}}</span>
<div class="w-9 h-9 bg-blue-500 flex items-center justify-center text-white font-semibold">
{{slice .UserName 0 1}}
</div>
<a href="/logout" class="p-2 hover:bg-gray-200 rounded">
<i class="fas fa-external-link-alt text-gray-500"></i>
</a>
</div>
</div>
<!-- Desktop Title Bar -->
<div class="hidden lg:flex bg-gray-100 px-4 py-3 items-center justify-between border-b border-gray-200">
<!-- Left Side: Logo + Title -->
<div class="flex items-center gap-2">
<div class="w-6 h-6 flex items-center justify-center">
<img src="../../static/icon-512.png" alt="Logo" class="w-6 h-6"/>
</div>
<span class="text-sm font-medium">Poll System</span>
</div>
<!-- Right Side: User Info -->
<div class="flex items-center gap-3">
<span class="text-sm text-gray-600 hidden sm:block">Welcome back, {{ .UserName }}!</span>
<div class="w-9 h-9 bg-blue-500 flex items-center justify-center text-white font-semibold">
{{slice .UserName 0 1}}
</div>
<a href="/logout" class="p-2 hover:bg-gray-200 rounded">
<i class="fas fa-external-link-alt text-gray-500"></i>
</a>
</div>
</div>
<div class="flex h-full">
<!-- Mobile Sidebar Overlay -->
<div x-show="sidebarOpen"
x-transition:enter="transition-opacity ease-linear duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition-opacity ease-linear duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="fixed inset-0 bg-gray-600 bg-opacity-75 z-20 lg:hidden"
@click="sidebarOpen = false">
</div>
<!-- Sidebar -->
<div class="fixed inset-y-0 left-0 w-64 bg-gray-50 border-r border-gray-200 transform transition-transform duration-300 ease-in-out z-30 lg:relative lg:translate-x-0 lg:z-0"
:class="sidebarOpen ? 'translate-x-0' : '-translate-x-full'"
x-show="sidebarOpen || window.innerWidth >= 1024"
x-transition:enter="transition ease-in-out duration-300 transform"
x-transition:enter-start="-translate-x-full"
x-transition:enter-end="translate-x-0"
x-transition:leave="transition ease-in-out duration-300 transform"
x-transition:leave-start="translate-x-0"
x-transition:leave-end="-translate-x-full">
<!-- Mobile Close Button -->
<div class="lg:hidden flex justify-between items-center p-4 border-b border-gray-200">
<div class="flex items-center gap-2">
<div class="w-5 h-5 bg-orange-500 rounded text-white text-xs flex items-center justify-center font-bold">
L
<div class="min-h-screen" x-data="{ mobileMenuOpen: false }">
<!-- Simple Navigation Bar -->
<nav class="bg-gray-700 border-b border-gray-600 fixed top-0 left-0 w-full z-50">
<div class="max-w-9xl mx-auto px-4 sm:px-6 lg:px-8 ">
<div class="flex justify-between items-center h-14 ">
<!-- Left: Logo and Navigation Links -->
<div class="flex items-center space-x-12">
<!-- Logo -->
<div class="flex items-center space-x-4">
<img src="../../static/icon-512.png" alt="Logo" class="w-6 h-6"/>
<span class="text-xl font-semibold text-white">Poll System</span>
</div>
<span class="text-sm font-medium">Poll System</span>
</div>
<!-- Desktop Navigation Links -->
<div class="hidden md:flex items-center space-x-10">
{{ if .ShowAdminNav }}
<a href="/dashboard" class="text-sm font-medium {{if eq .ActiveSection "dashboard"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Dashboard
</a>
<a href="/volunteers" class="text-sm font-medium {{if eq .ActiveSection "volunteer"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Volunteers
</a>
<a href="/team_builder" class="text-sm font-medium {{if eq .ActiveSection "team_builder"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Team Builder
</a>
<a href="/addresses" class="text-sm font-medium {{if eq .ActiveSection "address"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Addresses
</a>
<a href="/posts" class="text-sm font-medium {{if eq .ActiveSection "post"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Posts
</a>
<a href="/reports" class="text-sm font-medium {{if eq .ActiveSection "report"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Reports
</a>
{{ end }}
{{ if .ShowVolunteerNav }}
<a href="/volunteer/dashboard" class="text-sm font-medium {{if eq .ActiveSection "dashboard"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Dashboard
</a>
<a href="/volunteer/Addresses" class="text-sm font-medium {{if eq .ActiveSection "address"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Assigned Address
</a>
<a href="/volunteer/schedual" class="text-sm font-medium {{if eq .ActiveSection "schedual"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
My Schedule
</a>
{{ end }}
<a href="/profile" class="text-sm font-medium {{if eq .ActiveSection "profile"}}text-blue-300 border-b-2 border-blue-300{{else}}text-gray-300 hover:text-white{{end}} py-3 px-1">
Profile
</a>
</div>
<!-- Right: User Info and Actions -->
<div class="flex items-center space-x-4">
<!-- User Avatar and Name -->
<div class="hidden sm:flex items-center space-x-3">
<span class="text-sm text-gray-300">{{.UserName}}</span>
<div class="w-8 h-8 bg-blue-500 flex items-center justify-center text-white font-medium rounded-full">
{{slice .UserName 0 1}}
</div>
</div>
<!-- Logout Button -->
<a href="/logout" class="hidden sm:flex items-center px-3 py-2 text-sm font-medium text-gray-300 hover:text-white hover:bg-gray-600 rounded-md">
<i class="fas fa-sign-out-alt mr-2"></i>
Logout
</a>
<!-- Mobile Menu Button -->
<button @click="mobileMenuOpen = !mobileMenuOpen" class="md:hidden p-2 rounded-md text-gray-300 hover:text-white hover:bg-gray-600">
<i class="fas fa-bars" x-show="!mobileMenuOpen"></i>
<i class="fas fa-times" x-show="mobileMenuOpen"></i>
</button>
</div>
<button @click="sidebarOpen = false" class="p-1 hover:bg-gray-200 rounded">
<i class="fas fa-times text-gray-500"></i>
</button>
</div>
<div class="p-3 space-y-4">
<div class="space-y-1">
{{ if .ShowAdminNav }}
<a href="/dashboard"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "dashboard"}}bg-gray-100{{end}}">
<i class="fas fa-chart-pie text-gray-400 mr-2"></i>
<span>Dashboard</span>
</a>
<a href="/volunteers"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "volunteer"}}bg-gray-100{{end}}">
<i class="fas fa-users text-gray-400 mr-2"></i>
<span>Volunteers</span>
</a>
<a href="/team_builder"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "team_builder"}}bg-gray-100{{end}}">
<i class="fas fa-user-friends text-gray-400 mr-2"></i>
<span>Team Builder</span>
</a>
<a href="/addresses"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "address"}}bg-gray-100{{end}}">
<i class="fas fa-map-marked-alt text-gray-400 mr-2"></i>
<span>Addresses</span>
</a>
<a href="/posts"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "post"}}bg-gray-100{{end}}">
<i class="fas fa-blog text-gray-400 mr-2"></i>
<span>Posts</span>
</a>
<a href="/reports"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "report"}}bg-gray-100{{end}}">
<i class="fas fa-table text-gray-400 mr-2"></i>
<span>Reports</span>
</a>
{{ end }}
<!-- Mobile Navigation Menu -->
<div x-show="mobileMenuOpen"
x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0 scale-95"
x-transition:enter-end="opacity-100 scale-100"
x-transition:leave="transition ease-in duration-150"
x-transition:leave-start="opacity-100 scale-100"
x-transition:leave-end="opacity-0 scale-95"
class="md:hidden border-t border-gray-600"
@click.outside="mobileMenuOpen = false">
<div class="px-4 py-4 bg-gray-800">
<!-- User Info Mobile -->
<div class="flex items-center space-x-3 pb-4 mb-4 border-b border-gray-600">
<div class="w-10 h-10 bg-blue-500 flex items-center justify-center text-white font-medium rounded-full">
{{slice .UserName 0 1}}
</div>
<div>
<p class="text-sm font-medium text-white">{{.UserName}}</p>
<p class="text-xs text-gray-400">Logged in</p>
</div>
</div>
{{ if .ShowVolunteerNav }}
<a href="/volunteer/dashboard"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "dashboard"}}bg-gray-100{{end}}">
<i class="fas fa-chart-pie text-gray-400 mr-2"></i>
<span>Dashboard</span>
</a>
<a href="/volunteer/Addresses"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "address"}}bg-gray-100{{end}}">
<i class="fas fa-home text-gray-400 mr-2"></i>
<span>Assigned Address</span>
</a>
<a href="/volunteer/schedual"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "schedual"}}bg-gray-100{{end}}">
<i class="fas fa-calendar-alt text-gray-400 mr-2"></i>
<span>My Schedule</span>
</a>
{{ end }}
<!-- Mobile Navigation Links -->
<div class="space-y-2">
{{ if .ShowAdminNav }}
<a href="/dashboard" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "dashboard"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-chart-pie mr-3 w-4"></i>Dashboard
</a>
<a href="/volunteers" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "volunteer"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-users mr-3 w-4"></i>Volunteers
</a>
<a href="/team_builder" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "team_builder"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-user-friends mr-3 w-4"></i>Team Builder
</a>
<a href="/addresses" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "address"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-map-marked-alt mr-3 w-4"></i>Addresses
</a>
<a href="/posts" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "post"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-blog mr-3 w-4"></i>Posts
</a>
<a href="/reports" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "report"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-table mr-3 w-4"></i>Reports
</a>
{{ end }}
<a href="/profile"
@click="sidebarOpen = false"
class="flex items-center text-sm text-gray-600 hover:bg-gray-100 rounded px-2 py-1 {{if eq .ActiveSection "profile"}}bg-gray-100{{end}}">
<i class="fas fa-user-circle text-gray-400 mr-2"></i>
<span>Profile</span>
</a>
{{ if .ShowVolunteerNav }}
<a href="/volunteer/dashboard" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "dashboard"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-chart-pie mr-3 w-4"></i>Dashboard
</a>
<a href="/volunteer/Addresses" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "address"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-home mr-3 w-4"></i>Assigned Address
</a>
<a href="/volunteer/schedual" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "schedual"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-calendar-alt mr-3 w-4"></i>My Schedule
</a>
{{ end }}
<a href="/profile" @click="mobileMenuOpen = false"
class="block px-3 py-2 rounded-md text-base font-medium {{if eq .ActiveSection "profile"}}text-blue-300 bg-gray-700{{else}}text-gray-300 hover:text-white hover:bg-gray-700{{end}}">
<i class="fas fa-user-circle mr-3 w-4"></i>Profile
</a>
<!-- Logout for Mobile -->
<div class="border-t border-gray-600 pt-2 mt-4">
<a href="/logout" class="block px-3 py-2 rounded-md text-base font-medium text-gray-300 hover:text-white hover:bg-gray-700">
<i class="fas fa-sign-out-alt mr-3 w-4"></i>Logout
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden min-h-screen">
<div class="bg-white flex-1 overflow-auto pb-[60px]">
{{ template "content" . }}
</div>
<!-- Main Content Area -->
<main class="flex-1 mt-14">
<!--sm:px-4 lg:px-6-->
<div class="max-w-9xl mx-auto overflow-hidden ">
{{ template "content" . }}
</div>
</div>
</main>
</div>
{{else}}
<!-- Landing Page -->
<!-- Landing Page (unchanged) -->
<!DOCTYPE html>
<html lang="en">
<head>
@@ -193,63 +206,63 @@
<body class="bg-gray-50">
<div class="min-h-screen" x-data="{ mobileMenuOpen: false }">
<!-- Navigation -->
<nav class="bg-white border-b border-gray-200">
<div class="max-w-7xl mx-auto px-6">
<div class="flex justify-between items-center h-16">
<!-- Logo -->
<div class="flex items-center gap-3">
<img src="../../static/icon-512.png" alt="Logo" class="w-8 h-8"/>
<span class="text-xl font-semibold text-gray-900">Linq</span>
</div>
<!-- Navigation -->
<nav class="bg-gray-700 border-b border-gray-600">
<div class="max-w-7xl mx-auto px-6">
<div class="flex justify-between items-center h-14">
<!-- Logo -->
<div class="flex items-center gap-3">
<img src="../../static/icon-512.png" alt="Logo" class="w-8 h-8"/>
<span class="text-xl font-semibold text-white">Linq</span>
</div>
<!-- Desktop Navigation -->
<div class="hidden md:flex items-center gap-8">
<a href="#home" class="text-gray-600 hover:text-gray-900">Home</a>
<a href="#products" class="text-gray-600 hover:text-gray-900">Products</a>
<a href="#about" class="text-gray-600 hover:text-gray-900">About</a>
</div>
<!-- Desktop Navigation -->
<div class="hidden md:flex items-center gap-8">
<a href="#home" class="text-gray-300 hover:text-white py-3 px-1">Home</a>
<a href="#products" class="text-gray-300 hover:text-white py-3 px-1">Products</a>
<a href="#about" class="text-gray-300 hover:text-white py-3 px-1">About</a>
</div>
<!-- Auth Buttons -->
<div class="hidden md:flex items-center gap-3">
<button onclick="openLoginModal()" class="px-4 py-2 text-gray-600 hover:text-gray-900">
Sign In
</button>
<button onclick="openRegisterModal()" class="px-6 py-2 bg-blue-600 text-white hover:bg-blue-700 rounded">
Get Started
</button>
</div>
<!-- Mobile Menu Button -->
<button @click="mobileMenuOpen = !mobileMenuOpen" class="md:hidden p-2">
<i class="fas fa-bars text-gray-600" x-show="!mobileMenuOpen"></i>
<i class="fas fa-times text-gray-600" x-show="mobileMenuOpen"></i>
</button>
</div>
<!-- Mobile Menu -->
<div x-show="mobileMenuOpen" class="md:hidden border-t border-gray-200 bg-white">
<div class="px-6 py-4 space-y-3">
<a href="#home" @click="mobileMenuOpen = false" class="block py-2 text-gray-600">Home</a>
<a href="#products" @click="mobileMenuOpen = false" class="block py-2 text-gray-600">Products</a>
<a href="#about" @click="mobileMenuOpen = false" class="block py-2 text-gray-600">About</a>
<div class="border-t border-gray-200 pt-3 space-y-2">
<button onclick="openLoginModal(); document.querySelector('[x-data]').__x.$data.mobileMenuOpen = false"
class="block w-full text-left py-2 text-gray-600">
Sign In
</button>
<button onclick="openRegisterModal(); document.querySelector('[x-data]').__x.$data.mobileMenuOpen = false"
class="block w-full py-2 bg-blue-600 text-white rounded">
Get Started
</button>
</div>
</div>
</div>
</div>
<!-- Auth Buttons -->
<div class="hidden md:flex items-center gap-3">
<button onclick="openLoginModal()" class="px-4 py-2 text-gray-300 hover:text-white">
Sign In
</button>
<button onclick="openRegisterModal()" class="px-6 py-2 bg-blue-500 text-white hover:bg-blue-600 rounded">
Get Started
</button>
</div>
<!-- Mobile Menu Button -->
<button @click="mobileMenuOpen = !mobileMenuOpen" class="md:hidden p-2 text-gray-300 hover:text-white hover:bg-gray-600 rounded-md">
<i class="fas fa-bars" x-show="!mobileMenuOpen"></i>
<i class="fas fa-times" x-show="mobileMenuOpen"></i>
</button>
</div>
<!-- Mobile Menu -->
<div x-show="mobileMenuOpen" class="md:hidden border-t border-gray-600 bg-gray-800">
<div class="px-6 py-4 space-y-3">
<a href="#home" @click="mobileMenuOpen = false" class="block py-2 text-gray-300 hover:text-white">Home</a>
<a href="#products" @click="mobileMenuOpen = false" class="block py-2 text-gray-300 hover:text-white">Products</a>
<a href="#about" @click="mobileMenuOpen = false" class="block py-2 text-gray-300 hover:text-white">About</a>
<div class="border-t border-gray-600 pt-3 space-y-2">
<button onclick="openLoginModal(); document.querySelector('[x-data]').__x.$data.mobileMenuOpen = false"
class="block w-full text-left py-2 text-gray-300 hover:text-white">
Sign In
</button>
<button onclick="openRegisterModal(); document.querySelector('[x-data]').__x.$data.mobileMenuOpen = false"
class="block w-full py-2 bg-blue-500 text-white hover:bg-blue-600 rounded">
Get Started
</button>
</div>
</div>
</div>
</div>
</nav>
<!-- Hero -->
<section id="home" class="pt-20 pb-16 px-6">
<section id="home" class="pt-40 pb-16 px-6 min-h-[600px]">
<div class="max-w-4xl mx-auto text-center">
<h1 class="text-4xl sm:text-5xl font-bold text-gray-900 mb-6">
Simple Polling
@@ -272,7 +285,7 @@
</section>
<!-- Products Section -->
<section id="products" class="py-16 bg-white">
<section id="products" class="py-16 bg-white min-h-[600px]">
<div class="max-w-6xl mx-auto px-6">
<div class="text-center mb-12">
<h2 class="text-3xl font-bold text-gray-900 mb-4">Our Products</h2>
@@ -317,7 +330,7 @@
</section>
<!-- About -->
<section id="about" class="py-16 bg-gray-50">
<section id="about" class="py-16 bg-gray-50 min-h-[600px]">
<div class="max-w-6xl mx-auto px-6">
<div class="grid lg:grid-cols-2 gap-12 items-center">
<div>
@@ -380,13 +393,7 @@
<div class="flex flex-col lg:flex-row min-h-[500px]">
<!-- Left Side - Image -->
<div class="hidden lg:flex flex-1 bg-gradient-to-br from-blue-500 to-blue-700 flex-col items-center justify-center">
<!-- <div class="text-center text-white">
<i class="fas fa-chart-line text-4xl sm:text-6xl mb-6"></i>
<h2 class="text-2xl sm:text-3xl font-bold mb-4">Welcome Back</h2>
<p class="text-base sm:text-lg opacity-90">Continue managing your polling operations</p>
</div> -->
<img src="../../static/feature-mobile2.jpg" alt="Welcome Image" class="object-cover h-full rounded-lg shadow-lg">
</div>
<!-- Right Side - Form -->
<div class="flex-1 p-6 sm:p-8">
@@ -426,11 +433,6 @@
<div class="flex flex-col lg:flex-row min-h-[600px]">
<!-- Left Side - Image -->
<div class="hidden lg:flex flex-1 bg-gradient-to-br from-blue-600 to-blue-800 flex-col items-center justify-center">
<!-- <div class="text-center text-white">
<i class="fas fa-rocket text-4xl sm:text-6xl mb-6"></i>
<h2 class="text-2xl sm:text-3xl font-bold mb-4">Get Started</h2>
<p class="text-base sm:text-lg opacity-90">Join our platform and streamline your operations</p>
</div> -->
<img src="../../static/feature-mobile1.jpg" alt="Welcome Image" class="object-cover h-full rounded-lg shadow-lg">
</div>

View File

@@ -1,19 +1,6 @@
{{ define "content" }}
<div class="min-h-screen bg-gray-100">
<!-- Header -->
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-users{{end}} text-blue-600"
></i>
<span class="text-sm font-medium">Volunteer Management</span>
</div>
</div>
</div>
</div>
<div class="max-w-2xl mx-auto">
<!-- Create Post Form -->

View File

@@ -1,18 +1,5 @@
{{ define "content" }}
<div class="min-h-screen bg-gray-50">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-users{{end}} text-blue-600"
></i>
<span class="text-sm font-medium">Volunteer Management</span>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="p-6">
<!-- Profile Info Section -->

View File

@@ -17,30 +17,6 @@
</head>
<body class="bg-gray-100">
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center gap-2">
<i class="fas fa-chart-bar text-blue-600"></i>
<span class="text-xl font-semibold text-gray-800">
Schedual Overview
</span>
</div>
<div class="flex items-center gap-4">
<button
class="px-5 py-2 bg-blue-600 text-white text-sm hover:bg-blue-700 transition-colors"
>
<i class="fas fa-download mr-2"></i>Export Data
</button>
<button
class="px-5 py-2 border border-gray-300 text-gray-700 text-sm hover:bg-gray-50 transition-colors"
>
<i class="fas fa-filter mr-2"></i>Filter
</button>
</div>
</div>
</div>
<!-- Dashboard Content -->
<div class="flex-1 overflow-auto">
<!-- Top Stats Cards -->

View File

@@ -2,20 +2,6 @@
<div class="min-h-screen bg-gray-50">
<!-- Header Bar -->
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-users{{end}} text-blue-600"
></i>
<span class="text-sm font-medium">Volunteer Management</span>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="p-6">
<!-- Volunteer Info Section -->

View File

@@ -1,27 +1,5 @@
{{ define "content" }}
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-poll{{end}} text-green-600"
></i>
<span class="text-sm font-medium">Poll Questions</span>
</div>
</div>
<div class="flex items-center gap-2">
<a
href="/appointments"
class="px-3 py-1 bg-gray-500 text-white text-sm hover:bg-gray-600 rounded"
>
Back to Appointments
</a>
</div>
</div>
</div>
<!-- Form Content -->
<div class="flex-1 overflow-y-auto bg-gray-50 p-6">
<div class="max-w-2xl mx-auto">
@@ -150,7 +128,7 @@
<!-- Submit Button -->
<div class="flex justify-end gap-3 pt-6">
<a
href="/appointments"
href="/volunteer/Addresses"
class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50"
>
Cancel

View File

@@ -1,17 +1,5 @@
{{ define "content" }}
<div class="min-h-screen bg-gray-50">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-users{{end}} text-blue-600"
></i>
<span class="text-sm font-medium">Volunteer Management</span>
</div>
</div>
</div>
<!-- Main Content -->
<div class="p-6 space-y-6">
{{range .TeamLeads}} {{ $teamLeadID := .ID }}

View File

@@ -1,20 +1,6 @@
{{ define "content" }}
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden" x-data="volunteerTable()">
<!-- Top Navigation -->
<div class="bg-white border-b border-gray-200 px-6 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<i
class="{{if .PageIcon}}{{.PageIcon}}{{else}}fas fa-users{{end}} text-blue-600"
></i>
<span class="text-sm font-medium">Volunteer Management</span>
</div>
</div>
</div>
</div>
<!-- Toolbar -->
<div class="bg-gray-50 border-b border-gray-200 px-6 py-3">
<div class="flex items-center gap-4 text-sm">