Files
django5-genial-daneben-archiv/gd/templates/gd/team_member_detail.html
T
H4nSolo 115cf72a81 Api Team list and Teamdetail:
- team/<id> with more Informations (Statistics)
- team/ with auftritte_count
Team Detail:
- Added Wikipedialink Badge.
- Added Profile Picture captched from Wikipedia.
2026-05-18 01:01:50 +02:00

230 lines
12 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<div class="row">
<div class="col-12 mb-4">
<div class="card shadow-sm border-0 bg-dark text-white">
<div class="card-body p-4">
<div class="row align-items-center">
<div class="col-md-7">
<div class="d-flex align-items-center">
{% if wiki_image_url %}
<img src="{{ wiki_image_url }}" alt="{{ member.name }}" class="profile-img me-3" width="96" height="96">
{% endif %}
<div>
<div class="d-flex align-items-center">
<h1 class="display-5 fw-bold mb-1">{{ member.name }}</h1>
{% if wiki_page_url %}
<a href="{{ wiki_page_url }}" target="_blank" rel="noopener noreferrer" class="btn btn-outline-light btn-sm ms-2" title="Wikipedia Eintrag {{ member.name }}">
<i class="bi bi-wikipedia" aria-hidden="true"></i>
</a>
{% endif %}
</div>
{% if ist_stammgast %}
<span class="badge bg-warning text-dark px-3 py-2">
<i class="bi bi-star-fill me-1"></i> Stamm Gast
</span>
{% else %}
<span class="badge bg-secondary px-3 py-2 text-uppercase" style="letter-spacing: 1px; font-size: 0.7rem;">Gast</span>
{% endif %}
</div>
</div>
</div>
<div class="col-md-5">
<div class="d-flex justify-content-end gap-3">
<div class="text-center bg-white bg-opacity-10 rounded p-3 border border-white border-opacity-25" style="min-width: 100px;">
<div class="small text-uppercase text-white-50 fw-bold" style="font-size: 0.65rem; letter-spacing: 0.5px;">Auftritte</div>
<div class="h3 mb-0 text-warning fw-bold">{{ auftritte_count }}</div>
</div>
<div class="text-center bg-white bg-opacity-10 rounded p-3 border border-white border-opacity-25" style="min-width: 100px;">
<div class="small text-uppercase text-white-50 fw-bold" style="font-size: 0.65rem; letter-spacing: 0.5px;">Lösungen</div>
<div class="h3 mb-0 text-success fw-bold">{{ loesungen_count }}</div>
</div>
<div class="text-center bg-white bg-opacity-10 rounded p-3 border border-white border-opacity-25" style="min-width: 120px;">
<div class="small text-uppercase text-white-50 fw-bold" style="font-size: 0.65rem; letter-spacing: 0.5px;">Quote</div>
<div class="h3 mb-0 text-info fw-bold">{{ quote_gesamt }}%</div>
<div class="text-white-50 small" style="font-size: 0.75rem;">(Solo: {{ quote_solo }}%)</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<ul class="nav nav-tabs mb-4 border-bottom-0" id="yearTab" role="tablist">
{% for jahr in jahre %}
<li class="nav-item">
<button class="nav-link {% if forloop.first %}active{% endif %} fw-bold px-4"
data-bs-toggle="tab" data-bs-target="#jahr-{{ jahr }}" type="button">
{{ jahr }}
</button>
</li>
{% endfor %}
</ul>
<div class="tab-content" id="yearTabContent">
{% for jahr, auftritte in historie_nach_jahr.items %}
<div class="tab-pane fade {% if forloop.first %}show active{% endif %}" id="jahr-{{ jahr }}">
<div class="row">
<div class="col-md-4">
<div class="card shadow-sm mb-4 border-0">
<div class="card-header bg-white fw-bold border-bottom sticky-top">
Auftritte {{ jahr }}
</div>
<div class="list-group list-group-flush shadow-inset" style="max-height: 500px; overflow-y: auto;">
{% for a in auftritte %}
<a href="{% url 'gd:folge_detail' a.folge.id %}" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center py-3">
<div>
<strong class="text-primary">#{{ a.folge.folgen_nummer }}</strong>
<small class="text-muted ms-2">{{ a.folge.datum|date:"d.m.Y" }}</small>
</div>
{% if not ist_stammgast %}
<span class="badge bg-secondary rounded-pill">Pos. {{ a.position }}</span>
{% endif %}
</a>
{% endfor %}
</div>
</div>
</div>
<div class="col-md-8">
<div class="card shadow-sm mb-4 border-0">
<div class="card-header bg-dark text-white fw-bold sticky-top">
Erfolge {{ jahr }}
</div>
<div class="card-body p-0" style="max-height: 500px; overflow-y: auto;">
<div class="table-responsive">
<table class="table align-middle mb-0 table-hover">
<thead class="table-light small text-uppercase sticky-top" style="z-index: 1;">
<tr>
<th style="width: 15%;">Folge</th>
<th style="width: 65%;">Frage & Antwort</th>
<th style="width: 20%; text-align: center;">Modus</th>
</tr>
</thead>
<tbody>
{% for a in auftritte %}
{% for ant in a.meine_loesungen %}
<tr>
<td>
<a href="{% url 'gd:folge_detail' a.folge.id %}" class="btn btn-sm btn-light border fw-bold text-primary w-100">
#{{ a.folge.folgen_nummer }}
</a>
</td>
<td class="small">
<div class="fw-bold mb-1 text-dark">{{ ant.frage.frage_text }}</div>
<div class="p-2 bg-light rounded-2 border-start border-success border-3" style="font-size: 0.8rem;">
<span class="text-success fw-bold text-uppercase" style="font-size: 0.65rem;">Lösung:</span>
{{ ant.antwort_text }}
</div>
</td>
<td class="text-center">
{% with h_count=ant.team.count %}
{% if h_count == 1 %}
<span class="badge bg-warning text-dark w-100 shadow-sm" style="font-size: 0.7rem;">
<i class="bi bi-person-fill"></i> SOLO
</span>
{% elif h_count < 5 %}
<span class="badge bg-primary w-100 shadow-sm" style="font-size: 0.7rem;">
<i class="bi bi-people-fill"></i> TEAM
</span>
{% else %}
<span class="badge bg-success w-100 shadow-sm" style="font-size: 0.7rem;">
<i class="bi bi-grid-3x3-gap-fill"></i> PLENUM
</span>
{% endif %}
{% endwith %}
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="row mt-4">
<div class="col-12">
<div class="card border-0 bg-light shadow-sm">
<div class="card-body py-3">
<div class="row align-items-center">
<div class="col-md-3 text-muted small fw-bold text-uppercase">
<i class="bi bi-info-circle me-2"></i> Legende der Erfolge:
</div>
<div class="col-md-9">
<div class="d-flex flex-wrap gap-4">
<div class="d-flex align-items-center">
<span class="badge bg-warning text-dark me-2" style="width: 20px; height: 20px; border-radius: 4px;">&nbsp;</span>
<span class="small"><strong>Solo:</strong> Einzelleistung (nur 1 Person)</span>
</div>
<div class="d-flex align-items-center">
<span class="badge bg-primary me-2" style="width: 20px; height: 20px; border-radius: 4px;">&nbsp;</span>
<span class="small"><strong>Team:</strong> 2 bis 4 Personen beteiligt</span>
</div>
<div class="d-flex align-items-center">
<span class="badge bg-success me-2" style="width: 20px; height: 20px; border-radius: 4px;">&nbsp;</span>
<span class="small"><strong>Plenum:</strong> Das gesamte 5er-Panel hat gelöst</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
.nav-tabs .nav-link { color: #6c757d; border: none; border-bottom: 3px solid transparent; }
.nav-tabs .nav-link.active { color: #0d6efd; border: none; border-bottom: 3px solid #0d6efd; background: none; }
.table td { border-bottom-color: #f8f9fa; }
/* Styling für die Scrollbars (optional, für modernen Look) */
div::-webkit-scrollbar {
width: 6px;
}
div::-webkit-scrollbar-track {
background: #f1f1f1;
}
div::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 10px;
}
div::-webkit-scrollbar-thumb:hover {
background: #999;
}
/* Header fixieren beim Scrollen innerhalb der Card */
.sticky-top {
position: sticky;
top: 0;
z-index: 1020;
}
/* Profilbild Styling */
.profile-img {
width: 96px;
height: 96px;
object-fit: cover;
border-radius: 8px; /* leicht abgerundet */
border: 2px solid rgba(255,255,255,0.08);
box-shadow: 0 2px 6px rgba(0,0,0,0.25);
background-color: #f6f6f6;
display: inline-block;
}
</style>
{% endblock %}