feat: SVG-Icons für Like-Button und Filter-Toggle (BSN-Blau)
- 👍 Emoji → Thumbs-up SVG (16x16, #20228a) auf allen Like-Buttons - 🔽/🔼 Emoji → Chevron SVG im Filter-Toggle - JS-Handler aktualisiert (innerHTML statt textContent) - Look konsistent mit restlichen Frontend-Icons
This commit is contained in:
@@ -1824,7 +1824,7 @@ def public_frontend():
|
||||
<p class="story-preview">""" + preview + """</p>
|
||||
<div class="card-stats">
|
||||
<span class="stat-views">👁 """ + str(r['views'] or 0) + """</span>
|
||||
<button class="stat-like-btn" data-id=""" + str(r['id']) + """ data-likes=""" + str(r['likes'] or 0) + """>👍 """ + str(r['likes'] or 0) + """</button>
|
||||
<button class="stat-like-btn" data-id=""" + str(r['id']) + """ data-likes=""" + str(r['likes'] or 0) + """><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#20228a" stroke-width="2" stroke-linecap="round" style="vertical-align:middle;margin-right:2px;"><path d="M7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"/><path d="M7 11h11.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5h-2.5"/><path d="M16 16.5V19a3 3 0 0 1-6 1.5L7 11"/></svg> """ + str(r['likes'] or 0) + """</button>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -1843,7 +1843,7 @@ def public_frontend():
|
||||
<p class="story-preview">""" + preview + """</p>
|
||||
<div class="card-stats">
|
||||
<span class="stat-views">👁 """ + str(r['views'] or 0) + """</span>
|
||||
<button class="stat-like-btn" data-id=""" + str(r['id']) + """ data-likes=""" + str(r['likes'] or 0) + """>👍 """ + str(r['likes'] or 0) + """</button>
|
||||
<button class="stat-like-btn" data-id=""" + str(r['id']) + """ data-likes=""" + str(r['likes'] or 0) + """><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#20228a" stroke-width="2" stroke-linecap="round" style="vertical-align:middle;margin-right:2px;"><path d="M7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"/><path d="M7 11h11.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5h-2.5"/><path d="M16 16.5V19a3 3 0 0 1-6 1.5L7 11"/></svg> """ + str(r['likes'] or 0) + """</button>
|
||||
</div>
|
||||
</div>
|
||||
</article>"""
|
||||
@@ -2063,7 +2063,7 @@ def public_frontend():
|
||||
</a>
|
||||
<div class="header-right">
|
||||
<a href="https://brettspiel-news.de">brettspiel-news.de</a>
|
||||
<button id="filterToggle" class="filter-toggle-btn" aria-label="Filter einblenden">🔽</button>
|
||||
<button id="filterToggle" class="filter-toggle-btn" aria-label="Filter einblenden"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" style="vertical-align:middle;"><polyline points="6 9 12 15 18 9"/></svg></button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -2083,7 +2083,7 @@ def public_frontend():
|
||||
if (btn && bar) {
|
||||
btn.addEventListener('click', function() {
|
||||
var hidden = bar.classList.toggle('filter-collapsed');
|
||||
btn.textContent = hidden ? '🔽' : '🔼';
|
||||
btn.innerHTML = hidden ? '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" style="vertical-align:middle;"><polyline points="6 9 12 15 18 9"/></svg>' : '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" style="vertical-align:middle;"><polyline points="18 15 12 9 6 15"/></svg>';
|
||||
btn.classList.toggle('active', !hidden);
|
||||
});
|
||||
}
|
||||
@@ -2314,7 +2314,7 @@ def public_frontend():
|
||||
.then(function(data) {
|
||||
if (!data.already) {
|
||||
this.classList.add('liked');
|
||||
this.textContent = '👍 ' + data.likes;
|
||||
this.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#20228a" stroke-width="2" stroke-linecap="round" style="vertical-align:middle;margin-right:2px;"><path d="M7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"/><path d="M7 11h11.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5h-2.5"/><path d="M16 16.5V19a3 3 0 0 1-6 1.5L7 11"/></svg> ' + data.likes;
|
||||
this.setAttribute('data-likes', data.likes);
|
||||
}
|
||||
this.disabled = false;
|
||||
@@ -2928,7 +2928,7 @@ def public_detail(sub_id: int):
|
||||
{"".join([f'<div class="detail-content">{content}</div>' if content else ''])}
|
||||
<div style="display:flex;align-items:center;gap:1rem;margin-top:1.5rem;padding-top:1rem;border-top:1px solid #f0ede6;">
|
||||
<span style="font-size:0.8rem;color:#999;">👁 {row['views'] or 0} Aufrufe</span>
|
||||
<button id="detail-like-btn" data-id="{sub_id}" class="detail-like-btn">👍 {row['likes'] or 0}</button>
|
||||
<button id="detail-like-btn" data-id="{sub_id}" class="detail-like-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#20228a" stroke-width="2" stroke-linecap="round" style="vertical-align:middle;margin-right:2px;"><path d="M7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"/><path d="M7 11h11.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5h-2.5"/><path d="M16 16.5V19a3 3 0 0 1-6 1.5L7 11"/></svg> {row['likes'] or 0}</button>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
@@ -2951,7 +2951,7 @@ def public_detail(sub_id: int):
|
||||
.then(function(data) {{
|
||||
if (!data.already) {{
|
||||
btn.classList.add('liked');
|
||||
btn.textContent = '👍 ' + data.likes;
|
||||
btn.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#20228a" stroke-width="2" stroke-linecap="round" style="vertical-align:middle;margin-right:2px;"><path d="M7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"/><path d="M7 11h11.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5h-2.5"/><path d="M16 16.5V19a3 3 0 0 1-6 1.5L7 11"/></svg> ' + data.likes;
|
||||
btn.style.background = '#20228a';
|
||||
btn.style.color = '#fff';
|
||||
btn.style.borderColor = '#20228a';
|
||||
|
||||
Reference in New Issue
Block a user