907 lines
29 KiB
HTML
907 lines
29 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Profil{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
/* Grundstile für das Profil mit verbessertem Glasmorphismus */
|
|
.profile-container {
|
|
background: rgba(24, 28, 45, 0.75);
|
|
backdrop-filter: blur(20px);
|
|
-webkit-backdrop-filter: blur(20px);
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
border-radius: 24px;
|
|
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
|
|
padding: 2rem;
|
|
margin-bottom: 2rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.profile-container:hover {
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
|
|
transform: translateY(-3px);
|
|
}
|
|
|
|
/* Verbesserte Profile-Header mit dynamischer User-Anzeige */
|
|
.profile-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
margin-bottom: 2rem;
|
|
gap: 2.5rem;
|
|
position: relative;
|
|
}
|
|
|
|
.avatar-container {
|
|
width: 180px;
|
|
height: 180px;
|
|
border-radius: 50%;
|
|
background: rgba(32, 36, 55, 0.9);
|
|
backdrop-filter: blur(10px);
|
|
-webkit-backdrop-filter: blur(10px);
|
|
border: 3px solid rgba(179, 143, 255, 0.3);
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 15px rgba(179, 143, 255, 0.2);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
position: relative;
|
|
transition: all 0.3s ease;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.avatar-container:hover {
|
|
transform: scale(1.05);
|
|
border: 3px solid rgba(179, 143, 255, 0.5);
|
|
box-shadow: 0 12px 45px rgba(0, 0, 0, 0.3), 0 0 25px rgba(179, 143, 255, 0.35);
|
|
}
|
|
|
|
.avatar-container img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: filter 0.3s ease;
|
|
}
|
|
|
|
.avatar-container:hover img {
|
|
filter: brightness(1.1);
|
|
}
|
|
|
|
.avatar-edit {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border-radius: 50%;
|
|
width: 30px;
|
|
height: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.avatar-edit:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.user-info {
|
|
flex: 1;
|
|
padding-top: 0.5rem;
|
|
}
|
|
|
|
.user-info h1 {
|
|
font-size: 2.75rem;
|
|
font-weight: 800;
|
|
margin-bottom: 0.75rem;
|
|
background: linear-gradient(135deg, #b38fff, #58a9ff);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
color: transparent;
|
|
text-shadow: 0 2px 10px rgba(179, 143, 255, 0.3);
|
|
letter-spacing: 0.3px;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.user-bio {
|
|
font-size: 1.15rem;
|
|
line-height: 1.7;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
max-width: 650px;
|
|
margin-bottom: 1.5rem;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.user-meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 1.5rem;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
font-size: 1rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.user-meta span {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
transition: all 0.25s ease;
|
|
}
|
|
|
|
.user-meta span:hover {
|
|
color: rgba(255, 255, 255, 1);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.user-meta i {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* Benutzer-Aktionsbereich */
|
|
.profile-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.profile-action-btn {
|
|
padding: 0.75rem 1.5rem;
|
|
border-radius: 16px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
transition: all 0.3s ease;
|
|
background: rgba(32, 36, 55, 0.75);
|
|
color: rgba(255, 255, 255, 0.9);
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
backdrop-filter: blur(15px);
|
|
-webkit-backdrop-filter: blur(15px);
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.profile-action-btn:hover {
|
|
transform: translateY(-3px);
|
|
background: rgba(179, 143, 255, 0.25);
|
|
border: 1px solid rgba(179, 143, 255, 0.3);
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 15px rgba(179, 143, 255, 0.2);
|
|
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.profile-action-btn.primary {
|
|
background: rgba(179, 143, 255, 0.25);
|
|
color: #ffffff;
|
|
border: 1px solid rgba(179, 143, 255, 0.3);
|
|
}
|
|
|
|
.profile-action-btn.primary:hover {
|
|
background: rgba(179, 143, 255, 0.35);
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), 0 0 20px rgba(179, 143, 255, 0.35);
|
|
}
|
|
|
|
/* Verbesserte Profil-Tabs */
|
|
.profile-tabs {
|
|
display: flex;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
margin-bottom: 1.5rem;
|
|
overflow-x: auto;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: rgba(179, 143, 255, 0.5) rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.profile-tab {
|
|
padding: 1rem 1.5rem;
|
|
font-weight: 600;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
border-bottom: 3px solid transparent;
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.profile-tab:hover {
|
|
color: rgba(255, 255, 255, 0.9);
|
|
background: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.profile-tab.active {
|
|
color: #b38fff;
|
|
border-bottom: 3px solid #b38fff;
|
|
background: rgba(179, 143, 255, 0.1);
|
|
}
|
|
|
|
/* Aktivitäten und Beiträge */
|
|
.activity-feed {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.25rem;
|
|
}
|
|
|
|
.activity-card {
|
|
background: rgba(32, 36, 55, 0.7);
|
|
border-radius: 20px;
|
|
overflow: hidden;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
transition: all 0.3s ease;
|
|
backdrop-filter: blur(15px);
|
|
-webkit-backdrop-filter: blur(15px);
|
|
}
|
|
|
|
.activity-card:hover {
|
|
transform: translateY(-3px);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 0 15px 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.92);
|
|
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
body:not(.dark) .stat-item,
|
|
body:not(.dark) .settings-input {
|
|
background: rgba(255, 255, 255, 0.7);
|
|
border: 1px solid rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
body:not(.dark) .stat-value {
|
|
background: linear-gradient(135deg, #7e3ff2, #3282f6);
|
|
}
|
|
|
|
body:not(.dark) .stat-label {
|
|
color: #4a5568;
|
|
}
|
|
|
|
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);
|
|
}
|
|
|
|
body:not(.dark) .activity-title,
|
|
body:not(.dark) .settings-card-header,
|
|
body:not(.dark) .settings-label {
|
|
color: #1a202c;
|
|
}
|
|
|
|
body:not(.dark) .activity-date {
|
|
color: #718096;
|
|
}
|
|
|
|
body:not(.dark) .activity-footer {
|
|
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
body:not(.dark) .reaction-button {
|
|
color: #4a5568;
|
|
background: rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
body:not(.dark) .reaction-button:hover {
|
|
background: rgba(126, 63, 242, 0.1);
|
|
color: #7e3ff2;
|
|
}
|
|
|
|
body:not(.dark) .reaction-button.active {
|
|
background: rgba(126, 63, 242, 0.15);
|
|
color: #7e3ff2;
|
|
}
|
|
|
|
body:not(.dark) .action-button {
|
|
background: rgba(126, 63, 242, 0.1);
|
|
color: #7e3ff2;
|
|
border: 1px solid rgba(126, 63, 242, 0.2);
|
|
}
|
|
|
|
body:not(.dark) .action-button:hover {
|
|
background: rgba(126, 63, 242, 0.2);
|
|
}
|
|
|
|
/* 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);
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container mx-auto px-4 py-10">
|
|
<!-- Profil-Container -->
|
|
<div class="profile-container">
|
|
<!-- User Info Section -->
|
|
<div class="profile-header">
|
|
<div class="avatar-container">
|
|
<img src="{{ user.avatar if user.avatar else url_for('static', filename='img/default-avatar.png') }}" alt="Profilbild" class="avatar">
|
|
<div class="avatar-edit">
|
|
<i class="fas fa-camera"></i>
|
|
</div>
|
|
</div>
|
|
<div class="user-info">
|
|
<h1>{{ user.username }}</h1>
|
|
<p class="user-bio">{{ user.bio if user.bio else 'Keine Bio vorhanden. Klicke auf bearbeiten, um eine hinzuzufügen.' }}</p>
|
|
<div class="user-meta">
|
|
<span><i class="fas fa-map-marker-alt"></i> {{ user.location if user.location else 'Kein Standort angegeben' }}</span>
|
|
<span><i class="fas fa-calendar-alt"></i> Mitglied seit {{ user.created_at.strftime('%d.%m.%Y') }}</span>
|
|
</div>
|
|
<button class="edit-profile-btn">Profil bearbeiten</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Statistiken -->
|
|
<div class="profile-stats">
|
|
<!-- Gedanken -->
|
|
<div class="stat-item">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-lightbulb"></i>
|
|
</div>
|
|
<div class="stat-value">{{ stats.thought_count if stats and stats.thought_count else 0 }}</div>
|
|
<div class="stat-label">Gedanken</div>
|
|
</div>
|
|
|
|
<!-- Verbindungen -->
|
|
<div class="stat-item">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-project-diagram"></i>
|
|
</div>
|
|
<div class="stat-value">{{ stats.connections_count if stats and stats.connections_count else 0 }}</div>
|
|
<div class="stat-label">Verbindungen</div>
|
|
</div>
|
|
|
|
<!-- Follower -->
|
|
<div class="stat-item">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-users"></i>
|
|
</div>
|
|
<div class="stat-value">{{ stats.followers_count if stats and stats.followers_count else 0 }}</div>
|
|
<div class="stat-label">Follower</div>
|
|
</div>
|
|
|
|
<!-- Beiträge -->
|
|
<div class="stat-item">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-comment-dots"></i>
|
|
</div>
|
|
<div class="stat-value">{{ stats.contributions_count if stats and stats.contributions_count else 0 }}</div>
|
|
<div class="stat-label">Beiträge</div>
|
|
</div>
|
|
|
|
<!-- Bewertung -->
|
|
<div class="stat-item">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-star"></i>
|
|
</div>
|
|
<div class="stat-value">{{ stats.rating if stats and stats.rating else '0.0' }}</div>
|
|
<div class="stat-label">Bewertung</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tabs und Inhaltsbereich -->
|
|
<div class="glass-card">
|
|
<!-- Profil-Tabs -->
|
|
<div class="profile-tabs">
|
|
<div class="profile-tab active" data-tab="activity">Aktivitäten</div>
|
|
<div class="profile-tab" data-tab="thoughts">Gedanken</div>
|
|
<div class="profile-tab" data-tab="mindmaps">Mindmaps</div>
|
|
<div class="profile-tab" data-tab="collections">Sammlungen</div>
|
|
<div class="profile-tab" data-tab="connections">Verbindungen</div>
|
|
<div class="profile-tab" data-tab="settings">Einstellungen</div>
|
|
</div>
|
|
|
|
<!-- Tab-Inhalte -->
|
|
<div class="p-6">
|
|
<!-- Aktivitäts-Tab (Standardmäßig angezeigt) -->
|
|
<div class="tab-content" id="activity-tab">
|
|
<div class="activity-feed">
|
|
{% if activities %}
|
|
{% for activity in activities %}
|
|
<div class="activity-card">
|
|
<div class="activity-header">
|
|
<div class="activity-title">{{ activity.title }}</div>
|
|
<div class="activity-date">{{ activity.date }}</div>
|
|
</div>
|
|
<div class="activity-content">
|
|
<p>{{ activity.content }}</p>
|
|
</div>
|
|
<div class="activity-footer">
|
|
<div class="activity-reactions">
|
|
<button class="reaction-button {% if activity.user_liked %}active{% endif %}">
|
|
<i class="fas fa-thumbs-up"></i> <span>{{ activity.likes }}</span>
|
|
</button>
|
|
<button class="reaction-button">
|
|
<i class="fas fa-comment"></i> <span>{{ activity.comments }}</span>
|
|
</button>
|
|
<button class="reaction-button">
|
|
<i class="fas fa-share"></i> <span>{{ activity.shares }}</span>
|
|
</button>
|
|
</div>
|
|
<div class="activity-actions">
|
|
<button class="action-button">
|
|
Ansehen
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="text-center py-12">
|
|
<i class="fas fa-history text-5xl text-gray-400 mb-4"></i>
|
|
<p class="text-gray-500">Noch keine Aktivitäten vorhanden</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Weitere Tab-Inhalte (werden per JavaScript angezeigt) -->
|
|
<div class="tab-content hidden" id="thoughts-tab">
|
|
<div id="thoughts-container">
|
|
{% if thoughts %}
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
{% for thought in thoughts %}
|
|
<div class="thought-item bg-opacity-70 rounded-xl overflow-hidden border transition-all duration-300 hover:transform hover:scale-105 hover:shadow-lg"
|
|
x-bind:class="darkMode ? 'bg-gray-800/80 border-gray-700/60' : 'bg-white/90 border-gray-200/60'">
|
|
<div class="p-5" style="border-left: 4px solid {{ thought.color_code|default('#B39DDB') }}">
|
|
<h3 class="text-xl font-bold mb-2"
|
|
x-bind:class="darkMode ? 'text-purple-300' : 'text-purple-700'">{{ thought.title }}</h3>
|
|
<p class="mb-4 text-sm"
|
|
x-bind:class="darkMode ? 'text-gray-300' : 'text-gray-600'">
|
|
{{ thought.abstract or thought.content[:150] ~ '...' }}
|
|
</p>
|
|
<div class="flex justify-between items-center text-xs"
|
|
x-bind:class="darkMode ? 'text-gray-400' : 'text-gray-500'">
|
|
<span>{{ thought.created_at.strftime('%d.%m.%Y') }}</span>
|
|
<span>{{ thought.branch }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="p-3 border-t flex justify-between items-center"
|
|
x-bind:class="darkMode ? 'bg-gray-900/80 border-gray-700/60' : 'bg-gray-50/80 border-gray-200/60'">
|
|
<a href="{{ url_for('get_thought', thought_id=thought.id) }}" class="transition-colors"
|
|
x-bind:class="darkMode ? 'text-purple-400 hover:text-purple-300' : 'text-purple-600 hover:text-purple-500'">
|
|
<i class="fas fa-eye mr-1"></i> Ansehen
|
|
</a>
|
|
<a href="{{ url_for('update_thought', thought_id=thought.id) }}" class="transition-colors"
|
|
x-bind:class="darkMode ? 'text-blue-400 hover:text-blue-300' : 'text-blue-600 hover:text-blue-500'">
|
|
<i class="fas fa-edit mr-1"></i> Bearbeiten
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="text-center py-12">
|
|
<i class="fas fa-lightbulb text-5xl text-gray-400 mb-4"></i>
|
|
<p class="text-gray-500">Noch keine Gedanken erstellt</p>
|
|
<a href="{{ url_for('add_thought') }}" class="mt-4 inline-block px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors">Ersten Gedanken erstellen</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Mindmaps-Tab -->
|
|
<div class="tab-content hidden" id="mindmaps-tab">
|
|
<div id="mindmaps-container">
|
|
{% if user_mindmaps %}
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
{% for mindmap in user_mindmaps %}
|
|
<div class="mindmap-item bg-opacity-70 rounded-xl overflow-hidden border transition-all duration-300 hover:transform hover:scale-105 hover:shadow-lg"
|
|
x-bind:class="darkMode ? 'bg-gray-800/80 border-gray-700/60' : 'bg-white/90 border-gray-200/60'">
|
|
<div class="p-5">
|
|
<h3 class="text-xl font-bold mb-2"
|
|
x-bind:class="darkMode ? 'text-purple-400' : 'text-purple-700'">{{ mindmap.name }}</h3>
|
|
<p class="mb-4 text-sm"
|
|
x-bind:class="darkMode ? 'text-gray-300' : 'text-gray-600'">{{ mindmap.description }}</p>
|
|
<div class="flex justify-between items-center text-xs"
|
|
x-bind:class="darkMode ? 'text-gray-400' : 'text-gray-500'">
|
|
<span>Erstellt: {{ mindmap.created_at.strftime('%d.%m.%Y') }}</span>
|
|
<span>Zuletzt bearbeitet: {{ mindmap.last_modified.strftime('%d.%m.%Y') }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="p-3 border-t flex justify-between"
|
|
x-bind:class="darkMode ? 'bg-gray-900/80 border-gray-700/60' : 'bg-gray-50/80 border-gray-200/60'">
|
|
<a href="{{ url_for('mindmap') }}?id={{ mindmap.id }}" class="transition-colors"
|
|
x-bind:class="darkMode ? 'text-purple-400 hover:text-purple-300' : 'text-purple-600 hover:text-purple-500'">
|
|
<i class="fas fa-eye mr-1"></i> Anzeigen
|
|
</a>
|
|
<a href="{{ url_for('edit_mindmap', mindmap_id=mindmap.id) }}" class="transition-colors"
|
|
x-bind:class="darkMode ? 'text-blue-400 hover:text-blue-300' : 'text-blue-600 hover:text-blue-500'">
|
|
<i class="fas fa-edit mr-1"></i> Bearbeiten
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="text-center py-12">
|
|
<i class="fas fa-project-diagram text-5xl text-gray-400 mb-4"></i>
|
|
<p class="text-gray-500">Noch keine Mindmaps erstellt</p>
|
|
<a href="{{ url_for('create_mindmap') }}" class="mt-4 inline-block px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors">
|
|
Erste Mindmap erstellen
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-content hidden" id="collections-tab">
|
|
<div id="collections-container">
|
|
{% if collections %}
|
|
{% for collection in collections %}
|
|
<div class="collection-item">
|
|
<h3>{{ collection.title }}</h3>
|
|
<p>{{ collection.description }}</p>
|
|
<div class="collection-meta">
|
|
<span>{{ collection.thoughts_count }} Gedanken</span>
|
|
<span>{{ collection.date }}</span>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="text-center py-12">
|
|
<i class="fas fa-folder-open text-5xl text-gray-400 mb-4"></i>
|
|
<p class="text-gray-500">Noch keine Sammlungen erstellt</p>
|
|
<a href="{{ url_for('profile') }}" class="mt-4 inline-block px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors">Zurück zum Profil</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-content hidden" id="connections-tab">
|
|
<div id="connections-container">
|
|
{% if connections %}
|
|
{% for connection in connections %}
|
|
<div class="connection-item">
|
|
<div class="connection-nodes">
|
|
<div class="connection-node">
|
|
<h4>{{ connection.source.title }}</h4>
|
|
<p>{{ connection.source.excerpt }}</p>
|
|
</div>
|
|
<div class="connection-type">
|
|
<i class="fas fa-arrow-right"></i>
|
|
<span>{{ connection.relation_type }}</span>
|
|
</div>
|
|
<div class="connection-node">
|
|
<h4>{{ connection.target.title }}</h4>
|
|
<p>{{ connection.target.excerpt }}</p>
|
|
</div>
|
|
</div>
|
|
<div class="connection-meta">
|
|
<span>{{ connection.date }}</span>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="text-center py-12">
|
|
<i class="fas fa-project-diagram text-5xl text-gray-400 mb-4"></i>
|
|
<p class="text-gray-500">Noch keine Verbindungen erstellt</p>
|
|
<a href="{{ url_for('mindmap') }}" class="mt-4 inline-block px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors">Verbindungen in der Mindmap erstellen</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-content hidden" id="settings-tab">
|
|
<!-- Einstellungs-Tab-Inhalt -->
|
|
<div class="settings-card">
|
|
<div class="settings-card-header">Profilinformationen</div>
|
|
<div class="settings-card-body">
|
|
<div class="settings-group">
|
|
<label class="settings-label" for="name">Name</label>
|
|
<input type="text" id="name" class="settings-input" value="{{ user.name }}" />
|
|
</div>
|
|
|
|
<div class="settings-group">
|
|
<label class="settings-label" for="bio">Über mich</label>
|
|
<textarea id="bio" class="settings-input" rows="4">{{ user.bio }}</textarea>
|
|
</div>
|
|
|
|
<div class="settings-group">
|
|
<label class="settings-label" for="location">Standort</label>
|
|
<input type="text" id="location" class="settings-input" value="{{ user.location }}" />
|
|
</div>
|
|
|
|
<div class="settings-group">
|
|
<label class="settings-label" for="website">Website</label>
|
|
<input type="url" id="website" class="settings-input" value="{{ user.website }}" />
|
|
</div>
|
|
|
|
<button class="profile-action-btn primary mt-4">
|
|
<i class="fas fa-save mr-1"></i> Speichern
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="settings-card">
|
|
<div class="settings-card-header">Datenschutz und Sicherheit</div>
|
|
<div class="settings-card-body">
|
|
<div class="settings-group">
|
|
<label class="settings-label" for="email">E-Mail-Adresse</label>
|
|
<input type="email" id="email" class="settings-input" value="{{ user.email }}" />
|
|
</div>
|
|
|
|
<div class="settings-group">
|
|
<label class="settings-label" for="password">Neues Passwort</label>
|
|
<input type="password" id="password" class="settings-input" placeholder="Neues Passwort eingeben" />
|
|
</div>
|
|
|
|
<div class="settings-group">
|
|
<label class="settings-label" for="password_confirm">Passwort bestätigen</label>
|
|
<input type="password" id="password_confirm" class="settings-input" placeholder="Passwort wiederholen" />
|
|
</div>
|
|
|
|
<button class="profile-action-btn primary mt-4">
|
|
<i class="fas fa-lock mr-1"></i> Passwort aktualisieren
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_js %}
|
|
<script nonce="{{ csp_nonce }}">
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Profil-Tab-Funktionalität
|
|
const tabs = document.querySelectorAll('.profile-tab');
|
|
const tabContents = document.querySelectorAll('.tab-content');
|
|
|
|
tabs.forEach(tab => {
|
|
tab.addEventListener('click', function() {
|
|
// Alle Tabs deaktivieren
|
|
tabs.forEach(t => t.classList.remove('active'));
|
|
|
|
// Aktuellen Tab aktivieren
|
|
this.classList.add('active');
|
|
|
|
// Alle Tab-Inhalte ausblenden
|
|
tabContents.forEach(content => content.classList.add('hidden'));
|
|
|
|
// Entsprechenden Tab-Inhalt anzeigen
|
|
const tabId = this.getAttribute('data-tab');
|
|
document.getElementById(`${tabId}-tab`).classList.remove('hidden');
|
|
});
|
|
});
|
|
|
|
// Like-Button-Funktionalität
|
|
const reactionButtons = document.querySelectorAll('.reaction-button');
|
|
|
|
reactionButtons.forEach(button => {
|
|
button.addEventListener('click', function() {
|
|
// Toggle active-Klasse
|
|
this.classList.toggle('active');
|
|
|
|
// Aktueller Zählerstand
|
|
const countElement = this.querySelector('span');
|
|
let count = parseInt(countElement.textContent);
|
|
|
|
// Zähler aktualisieren
|
|
if (this.classList.contains('active')) {
|
|
count += 1;
|
|
} else {
|
|
count -= 1;
|
|
}
|
|
|
|
countElement.textContent = count;
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %} |