new fonts
This commit is contained in:
@@ -13,6 +13,33 @@ FLAG_ICONS_VERSION = "7.2.3"
|
||||
SWAGGER_UI_VERSION = "5"
|
||||
SOCKET_IO_VERSION = "4.7.5"
|
||||
|
||||
GOOGLE_FONT_FAMILIES = (
|
||||
"DM Sans",
|
||||
"Figtree",
|
||||
"Geist",
|
||||
"IBM Plex Sans",
|
||||
"Inter",
|
||||
"JetBrains Mono",
|
||||
"Lato",
|
||||
"Manrope",
|
||||
"Montserrat",
|
||||
"Nunito Sans",
|
||||
"Open Sans",
|
||||
"Poppins",
|
||||
"Roboto",
|
||||
"Source Sans 3",
|
||||
)
|
||||
GOOGLE_FONT_WEIGHTS = "400;500;600;700;800"
|
||||
|
||||
|
||||
def google_fonts_css_url() -> str:
|
||||
families = "&".join(
|
||||
f"family={name.replace(' ', '+')}:wght@{GOOGLE_FONT_WEIGHTS}"
|
||||
for name in GOOGLE_FONT_FAMILIES
|
||||
)
|
||||
return f"https://fonts.googleapis.com/css2?{families}&display=swap"
|
||||
|
||||
|
||||
BOOTSTRAP_THEMES = (
|
||||
"default",
|
||||
"flatly",
|
||||
@@ -39,6 +66,10 @@ STATIC_ASSETS = {
|
||||
"local": f"{LIBS_STATIC_DIR}/flag-icons/{FLAG_ICONS_VERSION}/css/flag-icons.min.css",
|
||||
"cdn": f"https://cdn.jsdelivr.net/gh/lipis/flag-icons@{FLAG_ICONS_VERSION}/css/flag-icons.min.css",
|
||||
},
|
||||
"font_css": {
|
||||
"local": f"{LIBS_STATIC_DIR}/fonts/google-fonts.css",
|
||||
"cdn": google_fonts_css_url(),
|
||||
},
|
||||
"socket_io_js": {
|
||||
"local": f"{LIBS_STATIC_DIR}/socket.io/{SOCKET_IO_VERSION}/socket.io.min.js",
|
||||
"cdn": f"https://cdn.socket.io/{SOCKET_IO_VERSION}/socket.io.min.js",
|
||||
@@ -87,6 +118,7 @@ def missing_offline_paths() -> list[Path]:
|
||||
LIBS_DIR / f"fontawesome/{FONTAWESOME_VERSION}/webfonts",
|
||||
LIBS_DIR / f"flag-icons/{FLAG_ICONS_VERSION}/flags/4x3",
|
||||
LIBS_DIR / f"flag-icons/{FLAG_ICONS_VERSION}/flags/1x1",
|
||||
LIBS_DIR / "fonts/files",
|
||||
]
|
||||
for directory in required_dirs:
|
||||
if not directory.is_dir() or not any(directory.iterdir()):
|
||||
|
||||
@@ -20,11 +20,22 @@ BOOTSTRAP_THEMES = {
|
||||
|
||||
FONT_FAMILIES = {
|
||||
"default": "Theme default",
|
||||
"adwaita-mono": "Adwaita Mono",
|
||||
"system-ui": "System UI / Apple-like",
|
||||
"figtree": "Figtree",
|
||||
"inter": "Inter",
|
||||
"system-ui": "System UI",
|
||||
"geist": "Geist",
|
||||
"manrope": "Manrope",
|
||||
"dm-sans": "DM Sans",
|
||||
"source-sans-3": "Source Sans 3",
|
||||
"open-sans": "Open Sans",
|
||||
"roboto": "Roboto",
|
||||
"lato": "Lato",
|
||||
"nunito-sans": "Nunito Sans",
|
||||
"poppins": "Poppins",
|
||||
"montserrat": "Montserrat",
|
||||
"ibm-plex-sans": "IBM Plex Sans",
|
||||
"jetbrains-mono": "JetBrains Mono",
|
||||
"adwaita-mono": "Adwaita Mono",
|
||||
}
|
||||
|
||||
# Note: Backend owns the recommended torrent table layout so frontend builds do not duplicate presets.
|
||||
|
||||
@@ -33,13 +33,66 @@ html[data-app-font="inter"] {
|
||||
}
|
||||
html[data-app-font="system-ui"] {
|
||||
--app-font-family:
|
||||
system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
|
||||
system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
|
||||
Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="figtree"] {
|
||||
--app-font-family:
|
||||
Figtree, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="geist"] {
|
||||
--app-font-family:
|
||||
Geist, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="manrope"] {
|
||||
--app-font-family:
|
||||
Manrope, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="dm-sans"] {
|
||||
--app-font-family:
|
||||
"DM Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="source-sans-3"] {
|
||||
--app-font-family:
|
||||
"Source Sans 3", "Source Sans Pro", system-ui, -apple-system, Segoe UI,
|
||||
Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="open-sans"] {
|
||||
--app-font-family:
|
||||
"Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="roboto"] {
|
||||
--app-font-family:
|
||||
Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="lato"] {
|
||||
--app-font-family:
|
||||
Lato, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="nunito-sans"] {
|
||||
--app-font-family:
|
||||
"Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="poppins"] {
|
||||
--app-font-family:
|
||||
Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="montserrat"] {
|
||||
--app-font-family:
|
||||
Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="ibm-plex-sans"] {
|
||||
--app-font-family:
|
||||
"IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="jetbrains-mono"] {
|
||||
--app-font-family:
|
||||
"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
|
||||
|
||||
@@ -33,13 +33,66 @@ html[data-app-font="inter"] {
|
||||
}
|
||||
html[data-app-font="system-ui"] {
|
||||
--app-font-family:
|
||||
system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
|
||||
system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
|
||||
Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="figtree"] {
|
||||
--app-font-family:
|
||||
Figtree, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="geist"] {
|
||||
--app-font-family:
|
||||
Geist, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="manrope"] {
|
||||
--app-font-family:
|
||||
Manrope, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="dm-sans"] {
|
||||
--app-font-family:
|
||||
"DM Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="source-sans-3"] {
|
||||
--app-font-family:
|
||||
"Source Sans 3", "Source Sans Pro", system-ui, -apple-system, Segoe UI,
|
||||
Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="open-sans"] {
|
||||
--app-font-family:
|
||||
"Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="roboto"] {
|
||||
--app-font-family:
|
||||
Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="lato"] {
|
||||
--app-font-family:
|
||||
Lato, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="nunito-sans"] {
|
||||
--app-font-family:
|
||||
"Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="poppins"] {
|
||||
--app-font-family:
|
||||
Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
|
||||
}
|
||||
html[data-app-font="montserrat"] {
|
||||
--app-font-family:
|
||||
Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="ibm-plex-sans"] {
|
||||
--app-font-family:
|
||||
"IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
|
||||
sans-serif;
|
||||
}
|
||||
html[data-app-font="jetbrains-mono"] {
|
||||
--app-font-family:
|
||||
"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<link rel="shortcut icon" href="{{ static_url('favicon.svg') }}" type="image/svg+xml">
|
||||
<link id="bootstrapThemeStylesheet" href="{{ bootstrap_theme_url(prefs.bootstrap_theme if prefs else 'default') }}" rel="stylesheet">
|
||||
<link href="{{ frontend_asset_url('fontawesome_css') }}" rel="stylesheet">
|
||||
<link href="{{ frontend_asset_url('font_css') }}" rel="stylesheet">
|
||||
<link href="{{ frontend_asset_url('flag_icons_css') }}" rel="stylesheet">
|
||||
<link href="{{ static_url('styles.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<link rel="shortcut icon" href="{{ static_url('favicon.svg') }}" type="image/svg+xml">
|
||||
<link href="{{ bootstrap_theme_url('default') }}" rel="stylesheet">
|
||||
<link href="{{ frontend_asset_url('fontawesome_css') }}" rel="stylesheet">
|
||||
<link href="{{ frontend_asset_url('font_css') }}" rel="stylesheet">
|
||||
<link href="{{ static_url('styles.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body class="auth-page">
|
||||
|
||||
Reference in New Issue
Block a user