Update compliance landing page

Show district logo, phone number, etc.
This commit is contained in:
Eli Ribble 2026-04-03 00:18:15 +00:00
parent 457f123f69
commit 377683c4e3
No known key found for this signature in database
2 changed files with 55 additions and 123 deletions

View file

@ -6,139 +6,69 @@
body {
background-color: #f8f9fa;
}
.page-container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.content-card {
background-color: white;
border-radius: 15px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 25px;
margin-bottom: 20px;
}
.logo-area {
text-align: center;
margin-bottom: 20px;
}
.logo {
height: 50px;
max-width: 200px;
margin: 0 auto;
}
.map-container {
height: 300px;
background-color: #e9ecef;
border-radius: 10px;
margin-bottom: 20px;
position: relative;
overflow: hidden;
}
.map-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-image: url("https://placehold.co/600x300/e9ecef/adb5bd?text=Map+View");
background-size: cover;
background-position: center;
}
.map-pin {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -100%);
color: #dc3545;
font-size: 30px;
}
.address-container {
background-color: #f8f9fa;
border-radius: 10px;
padding: 15px;
margin-bottom: 20px;
border-left: 4px solid #0d6efd;
}
.action-buttons {
display: flex;
gap: 10px;
}
.progress-container {
margin: 30px 0 20px;
}
.progress {
height: 8px;
.progress-bar {
background-color: #0d6efd;
transition: width 0.3s ease;
}
</style>
{{ end }}
{{ define "content" }}
<div class="page-container">
<div class="logo-area">
<div class="container-fluid px-3 py-3">
<!-- Header -->
<header class="text-center mb-4 pb-3 border-bottom">
<div class="d-flex align-items-center justify-content-center mb-2">
<img
src="{{ .District.URLLogo }}"
alt="{{ .District.Name }} Logo"
class="logo"
alt="{{ .District.Name }} logo"
class="me-2"
style="height: 40px; width: auto;"
/>
<h1 class="h5 mb-0">{{ .District.Name }}</h1>
</div>
<div class="text-muted small">
<i class="bi bi-telephone"></i> {{ .District.OfficePhone }}
</div>
</header>
<div class="progress-container">
<div class="d-flex justify-content-between mb-1">
<span class="text-muted small">Location</span>
<span class="text-muted small">1 of 4</span>
<!-- Progress Bar -->
<div class="mb-4">
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="small text-muted">Step 1 of 10</span>
</div>
<div class="progress">
<div class="progress" style="height: 8px;">
<div
class="progress-bar"
role="progressbar"
style="width: 25%"
aria-valuenow="25"
style="width: 20%;"
aria-valuenow="20"
aria-valuemin="0"
aria-valuemax="100"
></div>
</div>
</div>
<div class="content-card">
<h1 class="h4 mb-4">Confirm Property Location</h1>
<!-- Main Content -->
<main>
<h2 class="h4 mb-3">Action requested for this property</h2>
<div class="map-container">
<div class="map-placeholder"></div>
<div class="map-pin">
<i class="bi bi-geo-alt-fill"></i>
</div>
</div>
<div class="address-container">
<div class="mb-2"><strong>Detected Address:</strong></div>
<h5>123 Maple Street, Riverside, CA 92501</h5>
</div>
<div class="mb-4">
<p>Is this the correct location of the property in question?</p>
</div>
<div class="action-buttons">
<a
href="/mock/report/%7bcode%7d/evidence"
class="btn btn-success flex-grow-1"
>
<i class="bi bi-check-circle me-2"></i> Correct
</a>
<a
href="/mock/report/%7bcode%7d/update"
class="btn btn-outline-primary flex-grow-1"
>
<i class="bi bi-geo-alt me-2"></i> Update Location
</a>
</div>
</div>
<div class="text-center text-muted small">
<p>
If you need assistance, please contact Vector Control at (555) 123-4567
<div class="alert alert-warning" role="alert">
<p class="mb-2">
The {{ .District.Name }} has identified a possible mosquito breeding
source at this property during a recent inspection.
</p>
<p class="mb-0">
Please confirm the property address and provide any photos, access
details, and contact information to help us review and resolve this
issue quickly.
</p>
</div>
<div class="d-grid mt-4">
<a class="btn btn-primary btn-lg" href="compliance/address"
>Get Started</a
>
</div>
</main>
</div>
{{ end }}

View file

@ -13,6 +13,7 @@ import (
type ContentDistrict struct {
Name string
OfficePhone string
URLLogo string
URLRMO string
URLWebsite string
@ -60,6 +61,7 @@ func newContentDistrict(d *models.Organization) *ContentDistrict {
}
return &ContentDistrict{
Name: d.Name,
OfficePhone: "123-456-7890",
URLLogo: config.MakeURLNidus("/api/district/%s/logo", d.Slug.GetOr("unset")),
URLRMO: config.MakeURLReport("/district/%s", d.Slug.GetOr("unset")),
URLWebsite: d.Website.GetOr(""),