From 24d5d2f635acc514c30fa4d78332b607e5eaece0 Mon Sep 17 00:00:00 2001 From: farvardin Date: Fri, 17 Mar 2023 12:29:40 +0100 Subject: [PATCH] upgrade to latest lionwiki make mimoza default template remove dependency to lessc which seems to be broken in debian --- conf/app.src | 2 +- conf/config.php | 31 +++-- conf/mimoza.css | 327 +++++++++++++++++++++++++++++++++++++++++++++ manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/install | 15 ++- 6 files changed, 362 insertions(+), 17 deletions(-) create mode 100644 conf/mimoza.css diff --git a/conf/app.src b/conf/app.src index 710a0cf..ba88909 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://sourceforge.net/projects/lionwiki-t2t/files/lionwiki-t2t.zip -SOURCE_SUM=5b7397da673c63f0207a5a832c33f3181e715948ffcf47d95d85bd7231215eda +SOURCE_SUM=2cdbc0b08db4ee03d01f2c2cecbbeeda8ed705dd19a87eb1902d629afb3587bd SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/config.php b/conf/config.php index bf183fc..392fcbb 100755 --- a/conf/config.php +++ b/conf/config.php @@ -12,7 +12,7 @@ $WIKI_TITLE = '__YNH_LABEL__'; // name of the site $PASSWORD = sha1("__YNH_PASSWORD__"); $Admin["PASSWORD"] = sha1("__YNH_PASSWORD__"); -// if true, you need to fill password for reading pages too +// if true, you need to enter the password for entering the wiki and reading pages. // before setting to true, read http://lionwiki.0o.cz/index.php?page=UserGuide%3A+How+to+use+PROTECTED_READ $PROTECTED_READ = false; @@ -20,34 +20,48 @@ $PROTECTED_READ = false; /* **** SKINS **** */ -// 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 +//$TEMPLATE = 'templates/minimaxing/minimaxing.html'; // this one is the default skin for lionwiki-t2t +//$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/ElectricObsidian/ElectricObsidian.html'; // dark theme //$TEMPLATE = 'templates/literature/literature.html'; // light theme -//$TEMPLATE = 'templates/newspaper/newspaper.html'; // light theme -//$TEMPLATE = 'templates/bootstrap/bootstrap.html'; // bootstrap look. The navbar collapse menu no longer work at the moment + +//$TEMPLATE = 'templates/bootstrap/bootstrap.html'; // bootstrap + + // Those templates are more minimalistic and use only a basic toolbar: //$TEMPLATE = 'templates/ggp/ggp.html'; +//$TEMPLATE = 'templates/newspaper/newspaper.html'; // light theme +//$TEMPLATE = 'templates/stellar/index.html'; // in development +//$TEMPLATE = 'templates/editorial/index0.html'; // in development //$TEMPLATE = 'templates/blazekiss/blazekiss.html'; //$TEMPLATE = 'templates/sissou.html'; //$TEMPLATE = 'templates/fravashyo/fravashyo.html'; //$TEMPLATE = 'templates/dandelion.html'; +//$TEMPLATE = 'templates/flexbox.html'; // in development //$TEMPLATE = 'templates/minimal.html'; //$TEMPLATE = 'templates/terminal/terminal.html'; //$TEMPLATE = 'templates/terminal_green.html'; //$TEMPLATE = 'templates/terminal_white.html'; +//$TEMPLATE = 'templates/geek/geek.html'; +//$TEMPLATE = 'templates/brut/brut.html'; // ugly colors and brutism aesthetics +//$TEMPLATE = 'templates/lagrange/lagrange.html'; // looks like the gemini browser lagrange //$TEMPLATE = 'templates/light.html'; -//$TEMPLATE = 'templates/print.html'; -//$TEMPLATE = 'templates/skeleton.html'; // doesn't work well yet +//$TEMPLATE = 'templates/print.html'; +//$TEMPLATE = 'templates/paper/paper.html'; +$TEMPLATE = 'templates/mimoza/mimoza.html'; +//$TEMPLATE = 'templates/wikiss.html'; +//$TEMPLATE = 'templates/skeleton/skeleton.html'; // deprecated +//$TEMPLATE = 'templates/simple.html'; // /* **** MORE OPTIONS **** */ @@ -55,6 +69,7 @@ $NO_HTML = true; // XSS protection $START_PAGE = 'main'; // Which page should be default (start page)? +$RSS = 'RSS'; // if needed (if autodetection doesn't work), force language //$LANG = fr; diff --git a/conf/mimoza.css b/conf/mimoza.css new file mode 100644 index 0000000..3ba47b6 --- /dev/null +++ b/conf/mimoza.css @@ -0,0 +1,327 @@ +:root { + --couleur-primaire: #__YNH_COLOR__; + + --underline-max-width: 100%; + --underline-hover-width: 0; + --underline-idle-width: var(--underline-max-width); + --underline-x: calc(var(--underline-max-width) * 0); + --underline-img: linear-gradient(0deg, currentColor, currentColor); + --external-link-content: ""; +} + +*, +::before, +::after { + box-sizing: border-box; +} + +@font-face { + font-family: "Luciole"; + src: url("../fonts/Luciole-Regular.woff") format("woff"), + url("../fonts/Luciole-Regular.woff2") format("woff2"); + font-style: normal; + font-weight: normal; + text-rendering: optimizeLegibility; +} + +@font-face { + font-family: "Luciole"; + src: url("../fonts/Luciole-Bold.woff") format("woff"), + url("../fonts/Luciole-Bold.woff2") format("woff2"); + font-style: normal; + font-weight: 700; + text-rendering: optimizeLegibility; +} + +@font-face { + font-family: "Luciole"; + src: url("../fonts/Luciole-Italic.woff") format("woff"), + url("../fonts/Luciole-Italic.woff2") format("woff2"); + font-style: italic; + font-weight: normal; + text-rendering: optimizeLegibility; +} + +@font-face { + font-family: "Luciole"; + src: url("../fonts/Luciole-BoldItalic.woff") format("woff"), + url("../fonts/Luciole-BoldItalic.woff2") format("woff2"); + font-style: italic; + font-weight: 700; + text-rendering: optimizeLegibility; +} + +html { + font-family: "Luciole", Arial, Helvetica, sans-serif; +} + +body { + margin: 0; + font-size: 1.125rem; + line-height: 1.4; +} + +header { + background-color: var(--couleur-primaire); +} + +header .container { + display: flex; + justify-content: flex-end; +} + +header a { + color: white; +} + +header ul { + display: flex; + align-items: center; + list-style: none; + gap: 1rem; + flex-wrap: wrap; +} + +header li + li { + margin-top: 0; +} + +footer { + padding-top: 1rem; + padding-bottom: 1rem; + border-top: 4px solid var(--couleur-primaire); +} + +main { + max-width: 70ch; + min-height: 80vh; + margin: 0 auto; + padding-top: 3rem; + padding-bottom: 3rem; +} + +.container { + max-width: 1000px; + width: 100%; + margin: 0 auto; + padding-right: 1rem; + padding-left: 1rem; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin-top: 0; +} + +h1 { + font-size: 3rem; + color: var(--couleur-primaire); +} + +h2 { + font-size: 2.25rem; +} +p ~ h2, +p ~ h3, +p ~ h4, +p ~ h5, +p ~ h6 { + margin-top: 3rem; +} + +h3 { + margin-bottom: 1.6rem; + font-size: 1.8rem; +} + +h4 { + margin-bottom: 1.4rem; + font-size: 1.4rem; +} + +h5 { + margin-bottom: 1.25rem; + font-size: 1.25rem; +} + +h6 { + margin-bottom: 1rem; + font-size: 1.125rem; +} + +a { + color: var(--couleur-primaire); + text-decoration: none; +} + +a[href]:active, +a[href]:hover { + --underline-hover-width: var(--underline-max-width); +} + +[href] { + background-image: var(--underline-img), var(--underline-img); + background-position: var(--underline-x) 100%, + var(--underline-x) calc(100% - 0.0625em); + background-repeat: no-repeat, no-repeat; + background-size: var(--underline-hover-width) 0.125em, + var(--underline-idle-width) 0.0625em; + transition: background-size 0s; +} + +li + li, +li > ul, +li > ol { + margin-top: 0.5rem; +} + +blockquote { + margin-right: 0; + margin-left: 0; + padding: 0.5rem 1rem; + border-left: 4px solid var(--couleur-primaire); +} + +blockquote p { + margin: 0; +} + +blockquote p + p { + margin-top: 1rem; +} + +code { + padding: 0.2rem; + background-color: #abe1c3; +} + +pre { + padding: 1rem; + color: white; + background-color: black; +} +pre code { + background: none; +} + +img { + max-width: 100%; +} + + +/* lionwiki */ + +h2 span.par-edit, +h3 span.par-edit, +h4 span.par-edit, +h5 span.par-edit, +h6 span.par-edit { + float: right; + display: none; +} +h2:hover span.par-edit, +h3:hover span.par-edit, +h4:hover span.par-edit, +h5:hover span.par-edit, +h6:hover span.par-edit { + display: inline; + font-size: small; +} + +/* Progress bar */ +progress { + color: var(--couleur-primaire); + background-color: white; + /*border-radius: 4px; */ + border-radius: 0px; + border: solid 1px; + width: 10em; + height: 1em; + -webkit-appearance: none; +} +progress::-moz-progress-bar { + background: var(--couleur-primaire); +} +progress::-webkit-progress-value { + background: var(--couleur-primaire); +} +progress::-webkit-progress-bar { + background: white; +} +/* Big buttons */ +.block { + display: inline-block; + width: 65%; + border: 2px solid var(--couleur-primaire); + background-color: var(--couleur-primaire); + /*height: 50px;*/ + margin-top: 8px; + margin-bottom: 8px; + /*font-family: Ubuntu;*/ + padding-left: 2px; + padding-right: 2px; + font-size: 16px; + color: var(--couleur-primaire); + /*cursor: pointer;*/ + text-align: center; + vertical-align: middle; + /*transition: box-shadow 0.25s cubic-bezier(0.08, 0.59, 0.29, 0.99) 0s, color 0.25s cubic-bezier(0.08, 0.59, 0.29, 0.99) 0s, border-color 0.25s cubic-bezier(0.08, 0.59, 0.29, 0.99) 0s, transform 0.25s cubic-bezier(0.08, 0.59, 0.29, 0.99) 0s, background-color 0.25s cubic-bezier(0.08, 0.59, 0.29, 0.99) 0s;*/ + border-radius: 0px; +} +.block a { + display: inline-block; + min-width: 100%; + padding: 0px; + padding-top: 0px; + height: 46px; + line-height: 46px; + color: #fff; + text-decoration: none; + border-radius: 0px; +} +/*.block:hover, */ +.block a:hover { + /*border: 2px solid @HeaderColor;*/ + background-color: #fff; + color: var(--couleur-primaire); + margin-left: -2px; + margin-right: -2px; + padding-left: 2px; + padding-right: 2px; +} + +/* Todotxt support */ +.todotxt_A { + color: #082d46; +} +.todotxt_B { + color: #1b2267; +} +.todotxt_C { + color: #462873; +} +.todotxt_D { + color: #76377d; +} +.todotxt_E { + color: #8a446e; +} +.todotxt_F { + color: #527a95; +} +.todotxt_context { + color: #5d2c0b; +} +.todotxt_tag { + color: #550b5d; +} +.todotxt_deleted { + opacity: 0.4; +} +.todotxt_date { + background-color: #f2f2f2; +} diff --git a/manifest.json b/manifest.json index 641e14d..f767eec 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Lightweight wiki-style CMS using the txt2tags syntax", "fr": "CMS léger, géré sous forme de wiki utilisant la syntaxe txt2tags" }, - "version": "3.2.12~ynh2", + "version": "3.2.12~ynh3", "url": "https://lionwiki-t2t.sourceforge.io/", "upstream": { "license": "MIT", diff --git a/scripts/_common.sh b/scripts/_common.sh index b6889c4..61fa65b 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ YNH_PHP_VERSION="7.3" # dependencies used by the app -pkg_dependencies="node-less" +#pkg_dependencies="node-less" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index efb404d..9811b07 100755 --- a/scripts/install +++ b/scripts/install @@ -111,7 +111,8 @@ ynh_script_progression --message="Adding a configuration file..." cp ../conf/config.php $final_path/ cp ../conf/minimaxing.less $final_path/templates/minimaxing/ -cp ../conf/minimaxing.css $final_path/templates/minimaxing/minimaxing_org.css +cp ../conf/minimaxing.css $final_path/templates/minimaxing/minimaxing.css +cp ../conf/mimoza.css $final_path/templates/mimoza/ cp ../conf/pheditor.php $final_path/ @@ -130,7 +131,6 @@ pheditorhash=`python -c 'import hashlib; import sys; a=str(sys.argv[1]); print(h ynh_replace_string --match_string="__YNH_PASSWORD__" --replace_string="$pheditorhash" --target_file="$final_path/pheditor.php" - ynh_replace_string --match_string="__YNH_LANG__" --replace_string="$language" --target_file="$final_path/config.php" ynh_replace_string --match_string="__YNH_LABEL__" --replace_string="$wiki" --target_file="$final_path/config.php" @@ -145,19 +145,22 @@ 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" ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="$color" --target_file="$final_path/templates/ggp/ggp.less" + ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="$color" --target_file="$final_path/templates/mimoza/mimoza.css" else ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="555555" --target_file="$final_path/templates/minimaxing/minimaxing.less" ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="555555" --target_file="$final_path/templates/ggp/ggp.less" + ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="555555" --target_file="$final_path/templates/mimoza/mimoza.css" fi +## lessc seems to have a dependancy problem in debian, even with the node-tslib package it complains "Cannot find module "tslib"" +## so we'll use basic css instead at the moment + # soon lessc will require the --js option # lessc --js $final_path/templates/minimaxing/minimaxing.less > $final_path/templates/minimaxing/minimaxing.css -lessc $final_path/templates/minimaxing/minimaxing.less > $final_path/templates/minimaxing/minimaxing.css +#lessc $final_path/templates/minimaxing/minimaxing.less > $final_path/templates/minimaxing/minimaxing.css +#lessc $final_path/templates/ggp/ggp.less > $final_path/templates/ggp/ggp.css -lessc $final_path/templates/ggp/ggp.less > $final_path/templates/ggp/ggp.css - -#ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="$color" --target_file="$final_path/templates/minimaxing/minimaxing.css" ynh_store_file_checksum --file="$final_path/config.php" ynh_store_file_checksum --file="$final_path/config.t2t"