mirror of
https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git
synced 2024-09-03 19:36:27 +02:00
commit
ccaf0dcb62
5 changed files with 49 additions and 8 deletions
|
@ -22,11 +22,11 @@ $PROTECTED_READ = false;
|
||||||
|
|
||||||
// Some of those templates are using markitup, a convenient and advanced toolbar to edit the wiki.
|
// Some of those templates are using markitup, a convenient and advanced toolbar to edit the wiki.
|
||||||
|
|
||||||
//$TEMPLATE = 'templates/minimaxing/minimaxing.html'; // this one is the default skin for lionwiki-t2t
|
//$TEMPLATE = 'templates/minimaxing/minimaxing.html'; // this one was once the default skin for lionwiki-t2t
|
||||||
//$TEMPLATE = 'templates/minimaxing/minimaxing_links.html'; // this one is for a basic landpage without menu
|
//$TEMPLATE = 'templates/minimaxing/minimaxing_links.html'; // this one is for a basic landpage without menu
|
||||||
|
|
||||||
//$TEMPLATE = 'templates/red.html';
|
//$TEMPLATE = 'templates/red.html';
|
||||||
//$TEMPLATE = 'templates/txt2tags/txt2tags.html'; // used on the txt2tags wiki
|
//$TEMPLATE = 'templates/txt2tags/txt2tags.html'; // used once on the old txt2tags wiki (now offline)
|
||||||
|
|
||||||
|
|
||||||
//$TEMPLATE = 'templates/ElectricObsidian/ElectricObsidian.html'; // dark theme
|
//$TEMPLATE = 'templates/ElectricObsidian/ElectricObsidian.html'; // dark theme
|
||||||
|
@ -43,7 +43,7 @@ $PROTECTED_READ = false;
|
||||||
//$TEMPLATE = 'templates/newspaper/newspaper.html'; // light theme
|
//$TEMPLATE = 'templates/newspaper/newspaper.html'; // light theme
|
||||||
//$TEMPLATE = 'templates/stellar/index.html'; // in development
|
//$TEMPLATE = 'templates/stellar/index.html'; // in development
|
||||||
//$TEMPLATE = 'templates/editorial/index0.html'; // in development
|
//$TEMPLATE = 'templates/editorial/index0.html'; // in development
|
||||||
//$TEMPLATE = 'templates/blazekiss/blazekiss.html';
|
//$TEMPLATE = 'templates/blazekiss/blazekiss.html'; // deprecated
|
||||||
//$TEMPLATE = 'templates/sissou.html';
|
//$TEMPLATE = 'templates/sissou.html';
|
||||||
//$TEMPLATE = 'templates/fravashyo/fravashyo.html';
|
//$TEMPLATE = 'templates/fravashyo/fravashyo.html';
|
||||||
//$TEMPLATE = 'templates/dandelion.html';
|
//$TEMPLATE = 'templates/dandelion.html';
|
||||||
|
@ -58,7 +58,9 @@ $PROTECTED_READ = false;
|
||||||
//$TEMPLATE = 'templates/light.html';
|
//$TEMPLATE = 'templates/light.html';
|
||||||
//$TEMPLATE = 'templates/print.html';
|
//$TEMPLATE = 'templates/print.html';
|
||||||
//$TEMPLATE = 'templates/paper/paper.html';
|
//$TEMPLATE = 'templates/paper/paper.html';
|
||||||
$TEMPLATE = 'templates/mimoza/mimoza.html';
|
$TEMPLATE = 'templates/mimoza/mimoza.html'; // current default template
|
||||||
|
//$TEMPLATE = 'templates/cafe.html';
|
||||||
|
// $TEMPLATE = 'templates/smallweb/smallweb.html'; // not finished and not very good
|
||||||
//$TEMPLATE = 'templates/wikiss.html';
|
//$TEMPLATE = 'templates/wikiss.html';
|
||||||
//$TEMPLATE = 'templates/skeleton/skeleton.html'; // deprecated
|
//$TEMPLATE = 'templates/skeleton/skeleton.html'; // deprecated
|
||||||
//$TEMPLATE = 'templates/simple.html'; //
|
//$TEMPLATE = 'templates/simple.html'; //
|
||||||
|
|
|
@ -232,6 +232,17 @@ h6:hover span.par-edit {
|
||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* makes the top edit link invisible */
|
||||||
|
.editlink a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--couleur-primaire);
|
||||||
|
}
|
||||||
|
|
||||||
|
.editlink2 a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
/* Progress bar */
|
/* Progress bar */
|
||||||
progress {
|
progress {
|
||||||
color: var(--couleur-primaire);
|
color: var(--couleur-primaire);
|
||||||
|
|
|
@ -35,6 +35,13 @@
|
||||||
<link rel="stylesheet" href="templates/minimaxing/minimaxing.css" />
|
<link rel="stylesheet" href="templates/minimaxing/minimaxing.css" />
|
||||||
|
|
||||||
<script src="templates/js/less.js" type="text/javascript"></script>
|
<script src="templates/js/less.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Remove "alternate" in one of the style to make it default -->
|
||||||
|
<link rel="alternate stylesheet" type="text/css" media="screen" title="theme01 (Brick Red)" href="templates/minimaxing/minimaxing_theme01.css" />
|
||||||
|
<link rel="alternate stylesheet" type="text/css" media="screen" title="theme02 (Marron)" href="templates/minimaxing/minimaxing_theme02.css" />
|
||||||
|
<link rel="alternate stylesheet" type="text/css" media="screen" title="terminal solarized" href="templates/minimaxing/terminal_solarized.css" />
|
||||||
|
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
<!--
|
<!--
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
@ -150,6 +157,7 @@ $(document).ready(function() {
|
||||||
{SEARCH_FORM}{SEARCH_INPUT}{SEARCH_SUBMIT}{/SEARCH_FORM}
|
{SEARCH_FORM}{SEARCH_INPUT}{SEARCH_SUBMIT}{/SEARCH_FORM}
|
||||||
<br />
|
<br />
|
||||||
Design CC-BY-SA based on <a href="https://html5up.net/minimaxing">Minimaxing</a>. Powered by <a href="https://sourceforge.net/p/lionwiki-t2t/code/">LionWiki-t2t</a>
|
Design CC-BY-SA based on <a href="https://html5up.net/minimaxing">Minimaxing</a>. Powered by <a href="https://sourceforge.net/p/lionwiki-t2t/code/">LionWiki-t2t</a>
|
||||||
|
<br /> {RSS}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -33,6 +33,7 @@ ynh_setup_source --dest_dir="$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R "$app:www-data" "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -68,6 +69,10 @@ ynh_add_fpm_config
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
|
||||||
|
# chmod again to fix unaccessible templates / css files
|
||||||
|
chmod -R 755 "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -18,7 +18,8 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
if [[ -z "${password:-}" ]] || [[ -z "${color:-}" ]] || [[ -z "${wiki:-}" ]]; then
|
if [[ -z "${password:-}" ]] || [[ -z "${color:-}" ]] || [[ -z "${wiki:-}" ]]; then
|
||||||
password=$( grep -oP '^\$PASSWORD = sha1\(\"\K.*(?=\"\);$)' "$install_dir/config.php")
|
password=$( grep -oP '^\$PASSWORD = sha1\(\"\K.*(?=\"\);$)' "$install_dir/config.php")
|
||||||
wiki=$( grep -oP '^\$WIKI_TITLE = '"'\K.*(?=';)" "$install_dir/config.php")
|
wiki=$( grep -oP '^\$WIKI_TITLE = '"'\K.*(?=';)" "$install_dir/config.php")
|
||||||
color=$(grep -A1 'For YunoHost config' "$install_dir/templates/minimaxing/minimaxing.css" | grep -oP '^/\* @fg: #\K.*(?=;)')
|
# color=$(grep -A1 'For YunoHost config' "$install_dir/templates/minimaxing/minimaxing.css" | grep -oP '^/\* @fg: #\K.*(?=;)'|| true)
|
||||||
|
color=787878
|
||||||
|
|
||||||
if [[ -z "$password" ]] || [[ -z "$wiki" ]] || [[ -z "$color" ]]; then
|
if [[ -z "$password" ]] || [[ -z "$wiki" ]] || [[ -z "$color" ]]; then
|
||||||
yunohost_app="yunohost app"
|
yunohost_app="yunohost app"
|
||||||
|
@ -50,7 +51,8 @@ ynh_app_setting_set --app="$app" --key=color --value="$color"
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config.php pheditor.php menu.php config.t2t"
|
ynh_setup_source --dest_dir="$install_dir" --keep="config.php pheditor.php menu.php config.t2t var/pages/main.txt var/pages/todo.txt var/pages/sandbox.txt var/pages/links.txt var/pages/admin.txt"
|
||||||
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R "$app:www-data" "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
@ -71,8 +73,21 @@ ynh_backup_if_checksum_is_different --file="$install_dir/pheditor.php"
|
||||||
ynh_delete_file_checksum --file="$install_dir/config.php"
|
ynh_delete_file_checksum --file="$install_dir/config.php"
|
||||||
ynh_delete_file_checksum --file="$install_dir/pheditor.php"
|
ynh_delete_file_checksum --file="$install_dir/pheditor.php"
|
||||||
|
|
||||||
ynh_add_config --template="config.php" --destination="$install_dir/config.php"
|
# Do not overwrite existing configuration as it could have user customization's and settings.
|
||||||
ynh_add_config --template="pheditor.php" --destination="$install_dir/pheditor.php"
|
# Create file if it does not exist
|
||||||
|
if [ ! -f "$install_dir/config.php" ]; then
|
||||||
|
# Set the default settings
|
||||||
|
ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$install_dir/pheditor.php" ]; then
|
||||||
|
# Set the default settings
|
||||||
|
ynh_add_config --template="../conf/pheditor.php" --destination="$install_dir/pheditor.php"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# ynh_add_config --template="config.php" --destination="$install_dir/config.php"
|
||||||
|
# ynh_add_config --template="pheditor.php" --destination="$install_dir/pheditor.php"
|
||||||
|
|
||||||
mkdir -p "$install_dir/templates/minimaxing/"
|
mkdir -p "$install_dir/templates/minimaxing/"
|
||||||
ynh_delete_file_checksum --file="$install_dir/templates/minimaxing/minimaxing.less"
|
ynh_delete_file_checksum --file="$install_dir/templates/minimaxing/minimaxing.less"
|
||||||
|
|
Loading…
Reference in a new issue