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

update conf from sources

This commit is contained in:
Salamandar 2024-01-17 14:34:17 +01:00
parent ac35e83f4b
commit 7a551d0717
6 changed files with 150 additions and 734 deletions

View file

@ -1,60 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>{PAGE_TITLE_HEAD - }{WIKI_TITLE}</title>
<link rel="stylesheet" href="templates/ggp/ggp.css" />
<script src="templates/js/less.js" type="text/javascript"></script>
{HEAD}
</head>
<body>
<div id="wrapper">
<div id="header">
<ul>{MENU}</ul> <br/>
</div>
<div id="content">
<div id="content-header">
<h1 id="page-title">{PAGE_TITLE} {<span class="pageVersionsList">( plugin:VERSIONS_LIST )</span>}</h1>
</div>
<div class="menu">{HOME} {&nbsp;&nbsp; EDIT} {&nbsp;&nbsp; HISTORY} {&nbsp;&nbsp; RECENT_CHANGES}</div>
{<div class="error"> ERROR </div>}
{CONTENT}
{plugin:TAG_LIST}
{CONTENT_FORM}
<!-- new version for MarkitUp -->
<div id="editor"><table style="width: 100%;">
<tr>
<td>{RENAME_TEXT }{RENAME_INPUT }{plugin:TOOLBAR_TEXTAREA}</td>
<td colspan="2" style="text-align: right;" nowrap="nowrap">{SHOW_PAGE &nbsp; }{SYNTAX}</td>
</tr>
<tr>
<td colspan="3">{CONTENT_TEXTAREA}</td>
</tr>
<tr>
<td colspan="2">{FORM_PASSWORD}{ FORM_PASSWORD_INPUT}{ plugin:CAPTCHA_QUESTION}{ plugin:CAPTCHA_INPUT}{ EDIT_SUMMARY_TEXT}{ EDIT_SUMMARY_INPUT}{ CONTENT_SUBMIT}{ CONTENT_PREVIEW}</td>
<td style="text-align: right; vertical-align: top;">{plugin:RESIZE_TEXTAREA}</td>
</tr>
</table>
{/CONTENT_FORM}</div>
<!-- end new version for markitup-->
<div align="right"> {SEARCH_FORM}{SEARCH_INPUT}{SEARCH_SUBMIT}{/SEARCH_FORM} Powered by <a href="https://lionwiki-t2t.sourceforge.io/">LionWiki-t2t</a>
</div>
</div>
<div id="footer">
<div style="float:left;">
</div>
</div>
</div>
</body>
</html>

View file

@ -1,550 +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: #__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;}

View file

