Fix 04b src when the site is in a subfolder

This commit is contained in:
mez 2025-08-29 19:57:44 +01:00
parent e179b011f2
commit ee0879ef79
5 changed files with 19 additions and 8 deletions

View file

@ -5,5 +5,12 @@ buildscript = open("build.sh","w")
buildscript.write("#!/usr/bin/env bash && python3 colors.py\n\nrclone copy build " + variables.servername + ":" + variables.serverpath + " -P -L")
buildscript.close()
fontloc = open("build/font.css","w")
fontloc.write("@font-face {\n src: url(\"")
if len(variables.subfolder) > 0:
header.write("/" + variables.subfolder)
fontloc.write("/assets/fonts/04b24.ttf\");\n font-display: swap;\n font-family: \"04b24\";\n font-style: normal;\n font-weight: 400;\n}\n")
fontloc.close()
if not os.path.exists("build/user.css"):
open("build/user.css","x")