Skip to content

Commit d09992c

Browse files
author
Kristan Kenney
committed
Initial commit: Rework theme system
Theme control scripts have been removed - use v-change-sys-config-value THEME 'themename' to change active theme Place custom themes in $HESTIA/web/css/themes/custom/
1 parent 39a6ace commit d09992c

22 files changed

+50
-277
lines changed

bin/v-add-sys-theme

Lines changed: 0 additions & 98 deletions
This file was deleted.

bin/v-change-sys-theme

Lines changed: 0 additions & 63 deletions
This file was deleted.

bin/v-delete-sys-theme

Lines changed: 0 additions & 64 deletions
This file was deleted.

bin/v-list-sys-themes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ csv_list() {
9191

9292
# System provided themes
9393
themes=$(ls -v $HESTIA_THEMES/)
94-
themes=$(echo "$themes" | grep '\.css' | sed 's/\.css$//')
94+
themes=$(echo "$themes" | grep '\.min.css' | sed 's/\.min.css$//')
9595

9696
# Custom themes
9797
themes_custom=$(ls -v $HESTIA_THEMES_CUSTOM/)

func/main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ DNSTPL=$HESTIA/data/templates/dns
1616
RRD=$HESTIA/web/rrd
1717
SENDMAIL="$HESTIA/web/inc/mail-wrapper.php"
1818
HESTIA_GIT_REPO="https://raw.githubusercontent.com/hestiacp/hestiacp"
19-
HESTIA_THEMES="$HESTIA_INSTALL_DIR/themes"
20-
HESTIA_THEMES_CUSTOM="$HESTIA/data/templates/themes"
19+
HESTIA_THEMES="$HESTIA/web/css/themes"
20+
HESTIA_THEMES_CUSTOM="$HESTIA/web/css/themes/custom"
2121
SCRIPT="$(basename $0)"
2222

2323
# Return codes

func/upgrade.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ upgrade_health_check() {
6969
# Theme
7070
if [ -z "$THEME" ]; then
7171
echo "[ ! ] Adding missing variable to hestia.conf: THEME ('default')"
72-
$BIN/v-change-sys-theme 'default'
72+
$BIN/v-change-sys-config-value 'THEME' 'default'
7373
fi
7474

7575
# Default language
@@ -751,14 +751,6 @@ upgrade_rebuild_users() {
751751
}
752752

753753
upgrade_restart_services() {
754-
# Refresh user interface theme
755-
if [ "$THEME" ]; then
756-
if [ "$THEME" != "default" ]; then
757-
echo "[ * ] Applying user interface updates..."
758-
$BIN/v-change-sys-theme $THEME
759-
fi
760-
fi
761-
762754
if [ "$UPGRADE_RESTART_SERVICES" = "true" ]; then
763755
echo "[ * ] Restarting services..."
764756
export restart="yes"

install/deb/themes/default.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

install/hst-install-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,9 @@ echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
10911091
# Login in screen
10921092
echo "LOGIN_STYLE='default'" >> $HESTIA/conf/hestia.conf
10931093

1094+
# Theme
1095+
echo "THEME='dark'" >> $HESTIA/conf/hestia.conf
1096+
10941097
# Inactive session timeout
10951098
echo "INACTIVE_SESSION_TIMEOUT='60'" >> $HESTIA/conf/hestia.conf
10961099

@@ -1773,9 +1776,6 @@ fi
17731776
# Set backend port
17741777
$HESTIA/bin/v-change-sys-port $port > /dev/null 2>&1
17751778

1776-
# Set default theme
1777-
$HESTIA/bin/v-change-sys-theme 'dark'
1778-
17791779
# Update remaining packages since repositories have changed
17801780
echo -ne "[ * ] Installing remaining software updates..."
17811781
apt-get -qq update

install/hst-install-ubuntu.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,9 @@ echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
11241124
# Login in screen
11251125
echo "LOGIN_STYLE='default'" >> $HESTIA/conf/hestia.conf
11261126

1127+
# Theme
1128+
echo "THEME='dark'" >> $HESTIA/conf/hestia.conf
1129+
11271130
# Inactive session timeout
11281131
echo "INACTIVE_SESSION_TIMEOUT='60'" >> $HESTIA/conf/hestia.conf
11291132

@@ -1804,9 +1807,6 @@ fi
18041807
# Set backend port
18051808
$HESTIA/bin/v-change-sys-port $port > /dev/null 2>&1
18061809

1807-
# Set default theme
1808-
$HESTIA/bin/v-change-sys-theme 'dark'
1809-
18101810
# Update remaining packages since repositories have changed
18111811
echo -ne "[ * ] Installing remaining software updates..."
18121812
apt-get -qq update

web/css/active-theme.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)