modified: templates/user_landing_page.html

new file:   templates/user_landing_page_corrupted.html
This commit is contained in:
SimolZimol
2025-08-18 23:53:44 +02:00
parent 61f824a8c5
commit 7d0c7df6a7
2 changed files with 334 additions and 39 deletions

View File

@@ -4,25 +4,23 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Landing Page</title> <img src="https://cdn.discordapp.com/icons/{{ guild.id }}/{{ guild.icon }}.png" <title>User Landing Page</title>
class="server-icon" <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
alt="Server Icon"
onerror="this.style.display='none';">;"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style> <style>
body { body {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); background: linear-gradient(135deg, #0c1426 0%, #1a1f2e 25%, #2d3748 75%, #0c1426 100%);
min-height: 100vh; min-height: 100vh;
color: #e2e8f0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #e0e0e0;
} }
.landing-container { .landing-container {
background: rgba(30, 30, 46, 0.95); background: rgba(26, 31, 46, 0.8);
backdrop-filter: blur(15px);
border: 1px solid rgba(102, 126, 234, 0.2);
border-radius: 20px; border-radius: 20px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 2rem; padding: 2rem;
margin-top: 2rem; margin-top: 2rem;
} }
@@ -30,18 +28,20 @@
.welcome-header { .welcome-header {
text-align: center; text-align: center;
margin-bottom: 3rem; margin-bottom: 3rem;
padding-bottom: 1rem;
border-bottom: 1px solid rgba(102, 126, 234, 0.1);
} }
.welcome-title { .welcome-title {
color: #f8f9fa; color: #e2e8f0;
font-weight: 700; font-weight: 700;
font-size: 2.5rem; font-size: 2.5rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
} }
.welcome-subtitle { .welcome-subtitle {
color: #a0a0a0; color: #a0aec0;
font-size: 1.2rem; font-size: 1.2rem;
font-weight: 400; font-weight: 400;
} }
@@ -49,17 +49,34 @@
.server-card { .server-card {
background: rgba(45, 55, 72, 0.8); background: rgba(45, 55, 72, 0.8);
border-radius: 15px; border-radius: 15px;
border: 1px solid rgba(255, 255, 255, 0.1); border: 1px solid rgba(102, 126, 234, 0.2);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease; transition: all 0.3s ease;
margin-bottom: 2rem; margin-bottom: 2rem;
overflow: hidden; overflow: hidden;
position: relative;
}
.server-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #667eea, #764ba2);
transform: scaleX(0);
transition: transform 0.3s ease;
}
.server-card:hover::before {
transform: scaleX(1);
} }
.server-card:hover { .server-card:hover {
transform: translateY(-8px); transform: translateY(-8px);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4); box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
border-color: rgba(255, 255, 255, 0.2); border-color: rgba(102, 126, 234, 0.5);
} }
.server-icon { .server-icon {
@@ -70,6 +87,19 @@
transition: transform 0.3s ease; transition: transform 0.3s ease;
} }
.server-icon-fallback {
width: 100%;
height: 200px;
background: linear-gradient(135deg, #4a5568, #2d3748);
border-radius: 15px 15px 0 0;
display: flex;
align-items: center;
justify-content: center;
color: #e2e8f0;
font-size: 4rem;
font-weight: bold;
}
.server-card:hover .server-icon { .server-card:hover .server-icon {
transform: scale(1.05); transform: scale(1.05);
} }
@@ -80,14 +110,17 @@
} }
.server-title { .server-title {
color: #f7fafc; color: #e2e8f0;
font-weight: 600; font-weight: 600;
font-size: 1.3rem; font-size: 1.3rem;
margin-bottom: 1rem; margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
} }
.server-description { .server-description {
color: #cbd5e0; color: #a0aec0;
font-size: 0.95rem; font-size: 0.95rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
line-height: 1.5; line-height: 1.5;
@@ -98,64 +131,78 @@
padding: 0.6rem 1.5rem; padding: 0.6rem 1.5rem;
font-weight: 600; font-weight: 600;
text-decoration: none; text-decoration: none;
display: inline-block; display: inline-flex;
align-items: center;
gap: 0.5rem;
transition: all 0.3s ease; transition: all 0.3s ease;
margin: 0.25rem; margin: 0.25rem;
border: none; border: none;
} }
.btn-primary-custom { .btn-primary-custom {
background: linear-gradient(135deg, #4299e1, #3182ce); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #ffffff; color: white;
box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
} }
.btn-primary-custom:hover { .btn-primary-custom:hover {
background: linear-gradient(135deg, #3182ce, #2c5282);
color: #ffffff;
text-decoration: none;
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(66, 153, 225, 0.4); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
color: white;
text-decoration: none;
} }
.btn-secondary-custom { .btn-secondary-custom {
background: linear-gradient(135deg, #805ad5, #6b46c1); background: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
color: #ffffff; color: white;
box-shadow: 0 4px 12px rgba(128, 90, 213, 0.3); box-shadow: 0 4px 12px rgba(56, 178, 172, 0.3);
} }
.btn-secondary-custom:hover { .btn-secondary-custom:hover {
background: linear-gradient(135deg, #6b46c1, #553c9a);
color: #ffffff;
text-decoration: none;
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(128, 90, 213, 0.4); box-shadow: 0 8px 20px rgba(56, 178, 172, 0.4);
color: white;
text-decoration: none;
} }
.no-servers { .no-servers {
text-align: center; text-align: center;
padding: 3rem; padding: 3rem;
color: #a0aec0; color: #a0aec0;
background: rgba(45, 55, 72, 0.4);
border: 1px solid rgba(102, 126, 234, 0.1);
border-radius: 15px;
} }
.no-servers-icon { .no-servers-icon {
font-size: 4rem; font-size: 4rem;
color: #4a5568; color: #667eea;
margin-bottom: 1rem; margin-bottom: 1rem;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
} }
.user-icon { .user-icon {
color: #4299e1; color: #667eea;
margin-right: 0.5rem; margin-right: 0.5rem;
} }
.server-icon-container {
position: relative;
overflow: hidden;
}
/* Responsive Design */ /* Responsive Design */
@media (max-width: 768px) { @media (max-width: 768px) {
.welcome-title { .welcome-title {
font-size: 2rem; font-size: 2rem;
} }
.server-icon { .server-icon, .server-icon-fallback {
height: 150px; height: 150px;
} }
@@ -163,6 +210,12 @@
padding: 1rem; padding: 1rem;
margin-top: 1rem; margin-top: 1rem;
} }
.server-button {
width: 100%;
justify-content: center;
margin: 0.25rem 0;
}
} }
</style> </style>
</head> </head>
@@ -185,10 +238,21 @@
{% for guild in g.guilds %} {% for guild in g.guilds %}
<div class="col-lg-6 col-xl-4"> <div class="col-lg-6 col-xl-4">
<div class="server-card"> <div class="server-card">
<img src="https://cdn.discordapp.com/icons/{{ guild.id }}/{{ guild.icon }}.png" <div class="server-icon-container">
class="server-icon" {% if guild.icon %}
alt="Server Icon" <img src="https://cdn.discordapp.com/icons/{{ guild.id }}/{{ guild.icon }}.png"
onerror="this.onerror=null; this.src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTAwIiBjeT0iMTAwIiByPSIxMDAiIGZpbGw9IiM0YTU1NjgiLz48dGV4dCB4PSIxMDAiIHk9IjExMCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjYwIiBmaWxsPSIjZjdmYWZjIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4ke guild.name[0] if guild.name else 'S'}</text></svg>';"> class="server-icon"
alt="Server Icon"
onerror="this.style.display='none'; this.nextElementSibling.style.display='flex';">
<div class="server-icon-fallback" style="display: none;">
{{ guild.name[0] if guild.name else 'S' }}
</div>
{% else %}
<div class="server-icon-fallback">
{{ guild.name[0] if guild.name else 'S' }}
</div>
{% endif %}
</div>
<div class="card-body"> <div class="card-body">
<h5 class="server-title"> <h5 class="server-title">
<i class="fas fa-server"></i> {{ guild.name }} <i class="fas fa-server"></i> {{ guild.name }}

View File

@@ -0,0 +1,231 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Landing Page</title> <img src="https://cdn.discordapp.com/icons/{{ guild.id }}/{{ guild.icon }}.png"
class="server-icon"
alt="Server Icon"
onerror="this.style.display='none'; this.parentNode.insertAdjacentHTML('afterbegin', '<div class=&quot;server-icon-fallback&quot; style=&quot;width: 100%; height: 200px; background: linear-gradient(135deg, #4a5568, #2d3748); border-radius: 15px 15px 0 0; display: flex; align-items: center; justify-content: center; color: #f7fafc; font-size: 4rem; font-weight: bold;&quot;>{{ guild.name[0] if guild.name else 'S' }}</div>');" <img src="https://cdn.discordapp.com/icons/{{ guild.id }}/{{ guild.icon }}.png"
class="server-icon"
alt="Server Icon"
onerror="this.onerror=null; this.src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTAwIiBjeT0iMTAwIiByPSIxMDAiIGZpbGw9IiM0YTU1NjgiLz48dGV4dCB4PSIxMDAiIHk9IjExMCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjYwIiBmaWxsPSIjZjdmYWZjIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4n+ (guild.name ? guild.name[0] : 'S') +'</text></svg>';">");
<div class="card-body"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style>
body {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
min-height: 100vh;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #e0e0e0;
}
.landing-container {
background: rgba(30, 30, 46, 0.95);
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 2rem;
margin-top: 2rem;
}
.welcome-header {
text-align: center;
margin-bottom: 3rem;
}
.welcome-title {
color: #f8f9fa;
font-weight: 700;
font-size: 2.5rem;
margin-bottom: 0.5rem;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}
.welcome-subtitle {
color: #a0a0a0;
font-size: 1.2rem;
font-weight: 400;
}
.server-card {
background: rgba(45, 55, 72, 0.8);
border-radius: 15px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
margin-bottom: 2rem;
overflow: hidden;
}
.server-card:hover {
transform: translateY(-8px);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
border-color: rgba(255, 255, 255, 0.2);
}
.server-icon {
width: 100%;
height: 200px;
object-fit: cover;
border-radius: 15px 15px 0 0;
transition: transform 0.3s ease;
}
.server-card:hover .server-icon {
transform: scale(1.05);
}
.server-card .card-body {
padding: 1.5rem;
background: rgba(45, 55, 72, 0.9);
}
.server-title {
color: #f7fafc;
font-weight: 600;
font-size: 1.3rem;
margin-bottom: 1rem;
}
.server-description {
color: #cbd5e0;
font-size: 0.95rem;
margin-bottom: 1.5rem;
line-height: 1.5;
}
.server-button {
border-radius: 25px;
padding: 0.6rem 1.5rem;
font-weight: 600;
text-decoration: none;
display: inline-block;
transition: all 0.3s ease;
margin: 0.25rem;
border: none;
}
.btn-primary-custom {
background: linear-gradient(135deg, #4299e1, #3182ce);
color: #ffffff;
box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}
.btn-primary-custom:hover {
background: linear-gradient(135deg, #3182ce, #2c5282);
color: #ffffff;
text-decoration: none;
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(66, 153, 225, 0.4);
}
.btn-secondary-custom {
background: linear-gradient(135deg, #805ad5, #6b46c1);
color: #ffffff;
box-shadow: 0 4px 12px rgba(128, 90, 213, 0.3);
}
.btn-secondary-custom:hover {
background: linear-gradient(135deg, #6b46c1, #553c9a);
color: #ffffff;
text-decoration: none;
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(128, 90, 213, 0.4);
}
.no-servers {
text-align: center;
padding: 3rem;
color: #a0aec0;
}
.no-servers-icon {
font-size: 4rem;
color: #4a5568;
margin-bottom: 1rem;
}
.user-icon {
color: #4299e1;
margin-right: 0.5rem;
}
/* Responsive Design */
@media (max-width: 768px) {
.welcome-title {
font-size: 2rem;
}
.server-icon {
height: 150px;
}
.landing-container {
padding: 1rem;
margin-top: 1rem;
}
}
</style>
</head>
<body>
{% include 'navigation.html' %}
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-lg-10 col-xl-8">
<div class="landing-container">
<div class="welcome-header">
<h1 class="welcome-title">
<i class="fas fa-user-circle user-icon"></i>Welcome, {{ g.user_info['username'] }}!
</h1>
<p class="welcome-subtitle">Select a server to view your server-specific data and statistics.</p>
</div>
<div class="row">
{% if g.guilds %}
{% for guild in g.guilds %}
<div class="col-lg-6 col-xl-4">
<div class="server-card">
<img src="https://cdn.discordapp.com/icons/{{ guild.id }}/{{ guild.icon }}.png"
class="server-icon"
alt="Server Icon"
onerror="this.onerror=null; this.src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTAwIiBjeT0iMTAwIiByPSIxMDAiIGZpbGw9IiM0YTU1NjgiLz48dGV4dCB4PSIxMDAiIHk9IjExMCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjYwIiBmaWxsPSIjZjdmYWZjIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4ke guild.name[0] if guild.name else 'S'}</text></svg>';">
<div class="card-body">
<h5 class="server-title">
<i class="fas fa-server"></i> {{ guild.name }}
</h5>
<p class="server-description">
Access your dashboard, statistics, and achievements for {{ guild.name }}.
</p>
<div class="text-center">
<a href="{{ url_for('user_dashboard', guild_id=guild.id) }}" class="server-button btn-primary-custom">
<i class="fas fa-tachometer-alt"></i> View Dashboard
</a>
<a href="{{ url_for('leaderboard', guild_id=guild.id) }}" class="server-button btn-secondary-custom">
<i class="fas fa-trophy"></i> Leaderboard
</a>
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="col-12">
<div class="no-servers">
<i class="fas fa-server no-servers-icon"></i>
<h3>No Servers Found</h3>
<p>You don't have access to any servers with this bot. Join a server with Multus Bot to get started!</p>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</body>
</html>