@ -17,8 +17,7 @@
@font-face { @font-face {
font-family: "Luciole"; font-family: "Luciole";
src: url("../fonts/Luciole-Regular.woff") format("woff"), src: url("../fonts/Luciole-Regular.woff") format("woff");
url("../fonts/Luciole-Regular.woff2") format("woff2");
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
@ -26,8 +25,7 @@
@font-face { @font-face {
font-family: "Luciole"; font-family: "Luciole";
src: url("../fonts/Luciole-Bold.woff") format("woff"), src: url("../fonts/Luciole-Bold.woff") format("woff");
url("../fonts/Luciole-Bold.woff2") format("woff2");
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
@ -35,8 +33,7 @@
@font-face { @font-face {
font-family: "Luciole"; font-family: "Luciole";
src: url("../fonts/Luciole-Italic.woff") format("woff"), src: url("../fonts/Luciole-Italic.woff") format("woff");
url("../fonts/Luciole-Italic.woff2") format("woff2");
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
@ -44,13 +41,13 @@
@font-face { @font-face {
font-family: "Luciole"; font-family: "Luciole";
src: url("../fonts/Luciole-BoldItalic.woff") format("woff"), src: url("../fonts/Luciole-BoldItalic.woff") format("woff");
url("../fonts/Luciole-BoldItalic.woff2") format("woff2");
font-style: italic; font-style: italic;
font-weight: 700; font-weight: 700;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }
html { html {
font-family: "Luciole", Arial, Helvetica, sans-serif; font-family: "Luciole", Arial, Helvetica, sans-serif;
} }
@ -204,6 +201,7 @@ pre {
color: white; color: white;
background-color: black; background-color: black;
} }
pre code { pre code {
background: none; background: none;
} }
@ -215,6 +213,7 @@ img {
/* lionwiki */ /* lionwiki */
p span.full-edit,
h2 span.par-edit, h2 span.par-edit,
h3 span.par-edit, h3 span.par-edit,
h4 span.par-edit, h4 span.par-edit,
@ -223,6 +222,7 @@ h6 span.par-edit {
float: right; float: right;
display: none; display: none;
} }
p:hover span.full-edit,
h2:hover span.par-edit, h2:hover span.par-edit,
h3:hover span.par-edit, h3:hover span.par-edit,
h4:hover span.par-edit, h4:hover span.par-edit,
@ -325,3 +325,16 @@ progress::-webkit-progress-bar {
.todotxt_date { .todotxt_date {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
@media (prefers-color-scheme: dark) {
body {
filter: invert(100%) hue-rotate(180deg);
}
html {
background-color: #111;
}
}

View file

@ -110,9 +110,8 @@ You can create your own manuscript / handwriting font on http://www.myscriptfont
@font-face { @font-face {
font-family: Fengardo; font-family: Fengardo;
font-weight: bold; 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;*/ /*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-face {
font-family: 'Fengardo Neue'; font-family: 'Fengardo Neue';
@ -131,7 +130,7 @@ You can create your own manuscript / handwriting font on http://www.myscriptfont
*/ */
/* LionWiki specific */ /* LionWiki specific */
a.pending { a.pending {
color: #7f4736; color: #7F4736;
} }
h2 span.par-edit, h2 span.par-edit,
h3 span.par-edit, h3 span.par-edit,
@ -285,7 +284,7 @@ th,
td, td,
#previewPane th, #previewPane th,
#previewPane td { #previewPane td {
padding: .3em .5em; padding: 0.3em 0.5em;
margin: 0; margin: 0;
vertical-align: top; vertical-align: top;
border: 1px solid #999; border: 1px solid #999;
@ -293,7 +292,7 @@ td,
} }
.form th, .form th,
td { td {
padding: .3em .5em; padding: 0.3em 0.5em;
margin: 0; margin: 0;
vertical-align: top; vertical-align: top;
border: 0px solid #999; border: 0px solid #999;
@ -335,7 +334,7 @@ body {
font-size: 12pt; font-size: 12pt;
/*font-family: sans-serif;*/ /*font-family: sans-serif;*/
/*background-color: (@Bg-extra-light/1.1 + #111);*/ /*background-color: (@Bg-extra-light/1.1 + #111);*/
background-color: #ffffff; background-color: #fff;
font-family: Ubuntu; font-family: Ubuntu;
color: #656c61; color: #656c61;
} }
@ -371,7 +370,7 @@ h1 a {
color: #5d2c0b; color: #5d2c0b;
} }
#header-wrapper h1 { #header-wrapper h1 {
color: #ffffff; color: #fff;
line-height: 1.3em; line-height: 1.3em;
border-bottom: none; border-bottom: none;
} }
@ -387,14 +386,14 @@ h1 a {
color: #000019; color: #000019;
} }
#header nav { #header nav {
color: #ffffff; color: #fff;
text-transform: lowercase; text-transform: lowercase;
} }
#header nav a, #header nav a,
#header nav li a { #header nav li a {
display: inline-block; display: inline-block;
text-decoration: none; text-decoration: none;
color: #ffffff; color: #fff;
} }
#header nav li a:hover, #header nav li a:hover,
#header nav li a:active { #header nav li a:active {
@ -405,13 +404,13 @@ h1 a {
h2 { h2 {
font-size: 1.6em; font-size: 1.6em;
letter-spacing: 1px; letter-spacing: 1px;
margin-bottom: 0.0em; margin-bottom: 0em;
margin-top: 1.8em; margin-top: 1.8em;
} }
h3, h3,
h4 { h4 {
color: #283121; color: #283121;
margin-bottom: 0.0em; margin-bottom: 0em;
margin-top: 1.4em; margin-top: 1.4em;
} }
h3 { h3 {
@ -422,7 +421,7 @@ h4 {
} }
p, p,
ul { ul {
margin-bottom: 1.0em; margin-bottom: 1em;
overflow-wrap: break-word; overflow-wrap: break-word;
word-wrap: break-word; word-wrap: break-word;
-ms-word-break: break-all; -ms-word-break: break-all;
@ -452,18 +451,19 @@ s {
} }
::selection { ::selection {
background: #0b3c5d; background: #0b3c5d;
color: #ffffff; color: #fff;
} }
::-moz-selection { ::-moz-selection {
background: #0b3c5d; background: #0b3c5d;
color: #ffffff; color: #fff;
} }
pre { pre {
background-color: #f3fbff; background-color: #f3fbff;
line-height: 1.5em; line-height: 1.5em;
font-family: Monospace; font-family: Monospace;
font-size: 11pt; font-size: 11pt;
margin: 1.0em; margin: 1em;
overflow: auto;
} }
code, code,
blockquote, blockquote,
@ -472,6 +472,7 @@ dt {
font-family: Monospace; font-family: Monospace;
font-size: 11pt; font-size: 11pt;
/*margin: 1.0em;*/ /*margin: 1.0em;*/
overflow: auto;
} }
dd { dd {
line-height: 1.5em; 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 */ /* If you don't like color highlight when you're over a list, comment the next 2 entries */
#main ul:hover { #main ul:hover {
background-color: #ffffff; background-color: #fff;
} }
#main ul li:hover, #main ul li:hover,
ul li:active { ul li:active {
@ -535,7 +536,7 @@ a {
a:hover { a:hover {
text-decoration: none; text-decoration: none;
background-color: #407192; background-color: #407192;
color: #ffffff; color: #fff;
} }
ul.small-image-list li { ul.small-image-list li {
margin-bottom: 1.5em; margin-bottom: 1.5em;
@ -561,8 +562,8 @@ a.toolbarTextareaItem {
border-radius: 6px; border-radius: 6px;
text-transform: lowercase; text-transform: lowercase;
text-decoration: none; text-decoration: none;
color: #ffffff; color: #fff;
font-size: 1.0em; font-size: 1em;
letter-spacing: -1px; letter-spacing: -1px;
border: solid 1px #0b3c5d; border: solid 1px #0b3c5d;
box-shadow: inset 0px 0px 0px 1px #0b3c5d; box-shadow: inset 0px 0px 0px 1px #0b3c5d;
@ -570,10 +571,10 @@ a.toolbarTextareaItem {
.button:hover, .button:hover,
a.toolbarTextareaItem:hover { a.toolbarTextareaItem:hover {
background-color: #1c4d6e; background-color: #1c4d6e;
color: #ffffff; color: #fff;
} }
a.toolbarTextareaItem b { a.toolbarTextareaItem b {
color: #ffffff; color: #fff;
} }
#copyright { #copyright {
font-size: 0.6em; font-size: 0.6em;
@ -689,7 +690,7 @@ input.submit:hover {
#banner-wrapper h2 { #banner-wrapper h2 {
border-bottom: none; border-bottom: none;
color: white; color: white;
font-size: 2.0em; font-size: 2em;
text-align: center; text-align: center;
} }
#banner-wrapper a { #banner-wrapper a {
@ -744,7 +745,7 @@ input.submit:hover {
opacity: 0.8; opacity: 0.8;
} }
#main { #main {
background-color: #ffffff; background-color: #fff;
padding: 2% 0 2% 0; padding: 2% 0 2% 0;
padding-top: -20px; padding-top: -20px;
} }
@ -879,7 +880,7 @@ input.submit:hover {
opacity: 0.8; opacity: 0.8;
} }
#main { #main {
background-color: #ffffff; background-color: #fff;
padding: 3% 0 3% 0; padding: 3% 0 3% 0;
margin-left: 8px; margin-left: 8px;
margin-right: 4px; margin-right: 4px;
@ -1033,7 +1034,7 @@ input.submit:hover {
} }
#main { #main {
/*overflow: auto;*/ /*overflow: auto;*/
background-color: #ffffff; background-color: #fff;
margin-left: 8px; margin-left: 8px;
margin-right: 4px; margin-right: 4px;
} }
@ -1068,7 +1069,7 @@ input.submit:hover {
.mycontent tr { .mycontent tr {
background: #83b4d5; background: #83b4d5;
/*rgba(16,80,112,0.2);*/ /*rgba(16,80,112,0.2);*/
color: #111111; color: #111;
} }
.mycontent tr a:hover, .mycontent tr a:hover,
.mycontent #header-wrapper a:hover { .mycontent #header-wrapper a:hover {
@ -1112,7 +1113,7 @@ progress::-webkit-progress-bar {
width: 65%; width: 65%;
border: 2px solid #5d2c0b; border: 2px solid #5d2c0b;
background-color: #5d2c0b; background-color: #5d2c0b;
height: 50px; min-height: 50px;
margin-top: 8px; margin-top: 8px;
margin-bottom: 8px; margin-bottom: 8px;
font-family: Ubuntu; font-family: Ubuntu;
@ -1131,7 +1132,7 @@ progress::-webkit-progress-bar {
min-width: 100%; min-width: 100%;
padding: 0px; padding: 0px;
padding-top: 0px; padding-top: 0px;
height: 46px; min-height: 46px;
line-height: 46px; line-height: 46px;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
@ -1201,6 +1202,15 @@ progress::-webkit-progress-bar {
iframe { iframe {
filter: invert(100%) hue-rotate(180deg); filter: invert(100%) hue-rotate(180deg);
} }
#header-wrapper {
filter: invert(100%) hue-rotate(180deg);
}
h1,
h2,
h3,
h4 {
color: #0b3c5d;
}
/* Improve contrast on icons. */ /* Improve contrast on icons. */
.icon { .icon {
filter: invert(15%) hue-rotate(180deg); filter: invert(15%) hue-rotate(180deg);

View file

@ -1215,7 +1215,7 @@ progress::-webkit-progress-bar {
width: 65%; width: 65%;
border: 2px solid @HeaderColor; border: 2px solid @HeaderColor;
background-color: @HeaderColor; background-color: @HeaderColor;
height: 50px; min-height: 50px;
margin-top: 8px; margin-top: 8px;
margin-bottom: 8px; margin-bottom: 8px;
font-family: @font; font-family: @font;
@ -1239,7 +1239,7 @@ progress::-webkit-progress-bar {
padding: 0px; padding: 0px;
padding-top : 0px; padding-top : 0px;
height: 46px; min-height: 46px;
line-height:46px; line-height:46px;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;

View file

@ -8,6 +8,7 @@
* Release under MIT license * Release under MIT license
*/ */
/* "admin" by default */
define('PASSWORD', '__PASSWORD_SHA1__'); define('PASSWORD', '__PASSWORD_SHA1__');
define('DS', DIRECTORY_SEPARATOR); define('DS', DIRECTORY_SEPARATOR);
define('MAIN_DIR', __DIR__); define('MAIN_DIR', __DIR__);
@ -20,7 +21,7 @@ define('HISTORY_PATH', MAIN_DIR . DS . '.phedhistory');
define('MAX_HISTORY_FILES', 5); define('MAX_HISTORY_FILES', 5);
define('WORD_WRAP', true); define('WORD_WRAP', true);
define('PERMISSIONS', 'newfile,newdir,editfile,deletefile,deletedir,renamefile,renamedir,changepassword,uploadfile,terminal'); // empty means all 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_FILES', ''); // empty means no pattern
define('PATTERN_DIRECTORIES', '/^((?!backup).)*$/i'); // empy 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'); 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)); file_put_contents(__FILE__, implode($contents));
echo json_success('Password changed successfully'); echo json_success('Password changed successfully');
@ -474,11 +479,13 @@ function json_success($message, $params = [])
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pheditor</title> <title>Pheditor</title>
<link id="favicon" rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAhFBMVEUAAAAAAAD////p6ekLCwt+fn43NzccHBzT09PIyMjFxcWysrKnp6ekpKSfn5+ampqNjY2IiIiCgoJ0dHRubm5kZGRdXV1PT09JSUlEREQjIyMTExMHBwf7+/v19fXg4ODW1tbAwMCRkZGDg4N5eXloaGhTU1M+Pj4vLy8sLCwlJSURERGNXQbaAAAAAXRSTlN4HjghaAAAAI1JREFUGNNlz0cSwkAQQ9HRdyI542xyhvvfj5opFoC167dolYzRT/5v6Qui+P6Bp3wLDakDPwM4SQGdA2B1mdFqgRw0C3wNHMVB9dr+wJMeFCHpBiqjG4n8PVEAQU5klOPtoNacpTxPRjOSrBoleA3EtmUrm5C5rpQyHSsHBWeV2JZ2lEsvhctek3GT+W8jMQY7SBmDowAAAABJRU5ErkJggg==">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/themes/default/style.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/themes/default/style.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/codemirror.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/codemirror.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/lint/lint.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/lint/lint.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/dialog/dialog.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/dialog/dialog.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/css/iziToast.min.css">
<style type="text/css"> <style type="text/css">
h1, h1,
h1 a, h1 a,
@ -509,14 +516,6 @@ function json_success($message, $params = [])
opacity: 1; opacity: 1;
} }
.alert {
display: none;
position: fixed;
top: 10px;
right: 10px;
cursor: pointer;
}
#loading { #loading {
top: 0; top: 0;
left: 0; left: 0;
@ -595,7 +594,7 @@ function json_success($message, $params = [])
#terminal input.command { #terminal input.command {
width: 100%; width: 100%;
background: rgba(0, 0, 0, 0.8); background: #333;
color: #fff; color: #fff;
border: 0; border: 0;
border-radius: 0 0 5px 5px; border-radius: 0 0 5px 5px;
@ -610,10 +609,6 @@ function json_success($message, $params = [])
border-radius: .2rem; border-radius: .2rem;
} }
#terminal #prompt:fullscreen {
background: #fff;
}
#terminal #prompt:fullscreen pre { #terminal #prompt:fullscreen pre {
margin: 0; margin: 0;
border-radius: 0; border-radius: 0;
@ -645,6 +640,7 @@ function json_success($message, $params = [])
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/search/searchcursor.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/search/searchcursor.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/search/jump-to-line.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/search/jump-to-line.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/dialog/dialog.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/dialog/dialog.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/js/iziToast.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var editor, var editor,
modes = { modes = {
@ -655,14 +651,15 @@ function json_success($message, $params = [])
last_keyup_press = false, last_keyup_press = false,
last_keyup_double = false; last_keyup_double = false;
function alertBox(message, className) { function alertBox(title, message, color) {
$(".alert").removeClass("alert-success alert-warning alert-danger"); iziToast.show({
title: title,
$(".alert").html(message).addClass("alert-" + className).fadeIn(); message: message,
color: color,
setTimeout(function() { position: "bottomRight",
$(".alert").fadeOut(); transitionIn: "fadeInUp",
}, 5000); transitionOut: "fadeOutRight",
});
} }
function reloadFiles(hash) { function reloadFiles(hash) {
@ -753,7 +750,7 @@ function json_success($message, $params = [])
action: "password", action: "password",
password: password password: password
}, function(data) { }, function(data) {
alertBox(data.message, data.error ? "warning" : "success"); alertBox(data.error ? "Error" : "Success", data.message, data.error ? "red" : "green");
}); });
} }
}); });
@ -778,7 +775,7 @@ function json_success($message, $params = [])
file: file, file: file,
data: "" data: ""
}, function(data) { }, function(data) {
alertBox(data.message, data.error ? "warning" : "success"); alertBox(data.error ? "Error" : "Success", data.message, data.error ? "red" : "green");
if (data.error == false) { if (data.error == false) {
reloadFiles(); reloadFiles();
@ -786,7 +783,7 @@ function json_success($message, $params = [])
}); });
} }
} else { } else {
alertBox("Please select a file or directory", "warning"); alertBox("Warning", "Please select a file or directory", "yellow");
} }
}); });
@ -809,7 +806,7 @@ function json_success($message, $params = [])
action: "make-dir", action: "make-dir",
dir: dir dir: dir
}, function(data) { }, function(data) {
alertBox(data.message, data.error ? "warning" : "success"); alertBox(data.error ? "Error" : "Success", data.message, data.error ? "red" : "green");
if (data.error == false) { if (data.error == false) {
reloadFiles(); reloadFiles();
@ -817,7 +814,7 @@ function json_success($message, $params = [])
}); });
} }
} else { } else {
alertBox("Please select a file or directory", "warning"); alertBox("Warning", "Please select a file or directory", "yellow");
} }
}); });
@ -835,10 +832,10 @@ function json_success($message, $params = [])
file: path, file: path,
data: data data: data
}, function(data) { }, function(data) {
alertBox(data.message, data.error ? "warning" : "success"); alertBox(data.error ? "Error" : "Success", data.message, data.error ? "red" : "green");
}); });
} else { } else {
alertBox("Please select a file", "warning"); alertBox("Warning", "Please select a file", "yellow");
} }
}); });
@ -857,7 +854,7 @@ function json_success($message, $params = [])
action: "delete", action: "delete",
path: path path: path
}, function(data) { }, function(data) {
alertBox(data.message, data.error ? "warning" : "success"); alertBox(data.error ? "Error" : "Success", data.message, data.error ? "red" : "green");
if (data.error == false) { if (data.error == false) {
reloadFiles(); reloadFiles();
@ -865,7 +862,7 @@ function json_success($message, $params = [])
}); });
} }
} else { } else {
alertBox("Please select a file or directory", "warning"); alertBox("Warning", "Please select a file or directory", "yellow");
} }
}); });
@ -893,7 +890,7 @@ function json_success($message, $params = [])
path: path, path: path,
name: name name: name
}, function(data) { }, function(data) {
alertBox(data.message, data.error ? "warning" : "success"); alertBox(data.error ? "Error" : "Success", data.message, data.error ? "red" : "green");
if (data.error == false) { if (data.error == false) {
reloadFiles(path.substring(0, path.lastIndexOf("/")) + "/" + name); reloadFiles(path.substring(0, path.lastIndexOf("/")) + "/" + name);
@ -901,7 +898,7 @@ function json_success($message, $params = [])
}); });
} }
} else { } else {
alertBox("Please select a file or directory", "warning"); alertBox("Warning", "Please select a file or directory", "yellow");
} }
}); });
@ -926,6 +923,10 @@ function json_success($message, $params = [])
"height": "" "height": ""
}); });
} }
if (document.fullscreen) {
$("#prompt pre").height($(window).height() - $("#prompt input.command").height() - 20);
}
}); });
$(window).resize(); $(window).resize();
@ -1015,7 +1016,7 @@ function json_success($message, $params = [])
file: encodeURIComponent(hash) file: encodeURIComponent(hash)
}, function(data) { }, function(data) {
if (data.error == true) { if (data.error == true) {
alertBox(data.message, "warning"); alertBox("Error", data.message, "red");
return false; return false;
} }
@ -1121,7 +1122,7 @@ function json_success($message, $params = [])
processData: false, processData: false,
type: "POST", type: "POST",
success: function(data, textStatus, jqXHR) { success: function(data, textStatus, jqXHR) {
alertBox(data.message, data.error ? "warning" : "success"); alertBox(data.error ? "Error" : "Success", data.message, data.error ? "red" : "green");
if (data.error == false) { if (data.error == false) {
reloadFiles(); reloadFiles();
@ -1252,8 +1253,10 @@ function json_success($message, $params = [])
if (element.requestFullscreen) { if (element.requestFullscreen) {
element.requestFullscreen(); element.requestFullscreen();
$("#prompt pre").height(screen.height - $("#prompt input.command").height() - 20); setTimeout(function() {
$("#prompt pre").height($(window).height() - $("#prompt input.command").height() - 20);
$("#prompt input.command").focus(); $("#prompt input.command").focus();
}, 500);
} }
}); });