2023-04-21 00:53:59 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-04-21 20:34:14 +00:00
|
|
|
# Escape slashes
|
2023-12-15 00:17:10 +00:00
|
|
|
LOGO=${LOGO//\//\\/}
|
2023-04-21 04:43:30 +00:00
|
|
|
|
2023-04-21 21:15:25 +00:00
|
|
|
# HTML replacement
|
2023-04-22 18:06:06 +00:00
|
|
|
sed -i -e 's/My Website/'"${TITLE}"'/g' /app/index.html
|
2023-04-21 21:15:25 +00:00
|
|
|
|
|
|
|
# TypeScript replacement
|
2023-04-21 23:37:22 +00:00
|
|
|
sed -i -e 's/PAGETITLE = "My Website"/PAGETITLE = "'"${TITLE}"'"/g' /app/src/variables.ts
|
|
|
|
sed -i -e 's/PAGEICON = "\/logo\.png"/PAGEICON = "'"${LOGO}"'"/g' /app/src/variables.ts
|
|
|
|
sed -i -e 's/SHOWHEADER = true/SHOWHEADER = '"${HEADER}"'/g' /app/src/variables.ts
|
|
|
|
sed -i -e 's/SHOWHEADERLINE = true/SHOWHEADERLINE = '"${HEADERLINE}"'/g' /app/src/variables.ts
|
|
|
|
sed -i -e 's/SHOWHEADERTOP = false/SHOWHEADERTOP = '"${HEADERTOP}"'/g' /app/src/variables.ts
|
|
|
|
sed -i -e 's/CATEGORIES = "normal"/CATEGORIES = "'"${CATEGORIES}"'"/g' /app/src/variables.ts
|
2023-04-22 21:50:09 +00:00
|
|
|
sed -i -e 's/NEWWINDOW = true/NEWWINDOW = '"${NEWWINDOW}"'/g' /app/src/variables.ts
|
2023-04-21 22:02:15 +00:00
|
|
|
|
|
|
|
# CSS replacement
|
2023-04-21 23:46:52 +00:00
|
|
|
sed -i -e 's/background-color: theme(\(colors\.slate\.50\))/background-color: '"${BGCOLOR}"'/g' /app/src/tailwind.css
|
|
|
|
sed -i -e 's/background-color: theme(\(colors\.gray\.950\))/background-color: '"${BGCOLORDARK}"'/g' /app/src/tailwind.css
|
2023-04-21 04:43:30 +00:00
|
|
|
|
2023-04-21 00:53:59 +00:00
|
|
|
exec "$@"
|