mirror of
https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git
synced 2024-09-03 19:36:27 +02:00
update color scheme script
This commit is contained in:
parent
aca3664ade
commit
bc1db8147b
4 changed files with 25 additions and 6 deletions
|
@ -51,7 +51,7 @@ You can create your own manuscript / handwriting font on http://www.myscriptfont
|
|||
@MainColor: #549136;
|
||||
|
||||
/* For YunoHost config */
|
||||
@MainColor: __YNH_COLOR__;
|
||||
@MainColor: #__YNH_COLOR__;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -99,14 +99,14 @@
|
|||
"name": "color",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Set default color base",
|
||||
"en": "Set color base",
|
||||
"fr": "Définissez la couleur de base"
|
||||
},
|
||||
"help": {
|
||||
"en": "Use hexadecimal value",
|
||||
"fr": "Utilisez une valeur hexadecimale"
|
||||
"en": "Use hexadecimal value (6 figures without #)",
|
||||
"fr": "Utilisez une valeur hexadecimale (6 chiffres sans # devant)"
|
||||
},
|
||||
"example": "#D07732"
|
||||
"example": "D07732"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="node-less"
|
||||
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -183,6 +183,10 @@ ynh_add_fpm_config
|
|||
cp ../conf/config.php $final_path/
|
||||
|
||||
cp ../conf/minimaxing.less $final_path/templates/minimaxing/
|
||||
#cp ../conf/minimaxing.css $final_path/templates/minimaxing/
|
||||
|
||||
# we already use the default html template
|
||||
#cp ../conf/minimaxing.html $final_path/templates/
|
||||
|
||||
# Set the password
|
||||
ynh_replace_string --match_string="__YNH_PASSWORD__" --replace_string="$password" --target_file="$final_path/config.php"
|
||||
|
@ -194,7 +198,20 @@ ynh_replace_string --match_string="__YNH_LANG__" --replace_string="$language"
|
|||
|
||||
ynh_replace_string --match_string="__YNH_LABEL__" --replace_string="$wiki" --target_file="$final_path/config.php"
|
||||
|
||||
# test if the color was correctly set (6 hexadecimal values)
|
||||
if echo "$color" | grep -q -E '[A-Fa-f0-9]{6}'
|
||||
then
|
||||
ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="$color" --target_file="$final_path/templates/minimaxing/minimaxing.less"
|
||||
else
|
||||
ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="555555" --target_file="$final_path/templates/minimaxing/minimaxing.less"
|
||||
fi
|
||||
|
||||
lessc --js $final_path/templates/minimaxing/minimaxing.less > $final_path/templates/minimaxing/minimaxing.css
|
||||
|
||||
|
||||
|
||||
|
||||
#ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="$color" --target_file="$final_path/templates/minimaxing/minimaxing.css"
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue