diff --git a/README.md b/README.md index 6f62c70..7bf4264 100755 --- a/README.md +++ b/README.md @@ -19,66 +19,12 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in LionWiki-t2t is a minimalist Wiki engine programmed in PHP. It is extensible, templatable, file based (it doesn't need database like MySQL) and requires just one file to function (30 kb). It is suitable for small websites, personal notebooks or journals. This version is using the lightweight markup language TXT2TAGS. -**Shipped version:** 3.2.12~ynh4 +**Shipped version:** 3.2.12~ynh5 ## Screenshots ![Screenshot of Lionwiki](./doc/screenshots/screenshot_lionwikit2t.png) -## Disclaimers / important information - -## Configuration - -In the root folder of this app, there are two files: `config.php` and `config.t2t` - -- `config.php` is for changing password, the template used, default page. You can also define an administrator password which has some more rights (it's possible to lock some pages and modify them only with the administrator password, add some IP address to a blacklist) - -- `config.t2t` is for tweaking your wiki syntax. You can define more tags (using the txt2tags rules) for specific behaviors. - -The `pheditor.php` tool at the root of the site allows you to edit all the necessary configuration files. You can remove or rename it from its interface. The password is the same as the one defined during installation. - -#### Multi-users support - -This is only a single password for editing the wiki (it's not multi-user), and one other password for administration. Both are set to the same one defined in the lionwiki-t2t during the installation by YunoHost. - -You can set the wiki to private (only readable when you are connected to YunoHost SSO) or public (readable by the whole internet). - -You can install multiple instance of this app. - -## Additional information - -You must define a base color during the installation (in hexadecimal format). You can choose it using this online tool for example: https://www.w3schools.com/colors/colors_picker.asp - -It will modify the `templates/minimaxing/minimaxing.less` file and compile it using the lessc command (from the node-less package). - -After the installation, you can edit the base color found in `/var/www/lionwikit2t/templates/minimaxing/minimaxing.less` file. - -Search for: - -``` -/* For YunoHost config */ -@MainColor: #D17732; -``` - -Go inside your installation folder (adapt it to your case, if it's the second instance you've installed, it will be named /var/www/lionwikit2t__2/): - -``` -cd /var/www/lionwikit2t -``` - -Then compile it with: - -``` -lessc templates/minimaxing/minimaxing.less > templates/minimaxing/minimaxing.css -``` - -If something goes wrong, you can go back to the original default file: - -``` -cp templates/minimaxing/minimaxing_org.css templates/minimaxing/minimaxing.css -``` - - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index d768a8a..d52515a 100755 --- a/README_fr.md +++ b/README_fr.md @@ -19,64 +19,12 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Lionwiki-t2t est un système de type wiki minimaliste, programmé en PHP. Il est extensible et n'utilise que des fichiers plats pour sa base de données. Il est adapté pour la création de petits sites web, de notes personnelles ou de journaux. Cette version utilise le langage de balisage léger TXT2TAGS. -**Version incluse :** 3.2.12~ynh4 +**Version incluse :** 3.2.12~ynh5 ## Captures d’écran ![Capture d’écran de Lionwiki](./doc/screenshots/screenshot_lionwikit2t.png) -## Avertissements / informations importantes - -## Configuration - -Dans le dossier racine de l'application il y a 2 fichiers, `config.php` et `config.t2t` - -- config.php permet de modifier le mot de passe, le choix du template utilisé et la page par défaut. Vous pouvez également définir ici un mot de passe administrateur (pour bloquer certaines pages en édition) - -- `config.t2t` est pour customiser votre syntaxe wiki. Vous pouvez définir là de nouvelles balises (utilisant les règles txt2tags) pour des comportements spécifiques. - -- L'outil `pheditor.php` à la racine du site permet d'éditer tous les fichiers de configuration nécessaires. Vous pouvez le retirer ou le renommer depuis son interface. Le mot de passe est le même que celui définit lors de l'installation. - -#### Support multi-utilisateurs - -Il y a un seul mot de passe pour éditer ce wiki (dans le fichier config.php), et un autre pour l'administration. C'est le même qui a a été créé lors de l'installation par YunoHost. - -Vous pouvez passer le wiki en mode privé ou public, selon vos usages. - -## Informations additionnelles - -Vous devez définir une couleur de base durant l'installation, au format hexadécimal. Vous pouvez la choisir en utilisant cet outil en ligne : https://www.w3schools.com/colors/colors_picker.asp - -La couleur choisie va modifier le fichier `templates/minimaxing/minimaxing.less` et le compiler en utilisant la commande lessc (du paquet node-less). - -Après l'installation, vous pouvez éditer la couleur de base dans le fichier `/var/www/lionwikit2t/templates/minimaxing/minimaxing.less` - -Recherchez pour : - -``` -/* For YunoHost config */ -@MainColor: #D17732; -``` - -Allez dans le dossier d'installation (à adapter à votre cas, si c'est la seconde instance installée, cela sera nommé `/var/www/lionwikit2t__2/`) : - -``` -cd /var/www/lionwikit2t -``` - -Ensuite compilez le fichier avec : - -``` -lessc templates/minimaxing/minimaxing.less > templates/minimaxing/minimaxing.css -``` - -Si quelque chose se passe mal, vous pouvez revenir au fichier original : - -``` -cp templates/minimaxing/minimaxing_org.css templates/minimaxing/minimaxing.css -``` - - ## Documentations et ressources * Site officiel de l’app : diff --git a/check_process b/check_process deleted file mode 100755 index 53cffea..0000000 --- a/check_process +++ /dev/null @@ -1,28 +0,0 @@ -;; Test complet - auto_remove=1 - ; Manifest - domain="domain.tld" - path="/path" - is_public=1 - language="en" - admin="john" - password="azerty1234" - wiki="My Wiki" - color="328cc1" - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - # 3.2.12~ynh1 - upgrade=1 from_commit=a59e01aec10bd3a749ce062d2931906151d8f8be - backup_restore=1 - multi_instance=1 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none diff --git a/conf/app.src b/conf/app.src deleted file mode 100755 index b9a461e..0000000 --- a/conf/app.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://sourceforge.net/projects/lionwiki-t2t/files/lionwiki-t2t.zip -SOURCE_SUM=081a05b07446183da5cf065b07cab2baaabe69e57d11b61c0aaf3d187ee2ff30 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=true diff --git a/conf/config.php b/conf/config.php index 392fcbb..c523952 100755 --- a/conf/config.php +++ b/conf/config.php @@ -1,16 +1,16 @@ -RSS'; -// if needed (if autodetection doesn't work), force language +// if needed (if autodetection doesn't work), force language //$LANG = fr; -$LANG = __YNH_LANG__; +$LANG = __LANGUAGE__; /* see the file config.t2t to tweak the syntax and even more! */ diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100755 index 0000000..e69de29 diff --git a/conf/ggp.html b/conf/ggp.html deleted file mode 100755 index 35ff878..0000000 --- a/conf/ggp.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - {PAGE_TITLE_HEAD - }{WIKI_TITLE} - - - - - {HEAD} - - - - - -
- -
-
-

