fix: Herz-Icon ohne blauen Hintergrund — JS-Inline-Styles entfernt
Quality Gate / 🛡️ Lint + Type Check + Tests (push) Failing after 12m16s
Quality Gate / 🛡️ Lint + Type Check + Tests (push) Failing after 12m16s
Die JavaScript-Initialisierung und Click-Handler setzten btn.style.background = '#20228a' und ueberschrieben die CSS-Regel background:none. Entfernt in beiden Code-Pfaden.
This commit is contained in:
@@ -4740,9 +4740,6 @@ def public_detail(sub_id: int):
|
||||
var id = parseInt(btn.getAttribute('data-id'));
|
||||
if (likedPosts.indexOf(id) !== -1) {{
|
||||
btn.classList.add('liked');
|
||||
btn.style.background = '#20228a';
|
||||
btn.style.color = '#fff';
|
||||
btn.style.borderColor = '#20228a';
|
||||
}}
|
||||
|
||||
btn.addEventListener('click', function() {{
|
||||
@@ -4754,9 +4751,6 @@ def public_detail(sub_id: int):
|
||||
if (!data.already) {{
|
||||
btn.classList.add('liked');
|
||||
btn.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#20228a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:middle;margin-right:2px;"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg> ' + data.likes;
|
||||
btn.style.background = '#20228a';
|
||||
btn.style.color = '#fff';
|
||||
btn.style.borderColor = '#20228a';
|
||||
likedPosts.push(id);
|
||||
localStorage.setItem('likedPosts', JSON.stringify(likedPosts));
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user