Frontend fixes
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -81,15 +81,15 @@ pub async fn send_unsubscribe_email(
|
||||
base_url, unsubscribe_token
|
||||
);
|
||||
let html_content = format!(
|
||||
"You've requested to unsubscribe from my emails. To confirm, please click the link below:<br />\
|
||||
<a href=\"{}\">Confirm unsubscribe</a><br />\
|
||||
If you did not request this, you can safely ignore this email.",
|
||||
r#"You've requested to unsubscribe from the newsletter. To confirm, please click the link below:<br />
|
||||
<a href="{}">Confirm unsubscribe</a><br />
|
||||
If you did not request this, you can safely ignore this email."#,
|
||||
confirmation_link
|
||||
);
|
||||
let text_content = format!(
|
||||
"You've requested to unsubscribe from my emails. To confirm, please follow the link below:\
|
||||
{}\
|
||||
If you did not request this, you can safely ignore this email.",
|
||||
r#"You've requested to unsubscribe from the newsletter. To confirm, please follow the link below:
|
||||
{}
|
||||
If you did not request this, you can safely ignore this email."#,
|
||||
confirmation_link
|
||||
);
|
||||
email_client
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="flex items-center space-x-2 group">
|
||||
<a href="/" class="flex items-center space-x-2 group">
|
||||
<div class="w-6 h-6 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-xl flex items-center justify-center shadow-lg group-hover:shadow-xl transition-all duration-200">
|
||||
<svg class="w-4 h-4 text-white group-hover:scale-110 transition-transform duration-200"
|
||||
fill="none"
|
||||
@@ -29,13 +29,8 @@
|
||||
<span class="text-sm font-bold bg-gradient-to-r from-blue-600 to-indigo-600 bg-clip-text text-transparent">
|
||||
zero2prod
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<nav class="hidden md:flex items-center">
|
||||
<a href="/"
|
||||
class="text-gray-700 hover:text-blue-600 px-4 py-2 rounded-lg text-sm font-medium transition-all duration-200 relative group">
|
||||
Home
|
||||
<span class="absolute inset-x-4 bottom-0 h-0.5 bg-blue-600 scale-x-0 group-hover:scale-x-100 transition-transform duration-200"></span>
|
||||
</a>
|
||||
<a href="/posts"
|
||||
class="text-gray-700 hover:text-blue-600 px-4 py-2 rounded-lg text-sm font-medium transition-all duration-200 relative group">
|
||||
Posts
|
||||
@@ -47,7 +42,7 @@
|
||||
<a href="/admin/dashboard"
|
||||
hx-boost="true"
|
||||
class="hidden md:flex bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white px-4 py-2 rounded-lg text-sm font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:scale-105">
|
||||
dashboard
|
||||
Dashboard
|
||||
</a>
|
||||
<button class="md:hidden p-2 text-gray-700 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors duration-200"
|
||||
onclick="toggleMobileMenu()">
|
||||
@@ -60,10 +55,6 @@
|
||||
<div id="mobile-menu"
|
||||
class="hidden md:hidden border-t border-gray-100 pb-4 pt-4">
|
||||
<nav class="flex flex-col space-y-2">
|
||||
<a href="/"
|
||||
class="text-gray-700 hover:text-blue-600 hover:bg-blue-50 px-4 py-2 rounded-lg text-sm font-medium transition-colors duration-200">
|
||||
Home
|
||||
</a>
|
||||
<a href="/posts"
|
||||
class="text-gray-700 hover:text-blue-600 hover:bg-blue-50 px-4 py-2 rounded-lg text-sm font-medium transition-colors duration-200">
|
||||
Posts
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" opacity="0.7" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 11h10M7 14h6" opacity="0.3" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 8l8 8M16 8l-8 8" stroke="#dc2626" opacity="0.8" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold text-gray-900 mb-2">Unsubscribe</h1>
|
||||
@@ -45,12 +47,6 @@
|
||||
</div>
|
||||
<button type="submit"
|
||||
class="w-full bg-orange-600 text-white hover:bg-orange-700 font-medium py-3 px-4 rounded-md transition-colors flex items-center justify-center">
|
||||
<svg class="w-4 h-4 mr-2"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
|
||||
</svg>
|
||||
Unsubscribe
|
||||
</button>
|
||||
<div id="unsubscribe-messages" class="mt-4"></div>
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 class="text-4xl font-bold text-gray-800 mb-4">Good bye, friend!</h1>
|
||||
<h2 class="text-xl font-medium text-gray-600 mb-6">You've successfully unsubscribed</h2>
|
||||
<h1 class="text-4xl font-bold text-gray-800 mb-4">Good bye, friend.</h1>
|
||||
<h2 class="text-xl font-medium text-gray-600 mb-6">Unsubscription was successfull!</h2>
|
||||
<p class="text-gray-600 mb-8 max-w-2xl mx-auto">
|
||||
Your email has been removed from the database. You won't receive emails anymore. If you change your mind, you are welcome back any time!
|
||||
Your email has been removed from the database. If you change your mind, you are welcome back any time!
|
||||
</p>
|
||||
<div class="flex flex-col sm:flex-row gap-4 justify-center items-center">
|
||||
<a href="/"
|
||||
|
||||
Reference in New Issue
Block a user