diff --git a/app.py b/app.py
index 4df0442..ff859d8 100644
--- a/app.py
+++ b/app.py
@@ -1809,8 +1809,9 @@ def submission_detail(sub_id: int):
}
for i, path in enumerate(paths):
checked = "checked" if flags[i] == "1" else ""
- if not os.path.exists(path):
- media_html += f'
📁 Datei nicht gefunden: {os.path.basename(path)}
'
+ basename = os.path.basename(path)
+ if not (MEDIA_DIR / basename).exists():
+ media_html += f'📁 Datei nicht gefunden: {basename}
'
continue
_, ext = os.path.splitext(path)
mime = mime_map.get(ext.lower(), "application/octet-stream")
@@ -2725,9 +2726,9 @@ def public_frontend():
# Skip media not marked for publishing
if flags[i] != "1":
continue
- if not os.path.exists(path):
- continue
basename = os.path.basename(path)
+ if not (MEDIA_DIR / basename).exists():
+ continue
_, ext = os.path.splitext(path)
mime = mime_map.get(ext.lower(), "application/octet-stream")
try:
@@ -2956,8 +2957,8 @@ def public_frontend():
.stat-like-btn { background:none; border:none; border-radius:999px; padding:0.25rem 0.6rem; font-size:0.72rem; cursor:pointer; color:#9CA3AF; font-family:inherit; transition:all 0.15s; display:flex; align-items:center; gap:0.2rem; -webkit-tap-highlight-color:transparent; min-width:44px; min-height:36px; justify-content:center; }
.stat-like-btn svg, .stat-like-btn svg path { stroke:#EF4444 !important; fill:#EF4444 !important; }
.stat-like-btn:hover { border-color:#9CA3AF; color:#6B7280; }
- .stat-like-btn.liked { background:#EF4444; color:#fff; border-color:#EF4444; }
- .stat-like-btn.liked svg, .stat-like-btn.liked svg path { stroke:#fff !important; fill:#fff !important; }
+ .stat-like-btn.liked { background:none; }
+ .stat-like-btn.liked svg, .stat-like-btn.liked svg path { stroke:#EF4444 !important; fill:#EF4444 !important; }
.stat-like-btn:active { transform:scale(0.96); }
/* Filter bar */
@@ -4515,7 +4516,8 @@ def public_detail(sub_id: int):
for i, path in enumerate(paths):
if flags[i] != "1":
continue
- if not os.path.exists(path):
+ basename = os.path.basename(path)
+ if not (MEDIA_DIR / basename).exists():
continue
_, ext = os.path.splitext(path)
mime = mime_map.get(ext.lower(), "application/octet-stream")
@@ -4585,7 +4587,7 @@ def public_detail(sub_id: int):
"""
@@ -4657,10 +4659,10 @@ def public_detail(sub_id: int):
.reply-btn {{ background:none; border:1px solid #ccc; border-radius:6px; padding:0.2rem 0.6rem; font-size:0.72rem; color:#666; cursor:pointer; margin-top:0.3rem; font-family:inherit; transition:all 0.15s; }}
.reply-btn:hover {{ border-color:#20228a; color:#20228a; background:rgba(32,34,138,0.04); }}
.comment-actions {{ display:flex; align-items:center; gap:0.4rem; margin-top:0.4rem; }}
- .comment-like-btn {{ background:none; border:1.5px solid #e0dcd3; border-radius:999px; padding:0.15rem 0.5rem; font-size:0.68rem; cursor:pointer; color:#888; font-family:inherit; transition:all 0.15s; display:inline-flex; align-items:center; -webkit-tap-highlight-color:transparent; }}
- .comment-like-btn:hover {{ border-color:#20228a; color:#20228a; background:rgba(32,34,138,0.05); }}
- .comment-like-btn.liked {{ background:#20228a; color:#fff; border-color:#20228a; font-weight:600; }}
- .comment-like-btn.liked svg, .comment-like-btn.liked svg path {{ stroke:#fff !important; }}
+ .comment-like-btn {{ background:none; border:none; border-radius:999px; padding:0.15rem 0.5rem; font-size:0.68rem; cursor:pointer; color:#888; font-family:inherit; transition:all 0.15s; display:inline-flex; align-items:center; -webkit-tap-highlight-color:transparent; }}
+ .comment-like-btn:hover {{ opacity:0.8; }}
+ .comment-like-btn.liked {{ background:none; }}
+ .comment-like-btn.liked svg, .comment-like-btn.liked svg path {{ stroke:#EF4444 !important; fill:#EF4444 !important; }}
.comment-like-btn:active {{ transform:scale(0.94); }}
.reply-info {{ font-size:0.75rem; color:#20228a; margin-bottom:0.3rem; font-weight:600; display:none; }}
.comment-email, .comment-phone {{ padding:0.6rem 0.9rem; border:1.5px solid #ddd; border-radius:10px; font-size:0.85rem; font-family:inherit; }}
@@ -4676,9 +4678,9 @@ def public_detail(sub_id: int):
.site-header {{ padding:0.8rem 1rem; }}
}}
- .detail-like-btn:hover {{ border-color:#20228a; color:#20228a; background:rgba(32,34,138,0.05); }}
- .detail-like-btn.liked {{ background:#20228a; color:#fff; border-color:#20228a; font-weight:600; }}
- .detail-like-btn.liked svg, .detail-like-btn.liked svg path {{ stroke:#fff !important; }}
+ .detail-like-btn:hover {{ opacity:0.8; }}
+ .detail-like-btn.liked {{ background:none; }}
+ .detail-like-btn.liked svg, .detail-like-btn.liked svg path {{ stroke:#EF4444 !important; fill:#EF4444 !important; }}
.detail-like-btn:active {{ transform:scale(0.94); }}
@@ -4702,7 +4704,7 @@ def public_detail(sub_id: int):
{"".join([f'{content}
' if content else ''])}
{row['views'] or 0} Aufrufe
-
+