{PAGE_TITLE} {( plugin:VERSIONS_LIST )}

-
- - {
ERROR
} - {CONTENT} - {plugin:TAG_LIST} - {CONTENT_FORM} - - - -
- - - - - - - - - - - -
{RENAME_TEXT }{RENAME_INPUT }{plugin:TOOLBAR_TEXTAREA}{SHOW_PAGE   }{SYNTAX}
{CONTENT_TEXTAREA}
{FORM_PASSWORD}{ FORM_PASSWORD_INPUT}{ plugin:CAPTCHA_QUESTION}{ plugin:CAPTCHA_INPUT}{ EDIT_SUMMARY_TEXT}{ EDIT_SUMMARY_INPUT}{ CONTENT_SUBMIT}{ CONTENT_PREVIEW}{plugin:RESIZE_TEXTAREA}
- {/CONTENT_FORM}
- - -
{SEARCH_FORM}{SEARCH_INPUT}{SEARCH_SUBMIT}{/SEARCH_FORM} Powered by LionWiki-t2t -
- -
- -
- - diff --git a/conf/ggp.less b/conf/ggp.less deleted file mode 100755 index afdd8a4..0000000 --- a/conf/ggp.less +++ /dev/null @@ -1,551 +0,0 @@ -/*----- - © 2012 GGP & al.jes, certains droits réservés… - http://geekygoblin.org - http://aljes.me - Cette oeuvre est libre, vous pouvez la copier, la diffuser et la modifier selon les termes de la licence Art Libre - http://www.artlibre.org - http://geekygoblin.org/mentions.htm ------*/ - -/* 0 - Préliminaires */ - - - - -/* font colors:*/ -@MainColor: #__YNH_COLOR__; -/* or D17732 */ -@FontColor: darken(desaturate(@MainColor, 80%),30%) ; -@SecondaryColor: spin(@LinkColor, 25) ; -@LinkColor: @MainColor; -@LinkColorHover: spin(@LinkColor, 180) ; - -/* background color: */ -@BackgroundColor: #fAfAfA; - -/*@BackgroundColor: contrast(@FontColor,#444,#999) ;*/ -/*@BackgroundColor: contrast(@FontColor) ; */ - -/*@BackgroundColor: mix(@MainColor, @LinkColor) ; */ - - - - - - -/* for diff tool */ -@RedBrick: #7F4736; - -/* INITIAL SETTINGS -@MainColor: #292929 ; -@SecondaryColor: #42C200 ; -@LinkColor: #328cc1 ; -@LinkColorHover: #d9b310 ; -@BackgroundColor: #FAFAFA ; -*/ - - -/* 1 - Typographie */ - -@MainFontFamily: Fengardo; -@MainFontFamilyEdit:Fengardo; - -@font-face { - font-family: @MainFontFamily; - font-style: normal; - font-weight: normal; - src: url(../fonts/fengardoneue-regular.woff) format('woff'), url(../fonts/fengardoneue-regular.otf) format('opentype'), url(../fonts/fengardoneue-regular.svg) format('svg'); -} - -@font-face { - font-family: Fengardo; - font-style: italic; - src: url(../fonts/fengardoneue-italic.otf) format('opentype'); -} - -@font-face { - font-family: Fengardo; - font-weight: bold; - /*font-weight: 500;*/ - src: url(../fonts/fengardoneue-black.woff) format('woff'), url(../fonts/fengardoneue-black.otf) format('opentype'), url(../fonts/fengardoneue-black.svg) format('svg'); -} - -/* 2 - Général */ - -#header li {float: left; list-style: none; position: relative; width: 25%; } - -/*ul li {list-style: none;} -ul li::before {content: "– ";}*/ -/*hr::after {content: "⁂";}*/ -/* 3 - Titres */ -/* 4 - Menus */ -/* 5 - Colophon */ - -* { - border: 1; - box-sizing: border-box; - font: inherit; - font-size: 100%; - line-height: 1.5 !important; - max-width: 100%; - /*outline: 0; - text-decoration: none;*/ - vertical-align: baseline; -} -html { - background-color: @BackgroundColor; - color: @FontColor; - font-family: Fengardo, sans-serif; - font-size: 125%; - -epub-hyphens: auto; - -moz-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; - text-align: justify; -} -body { - margin: 0 auto; - max-width: 700px; - width: 85%; -} -img.border { - border: solid 1px @MainColor; -} -em, i { - font-style: italic; -} -strong, b { - font-weight: bold; -} - -b i { - font-weight: bolder; - font-weight: 900; - font-style: italic; -} - -li { - ul { - margin-top: 0.5rem; - margin-bottom: 0.5rem; - margin-left: 0rem; - } - ol { - margin-bottom: 0; - margin-left: 2rem; - } - dl { - margin-bottom: 0; - margin-left: 2rem; - } -} -dd { - ul { - margin-bottom: 0; - margin-left: 2rem; - } - ol { - margin-bottom: 0; - margin-left: 2rem; - } - dl { - margin-bottom: 0; - margin-left: 2rem; - } -} -blockquote { - margin-left: 1rem; - p { - &::before { - content: "— "; - } - } -} -q { - &::before { - content: "« "; - } - &::after { - content: " »"; - } -} -code { - font-family: monospace; - font-size: 0.8rem; - -epub-hyphens: none; - -moz-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} -pre { - code { - display: block; - overflow: auto; - } -} -a { - /* border-bottom: 1px solid @SecondaryColor; */ - color: inherit; - margin-bottom: -1px; - text-decoration: none; - color: @LinkColor; - &:hover { - border-color: inherit; - color: @LinkColorHover; - text-decoration: underline; - } - &:focus { - border-color: inherit; - color: @LinkColorHover; - text-decoration: none; - } -} -abbr { - border-bottom: 1px dashed @SecondaryColor; - margin-bottom: -1px; -} -acronym { - border-bottom: 1px dashed @SecondaryColor; - margin-bottom: -1px; -} -a.definition { - border-bottom: 1px dashed @SecondaryColor; - margin-bottom: -1px; -} -a.no-border { - border: 0; -} -hr { - border: 1; - /*height: 1rem;*/ - margin: 1rem auto; - width: 1; -} -.skip { - font-size: 0.7rem; - margin-bottom: 0.3rem; - text-align: right; - p { - margin: 0; - } - a { - margin-left: 1rem; - } -} - -/* disable par-edit visibility anytime */ - -h2 .par-edit,h3 .par-edit,h4 .par-edit,h5 .par-edit,h6 .par-edit{visibility:hidden;font-size:x-small;} - -h2:hover .par-edit,h3:hover .par-edit,h4:hover .par-edit,h5:hover .par-edit,h6:hover .par-edit{visibility:visible} - - -h1 { - font-family: Fengardo; - text-align: center; - font-size: 1.6rem; - font-weight: bold; - margin: 1.1rem 0; - text-transform: uppercase; -} -h2 { - text-align: center; - font-size: 1.5rem; - font-weight: bold; - margin: 1rem 0 0.5rem 0; - font-variant: small-caps; -} -h3 { - text-align: left; - font-size: 1.3rem; - font-weight: bold; - margin: 0.7rem 0 0 0; - font-variant: small-caps; -} -h4 { - text-align: left; - font-size: 1.2rem; - margin: 0.8rem 0 0 0; - font-style: italic; - font-variant: normal; - font-weight: normal; - text-transform: none; -} -h5 { - text-align: left; - font-size: 1.1rem; - margin: 0.9rem 0 0 0; - font-style: italic; - font-variant: normal; - font-weight: normal; - text-transform: none; -} -h6 { - text-align: left; - font-size: 1rem; - font-style: italic; - font-variant: normal; - font-weight: normal; - text-transform: none; -} - -table { - border-collapse: collapse; - empty-cells: show; - border-spacing: 0; - border: 2px solid #999; - margin: 10px 10px 20px 50px; - padding: 10px 10px 10px 10px; -} - -th, -td { - padding: .3em .5em; - margin: 5; - vertical-align: top; - border: 1px solid #999; - text-align: left; -} -.form th, -td { - padding: .3em .5em; - /*margin: 0;*/ - vertical-align: top; - border: 1px solid #999; - text-align: left; -} -th { - font-weight: bold; - background-color: #ddd; -} -[dir=rtl] td, -[dir=rtl] th { - text-align: right; -} - - -.sub { - font-size: 1rem; - font-style: italic; - font-variant: normal; - font-weight: normal; - text-transform: none; -} -.menu { - text-align: center; - li { - display: inline-block; - list-style: none; - margin: 0 1rem; - &::before { - content: ""; - } - } -} -.table { - li { - list-style-type: lower-roman; - } -} -.sommaire { - li { - list-style-type: none; - } -} -.colophon { - font-size: 0.6rem; - margin-top: 1rem; - text-align: center; -} -.logo { - font-size: 0.6rem; - margin-top: 1rem; - text-align: center; - a { - border: 0; - } - img { - width: 20%; - } -} - -#editor table { - border: 0px solid #999; -} - - -#editor td { - border: 0px solid #999; -} - - - -/* LionWiki specific */ - -a.pending { - color: @RedBrick; -} -h2 span.par-edit, h3 span.par-edit, h4 span.par-edit, h5 span.par-edit, h6 span.par-edit { - /*float: right;*/ - display: none; - font-size: small; -} -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; -} -h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { - background-color: transparent; -} -.pageLinks { - padding-left: 1em; - padding-right: 1em; - margin-top: 0; - margin-bottom: 0; -} -.pageLinks a { - font-weight: bold; - text-decoration: none; -} -#headerLinks td { - border-bottom: 1px dashed #ccc !important; -} -#footerLinks td { - border-top: 1px dashed #ccc !important; -} -#mainContent { - padding: 1em; - background-color: white; -} -#mainContent h2:first-child { - margin-top: 0px; -} -.error { - color: #F25A5A; - font-weight: bold; -} -.contentTextarea { - width: 90%; - font-family: @MainFontFamilyEdit; - font-size: 105%; -} -#diff { - white-space: pre-wrap; - word-wrap: break-word; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - width: 97%; -} -#diff ins { - color: green; - text-decoration: none; - font-weight: bold; -} -#diff del { - color: red; - text-decoration: line-through; -} -#diff .orig { - color: #666; -} -#toc { - /*border: 1px dashed #11141A;*/ - margin: 2em 1em 2em 1em; - padding: 5px 5px 5px 5px; - /*float: right;*/ - padding-right: 2em; - /*text-align: right;*/ - list-style: none; - background: #eee; - clear: none; - display: block; -} -#toc ul { - list-style: none; - padding-left: 1em; -} -#toc li { - /*font-size: 11px;*/ - padding-left: 1em; -} - -/* Plugins LionWiki*/ - -.tagList { - padding: 0.2em 0.4em 0.2em 0.4em; - margin-top: 0.5em; - border: 1px dashed #31343A; - background: #eee; - clear: right; -} -.tagCloud { - float: right; - width: 200px; - padding: 0.5em; - margin: 1em; - border: 1px dashed #31343A; - background: #eee; - clear: right; -} -.pageVersionsList { - letter-spacing: 0px; - font-variant: normal; - font-size: 12px; -} -table.wikitable { - border-collapse: collapse; - border: 1px solid #ccc; -} -table.wikitable td { - border: 1px solid #ccc; - text-align: center; - vertical-align: middle; - padding: 2px; -} -table.wikitable td.em { - background: #ccc; - font-weight: bold; -} -table, #previewPane table { - border-collapse: collapse; - empty-cells: show; - border-spacing: 0; - border: 1px solid #999; -} -.form table { - border-collapse: collapse; - empty-cells: hide; - border-spacing: 0; - border: 0px solid #fff; -} -th, td, #previewPane th, #previewPane td { - padding: .3em .5em; - margin: 0; - vertical-align: top; - border: 1px solid #999; - text-align: left; -} -.form th, td { - padding: .3em .5em; - margin: 0; - vertical-align: top; - border: 0px solid #999; - text-align: left; -} -th, thead, #previewPane th, #previewPane thead { - font-weight: bold; - background-color: #ddd; -} -[dir=rtl] td, [dir=rtl] th { - text-align: right; -} -.resizeTextarea a { - text-decoration: none; -} - -progress { color: @MainColor; background-color: @BackgroundColor - #111; border-radius: 0px; border: solid 1px; width: 10em; height: 1em;} -progress::-moz-progress-bar { background: @MainColor;} -progress::-webkit-progress-value { background: @MainColor;} -progress::-webkit-progress-bar { background: @MainColor;} - diff --git a/conf/mimoza.css b/conf/mimoza.css index 3ba47b6..434d8b7 100644 --- a/conf/mimoza.css +++ b/conf/mimoza.css @@ -1,5 +1,5 @@ :root { - --couleur-primaire: #__YNH_COLOR__; + --couleur-primaire: #__COLOR__; --underline-max-width: 100%; --underline-hover-width: 0; @@ -17,8 +17,7 @@ @font-face { font-family: "Luciole"; - src: url("../fonts/Luciole-Regular.woff") format("woff"), - url("../fonts/Luciole-Regular.woff2") format("woff2"); + src: url("../fonts/Luciole-Regular.woff") format("woff"); font-style: normal; font-weight: normal; text-rendering: optimizeLegibility; @@ -26,8 +25,7 @@ @font-face { font-family: "Luciole"; - src: url("../fonts/Luciole-Bold.woff") format("woff"), - url("../fonts/Luciole-Bold.woff2") format("woff2"); + src: url("../fonts/Luciole-Bold.woff") format("woff"); font-style: normal; font-weight: 700; text-rendering: optimizeLegibility; @@ -35,8 +33,7 @@ @font-face { font-family: "Luciole"; - src: url("../fonts/Luciole-Italic.woff") format("woff"), - url("../fonts/Luciole-Italic.woff2") format("woff2"); + src: url("../fonts/Luciole-Italic.woff") format("woff"); font-style: italic; font-weight: normal; text-rendering: optimizeLegibility; @@ -44,13 +41,13 @@ @font-face { font-family: "Luciole"; - src: url("../fonts/Luciole-BoldItalic.woff") format("woff"), - url("../fonts/Luciole-BoldItalic.woff2") format("woff2"); + src: url("../fonts/Luciole-BoldItalic.woff") format("woff"); font-style: italic; font-weight: 700; text-rendering: optimizeLegibility; } + html { font-family: "Luciole", Arial, Helvetica, sans-serif; } @@ -204,6 +201,7 @@ pre { color: white; background-color: black; } + pre code { background: none; } @@ -215,6 +213,7 @@ img { /* lionwiki */ +p span.full-edit, h2 span.par-edit, h3 span.par-edit, h4 span.par-edit, @@ -223,6 +222,7 @@ h6 span.par-edit { float: right; display: none; } +p:hover span.full-edit, h2:hover span.par-edit, h3:hover span.par-edit, h4:hover span.par-edit, @@ -325,3 +325,16 @@ progress::-webkit-progress-bar { .todotxt_date { background-color: #f2f2f2; } + + +@media (prefers-color-scheme: dark) { + + body { + filter: invert(100%) hue-rotate(180deg); + } + + html { + background-color: #111; + } + +} diff --git a/conf/minimaxing.css b/conf/minimaxing.css index 113e361..f416b75 100755 --- a/conf/minimaxing.css +++ b/conf/minimaxing.css @@ -45,7 +45,7 @@ You can create your own manuscript / handwriting font on http://www.myscriptfont /* @fg: @background-color; */ /* if you prefer to select a fixed background color, just uncomment one color from below */ /* For YunoHost config */ -/* @fg: #__YNH_COLOR__; */ +/* @fg: #__COLOR__; */ /* Header color */ /* You can use a shade of MainColor: */ /* or a complementary color: */ @@ -110,9 +110,8 @@ You can create your own manuscript / handwriting font on http://www.myscriptfont @font-face { font-family: Fengardo; font-weight: bold; - src: url(../fonts/fengardoneue-black.woff) format('woff'), url(../fonts/fengardoneue-black.otf) format('opentype'), url(../fonts/fengardoneue-black.svg) format('svg'); - /*font-weight: 500;*/ + src: url(../fonts/fengardoneue-black.woff) format('woff'), url(../fonts/fengardoneue-black.otf) format('opentype'), url(../fonts/fengardoneue-black.svg) format('svg'); } @font-face { font-family: 'Fengardo Neue'; @@ -131,7 +130,7 @@ You can create your own manuscript / handwriting font on http://www.myscriptfont */ /* LionWiki specific */ a.pending { - color: #7f4736; + color: #7F4736; } h2 span.par-edit, h3 span.par-edit, @@ -285,7 +284,7 @@ th, td, #previewPane th, #previewPane td { - padding: .3em .5em; + padding: 0.3em 0.5em; margin: 0; vertical-align: top; border: 1px solid #999; @@ -293,7 +292,7 @@ td, } .form th, td { - padding: .3em .5em; + padding: 0.3em 0.5em; margin: 0; vertical-align: top; border: 0px solid #999; @@ -335,7 +334,7 @@ body { font-size: 12pt; /*font-family: sans-serif;*/ /*background-color: (@Bg-extra-light/1.1 + #111);*/ - background-color: #ffffff; + background-color: #fff; font-family: Ubuntu; color: #656c61; } @@ -371,7 +370,7 @@ h1 a { color: #5d2c0b; } #header-wrapper h1 { - color: #ffffff; + color: #fff; line-height: 1.3em; border-bottom: none; } @@ -387,14 +386,14 @@ h1 a { color: #000019; } #header nav { - color: #ffffff; + color: #fff; text-transform: lowercase; } #header nav a, #header nav li a { display: inline-block; text-decoration: none; - color: #ffffff; + color: #fff; } #header nav li a:hover, #header nav li a:active { @@ -405,13 +404,13 @@ h1 a { h2 { font-size: 1.6em; letter-spacing: 1px; - margin-bottom: 0.0em; + margin-bottom: 0em; margin-top: 1.8em; } h3, h4 { color: #283121; - margin-bottom: 0.0em; + margin-bottom: 0em; margin-top: 1.4em; } h3 { @@ -422,7 +421,7 @@ h4 { } p, ul { - margin-bottom: 1.0em; + margin-bottom: 1em; overflow-wrap: break-word; word-wrap: break-word; -ms-word-break: break-all; @@ -452,18 +451,19 @@ s { } ::selection { background: #0b3c5d; - color: #ffffff; + color: #fff; } ::-moz-selection { background: #0b3c5d; - color: #ffffff; + color: #fff; } pre { background-color: #f3fbff; line-height: 1.5em; font-family: Monospace; font-size: 11pt; - margin: 1.0em; + margin: 1em; + overflow: auto; } code, blockquote, @@ -472,6 +472,7 @@ dt { font-family: Monospace; font-size: 11pt; /*margin: 1.0em;*/ + overflow: auto; } dd { line-height: 1.5em; @@ -521,7 +522,7 @@ li { } /* If you don't like color highlight when you're over a list, comment the next 2 entries */ #main ul:hover { - background-color: #ffffff; + background-color: #fff; } #main ul li:hover, ul li:active { @@ -535,7 +536,7 @@ a { a:hover { text-decoration: none; background-color: #407192; - color: #ffffff; + color: #fff; } ul.small-image-list li { margin-bottom: 1.5em; @@ -561,8 +562,8 @@ a.toolbarTextareaItem { border-radius: 6px; text-transform: lowercase; text-decoration: none; - color: #ffffff; - font-size: 1.0em; + color: #fff; + font-size: 1em; letter-spacing: -1px; border: solid 1px #0b3c5d; box-shadow: inset 0px 0px 0px 1px #0b3c5d; @@ -570,10 +571,10 @@ a.toolbarTextareaItem { .button:hover, a.toolbarTextareaItem:hover { background-color: #1c4d6e; - color: #ffffff; + color: #fff; } a.toolbarTextareaItem b { - color: #ffffff; + color: #fff; } #copyright { font-size: 0.6em; @@ -689,7 +690,7 @@ input.submit:hover { #banner-wrapper h2 { border-bottom: none; color: white; - font-size: 2.0em; + font-size: 2em; text-align: center; } #banner-wrapper a { @@ -744,7 +745,7 @@ input.submit:hover { opacity: 0.8; } #main { - background-color: #ffffff; + background-color: #fff; padding: 2% 0 2% 0; padding-top: -20px; } @@ -879,7 +880,7 @@ input.submit:hover { opacity: 0.8; } #main { - background-color: #ffffff; + background-color: #fff; padding: 3% 0 3% 0; margin-left: 8px; margin-right: 4px; @@ -1033,7 +1034,7 @@ input.submit:hover { } #main { /*overflow: auto;*/ - background-color: #ffffff; + background-color: #fff; margin-left: 8px; margin-right: 4px; } @@ -1068,7 +1069,7 @@ input.submit:hover { .mycontent tr { background: #83b4d5; /*rgba(16,80,112,0.2);*/ - color: #111111; + color: #111; } .mycontent tr a:hover, .mycontent #header-wrapper a:hover { @@ -1112,7 +1113,7 @@ progress::-webkit-progress-bar { width: 65%; border: 2px solid #5d2c0b; background-color: #5d2c0b; - height: 50px; + min-height: 50px; margin-top: 8px; margin-bottom: 8px; font-family: Ubuntu; @@ -1131,7 +1132,7 @@ progress::-webkit-progress-bar { min-width: 100%; padding: 0px; padding-top: 0px; - height: 46px; + min-height: 46px; line-height: 46px; color: #fff; text-decoration: none; @@ -1201,6 +1202,15 @@ progress::-webkit-progress-bar { iframe { filter: invert(100%) hue-rotate(180deg); } + #header-wrapper { + filter: invert(100%) hue-rotate(180deg); + } + h1, + h2, + h3, + h4 { + color: #0b3c5d; + } /* Improve contrast on icons. */ .icon { filter: invert(15%) hue-rotate(180deg); diff --git a/conf/minimaxing.less b/conf/minimaxing.less index e063aa1..f13d521 100755 --- a/conf/minimaxing.less +++ b/conf/minimaxing.less @@ -73,7 +73,7 @@ You can create your own manuscript / handwriting font on http://www.myscriptfont // @fg: #847457; /* Marron */ /* For YunoHost config */ -/* @fg: #__YNH_COLOR__; */ +/* @fg: #__COLOR__; */ @@ -1215,7 +1215,7 @@ progress::-webkit-progress-bar { width: 65%; border: 2px solid @HeaderColor; background-color: @HeaderColor; - height: 50px; + min-height: 50px; margin-top: 8px; margin-bottom: 8px; font-family: @font; @@ -1239,7 +1239,7 @@ progress::-webkit-progress-bar { padding: 0px; padding-top : 0px; - height: 46px; + min-height: 46px; line-height:46px; color: #fff; text-decoration: none; @@ -1308,7 +1308,7 @@ progress::-webkit-progress-bar { } - + /* Improve contrast on icons. */ .icon { filter: invert(15%) hue-rotate(180deg); @@ -1324,4 +1324,3 @@ progress::-webkit-progress-bar { color: #555; } } - diff --git a/conf/nginx.conf b/conf/nginx.conf index b7c8793..eef57bf 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,26 +1,26 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - # Path to source - alias __FINALPATH__/; + # Path to source + alias __INSTALL_DIR__/; - index index.php; + index index.php; - # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; + # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file + client_max_body_size 100M; - try_files $uri $uri/ index.php; - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + try_files $uri $uri/ index.php; + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; - } + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; + } - # Don't include SSOWAT user panel (can lead to some server error, like "bad gateway") - # include conf.d/yunohost_panel.conf.inc; + # Don't include SSOWAT user panel (can lead to some server error, like "bad gateway") + # include conf.d/yunohost_panel.conf.inc; } diff --git a/conf/pheditor.php b/conf/pheditor.php index 3c79e22..86f11ef 100755 --- a/conf/pheditor.php +++ b/conf/pheditor.php @@ -8,7 +8,8 @@ * Release under MIT license */ -define('PASSWORD', '__YNH_PASSWORD__'); +/* "admin" by default */ +define('PASSWORD', '__PASSWORD_SHA1__'); define('DS', DIRECTORY_SEPARATOR); define('MAIN_DIR', __DIR__); define('VERSION', '2.0.0'); @@ -20,7 +21,7 @@ define('HISTORY_PATH', MAIN_DIR . DS . '.phedhistory'); define('MAX_HISTORY_FILES', 5); define('WORD_WRAP', true); define('PERMISSIONS', 'newfile,newdir,editfile,deletefile,deletedir,renamefile,renamedir,changepassword,uploadfile,terminal'); // empty means all -define('PATTERN_FILES', '/^[A-Za-z0-9-_.\/]*\.(txt|php|htm|html|js|css|tpl|md|xml|json|t2t)$/i'); // empty means no pattern +define('PATTERN_FILES', '/^[A-Za-z0-9-_.\/]*\.(txt|php|htm|html|js|css|tpl|md|xml|json|t2t|less)$/i'); // empty means no pattern //define('PATTERN_FILES', ''); // empty means no pattern define('PATTERN_DIRECTORIES', '/^((?!backup).)*$/i'); // empy means no pattern define('TERMINAL_COMMANDS', 'ls,ll,cp,rm,mv,whoami,pidof,pwd,whereis,kill,php,date,cd,mkdir,chmod,chown,rmdir,touch,cat,git,find,grep,echo,tar,zip,unzip,whatis,composer,help'); @@ -194,6 +195,10 @@ if (isset($_POST['action'])) { } } + if (is_writable(__FILE__) === false) { + die(json_error('File is not writable')); + } + file_put_contents(__FILE__, implode($contents)); echo json_success('Password changed successfully'); @@ -474,11 +479,13 @@ function json_success($message, $params = []) Pheditor + +