diff --git a/README.md b/README.md
index 45bc220..0148063 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,19 @@
-
+
+
+ Español | English
+
-
+
Max Theme para HestiaCP
-Última versión: 2.0 | Ver Cambios | Capturas de Pantalla
+Última versión: 2.1 | Ver Cambios | Capturas de Pantalla
Mi web: maxizamorano.com |
@@ -38,11 +38,11 @@ He creado este script de fácil instalación para que puedas tener 2 nuevos tema
Para instalar los temas debes ejecutar como root los siguientes comandos en tu terminal:
#### - Instalar Tema Light/Claro
```bash
-curl -sSL https://raw.githubusercontent.com/maxizamorano/maxtheme/main/install-light.sh -o install.sh && sh install.sh
+curl -sSL https://raw.githubusercontent.com/maxizamorano/maxtheme/main/install/light-es.sh -o install.sh && sh install.sh
```
#### - Instalar Tema Dark/Oscuro
```bash
-curl -sSL https://raw.githubusercontent.com/maxizamorano/maxtheme/main/install-dark.sh -o install.sh && sh install.sh
+curl -sSL https://raw.githubusercontent.com/maxizamorano/maxtheme/main/install/dark-es.sh -o install.sh && sh install.sh
```
## Notas importantes:
- Si el tema no se cambia de forma automática, debes cambiarlo desde las opciones del panel de control HestiaCP.
@@ -118,3 +118,117 @@ Tienes permitido modificar el script a tu gusto o los archivos de estilos del te
## Licencia
Max Theme está bajo la licencia [GPL v3](https://github.com/MaxiZamorano/maxtheme/blob/main/LICENSE).
+
+===========================================================================
+
+
+
+
+
+Max Theme for HestiaCP
+
+Latest version: 2.1 | Changelog | Screenshots
+
+
+ My website: maxizamorano.com |
+ Suggestions: contacto@maxizamorano.com
+
+
+
+## **Welcome!**
+
+I have created this easy to install script so you can have 2 new themes (Dark and Light) for the HestiaCP control panel with Bootstrap 5 style, it includes branding so you can include your logo at the top replacing the default HestiaCP logo.
+
+## Features
+
+- Dark and Light theme
+- Bootstrap 5 Style Theme
+- Install and uninstall without affecting the default themes
+- Add your logo in the HestiaCP Dashboard (See example)
+- Add your logo on the Login screen (See example)
+- Add a background image on the Login screen (See example)
+
+## Installation
+To install the themes you must run the following commands as root in your terminal:
+#### - Install Light Theme
+```bash
+curl -sSL https://raw.githubusercontent.com/maxizamorano/maxtheme/main/install/light-en.sh -o install.sh && sh install.sh
+```
+#### - Install Dark Theme
+```bash
+curl -sSL https://raw.githubusercontent.com/maxizamorano/maxtheme/main/install/dark-en.sh -o install.sh && sh install.sh
+```
+## Important Notes:
+- If the theme is not changed automatically, you must change it from the HestiaCP control panel options.
+- We recommend disabling HestiaCP automatic updates.
+- If the login screen styles are lost after a HestiaCP update, reinstall the theme.
+- If you want to make changes to the Logo or Background you can reinstall the theme.
+- If you install the 2 themes, you can change them whenever you want from the control panel options, but the login screen will have the styles of the last theme installed, for example: if the last theme you installed was the Dark theme, the login screen will continue with the Dark theme even if you switch to the Light theme, This is only for the login screen, not in the dashboard.
+- To change the theme of the login screen (Dark or Light), you must reinstall the login screen theme again.
+- To change the dashboard theme you just have to select it from the HestiaCP configuration options.
+
+## Screenshots
+
+Below, you can see some screenshots of the theme you will have for your HestiaCP dashboard.
+
+#### - Login with your logo
+
+
+
+#### - Login with your logo and your background
+
+
+
+#### - Dashboard with your logo
+
+
+
+#### - Screenshots Max Theme Light
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+
+#### - Screenshots Max Theme Dark
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+
+## Problems and/or Suggestions
+
+If you have any problems with the script, find any errors or have any suggestions, please contact contacto@maxizamorano.com to receive help and/or establish a conversation.
+
+## Copyright
+
+You are allowed to modify the script to your liking or the theme style files, if you make any major improvements you can share them and thus support the community that uses HestiaCP.
+
+## License
+
+Max Theme is licensed under the [GPL v3](https://github.com/MaxiZamorano/maxtheme/blob/main/LICENSE).
diff --git a/install/dark-en.sh b/install/dark-en.sh
new file mode 100644
index 0000000..2bdf706
--- /dev/null
+++ b/install/dark-en.sh
@@ -0,0 +1,261 @@
+#!/bin/bash
+
+# Colors
+blanco='\033[1;37m'
+verde='\033[0;32m'
+amarillo='\033[1;33m'
+azul='\033[0;34m'
+magenta='\033[0;35m'
+cyan='\033[0;36m'
+gris='\033[1;30m'
+negro='\033[30m'
+rojo='\033[31m'
+reset='\033[0m'
+
+# Function to display the menu
+show_menu() {
+ clear
+ echo ""
+ echo ' ___ ___ _____ _'
+ echo ' | \/ | |_ _| |'
+ echo ' | . . | __ ___ __ | | | |__ ___ _ __ ___ ___ '
+ echo ' | |\/| |/ _ \ \/ / | | | _ \ / _ \ _ _ \ / _ \'
+ echo ' | | | | (_| |> < | | | | | | __/ | | | | | __/'
+ echo ' \_| |_/\__,_/_/\_\ \_/ |_| |_|\___|_| |_| |_|\___|'
+ echo ' ___ _ '
+ echo ' | \ __ _ _ _| |__'
+ echo ' | |) / _ | _| / /'
+ echo ' |___/\__,_|_| |_\_\'
+
+ echo ""
+ echo " Max Theme Dark for HestiaCP"
+ echo " v2.1"
+ echo " www.maxizamorano.com"
+ echo " https://github.com/MaxiZamorano"
+ echo ""
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${blanco}1) Install/Reinstall${reset}"
+ echo "${blanco}2) Uninstall${reset}"
+ echo "${blanco}3) Exit${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+
+}
+
+#function to install or reinstall the theme
+instalar(){
+
+ url="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-dark/max-theme-dark.css"
+ dir_archivo="/usr/local/hestia/web/css/themes/custom/max-theme-dark.css"
+
+ url_2="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-dark/max-theme-dark-login.css"
+ dir_archivo_2="/usr/local/hestia/web/css/themes/max-theme-dark-login.css"
+
+ # Check if the folder "/usr/local/hestia/web/css/themes/custom" exists, if not create it
+ if [ ! -d "/usr/local/hestia/web/css/themes/custom" ]; then
+ mkdir -p "/usr/local/hestia/web/css/themes/custom"
+ fi
+
+ # Downloads the file and overwrites it if it already exists
+ curl -s -o "$dir_archivo" -k "$url"
+ curl -s -o "$dir_archivo_2" -k "$url_2"
+
+ # Check if the .copy-dark.min.css_dark file already exists
+ if [ -f /usr/local/hestia/web/css/themes/.copy-dark.min.css_dark ]; then
+ rm -rf /usr/local/hestia/web/css/themes/dark.min.css
+ cp /usr/local/hestia/web/css/themes/max-theme-dark-login.css /usr/local/hestia/web/css/themes/dark.min.css
+ rm -rf /usr/local/hestia/web/css/themes/max-theme-dark-login.css
+ else
+ cp /usr/local/hestia/web/css/themes/dark.min.css /usr/local/hestia/web/css/themes/.copy-dark.min.css_dark
+ rm -rf /usr/local/hestia/web/css/themes/dark.min.css
+ cp /usr/local/hestia/web/css/themes/max-theme-dark-login.css /usr/local/hestia/web/css/themes/dark.min.css
+ rm -rf /usr/local/hestia/web/css/themes/max-theme-dark-login.css
+ fi
+
+ archivo="/usr/local/hestia/web/css/themes/custom/max-theme-dark.css"
+ linea="5"
+ css_inicio=' background-image: url("'
+ css_final='");'
+
+ archivo_2="/usr/local/hestia/web/css/themes/dark.min.css"
+ linea_2="594"
+ css_inicio_2=' background-image: url("'
+ css_final_2='");'
+
+ linea_3="603"
+ css_inicio_3=' background-image: url("'
+ css_final_3='");'
+ css_color_fondo=' background: #10161f;'
+
+ # Asks the URL of the logo for the dashboard
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${amarillo}LOGO FOR THE TOP BAR OF THE DASHBOARD ${reset}"
+ echo ""
+ echo "${cyan}We recommend that your logo be in a ${amarillo}PNG, SVG or Webp ${cyan}format.${reset}"
+ echo "${cyan}Use a correct URL format and in https, for example: ${amarillo}https://example.com/img/your-logo.png${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Paste or type the URL of your logo: ${reset}"
+ read url_logo
+
+ url=$(echo $url_logo | sed 's/\//\\\//g')
+
+ sed -i "${linea}s/.*/$css_inicio${url}$css_final/" $archivo
+
+ # Asks the URL of the logo for the login
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${amarillo}LOGO FOR THE LOGIN SCREEN ${reset}"
+ echo ""
+ echo "${cyan}We recommend that your logo be in a ${amarillo}PNG, SVG or Webp ${cyan}format.${reset}"
+ echo "${cyan}Use a correct URL format and in https, for example: ${amarillo}https://example.com/img/your-logo.png${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Paste or type the URL of your logo: ${reset}"
+ read url_logo_login
+
+ url_2=$(echo $url_logo_login | sed 's/\//\\\//g')
+
+ sed -i "${linea_2}s/.*/$css_inicio_2${url_2}$css_final_2/" $archivo_2
+
+ # Ask the background URL
+ while true; do
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Do you want to add a background image at login? [Y/N]:${reset} "
+ read respuesta
+
+ case "$respuesta" in
+ [Yy]* )
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${amarillo}BACKGROUND IMAGE FOR THE LOGIN SCREEN ${reset}"
+ echo ""
+ echo "${cyan}We recommend that the image have a resolution of ${amarillo}1920x1080px ${cyan}and be in ${amarillo}PNG, JPG or Webp ${cyan}format${reset}"
+ echo "${cyan}Use a correct URL format and in https, for example: ${amarillo}https://example.com/img/your-background.png${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Paste or type the URL of the background image: ${reset}"
+ read url_img_fondo
+
+ url_3=$(echo $url_img_fondo | sed 's/\//\\\//g')
+ sed -i "${linea_3}s/.*/$css_inicio_3${url_3}$css_final_3/" $archivo_2
+
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} THEME INSTALLED SUCCESSFULLY! ${reset}"
+ echo "${cyan} NOTE: ${amarillo}If the theme is not changed automatically, you must change it from the control panel. ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ ;;
+ [Nn]* )
+ sed -i "${linea_3}s/.*/$css_color_fondo/" $archivo_2
+
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} THEME INSTALLED SUCCESSFULLY! ${reset}"
+ echo "${cyan} NOTE: ${amarillo}If the theme is not changed automatically, you must change it from the control panel. ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ ;;
+ * )
+ echo ""
+ echo "${rojo}The answer is invalid, you must answer with "Y/N or y/n".${reset}"
+ ;;
+ esac
+ done
+
+}
+
+
+#function to uninstall the theme
+desinstalar(){
+ # It asks if you want to uninstall the theme
+ while true; do
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${cyan}NOTE:${reset} If you uninstall it we will restore the original files and the default HestiaCP theme will be activated."
+ echo ""
+ echo -n "${verde}Do you want to uninstall Max Theme Dark theme? [Y/N]:${reset} "
+ read respuesta
+
+ case "$respuesta" in
+ [Yy]* )
+
+ # Check if the theme is currently installed
+ if [ -f /usr/local/hestia/web/css/themes/.copy-dark.min.css_dark ]; then
+ # Delete the files and restore the original
+ rm -rf /usr/local/hestia/web/css/themes/dark.min.css
+ cp /usr/local/hestia/web/css/themes/.copy-dark.min.css_dark /usr/local/hestia/web/css/themes/dark.min.css
+ rm /usr/local/hestia/web/css/themes/.copy-dark.min.css_dark
+ rm -rf /usr/local/hestia/web/css/themes/custom/max-theme-dark.css
+
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} THEME UNINSTALLED SUCCESSFULLY! ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ else
+ echo ""
+ echo "${rojo}You don't have the theme installed! We can only uninstall it if the theme was previously installed.${reset}"
+ echo ""
+ exit
+ fi
+
+
+ ;;
+ [Nn]* )
+ # Doesn't uninstall the theme
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} GREAT! CONTINUE WITH YOUR THEME ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ ;;
+ * )
+ echo ""
+ echo "${rojo}The answer is invalid, you must answer with "Y/N or y/n".${reset}"
+ ;;
+ esac
+ done
+
+}
+
+
+# Loop for user response
+while true; do
+ # show menu
+ show_menu
+
+ # Read the option selected by the user
+ echo -n "${verde}Select an option [1-3]: ${reset}"
+ read opcion
+
+ # Evaluate the selected option
+ case $opcion in
+ 1)
+ instalar
+ ;;
+ 2)
+ desinstalar
+ ;;
+ 3)
+ exit
+ ;;
+ *)
+ echo "${rojo}Invalid option. Try again.${reset}"
+ sleep 3
+ ;;
+ esac
+done
diff --git a/install-dark.sh b/install/dark-es.sh
similarity index 95%
rename from install-dark.sh
rename to install/dark-es.sh
index 8f77b6e..1a450e8 100644
--- a/install-dark.sh
+++ b/install/dark-es.sh
@@ -29,7 +29,7 @@ show_menu() {
echo ""
echo " Max Theme Dark para HestiaCP"
- echo " v2.0"
+ echo " v2.1"
echo " www.maxizamorano.com"
echo " https://github.com/MaxiZamorano"
echo ""
@@ -47,10 +47,10 @@ show_menu() {
#función para instalar o reinstalar el tema
instalar(){
- url="https://raw.githubusercontent.com/maxizamorano/maxtheme/release-dev/themes/max-theme-dark/max-theme-dark.css"
+ url="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-dark/max-theme-dark.css"
dir_archivo="/usr/local/hestia/web/css/themes/custom/max-theme-dark.css"
- url_2="https://raw.githubusercontent.com/maxizamorano/maxtheme/release-dev/themes/max-theme-dark/max-theme-dark-login.css"
+ url_2="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-dark/max-theme-dark-login.css"
dir_archivo_2="/usr/local/hestia/web/css/themes/max-theme-dark-login.css"
# Verifica si la carpeta "/usr/local/hestia/web/css/themes/custom" existe, si no la crea
@@ -95,7 +95,7 @@ instalar(){
echo "${amarillo}LOGO PARA LA BARRA SUPERIOR DEL DASHBOARD ${reset}"
echo ""
echo "${cyan}Se recomienda que tu logo esté en formato ${amarillo}PNG, SVG o Webp${reset}"
- echo "${cyan}Utiliza un formato de URL correcto y en https, por ejmplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
+ echo "${cyan}Utiliza un formato de URL correcto y en https, por ejemplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo -n "${verde}Pega o escribe la URL de tu logo: ${reset}"
@@ -111,7 +111,7 @@ instalar(){
echo "${amarillo}LOGO PARA LA PANTALLA DE LOGIN O INICIO DE SESIÓN ${reset}"
echo ""
echo "${cyan}Se recomienda que tu logo esté en formato ${amarillo}PNG, SVG o Webp${reset}"
- echo "${cyan}Utiliza un formato de URL correcto y en https, por ejmplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
+ echo "${cyan}Utiliza un formato de URL correcto y en https, por ejemplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo -n "${verde}Pega o escribe la URL de tu logo: ${reset}"
@@ -135,7 +135,7 @@ instalar(){
echo "${amarillo}IMAGEN DE FONDO PARA LA PANTALLA DE LOGIN O INICIO DE SESIÓN ${reset}"
echo ""
echo "${cyan}Se recomienda que la imagen tenga una resolución de ${amarillo}1920x1080px ${cyan}y esté en formato ${amarillo}PNG, JPG o Webp${reset}"
- echo "${cyan}Utiliza un formato de URL correcto y en https, por ejmplo: ${amarillo}https://example.com/img/tu-fondo.png${reset}"
+ echo "${cyan}Utiliza un formato de URL correcto y en https, por ejemplo: ${amarillo}https://example.com/img/tu-fondo.png${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo -n "${verde}Pega o escribe la URL de la imagen de fondo: ${reset}"
@@ -147,7 +147,7 @@ instalar(){
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo "${verde} ¡TEMA INSTALADO CORRECTAMENTE! ${reset}"
- echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automaticamente, debes cambiarlo desde el panel de control. ${reset}"
+ echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automáticamente, debes cambiarlo desde el panel de control. ${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
@@ -159,7 +159,7 @@ instalar(){
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo "${verde} ¡TEMA INSTALADO CORRECTAMENTE! ${reset}"
- echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automaticamente, debes cambiarlo desde el panel de control. ${reset}"
+ echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automáticamente, debes cambiarlo desde el panel de control. ${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
diff --git a/install/light-en.sh b/install/light-en.sh
new file mode 100644
index 0000000..6ae938c
--- /dev/null
+++ b/install/light-en.sh
@@ -0,0 +1,262 @@
+#!/bin/bash
+
+# Colors
+blanco='\033[1;37m'
+verde='\033[0;32m'
+amarillo='\033[1;33m'
+azul='\033[0;34m'
+magenta='\033[0;35m'
+cyan='\033[0;36m'
+gris='\033[1;30m'
+negro='\033[30m'
+rojo='\033[31m'
+reset='\033[0m'
+
+# Function to display the menu
+show_menu() {
+ clear
+ echo ""
+ echo ' ___ ___ _____ _'
+ echo ' | \/ | |_ _| |'
+ echo ' | . . | __ ___ __ | | | |__ ___ _ __ ___ ___ '
+ echo ' | |\/| |/ _ \ \/ / | | | _ \ / _ \ _ _ \ / _ \'
+ echo ' | | | | (_| |> < | | | | | | __/ | | | | | __/'
+ echo ' \_| |_/\__,_/_/\_\ \_/ |_| |_|\___|_| |_| |_|\___|'
+ echo " _ _ _ _"
+ echo " | | (_)__ _| |_| |_"
+ echo " | |__| / _' | ' \ _|"
+ echo " |____|_\__, |_||_\__|"
+ echo " |___/"
+
+ echo ""
+ echo " Max Theme Light para HestiaCP"
+ echo " v2.1"
+ echo " www.maxizamorano.com"
+ echo " https://github.com/MaxiZamorano"
+ echo ""
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${blanco}1) Install/Reinstall${reset}"
+ echo "${blanco}2) Uninstall${reset}"
+ echo "${blanco}3) Exit${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+
+}
+
+#function to install or reinstall the theme
+instalar(){
+
+ url="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-light/max-theme-light.css"
+ dir_archivo="/usr/local/hestia/web/css/themes/custom/max-theme-light.css"
+
+ url_2="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-light/max-theme-light-login.css"
+ dir_archivo_2="/usr/local/hestia/web/css/themes/max-theme-light-login.css"
+
+ # Check if the folder "/usr/local/hestia/web/css/themes/custom" exists, if not create it
+ if [ ! -d "/usr/local/hestia/web/css/themes/custom" ]; then
+ mkdir -p "/usr/local/hestia/web/css/themes/custom"
+ fi
+
+ # Downloads the file and overwrites it if it already exists
+ curl -s -o "$dir_archivo" -k "$url"
+ curl -s -o "$dir_archivo_2" -k "$url_2"
+
+ # Check if the .copy-dark.min.css_dark file already exists
+ if [ -f /usr/local/hestia/web/css/themes/.copy-dark.min.css_light ]; then
+ rm -rf /usr/local/hestia/web/css/themes/dark.min.css
+ cp /usr/local/hestia/web/css/themes/max-theme-light-login.css /usr/local/hestia/web/css/themes/dark.min.css
+ rm -rf /usr/local/hestia/web/css/themes/max-theme-light-login.css
+ else
+ cp /usr/local/hestia/web/css/themes/dark.min.css /usr/local/hestia/web/css/themes/.copy-dark.min.css_light
+ rm -rf /usr/local/hestia/web/css/themes/dark.min.css
+ cp /usr/local/hestia/web/css/themes/max-theme-light-login.css /usr/local/hestia/web/css/themes/dark.min.css
+ rm -rf /usr/local/hestia/web/css/themes/max-theme-light-login.css
+ fi
+
+ archivo="/usr/local/hestia/web/css/themes/custom/max-theme-light.css"
+ linea="5"
+ css_inicio=' background-image: url("'
+ css_final='");'
+
+ archivo_2="/usr/local/hestia/web/css/themes/dark.min.css"
+ linea_2="594"
+ css_inicio_2=' background-image: url("'
+ css_final_2='");'
+
+ linea_3="603"
+ css_inicio_3=' background-image: url("'
+ css_final_3='");'
+ css_color_fondo=' background: #f6f6f6;'
+
+ # Asks the URL of the logo for the dashboard
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${amarillo}LOGO FOR THE TOP BAR OF THE DASHBOARD ${reset}"
+ echo ""
+ echo "${cyan}We recommend that your logo be in a ${amarillo}PNG, SVG or Webp ${cyan}format.${reset}"
+ echo "${cyan}Use a correct URL format and in https, for example: ${amarillo}https://example.com/img/your-logo.png${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Paste or type the URL of your logo: ${reset}"
+ read url_logo
+
+ url=$(echo $url_logo | sed 's/\//\\\//g')
+
+ sed -i "${linea}s/.*/$css_inicio${url}$css_final/" $archivo
+
+ # Asks the URL of the logo for the login
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${amarillo}LOGO FOR THE LOGIN SCREEN ${reset}"
+ echo ""
+ echo "${cyan}We recommend that your logo be in a ${amarillo}PNG, SVG or Webp ${cyan}format.${reset}"
+ echo "${cyan}Use a correct URL format and in https, for example: ${amarillo}https://example.com/img/your-logo.png${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Paste or type the URL of your logo: ${reset}"
+ read url_logo_login
+
+ url_2=$(echo $url_logo_login | sed 's/\//\\\//g')
+
+ sed -i "${linea_2}s/.*/$css_inicio_2${url_2}$css_final_2/" $archivo_2
+
+ # Ask the background URL
+ while true; do
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Do you want to add a background image at login? [Y/N]:${reset} "
+ read respuesta
+
+ case "$respuesta" in
+ [Yy]* )
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${amarillo}BACKGROUND IMAGE FOR THE LOGIN SCREEN ${reset}"
+ echo ""
+ echo "${cyan}We recommend that the image have a resolution of ${amarillo}1920x1080px ${cyan}and be in ${amarillo}PNG, JPG or Webp ${cyan}format${reset}"
+ echo "${cyan}Use a correct URL format and in https, for example: ${amarillo}https://example.com/img/your-background.png${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo -n "${verde}Paste or type the URL of the background image: ${reset}"
+ read url_img_fondo
+
+ url_3=$(echo $url_img_fondo | sed 's/\//\\\//g')
+ sed -i "${linea_3}s/.*/$css_inicio_3${url_3}$css_final_3/" $archivo_2
+
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} THEME INSTALLED SUCCESSFULLY! ${reset}"
+ echo "${cyan} NOTE: ${amarillo}If the theme is not changed automatically, you must change it from the control panel. ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ ;;
+ [Nn]* )
+ sed -i "${linea_3}s/.*/$css_color_fondo/" $archivo_2
+
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} THEME INSTALLED SUCCESSFULLY! ${reset}"
+ echo "${cyan} NOTE: ${amarillo}If the theme is not changed automatically, you must change it from the control panel. ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ ;;
+ * )
+ echo ""
+ echo "${rojo}The answer is invalid, you must answer with "Y/N or y/n".${reset}"
+ ;;
+ esac
+ done
+
+}
+
+
+#function to uninstall the theme
+desinstalar(){
+ # It asks if you want to uninstall the theme
+ while true; do
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${cyan}NOTE:${reset} If you uninstall it we will restore the original files and the default HestiaCP theme will be activated."
+ echo ""
+ echo -n "${verde}Do you want to uninstall Max Theme Dark theme? [Y/N]:${reset} "
+ read respuesta
+
+ case "$respuesta" in
+ [Yy]* )
+
+ # Check if the theme is currently installed
+ if [ -f /usr/local/hestia/web/css/themes/.copy-dark.min.css_light ]; then
+ # Delete the files and restore the original
+ rm -rf /usr/local/hestia/web/css/themes/dark.min.css
+ cp /usr/local/hestia/web/css/themes/.copy-dark.min.css_light /usr/local/hestia/web/css/themes/dark.min.css
+ rm /usr/local/hestia/web/css/themes/.copy-dark.min.css_light
+ rm -rf /usr/local/hestia/web/css/themes/custom/max-theme-light.css
+
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} THEME UNINSTALLED SUCCESSFULLY! ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ else
+ echo ""
+ echo "${rojo}You don't have the theme installed! We can only uninstall it if the theme was previously installed.${reset}"
+ echo ""
+ exit
+ fi
+
+
+ ;;
+ [Nn]* )
+ # Doesn't uninstall the theme
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+ echo "${verde} GREAT! CONTINUE WITH YOUR THEME ${reset}"
+ echo "${gris}____________________________________________________________________________________________________${reset}"
+ echo ""
+
+ exit
+ ;;
+ * )
+ echo ""
+ echo "${rojo}The answer is invalid, you must answer with "Y/N or y/n".${reset}"
+ ;;
+ esac
+ done
+
+}
+
+
+# Loop for user response
+while true; do
+ # show menu
+ show_menu
+
+ # Read the option selected by the user
+ echo -n "${verde}Select an option [1-3]: ${reset}"
+ read opcion
+
+ # Evaluate the selected option
+ case $opcion in
+ 1)
+ instalar
+ ;;
+ 2)
+ desinstalar
+ ;;
+ 3)
+ exit
+ ;;
+ *)
+ echo "${rojo}Invalid option. Try again.${reset}"
+ sleep 3
+ ;;
+ esac
+done
diff --git a/install-light.sh b/install/light-es.sh
similarity index 95%
rename from install-light.sh
rename to install/light-es.sh
index b5eb40e..31588a6 100644
--- a/install-light.sh
+++ b/install/light-es.sh
@@ -30,7 +30,7 @@ show_menu() {
echo ""
echo " Max Theme Light para HestiaCP"
- echo " v2.0"
+ echo " v2.1"
echo " www.maxizamorano.com"
echo " https://github.com/MaxiZamorano"
echo ""
@@ -48,10 +48,10 @@ show_menu() {
#función para instalar o reinstalar el tema
instalar(){
- url="https://raw.githubusercontent.com/maxizamorano/maxtheme/release-dev/themes/max-theme-light/max-theme-light.css"
+ url="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-light/max-theme-light.css"
dir_archivo="/usr/local/hestia/web/css/themes/custom/max-theme-light.css"
- url_2="https://raw.githubusercontent.com/maxizamorano/maxtheme/release-dev/themes/max-theme-light/max-theme-light-login.css"
+ url_2="https://raw.githubusercontent.com/maxizamorano/maxtheme/main/themes/max-theme-light/max-theme-light-login.css"
dir_archivo_2="/usr/local/hestia/web/css/themes/max-theme-light-login.css"
# Verifica si la carpeta "/usr/local/hestia/web/css/themes/custom" existe, si no la crea
@@ -96,7 +96,7 @@ instalar(){
echo "${amarillo}LOGO PARA LA BARRA SUPERIOR DEL DASHBOARD ${reset}"
echo ""
echo "${cyan}Se recomienda que tu logo esté en formato ${amarillo}PNG, SVG o Webp${reset}"
- echo "${cyan}Utiliza un formato de URL correcto y en https, por ejmplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
+ echo "${cyan}Utiliza un formato de URL correcto y en https, por ejemplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo -n "${verde}Pega o escribe la URL de tu logo: ${reset}"
@@ -112,7 +112,7 @@ instalar(){
echo "${amarillo}LOGO PARA LA PANTALLA DE LOGIN O INICIO DE SESIÓN ${reset}"
echo ""
echo "${cyan}Se recomienda que tu logo esté en formato ${amarillo}PNG, SVG o Webp${reset}"
- echo "${cyan}Utiliza un formato de URL correcto y en https, por ejmplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
+ echo "${cyan}Utiliza un formato de URL correcto y en https, por ejemplo: ${amarillo}https://example.com/img/tu-logo.png${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo -n "${verde}Pega o escribe la URL de tu logo: ${reset}"
@@ -136,7 +136,7 @@ instalar(){
echo "${amarillo}IMAGEN DE FONDO PARA LA PANTALLA DE LOGIN O INICIO DE SESIÓN ${reset}"
echo ""
echo "${cyan}Se recomienda que la imagen tenga una resolución de ${amarillo}1920x1080px ${cyan}y esté en formato ${amarillo}PNG, JPG o Webp${reset}"
- echo "${cyan}Utiliza un formato de URL correcto y en https, por ejmplo: ${amarillo}https://example.com/img/tu-fondo.png${reset}"
+ echo "${cyan}Utiliza un formato de URL correcto y en https, por ejemplo: ${amarillo}https://example.com/img/tu-fondo.png${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo -n "${verde}Pega o escribe la URL de la imagen de fondo: ${reset}"
@@ -148,7 +148,7 @@ instalar(){
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo "${verde} ¡TEMA INSTALADO CORRECTAMENTE! ${reset}"
- echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automaticamente, debes cambiarlo desde el panel de control. ${reset}"
+ echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automáticamente, debes cambiarlo desde el panel de control. ${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
@@ -160,7 +160,7 @@ instalar(){
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""
echo "${verde} ¡TEMA INSTALADO CORRECTAMENTE! ${reset}"
- echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automaticamente, debes cambiarlo desde el panel de control. ${reset}"
+ echo "${cyan} NOTA: ${amarillo}si no se cambia el tema automáticamente, debes cambiarlo desde el panel de control. ${reset}"
echo "${gris}____________________________________________________________________________________________________${reset}"
echo ""