offline libs

This commit is contained in:
Mateusz Gruszczyński
2026-05-06 11:25:41 +02:00
parent 6587e74892
commit c19ff17134
14 changed files with 275 additions and 25 deletions

View File

@@ -28,11 +28,10 @@ FONT_FAMILIES = {
}
def bootstrap_css_url(theme: str | None) -> str:
theme = theme if theme in BOOTSTRAP_THEMES else "default"
if theme == "default":
return "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
return f"https://cdn.jsdelivr.net/npm/bootswatch@5.3.3/dist/{theme}/bootstrap.min.css"
# Notatka: zachowana funkcja zwraca aktualny adres motywu, ale źródło wybiera konfiguracja offline.
from .frontend_assets import bootstrap_css_path
return bootstrap_css_path(theme)
def list_profiles(user_id: int | None = None):
user_id = user_id or auth.current_user_id() or default_user_id()