Compare commits
3 Commits
a03bec2dff
...
4a4271a23c
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a4271a23c | |||
| c1038b479f | |||
| cd0083544a |
Binary file not shown.
26
app.py
26
app.py
@@ -477,8 +477,30 @@ def profile():
|
||||
except Exception as e:
|
||||
# Eine andere Ausnahme ist aufgetreten
|
||||
print(f"Fehler beim Laden des Profils: {e}")
|
||||
flash('Dein Benutzerprofil konnte nicht geladen werden. Bitte kontaktiere den Support.', 'error')
|
||||
return redirect(url_for('index'))
|
||||
flash('Beim Laden Ihres Benutzerprofils ist ein Fehler aufgetreten. Wir zeigen Ihnen die Standard-Ansicht.', 'error')
|
||||
|
||||
# Erstelle grundlegende stats
|
||||
stats = {
|
||||
'thought_count': 0,
|
||||
'bookmark_count': 0,
|
||||
'connections_count': 0,
|
||||
'contributions_count': 0,
|
||||
'followers_count': 0,
|
||||
'rating': 0.0
|
||||
}
|
||||
|
||||
# Leere Listen für Mindmaps und Gedanken
|
||||
user_mindmaps = []
|
||||
thoughts = []
|
||||
location = "Deutschland"
|
||||
|
||||
# Zeige das normale Profil mit minimalen Daten an
|
||||
return render_template('profile.html',
|
||||
user=current_user,
|
||||
user_mindmaps=user_mindmaps,
|
||||
stats=stats,
|
||||
thoughts=thoughts,
|
||||
location=location)
|
||||
|
||||
# Route für Benutzereinstellungen
|
||||
@app.route('/settings', methods=['GET', 'POST'])
|
||||
|
||||
@@ -248,519 +248,41 @@
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.profile-tab::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
/* Statistik-Elemente - verkleinert */
|
||||
.stat-item {
|
||||
padding: 0.75rem !important;
|
||||
}
|
||||
|
||||
.stat-icon {
|
||||
width: 8px !important;
|
||||
height: 8px !important;
|
||||
margin-bottom: 0.3rem !important;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 1.2rem !important;
|
||||
margin-bottom: 0.2rem !important;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.7rem !important;
|
||||
}
|
||||
|
||||
/* Persönliche Mindmap Container */
|
||||
.personal-mindmap-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(135deg, rgba(179, 143, 255, 0.1), rgba(88, 169, 255, 0.1));
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.profile-tab:hover::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.profile-tab.active {
|
||||
color: #b38fff;
|
||||
border-bottom: 3px solid #b38fff;
|
||||
background: rgba(179, 143, 255, 0.15);
|
||||
box-shadow: 0 4px 15px rgba(179, 143, 255, 0.2);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* Aktivitäten und Beiträge */
|
||||
.activity-feed {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.activity-card {
|
||||
background: rgba(32, 36, 55, 0.7);
|
||||
border-radius: 20px;
|
||||
height: 400px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 1rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
backdrop-filter: blur(15px);
|
||||
-webkit-backdrop-filter: blur(15px);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1),
|
||||
0 4px 8px rgba(179, 143, 255, 0.05);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.activity-card:hover {
|
||||
transform: translateY(-5px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25),
|
||||
0 8px 24px rgba(179, 143, 255, 0.15);
|
||||
}
|
||||
|
||||
.activity-header {
|
||||
padding: 1.25rem 1.5rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.activity-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
.activity-date {
|
||||
font-size: 0.85rem;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.activity-content {
|
||||
padding: 1.5rem;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
font-size: 1.05rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.activity-footer {
|
||||
padding: 1rem 1.5rem;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.activity-reactions {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.reaction-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 12px;
|
||||
font-size: 0.9rem;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: none;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.reaction-button:hover {
|
||||
background: rgba(179, 143, 255, 0.15);
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.reaction-button.active {
|
||||
background: rgba(179, 143, 255, 0.2);
|
||||
color: #b38fff;
|
||||
}
|
||||
|
||||
.activity-actions {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 12px;
|
||||
font-size: 0.9rem;
|
||||
background: rgba(179, 143, 255, 0.1);
|
||||
color: #b38fff;
|
||||
border: 1px solid rgba(179, 143, 255, 0.25);
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.action-button:hover {
|
||||
background: rgba(179, 143, 255, 0.2);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1), 0 0 10px rgba(179, 143, 255, 0.2);
|
||||
}
|
||||
|
||||
/* Verbesserte Einstellungskarten */
|
||||
.settings-card {
|
||||
background: rgba(32, 36, 55, 0.7);
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
margin-bottom: 1.5rem;
|
||||
backdrop-filter: blur(15px);
|
||||
-webkit-backdrop-filter: blur(15px);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.settings-card:hover {
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 0 15px rgba(179, 143, 255, 0.15);
|
||||
}
|
||||
|
||||
.settings-card-header {
|
||||
padding: 1.25rem 1.5rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
.settings-card-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.settings-group {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.settings-label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 600;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
.settings-input {
|
||||
width: 100%;
|
||||
padding: 0.75rem 1rem;
|
||||
background: rgba(24, 28, 45, 0.6);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 12px;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
font-size: 1rem;
|
||||
transition: all 0.3s ease;
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.settings-input:focus {
|
||||
border-color: rgba(179, 143, 255, 0.4);
|
||||
box-shadow: 0 0 0 3px rgba(179, 143, 255, 0.15);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Light Mode Anpassungen */
|
||||
body:not(.dark) .profile-container,
|
||||
body:not(.dark) .profile-tabs,
|
||||
body:not(.dark) .activity-card,
|
||||
body:not(.dark) .settings-card {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06),
|
||||
0 2px 8px rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
|
||||
body:not(.dark) .profile-container {
|
||||
background: linear-gradient(to bottom right,
|
||||
rgba(255, 255, 255, 0.98),
|
||||
rgba(249, 250, 251, 0.96)
|
||||
);
|
||||
}
|
||||
|
||||
body:not(.dark) .glass-card {
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
body:not(.dark) .avatar-container {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border: 3px solid rgba(126, 63, 242, 0.3);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 0 15px rgba(126, 63, 242, 0.15);
|
||||
}
|
||||
|
||||
body:not(.dark) .user-info h1 {
|
||||
background: linear-gradient(135deg, #7e3ff2, #3282f6);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
body:not(.dark) .user-bio,
|
||||
body:not(.dark) .activity-content {
|
||||
color: #1a202c;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
body:not(.dark) .user-meta span {
|
||||
color: #4a5568;
|
||||
}
|
||||
|
||||
/* Light Mode Statistik-Karten */
|
||||
body:not(.dark) .stat-item {
|
||||
background: linear-gradient(to bottom right,
|
||||
rgba(255, 255, 255, 0.98),
|
||||
rgba(249, 250, 251, 0.95)
|
||||
);
|
||||
border: 1px solid rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03),
|
||||
0 2px 4px rgba(124, 58, 237, 0.02);
|
||||
}
|
||||
|
||||
body:not(.dark) .stat-item:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1),
|
||||
0 4px 8px rgba(126, 63, 242, 0.1);
|
||||
border-color: rgba(126, 63, 242, 0.2);
|
||||
}
|
||||
|
||||
body:not(.dark) .stat-icon {
|
||||
background: rgba(126, 63, 242, 0.1);
|
||||
}
|
||||
|
||||
body:not(.dark) .stat-value {
|
||||
background: linear-gradient(135deg, #7c3aed, #3b82f6);
|
||||
color: transparent;
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
body:not(.dark) .stat-label {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
/* Light Mode Einstellungen */
|
||||
body:not(.dark) .settings-input {
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||
color: #111827;
|
||||
font-size: 0.95rem;
|
||||
padding: 0.75rem 1rem;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-input:hover {
|
||||
border-color: rgba(124, 58, 237, 0.2);
|
||||
background: white;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-input:focus {
|
||||
border-color: rgba(124, 58, 237, 0.3);
|
||||
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
|
||||
background: white;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-input::placeholder {
|
||||
color: #9ca3af;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* Verbesserte Formulargruppen */
|
||||
body:not(.dark) .settings-group {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
padding: 1.5rem;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.04);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-group:hover {
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
border-color: rgba(124, 58, 237, 0.1);
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-group .settings-label {
|
||||
margin-bottom: 0.75rem;
|
||||
color: #374151;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
body:not(.dark) .profile-tab {
|
||||
color: #4a5568;
|
||||
}
|
||||
|
||||
body:not(.dark) .profile-tab:hover {
|
||||
background: rgba(0, 0, 0, 0.03);
|
||||
color: #1a202c;
|
||||
}
|
||||
|
||||
body:not(.dark) .profile-tab.active {
|
||||
color: #7e3ff2;
|
||||
border-bottom: 3px solid #7e3ff2;
|
||||
background: rgba(126, 63, 242, 0.08);
|
||||
}
|
||||
|
||||
/* Verbesserte Typografie im Light Mode */
|
||||
body:not(.dark) .activity-title,
|
||||
body:not(.dark) .settings-card-header {
|
||||
color: #111827;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-label {
|
||||
color: #374151;
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-card-header {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(249, 250, 251, 0.8),
|
||||
rgba(248, 250, 252, 0.8)
|
||||
);
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-card-body {
|
||||
padding: 1.75rem;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-group {
|
||||
margin-bottom: 1.75rem;
|
||||
}
|
||||
|
||||
body:not(.dark) .settings-group:last-child {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
body:not(.dark) .activity-date {
|
||||
color: #718096;
|
||||
}
|
||||
|
||||
body:not(.dark) .activity-footer {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
/* Verbesserte Interaktionselemente im Light Mode */
|
||||
body:not(.dark) .reaction-button {
|
||||
color: #4b5563;
|
||||
background: rgba(243, 244, 246, 0.8);
|
||||
border: 1px solid rgba(0, 0, 0, 0.04);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
body:not(.dark) .reaction-button:hover {
|
||||
background: rgba(124, 58, 237, 0.08);
|
||||
color: #6d28d9;
|
||||
border-color: rgba(124, 58, 237, 0.2);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
body:not(.dark) .reaction-button.active {
|
||||
background: rgba(124, 58, 237, 0.12);
|
||||
color: #6d28d9;
|
||||
border-color: rgba(124, 58, 237, 0.25);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Verbesserte Aktionsbuttons im Light Mode */
|
||||
body:not(.dark) .action-button {
|
||||
background: rgba(124, 58, 237, 0.08);
|
||||
color: #6d28d9;
|
||||
border: 1px solid rgba(124, 58, 237, 0.15);
|
||||
font-weight: 500;
|
||||
padding: 0.625rem 1rem;
|
||||
}
|
||||
|
||||
body:not(.dark) .action-button:hover {
|
||||
background: rgba(124, 58, 237, 0.12);
|
||||
border-color: rgba(124, 58, 237, 0.25);
|
||||
color: #5b21b6;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
|
||||
}
|
||||
|
||||
body:not(.dark) .action-button:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 6px rgba(124, 58, 237, 0.1);
|
||||
}
|
||||
|
||||
/* Verbesserte Styles für Card-Items im Light Mode */
|
||||
body:not(.dark) .thought-item,
|
||||
body:not(.dark) .mindmap-item,
|
||||
body:not(.dark) .collection-item {
|
||||
background: white !important;
|
||||
border: 1px solid rgba(0, 0, 0, 0.08) !important;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
body:not(.dark) .thought-item:hover,
|
||||
body:not(.dark) .mindmap-item:hover,
|
||||
body:not(.dark) .collection-item:hover {
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
|
||||
transform: translateY(-3px);
|
||||
border: 1px solid rgba(126, 63, 242, 0.2) !important;
|
||||
}
|
||||
|
||||
body:not(.dark) .edit-profile-btn {
|
||||
background: #7e3ff2;
|
||||
color: white;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 8px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
border: none;
|
||||
}
|
||||
|
||||
body:not(.dark) .edit-profile-btn:hover {
|
||||
background: #6d28d9;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
|
||||
}
|
||||
|
||||
/* Thought item styling */
|
||||
.thought-border {
|
||||
border-left: 4px solid #B39DDB;
|
||||
}
|
||||
|
||||
/* Light Mode Gedanken */
|
||||
body:not(.dark) .thought-item {
|
||||
background-color: white;
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
body:not(.dark) .thought-item h3 {
|
||||
color: #6d28d9;
|
||||
}
|
||||
|
||||
body:not(.dark) .thought-item p {
|
||||
color: #4b5563;
|
||||
}
|
||||
|
||||
/* Verbesserte Kontraste im Light-Mode */
|
||||
body:not(.dark) .profile-tab.active {
|
||||
color: #7c3aed;
|
||||
border-bottom-color: #7c3aed;
|
||||
background-color: rgba(124, 58, 237, 0.1);
|
||||
}
|
||||
|
||||
body:not(.dark) .profile-tab:hover:not(.active) {
|
||||
color: #6d28d9;
|
||||
background-color: rgba(124, 58, 237, 0.05);
|
||||
}
|
||||
|
||||
body:not(.dark) .nav-link-light {
|
||||
color: #4b5563;
|
||||
}
|
||||
|
||||
body:not(.dark) .nav-link-light:hover {
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
body:not(.dark) .edit-profile-btn {
|
||||
background: #7c3aed;
|
||||
color: white;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.5rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
border: none;
|
||||
}
|
||||
|
||||
body:not(.dark) .edit-profile-btn:hover {
|
||||
background: #6d28d9;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
|
||||
.dark .personal-mindmap-container {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user