diff --git a/css/addons/unraid/local.sh b/css/addons/unraid/local.sh new file mode 100644 index 00000000..04aa6a4b --- /dev/null +++ b/css/addons/unraid/local.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# +# Theme-Park Theme CSS Synchronization Script +# +# This script synchronizes the CSS files needed for the theme-park.dev Unraid theme +# into the Dynamix CSS styles folder. The script creates destination subfolders if +# they don't exist and performs rsync for each subfolder. It then updates the @import references +# in the CSS files so the files get correctly loaded by the client. +# +# This script is intended for users of the "Theme Engine" plugin, allowing custom +# styling to be added into the HTML head that references the copied CSS files. +# +# After running this script, you can use the following code snippet as an example +# in your HTML head (Custom styling (advanced)) to include the copied CSS files using the "Theme Engine" plugin: +# +# +# +# +# +# Tip: You can use the "User Scripts" plugin in Unraid to schedule this script to run +# automatically when the Unraid array starts. +# + +# Define root source folder (CHANGE THIS TO YOUR DESIRED SOURCE FOLDER) +root_source_folder="/path/to/the/theme-park/root/folder" + + +# -------------------- Start of Script -------------------- +# Define subfolders +subfolders=("base/unraid" "theme-options" "defaults" "community-theme-options") + +# Main destination folder +main_destination_folder="/usr/local/emhttp/plugins/dynamix/styles/theme-park/css/" + +# User instructions +# Instructions: Only change the 'root_source_folder' variable to point to your desired source directory. +# Do NOT modify other variables unless you understand their purpose. + +# Create subfolders if they don't exist +for subfolder in "${subfolders[@]}"; do + destination_folder="$main_destination_folder$subfolder" + if [ ! -d "$destination_folder" ]; then + echo "Destination folder not found. Creating destination folder: $destination_folder" + mkdir -p "$destination_folder" + fi +done + +# Perform rsync for each subfolder to its corresponding destination +for subfolder in "${subfolders[@]}"; do + source_folder="$root_source_folder/$subfolder" + destination_folder="$main_destination_folder$subfolder" + + # Check if source folder exists + if [ ! -d "$source_folder" ]; then + echo "Source folder not found: $source_folder" + exit 1 + fi + + rsync -av --delete "$source_folder/" "$destination_folder" + echo "Synchronization complete for source: $source_folder to destination: $destination_folder" +done + +# Update import references in CSS files so the the files get correctly loaded on the client +echo "Updating import references..." +find "$main_destination_folder" -type f -name "*.css" -exec sed -i 's|@import url("/theme.park/css/|@import url("/webGui/styles/theme-park/css/|g' {} + + +echo "Reference update complete." + +# ---- End of Script ---- + +echo "All synchronizations complete." diff --git a/css/base/gitea/gitea-base.css b/css/base/gitea/gitea-base.css index be655547..45790bed 100644 --- a/css/base/gitea/gitea-base.css +++ b/css/base/gitea/gitea-base.css @@ -24,7 +24,11 @@ --color-primary: rgb(var(--gitea-color-primary-dark-4),.6); --color-primary-dark-2: rgb(var(--gitea-color-primary-dark-4),.8); --color-primary-dark-4: rgb(var(--gitea-color-primary-dark-4)); - } + --color-nav-bg: var(--main-bg-color); + --color-button: transparent; + --color-menu: transparent; + --color-footer: transparent; +} body { background: var(--main-bg-color); diff --git a/css/base/transmission/transmission-base.css b/css/base/transmission/transmission-base.css index f053e078..95442da4 100644 --- a/css/base/transmission/transmission-base.css +++ b/css/base/transmission/transmission-base.css @@ -285,23 +285,27 @@ div#toolbar>div#toolbar-inspector:before { } ul.torrent_list, -ul.torrent_list li.torrent.even { - background: var(--transparency-dark-25) +ul.torrent_list li.torrent.even, +ul.torrent-list, +ul.torrent-list li.torrent.even { + background: var(--transparency-dark-25) !important; } ul.torrent_list li.torrent div.torrent_name { color: var(--text-hover); } -ul.torrent_list li.torrent.selected { - background: var(--transparency-dark-25); +ul.torrent_list li.torrent.selected, +ul.torrent-list li.torrent.selected { + background: var(--transparency-dark-50) !important; } -ul.torrent_list li.torrent { +ul.torrent_list li.torrent, +ul.torrent-list li.torrent { border-bottom: 1px solid rgba(204, 204, 204, 0.1); padding: 4px 30px 5px 14px; color: var(--text); - background: var(--transparency-light-10); + background: var(--transparency-light-10) !important; } /* Modal */ @@ -961,7 +965,9 @@ div.torrent_footer #compact-button.selected:before { /*Compact mode*/ ul.torrent_list li.torrent div.torrent_name.paused, -ul.torrent_list li.torrent.compact div.torrent_name { +ul.torrent_list li.torrent.compact div.torrent_name, +ul.torrent-list li.torrent div.torrent_name.paused, +ul.torrent-list li.torrent.compact div.torrent_name { color: var(--text); } @@ -982,4 +988,4 @@ ul.torrent_list li.torrent.compact div.torrent_name { .ui-icon, .ui-widget-content .ui-icon { background-image: url(/theme.park/resources/transmission/icons.png); -} \ No newline at end of file +} diff --git a/docker-mods/lidarr/root/etc/cont-init.d/98-themepark b/docker-mods/lidarr/root/etc/cont-init.d/98-themepark index d782d345..416c756e 100644 --- a/docker-mods/lidarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/lidarr/root/etc/cont-init.d/98-themepark @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/lidarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/lidarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index 14083437..387dcb9e 100644 --- a/docker-mods/lidarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/lidarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark b/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark index 537108d8..541878d5 100644 --- a/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/prowlarr/root/etc/cont-init.d/98-themepark @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/prowlarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/prowlarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index bd68c4a9..16b0285f 100644 --- a/docker-mods/prowlarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/prowlarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/radarr/root/etc/cont-init.d/98-themepark b/docker-mods/radarr/root/etc/cont-init.d/98-themepark index 2945c949..aaba7e32 100644 --- a/docker-mods/radarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/radarr/root/etc/cont-init.d/98-themepark @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/radarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/radarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index bc39ae49..555ab472 100644 --- a/docker-mods/radarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/radarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/readarr/root/etc/cont-init.d/98-themepark b/docker-mods/readarr/root/etc/cont-init.d/98-themepark index 00e30314..ac247e57 100644 --- a/docker-mods/readarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/readarr/root/etc/cont-init.d/98-themepark @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s/// /g" "${APP_FILEPATH}" - sed -i "s/// /g" "${APP_FILEPATH}" - sed -i "s/// /g" "${LOGIN_FILEPATH}" - sed -i "s/// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s/// /g" "${APP_FILEPATH}" - sed -i "s/// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' fi diff --git a/docker-mods/readarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/readarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index 19ac27f2..b6c21926 100644 --- a/docker-mods/readarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/readarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s/// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' fi diff --git a/docker-mods/sonarr/root/etc/cont-init.d/98-themepark b/docker-mods/sonarr/root/etc/cont-init.d/98-themepark index 501578f2..0a4a71e1 100644 --- a/docker-mods/sonarr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/sonarr/root/etc/cont-init.d/98-themepark @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/sonarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/sonarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index a854a510..11d97d71 100644 --- a/docker-mods/sonarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/sonarr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/transmission/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/transmission/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index 45c27963..13bfa7ad 100644 --- a/docker-mods/transmission/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/transmission/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -43,8 +43,13 @@ if ! grep -q "${TP_DOMAIN}/css/base" /usr/share/transmission/web/index.html; the echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' + echo 'There may be 2 missing file errors right now. If there''s only 2 you may safely' + echo 'ignore them as they''re there for backwards compatability. If there are more' + echo 'errors than that, something went wrong.' sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/web/index.html sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/web/index.html + sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/public_html/index.html + sed -i "s/<\/head>/<\/head> /g" /usr/share/transmission/public_html/index.html printf 'Stylesheet set to %s\n' "${TP_THEME} " -fi \ No newline at end of file +fi diff --git a/docker-mods/whisparr/root/etc/cont-init.d/98-themepark b/docker-mods/whisparr/root/etc/cont-init.d/98-themepark index c8ab5aa8..a34e6089 100644 --- a/docker-mods/whisparr/root/etc/cont-init.d/98-themepark +++ b/docker-mods/whisparr/root/etc/cont-init.d/98-themepark @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/docker-mods/whisparr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/whisparr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index 1647b4f2..cdea12d6 100644 --- a/docker-mods/whisparr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/whisparr/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -50,18 +50,22 @@ fi # Adding stylesheets if ! grep -q "${TP_DOMAIN}/css/base" "${APP_FILEPATH}"; then echo '---------------------------' - echo '| Adding the stylesheet |' + echo '| Adding the stylesheets |' echo '---------------------------' - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + + url_base="${TP_SCHEME}://${TP_DOMAIN}" + sheets="" + sheets="${sheets} " printf 'Stylesheet set to %s\n' "${TP_THEME}" + if [[ -n ${TP_ADDON} ]]; then for addon in $(echo "$TP_ADDON" | tr "|" " "); do - sed -i "s// /g" "${APP_FILEPATH}" - sed -i "s// /g" "${LOGIN_FILEPATH}" + sheets="${sheets} " printf 'Added custom addon: %s\n\n' "${addon}" done fi -fi \ No newline at end of file + + sed -i "s!!${sheets}!g" "${APP_FILEPATH}" + sed -i "s!!${sheets}!g" "${LOGIN_FILEPATH}" + printf 'Stylesheets inserted.' +fi diff --git a/themes.py b/themes.py index c6cb0a2b..83c11ee3 100644 --- a/themes.py +++ b/themes.py @@ -36,7 +36,7 @@ def create_addons_json() -> str: addon_folders = [name for name in listdir( addon_root) if isdir(join(addon_root, name))] for app in addon_folders: - app_addons = [addon for addon in listdir(f"{addon_root}/{app}")] + app_addons = [addon for addon in listdir(f"{addon_root}/{app}") if isdir(f"{addon_root}/{app}/{addon}")] ADDONS["addons"].update({ app: { addon: {} for addon in app_addons