1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git synced 2024-09-03 19:36:27 +02:00

upgrade to latest lionwiki

make mimoza default template
remove dependency to lessc which seems to be broken in debian
This commit is contained in:
farvardin 2023-03-17 12:29:40 +01:00
parent f8d81501bb
commit 24d5d2f635
6 changed files with 362 additions and 17 deletions

View file

@ -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

View file

@ -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,9 +20,10 @@ $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/txt2tags/txt2tags.html'; // used on the txt2tags wiki
@ -30,24 +31,37 @@ $TEMPLATE = 'templates/minimaxing/minimaxing.html'; // this one is the default s
//$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/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 = '<a href="./var/rss.xml">RSS</a>';
// if needed (if autodetection doesn't work), force language
//$LANG = fr;

327
conf/mimoza.css Normal file
View file

@ -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;
}

View file

@ -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",

View file

@ -7,7 +7,7 @@
YNH_PHP_VERSION="7.3"
# dependencies used by the app
pkg_dependencies="node-less"
#pkg_dependencies="node-less"
#=================================================
# PERSONAL HELPERS

View file

@ -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"