fix viewport

This commit is contained in:
lelo 2025-03-17 23:33:22 +00:00
parent 656b94dd15
commit d4a38bbf6f
4 changed files with 7 additions and 10 deletions

6
app.py
View File

@ -273,7 +273,9 @@ def serve_file(filename):
app.logger.error(f"File not found: {full_path}") app.logger.error(f"File not found: {full_path}")
return "File not found", 404 return "File not found", 404
log_file_access(full_path) # Exclude HEAD requests from logging
if request.method != 'HEAD':
log_file_access(full_path)
mime, _ = mimetypes.guess_type(full_path) mime, _ = mimetypes.guess_type(full_path)
mime = mime or 'application/octet-stream' mime = mime or 'application/octet-stream'
@ -283,12 +285,10 @@ def serve_file(filename):
# Check cache first (using diskcache) # Check cache first (using diskcache)
cached = cache.get(filename) cached = cache.get(filename)
if cached: if cached:
app.logger.info(f"Cache hit for {filename}")
cached_file_bytes, mime = cached cached_file_bytes, mime = cached
cached_file = io.BytesIO(cached_file_bytes) cached_file = io.BytesIO(cached_file_bytes)
response = send_file(cached_file, mimetype=mime) response = send_file(cached_file, mimetype=mime)
else: else:
app.logger.info(f"Cache miss for {filename}")
if mime and mime.startswith('image/'): if mime and mime.startswith('image/'):
# Image processing branch (with caching) # Image processing branch (with caching)
try: try:

View File

@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" /> <meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" />
<meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." /> <meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." />
@ -10,7 +9,7 @@
<meta property="og:url" content="https://app.bethaus-speyer.de" /> <meta property="og:url" content="https://app.bethaus-speyer.de" />
<title>Gottesdienste</title> <title>Gottesdienste</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="/static/icons/logo-192x192.png" type="image/png" sizes="192x192"> <link rel="icon" href="/static/icons/logo-192x192.png" type="image/png" sizes="192x192">

View File

@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" /> <meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" />
<meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." /> <meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." />
@ -11,7 +10,7 @@
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<title>Gottesdienste Speyer und Schwegenheim</title> <title>Gottesdienste Speyer und Schwegenheim</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<style> <style>

View File

@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" /> <meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" />
<meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." /> <meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." />
@ -11,7 +10,7 @@
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<title>Gottesdienste Speyer und Schwegenheim</title> <title>Gottesdienste Speyer und Schwegenheim</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<style> <style>