1
0
Fork 0

Improvements

This commit is contained in:
Airikr 2024-11-16 12:37:44 +01:00
parent 30d3404540
commit 9ceb37a8af
3 changed files with 75 additions and 37 deletions

View file

@ -20,24 +20,39 @@
/* Variables for the universal theme */ /* Variables for the universal theme */
:root { :root {
--main: #272e33; --main: #1a1b26;
--text: #e8e5d5; --text: #c0caf5;
--link_focused: #2e383c; --line: #414868;
--line: #475258; --highlight: #171721;
--form_bg: #2e383c; --image: #444663;
--field_bg: #1e2326; --field_bg: #1f1f2c;
--field_border: #414b50; --field_bg_hover: #2c2c3e;
--field_border_focused: #9da9a0; --field_bg_inactive: #1a1b26;
--submit_bg: #7fbbb3; --field_border: #414868;
--submit_text: #1e2326; --field_border_hover: #4c547a;
--field_border_inactive: #414868;
--field_text: #c0caf5;
--field_text_inactive: #777e98;
--red: #e67e80; --summary_open: #171721;
--red_underline: #613537; --summary_closed: #171721;
--green: #a7c080; --calendar_day: #414868;
--blue: #7fbbb3; --calendar_day_highlight: #ff9e64;
--yellow: #dbbc7f; --calendar_day_today: #7aa2f7;
--orange: #E69875;
--transparent_30: rgba(26, 27, 38, .7);
--transparent_20: rgba(26, 27, 38, .8);
--transparent_10: rgba(26, 27, 38, .9);
--red: #f7768e;
--green: #9ece6a;
--blue: #7aa2f7;
--purple: #bb9af7;
--orange: #ff9e64;
--yellow: #e0af68;
--dark: #414868;
--white: #ffffff;
--icon_select: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-selector" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="rgba(255,255,255,1)" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 9l4 -4l4 4"></path><path d="M16 15l-4 4l-4 -4"></path></svg>'); --icon_select: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-selector" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="rgba(255,255,255,1)" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 9l4 -4l4 4"></path><path d="M16 15l-4 4l-4 -4"></path></svg>');
@ -163,33 +178,46 @@ select {
background-color: var(--field_bg); background-color: var(--field_bg);
border: 1px solid var(--field_border); border: 1px solid var(--field_border);
border-radius: 3px; border-radius: 3px;
color: var(--text); color: var(--field_text);
font-family: var(--font); font-family: var(--font);
font-size: var(--fontsize); font-size: var(--fontsize);
outline: none; outline: none;
resize: none; resize: none;
padding: 5px; padding: 8px 10px;
width: calc(100% - (6px * 2)); width: calc(100% - (11px * 2));
} }
input:not([type="checkbox"]):focus, input::placeholder,
textarea:focus, textarea::placeholder,
select:focus { select::placeholder {
border: 1px solid var(--field_border_focused); color: var(--text);
} }
input[disabled], input[disabled],
textarea[disabled], textarea[disabled],
select[disabled] { select[disabled] {
background-color: var(--main); background-color: var(--field_bg_inactive);
border: 1px dashed var(--field_border); border: 1px dashed var(--field_border_inactive);
color: var(--field_text_inactive);
cursor: not-allowed; cursor: not-allowed;
} }
input[type="submit"] { input:not([disabled]):not([readonly]):active,
background-color: var(--submit_bg); input:not([disabled]):not([readonly]):hover,
border: 1px solid var(--submit_bg); textarea:not([disabled]):not([readonly]):active,
color: var(--submit_text); textarea:not([disabled]):not([readonly]):hover,
select:not([disabled]):active,
select:not([disabled]):hover {
background-color: var(--field_bg_hover);
border: 1px solid var(--field_border_hover);
}
input[type="submit"],
input[type="submit"]:active,
input[type="submit"]:hover {
background-color: var(--green) !important;
border: 1px solid var(--green) !important;
color: var(--main);
cursor: pointer; cursor: pointer;
font-weight: 700; font-weight: 700;
padding: 5px 10px; padding: 5px 10px;
@ -228,13 +256,20 @@ input[type="date"] {
appearance: none; appearance: none;
} }
input[readonly] {
border: 1px dashed var(--line);
}
input, textarea { input, textarea {
caret-color: var(--yellow); caret-color: var(--yellow);
} }
textarea { textarea {
height: 100px; height: 250px;
width: calc(100% - 12px); min-height: 130px;
resize: vertical;
vertical-align: top;
width: calc(100% - 21px - 2px);
} }
select { select {
@ -244,8 +279,7 @@ select {
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center right 8px; background-position: center right 8px;
cursor: pointer; cursor: pointer;
padding: 5px; width: calc(100% - 21px - 2px);
width: calc(100% - (6px * 2) + 12px);
} }
h1 { h1 {

View file

@ -21,7 +21,7 @@
if($encrypt == true) { if($encrypt == true) {
return Symmetric::encrypt(new HiddenString($string), $enckey); return Symmetric::encrypt(new HiddenString($string), $enckey);
} else { } else {
return Symmetric::decrypt($string, $enckey); return Symmetric::decrypt($string, $enckey)->getString();
} }
} else { } else {

View file

@ -1,5 +1,7 @@
<?php session_start(); <?php session_start();
use ParagonIE\Halite\KeyFactory;
require_once 'site-config.php'; require_once 'site-config.php';
ini_set('display_errors', ($debugging == false ? 0 : 1)); ini_set('display_errors', ($debugging == false ? 0 : 1));
@ -29,9 +31,11 @@
require_once 'vendor/autoload.php'; require_once 'vendor/autoload.php';
$Parsedown = new Parsedown(); $Parsedown = new Parsedown();
if(!file_exists($dir_files)) {
$oldmask = umask(0); $oldmask = umask(0);
mkdir($dir_files, 0777, true); mkdir($dir_files, 0777, true);
umask($oldmask); umask($oldmask);
}
if(!file_exists($dir_files.'/encryption.key')) { if(!file_exists($dir_files.'/encryption.key')) {
$enckey = KeyFactory::generateEncryptionKey(); $enckey = KeyFactory::generateEncryptionKey();