feat: Update styling and home page
All checks were successful
Build Docker / BuildImage (push) Successful in 1m50s

This commit is contained in:
2025-07-28 11:36:51 +10:00
parent 4b8d3465bc
commit 402e321396
6 changed files with 662 additions and 206 deletions

View File

@@ -4,9 +4,10 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FireAlerts</title>
<title>FireAlerts - Account</title>
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
<link rel="stylesheet" href="/assets/css/index.css">
<link rel="stylesheet" href="/assets/css/account.css">
<!-- Open Graph meta tags -->
<meta property="og:title" content="FireAlerts - Account">
@@ -16,97 +17,117 @@
</head>
<body>
<div class="right">
<span class="user">Logged in as {{user.username}}</span>
<a href="/logout" class="button">Logout</a>
</div>
<h1>FireAlerts</h1>
<div class="centre">
<h2>Your Alerts</h2>
</div>
<!-- Display existing notifications -->
{% if notifications %}
<div class="notifications-list">
{% for notification in notifications %}
<div class="notification-item">
<h4>Domain: {{notification.domain}}</h4>
<p><strong>Type:</strong> {{notification.notification.type.replace('_', ' ').title()}}</p>
<p><strong>Blocks before expiry:</strong> {{notification.notification.blocks}}</p>
{% for notificationType in NOTIFICATION_TYPES %}
{% if notificationType.type == notification.notification.type %}
{% for field in notificationType.fields %}
<p><strong>{{field.label}}:</strong> {{notification.notification[field.name]}}</p>
{% endfor %}
{% endif %}
{% endfor %}
<!-- Delete notification button -->
<a href="/notification/delete/{{notification.notification.id}}" class="button delete-button">Delete</a>
</div>
{% endfor %}
</div>
{% else %}
<div class="no-notifications">
<p>You have no notifications set up yet.</p>
<p>Use the forms below to add new notifications.</p>
</div>
{% endif %}
<div class="centre">
<h2>Setup your alerts below:</h2>
</div>
<!-- Forms to add notifications -->
{% for notificationType in NOTIFICATION_TYPES %}
<div class="notification-form">
<h3>{{notificationType.description}}</h3>
<form method="POST" action="/notification/{{notificationType.type}}">
<!-- Domain input -->
<div class="form-group">
<label for="domain">Domain:</label>
<input type="text" id="domain" name="domain" required placeholder="exampledomain">
<div class="container">
<header class="account-header">
<div class="logo">
<a href="/">🔥 FireAlerts</a>
</div>
{% for field in notificationType.fields %}
{% if field.type == 'username' %}
<div class="form-group hidden">
<label for="{{field.name}}">{{field.label}}:</label>
<input type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" {% if field.required %}required{%
endif %} value="{{user.username}}">
<div class="user-info">
<span class="user">Welcome, {{user.username}}</span>
<a href="/logout" class="button secondary">Logout</a>
</div>
{% else %}
<div class="form-group">
<label for="{{field.name}}">{{field.label}}:</label>
<input type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" {% if field.required %}required{%
endif %}>
</div>
{% endif %}
{% endfor %}
</header>
<!-- Add required blocks before expiry field -->
<div class="form-group">
<label for="blocks">Blocks before expiry</label>
<input type="number" id="blocks" name="blocks" required min="1" max="50000" value="1008">
<!-- Add a note that 144 blocks is 1 day, 1008 blocks is a week, and 4320 blocks is a month -->
<p class="note">Note: 144 blocks is approximately 1 day, 1008 blocks is approximately 1 week, and 4320
blocks is approximately 1 month.</p>
</div>
<main>
<section class="alerts-section">
<h2>Your Active Alerts</h2>
{% if notifications %}
<div class="notifications-grid">
{% for notification in notifications %}
<div class="notification-card">
<div class="notification-header">
<h3>{{notification.domain}}</h3>
<span class="notification-type">{{notification.notification.type.replace('_', ' ').title()}}</span>
</div>
<div class="notification-details">
<div class="detail-item">
<span class="label">Alert Threshold:</span>
<span class="value">{{notification.notification.blocks}} blocks</span>
</div>
{% for notificationType in NOTIFICATION_TYPES %}
{% if notificationType.type == notification.notification.type %}
{% for field in notificationType.fields %}
{% if field.name != 'username' %}
<div class="detail-item">
<span class="label">{{field.label}}:</span>
<span class="value">{{notification.notification[field.name]}}</span>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
<div class="notification-actions">
<a href="/notification/delete/{{notification.notification.id}}" class="button delete-button" onclick="return confirm('Are you sure you want to delete this notification?')">Delete</a>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="empty-state">
<div class="empty-icon">📭</div>
<h3>No alerts configured</h3>
<p>You haven't set up any domain expiry alerts yet. Use the forms below to add your first notification.</p>
</div>
{% endif %}
</section>
<button type="submit" class="button">Add {{notificationType.type.replace('_', ' ').title()}}
Notification</button>
<section class="add-alerts-section">
<h2>Add New Alert</h2>
<p class="section-description">Set up notifications to be alerted before your Handshake domains expire.</p>
<div class="notification-forms">
{% for notificationType in NOTIFICATION_TYPES %}
<div class="notification-form-card">
<div class="form-header">
<h3>{{notificationType.description}}</h3>
</div>
<form method="POST" action="/notification/{{notificationType.type}}" class="notification-form">
<div class="form-grid">
<div class="form-group">
<label for="domain-{{notificationType.type}}">Domain:</label>
<input type="text" id="domain-{{notificationType.type}}" name="domain" required placeholder="exampledomain">
</div>
{% if notificationType.links %}
{% for link in notificationType.links %}
<a href="{{link.url}}" target="_blank">{{link.label}}</a>
{% endfor %}
{% endif %}
</form>
{% for field in notificationType.fields %}
{% if field.type == 'username' %}
<input type="hidden" name="{{field.name}}" value="{{user.username}}">
{% else %}
<div class="form-group">
<label for="{{field.name}}-{{notificationType.type}}">{{field.label}}:</label>
<input type="{{field.type}}" id="{{field.name}}-{{notificationType.type}}" name="{{field.name}}" {% if field.required %}required{% endif %} placeholder="Enter {{field.label.lower()}}">
</div>
{% endif %}
{% endfor %}
<div class="form-group">
<label for="blocks-{{notificationType.type}}">Blocks before expiry:</label>
<input type="number" id="blocks-{{notificationType.type}}" name="blocks" required min="1" max="50000" value="1008">
<small class="form-note">💡 Tip: 144 blocks ≈ 1 day, 1008 blocks ≈ 1 week, 4320 blocks ≈ 1 month</small>
</div>
</div>
<div class="form-actions">
<button type="submit" class="button primary">Add {{notificationType.type.replace('_', ' ').title()}} Alert</button>
{% if notificationType.links %}
{% for link in notificationType.links %}
<a href="{{link.url}}" class="button secondary" target="_blank">{{link.label}}</a>
{% endfor %}
{% endif %}
</div>
</form>
</div>
{% endfor %}
</div>
</section>
</main>
</div>
{% endfor %}
</body>
</html>

