feat(v3): eigenes Tab-Icon (Beleg-Motiv, schwarz/orange)
Custom-Favicon assets/favicon.png (256px, schwarzer abgerundeter Hintergrund,
oranger Beleg mit Sägezahn-Unterkante) statt Emoji. page_icon lädt die Datei
über absoluten Pfad, mit Fallback auf 🧾, falls sie fehlt.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
565fe097dd
commit
1bcc3d0f57
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
8
main.py
8
main.py
|
|
@ -1,7 +1,9 @@
|
||||||
import io
|
import io
|
||||||
|
import os
|
||||||
import streamlit as st
|
import streamlit as st
|
||||||
import json
|
import json
|
||||||
import fitz
|
import fitz
|
||||||
|
from PIL import Image
|
||||||
from facturx import generate_from_binary as facturx_generate_from_binary
|
from facturx import generate_from_binary as facturx_generate_from_binary
|
||||||
from invoice_logic import (
|
from invoice_logic import (
|
||||||
VERKAEUFER,
|
VERKAEUFER,
|
||||||
|
|
@ -91,7 +93,11 @@ def build_zugferd_pdf(invoice_json: str, original_pdf_bytes: bytes) -> bytes:
|
||||||
# ==========================================
|
# ==========================================
|
||||||
# 5. STREAMLIT FRONTEND
|
# 5. STREAMLIT FRONTEND
|
||||||
# ==========================================
|
# ==========================================
|
||||||
st.set_page_config(page_title="PDF zu E-Rechnung", page_icon="🧾", layout="wide")
|
# Eigenes Tab-Icon (Beleg-Motiv, schwarz/orange). Faellt auf das Emoji zurueck, falls die
|
||||||
|
# Datei fehlt. Absoluter Pfad, damit es unabhaengig vom Arbeitsverzeichnis gefunden wird.
|
||||||
|
_FAVICON_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets", "favicon.png")
|
||||||
|
_page_icon = Image.open(_FAVICON_PATH) if os.path.exists(_FAVICON_PATH) else "🧾"
|
||||||
|
st.set_page_config(page_title="PDF zu E-Rechnung", page_icon=_page_icon, layout="wide")
|
||||||
st.title("📄 PDF zu E-Rechnung Konverter")
|
st.title("📄 PDF zu E-Rechnung Konverter")
|
||||||
|
|
||||||
col1, col2 = st.columns(2)
|
col1, col2 = st.columns(2)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue