- Created Unsubscribe.vue with matching site styling
- Added showUnsubscribe method to SubscriptionController
- Updated routes: GET /unsubscribe/{token} shows confirmation page
- POST /api/unsubscribe/{token} processes unsubscribe
- Updated email template to use new unsubscribe route
- Prevents accidental unsubscribes with confirmation dialog
153 lines
4.5 KiB
PHP
153 lines
4.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>New Court Filing Notification</title>
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #f4f4f4;
|
|
}
|
|
.email-container {
|
|
max-width: 600px;
|
|
margin: 20px auto;
|
|
background-color: #ffffff;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
.header {
|
|
background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
|
|
color: white;
|
|
padding: 30px 20px;
|
|
text-align: center;
|
|
}
|
|
.header h1 {
|
|
margin: 0;
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
}
|
|
.header p {
|
|
margin: 5px 0 0 0;
|
|
font-size: 14px;
|
|
opacity: 0.9;
|
|
}
|
|
.content {
|
|
padding: 30px 20px;
|
|
}
|
|
.filing-info {
|
|
background-color: #f9fafb;
|
|
border-left: 4px solid #3b82f6;
|
|
padding: 20px;
|
|
margin: 20px 0;
|
|
border-radius: 4px;
|
|
}
|
|
.filing-info .label {
|
|
font-weight: 600;
|
|
color: #374151;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 5px;
|
|
}
|
|
.filing-info .title {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: #1f2937;
|
|
margin-bottom: 10px;
|
|
}
|
|
.filing-info .date {
|
|
color: #6b7280;
|
|
font-size: 14px;
|
|
margin-bottom: 15px;
|
|
}
|
|
.filing-info .summary {
|
|
color: #4b5563;
|
|
font-size: 15px;
|
|
line-height: 1.6;
|
|
}
|
|
.cta-button {
|
|
display: inline-block;
|
|
background-color: #3b82f6;
|
|
color: white;
|
|
text-decoration: none;
|
|
padding: 12px 30px;
|
|
border-radius: 6px;
|
|
font-weight: 600;
|
|
margin: 20px 0;
|
|
transition: background-color 0.3s;
|
|
}
|
|
.cta-button:hover {
|
|
background-color: #2563eb;
|
|
}
|
|
.footer {
|
|
background-color: #f9fafb;
|
|
padding: 20px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
color: #6b7280;
|
|
border-top: 1px solid #e5e7eb;
|
|
}
|
|
.footer a {
|
|
color: #3b82f6;
|
|
text-decoration: none;
|
|
}
|
|
.footer a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.divider {
|
|
height: 1px;
|
|
background-color: #e5e7eb;
|
|
margin: 20px 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="email-container">
|
|
<div class="header">
|
|
<h1>New Court Filing</h1>
|
|
<p>Eliza Kragh v. Montana Association of the Deaf</p>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<p>A new document has been filed in the case:</p>
|
|
|
|
<div class="filing-info">
|
|
<div class="label">Filing Date</div>
|
|
<div class="date">{{ $entry->date->format('F j, Y') }}</div>
|
|
|
|
<div class="label">Title</div>
|
|
<div class="title">{{ $entry->title }}</div>
|
|
|
|
<div class="label">Summary</div>
|
|
<div class="summary">{{ $entry->summary }}</div>
|
|
</div>
|
|
|
|
<center>
|
|
<a href="{{ config('app.url') }}" class="cta-button">View Full Docket</a>
|
|
</center>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<p style="font-size: 14px; color: #6b7280;">
|
|
You are receiving this email because you subscribed to notifications for new court filings in this case.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>
|
|
<strong>Eliza Kragh v. Montana Association of the Deaf</strong><br>
|
|
Court Docket Notification System
|
|
</p>
|
|
<p style="margin-top: 10px;">
|
|
<a href="{{ url('/unsubscribe/' . $unsubscribeToken) }}">Unsubscribe from notifications</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|