Dark theme

This commit is contained in:
Freddy 2018-08-19 00:12:43 +02:00
parent 44ae07e6cd
commit 7e04747694
2 changed files with 2410 additions and 0 deletions

2390
assets/css/dark.css Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,14 @@ include("language.php");
<title>Halcyon</title> <title>Halcyon</title>
<link rel="shortcut icon" href="/assets/images/favicon.ico"> <link rel="shortcut icon" href="/assets/images/favicon.ico">
<link rel="gettext" type="text/x-gettext-translation" href="/locale/<?=$locale?>/LC_MESSAGES/messages.po"> <link rel="gettext" type="text/x-gettext-translation" href="/locale/<?=$locale?>/LC_MESSAGES/messages.po">
<?php if(!isset($_COOKIE["theme"])) {
setcookie('theme', 'light');
} if($_COOKIE["theme"] == "light") {
?>
<link rel="stylesheet" href="/assets/css/style.css" media="all"> <link rel="stylesheet" href="/assets/css/style.css" media="all">
<?php } else if($_COOKIE["theme"] == "dark") { ?>
<link rel="stylesheet" href="/assets/css/dark.css" media="all">
<?php } ?>
<link rel="stylesheet" href="/assets/css/fontawesome.min.css" media="all"> <link rel="stylesheet" href="/assets/css/fontawesome.min.css" media="all">
<link rel="stylesheet" href="/assets/css/emojipicker.css" media="all"> <link rel="stylesheet" href="/assets/css/emojipicker.css" media="all">
<script src="/assets/js/jquery/jquery.min.js"></script> <script src="/assets/js/jquery/jquery.min.js"></script>
@ -30,6 +37,11 @@ include("language.php");
<script src="/assets/js/twemoji/twemoji.min.js"></script> <script src="/assets/js/twemoji/twemoji.min.js"></script>
<script src="/assets/js/clipboard.js/clipboard.min.js"></script> <script src="/assets/js/clipboard.js/clipboard.min.js"></script>
<script> <script>
function setCookie(cname, cvalue) {
document.cookie = cname + "=" + cvalue;
}
</script>
<script>
if(!localStorage.getItem("current_id") | !localStorage.getItem("current_instance") | !localStorage.getItem("current_authtoken")) { if(!localStorage.getItem("current_id") | !localStorage.getItem("current_instance") | !localStorage.getItem("current_authtoken")) {
location.href = "/login"; location.href = "/login";
} }
@ -124,6 +136,14 @@ resetApp();
</ul> </ul>
<ul> <ul>
<li> <li>
<?php
if($_COOKIE["theme"] == "light") { ?>
<a href="/" onClick="setCookie('theme', 'dark');"><?=_('Night mode')?></a>
<?php } else if($_COOKIE["theme"] == "dark") { ?>
<a href="/" onClick="setCookie('theme', 'light');"><?=_('Light mode')?></a>
<?php } ?>
</li>
<li>
<a href="/settings"><?=_('Settings')?></a> <a href="/settings"><?=_('Settings')?></a>
</li> </li>
<li> <li>