View File

@@ -0,0 +1,276 @@
.account-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 0;
border-bottom: 1px solid rgba(255,255,255,0.1);
margin-bottom: 40px;
}
.account-header .logo a {
color: white;
text-decoration: none;
font-size: 2rem;
font-weight: bold;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.user-info {
display: flex;
align-items: center;
gap: 20px;
}
.user {
color: white;
font-weight: 500;
opacity: 0.9;
}
.alerts-section, .add-alerts-section {
margin-bottom: 60px;
}
.alerts-section h2, .add-alerts-section h2 {
color: white;
font-size: 2.5rem;
margin-bottom: 20px;
text-align: center;
}
.section-description {
color: rgba(255,255,255,0.8);
text-align: center;
font-size: 1.1rem;
margin-bottom: 40px;
}
.notifications-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 20px;
margin-bottom: 40px;
}
.notification-card {
background: rgba(30, 30, 46, 0.9);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 12px;
padding: 24px;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
transition: transform 0.3s ease;
}
.notification-card:hover {
transform: translateY(-2px);
background: rgba(40, 40, 56, 0.9);
}
.notification-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.notification-header h3 {
color: white;
margin: 0;
font-size: 1.3rem;
}
.notification-type {
background: #667eea;
color: white;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
}
.notification-details {
margin-bottom: 20px;
}
.detail-item {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
}
.detail-item .label {
color: #b0b0b0;
font-weight: 500;
}
.detail-item .value {
color: white;
font-weight: 600;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 200px;
}
.notification-actions {
text-align: right;
}
.delete-button {
background: #ff6b6b !important;
color: white !important;
padding: 8px 16px !important;
font-size: 0.9rem !important;
}
.delete-button:hover {
background: #ff5252 !important;
}
.empty-state {
text-align: center;
background: rgba(255,255,255,0.1);
border-radius: 20px;
padding: 60px 40px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.2);
}
.empty-icon {
font-size: 4rem;
margin-bottom: 20px;
}
.empty-state h3 {
color: white;
font-size: 1.8rem;
margin-bottom: 15px;
}
.empty-state p {
color: rgba(255,255,255,0.8);
font-size: 1.1rem;
}
.notification-forms {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 30px;
}
.notification-form-card {
background: rgba(30, 30, 46, 0.9);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 16px;
padding: 30px;
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.form-header h3 {
color: white;
margin-bottom: 20px;
font-size: 1.4rem;
}
.notification-form {
display: flex;
flex-direction: column;
}
.form-grid {
display: grid;
gap: 20px;
margin-bottom: 25px;
}
.form-group {
display: flex;
flex-direction: column;
}
.form-group label {
color: #e0e0e0;
font-weight: 600;
margin-bottom: 8px;
font-size: 0.95rem;
}
.form-group input {
padding: 12px 16px;
border: 2px solid rgba(255,255,255,0.2);
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s ease;
background: rgba(45, 45, 65, 0.8);
color: white;
}
.form-group input:focus {
outline: none;
border-color: #667eea;
background: rgba(55, 55, 75, 0.9);
}
.form-group input::placeholder {
color: #888;
}
.form-note {
color: #b0b0b0;
font-size: 0.85rem;
margin-top: 5px;
line-height: 1.4;
}
.form-actions {
display: flex;
gap: 15px;
align-items: center;
flex-wrap: wrap;
}
.form-actions .button {
flex: 1;
min-width: 180px;
text-align: center;
padding: 12px 20px;
font-size: 1rem;
}
@media (max-width: 768px) {
.account-header {
flex-direction: column;
gap: 20px;
text-align: center;
}
.notifications-grid {
grid-template-columns: 1fr;
}
.notification-forms {
grid-template-columns: 1fr;
}
.form-actions {
flex-direction: column;
}
.form-actions .button {
width: 100%;
min-width: auto;
}
.alerts-section h2, .add-alerts-section h2 {
font-size: 2rem;
}
}
@media (max-width: 480px) {
.notification-form-card {
padding: 20px;
}
}

View File

@@ -1,136 +1,238 @@
body {
background-color: #000000;
color: #ffffff;
}
h1 {
font-size: 50px;
* {
margin: 0;
padding: 0;
}
.centre {
margin-top: 10%;
text-align: center;
}
a {
color: #ffffff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #ffffff;
color: #000000;
border-radius: 5px;
transition: background-color 0.3s ease;
}
.right {
float: right;
}
span.user {
font-weight: bold;
color: #ffffff;
margin-inline-end: 5px;
}
.notification-form {
background-color: #1a1a1a;
border: 1px solid #333333;
border-radius: 8px;
padding: 20px;
margin: 20px auto;
max-width: 500px;
}
.notification-form h3 {
margin-top: 0;
margin-bottom: 15px;
color: #ffffff;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #ffffff;
}
.form-group input {
width: 100%;
padding: 10px;
background-color: #333333;
border: 1px solid #555555;
border-radius: 4px;
color: #ffffff;
font-size: 14px;
box-sizing: border-box;
}
.form-group input:focus {
outline: none;
border-color: #ffffff;
background-color: #444444;
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: #e0e0e0;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
min-height: 100vh;
}
.notifications-list {
max-width: 800px;
margin: 30px auto;
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.notifications-list h2 {
color: #ffffff;
header {
padding: 20px 0;
text-align: center;
}
.logo {
font-size: 2rem;
font-weight: bold;
color: white;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
main {
padding: 40px 0;
}
.hero {
text-align: center;
color: white;
margin-bottom: 80px;
}
.hero h1 {
font-size: 3.5rem;
font-weight: 700;
margin-bottom: 20px;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.subtitle {
font-size: 1.25rem;
margin-bottom: 40px;
opacity: 0.9;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
.cta-section {
display: flex;
gap: 20px;
justify-content: center;
flex-wrap: wrap;
}
.button {
display: inline-block;
padding: 15px 30px;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
font-size: 1.1rem;
transition: all 0.3s ease;
border: 2px solid transparent;
}
.button.primary {
background: #ff6b6b;
color: white;
box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
.button.primary:hover {
background: #ff5252;
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}
.button.secondary {
background: transparent;
color: white;
border-color: rgba(255,255,255,0.5);
}
.button.secondary:hover {
background: rgba(255,255,255,0.1);
border-color: white;
transform: translateY(-2px);
}
.features {
background: rgba(30, 30, 46, 0.8);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 20px;
padding: 60px 40px;
margin-bottom: 60px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
backdrop-filter: blur(10px);
}
.features h2 {
text-align: center;
font-size: 2.5rem;
margin-bottom: 50px;
color: white;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
}
.feature-card {
text-align: center;
padding: 30px 20px;
border-radius: 12px;
background: rgba(45, 45, 65, 0.6);
border: 1px solid rgba(255,255,255,0.1);
transition: transform 0.3s ease, background 0.3s ease;
}
.feature-card:hover {
transform: translateY(-5px);
background: rgba(55, 55, 75, 0.8);
}
.feature-icon {
font-size: 3rem;
margin-bottom: 20px;
}
.notification-item {
background-color: #1a1a1a;
border: 1px solid #333333;
border-radius: 8px;
padding: 15px;
.feature-card h3 {
font-size: 1.5rem;
margin-bottom: 15px;
color: white;
}
.feature-card p {
color: #b0b0b0;
line-height: 1.6;
}
.how-it-works {
background: rgba(255,255,255,0.05);
border-radius: 20px;
padding: 60px 40px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.1);
}
.how-it-works h2 {
text-align: center;
font-size: 2.5rem;
margin-bottom: 50px;
color: white;
}
.steps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 40px;
}
.step {
text-align: center;
color: white;
}
.step-number {
width: 60px;
height: 60px;
background: #ff6b6b;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
font-weight: bold;
margin: 0 auto 20px;
box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
.step h3 {
font-size: 1.5rem;
margin-bottom: 15px;
}
.notification-item h4 {
margin-top: 0;
margin-bottom: 10px;
color: #ffffff;
font-size: 18px;
.step p {
opacity: 0.9;
line-height: 1.6;
color: #b0b0b0;
}
.notification-item p {
margin: 5px 0;
color: #cccccc;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.notification-item p strong {
color: #ffffff;
}
.no-notifications {
footer {
text-align: center;
max-width: 500px;
margin: 30px auto;
color: #cccccc;
padding: 40px 0;
color: rgba(255,255,255,0.6);
border-top: 1px solid rgba(255,255,255,0.1);
}
/* Specific handling for long URLs and IDs */
.notification-item p:contains("URL"),
.notification-item p:contains("ID") {
font-family: monospace;
font-size: 12px;
}
.hidden {
display: none;
@media (max-width: 768px) {
.hero h1 {
font-size: 2.5rem;
}
.subtitle {
font-size: 1.1rem;
}
.features, .how-it-works {
padding: 40px 20px;
}
.features h2, .how-it-works h2 {
font-size: 2rem;
}
.cta-section {
flex-direction: column;
align-items: center;
}
.button {
width: 100%;
max-width: 300px;
}
}

View File

@@ -16,11 +16,69 @@
</head>
<body>
<div class="spacer"></div>
<div class="centre">
<h1>FireAlerts</h1>
<p>Get alerted before your Handshake domains expire.</p>
<a href="/account" class="button">Account</a>
<div class="container">
<header>
<div class="logo">
🔥 FireAlerts
</div>
</header>
<main>
<div class="hero">
<h1>Never Lose Your Handshake Domains</h1>
<p class="subtitle">Get timely notifications before your domains expire. Support for Discord webhooks, email, and Telegram alerts.</p>
<div class="cta-section">
<a href="/account" class="button primary">Get Started</a>
</div>
</div>
<section id="features" class="features">
<h2>Why Choose FireAlerts?</h2>
<div class="feature-grid">
<div class="feature-card">
<div class="feature-icon">🔔</div>
<h3>Multiple Alert Types</h3>
<p>Choose from Discord webhooks, email notifications, or Telegram messages.</p>
</div>
<div class="feature-card">
<div class="feature-icon"></div>
<h3>Customizable Timing</h3>
<p>Set alerts for any number of blocks before your domain expires.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🆓</div>
<h3>Free Service</h3>
<p>Keep track of all your Handshake domains at no cost.</p>
</div>
</div>
</section>
<section class="how-it-works">
<h2>How It Works</h2>
<div class="steps">
<div class="step">
<div class="step-number">1</div>
<h3>Sign In</h3>
<p>Use your existing account to access FireAlerts</p>
</div>
<div class="step">
<div class="step-number">2</div>
<h3>Add Domains</h3>
<p>Set up alerts for your Handshake domains</p>
</div>
<div class="step">
<div class="step-number">3</div>
<h3>Get Notified</h3>
<p>Receive timely alerts before expiration</p>
</div>
</div>
</section>
</main>
<footer>
<p>&copy; 2024 FireAlerts. Never miss a domain renewal again.</p>
</footer>
</div>
</body>