aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/admin-v2/$resources
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
commit529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 (patch)
tree8a50c30271b9b328cde0d907b1441f2dabdc341b /Neutron-trunk/cms-special/admin-v2/$resources
parent15e4724761c50b30803df1811a525c85058f70bf (diff)
downloadelectrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.gz
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.bz2
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.zip
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2/$resources')
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/admin.js16
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/common.css523
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/header.php0
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css3
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css45
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/index.css31
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php6
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/precontent.php223
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/responsive.css31
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php14
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php24
11 files changed, 916 insertions, 0 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/admin.js b/Neutron-trunk/cms-special/admin-v2/$resources/admin.js
new file mode 100644
index 0000000..bca683b
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/admin.js
@@ -0,0 +1,16 @@
+window.onscroll = () => {
+ // console.log("> Scroll");
+ if (window.scrollY >= 52 && !document.getElementById('portal-background').classList.contains('scrolled')) {
+ // console.log("> ADD");
+ document.getElementById('portal-background').classList.add('scrolled');
+ } else if (window.scrollY < 52 && document.getElementById('portal-background').classList.contains('scrolled')) {
+ // console.log("> REMOVE");
+ document.getElementById('portal-background').classList.remove('scrolled');
+ } else {
+ // console.log("> Nothing");
+ }
+}
+
+window.onbeforeunload = () => {
+ window.parent.$("#loader").fadeIn(200);
+} \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/common.css b/Neutron-trunk/cms-special/admin-v2/$resources/common.css
new file mode 100644
index 0000000..3826747
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/common.css
@@ -0,0 +1,523 @@
+@import "./responsive.css";
+
+html, body {
+ margin: 0;
+ color: var(--mpc-text) !important;
+ background-color: var(--mpc-background);
+}
+
+.mdc-drawer {
+ color: var(--mpc-text) !important;
+ background-color: var(--mpc-menu-background) !important;
+ height: 100vh;
+ z-index: 99999999999 !important;
+}
+
+.mdc-drawer .mdc-list-item--activated .mdc-list-item__graphic {
+ color: var(--mpc-menu-selected) !important;
+}
+
+.mdc-list-item__graphic {
+ color: var(--mpc-icons) !important;
+}
+
+.mdc-list-group__subheader {
+ color: var(--mpc-menu-header) !important;
+}
+
+.mdc-drawer__subtitle {
+ color: var(--mpc-menu-subtitle) !important;
+}
+
+.mdc-drawer__title {
+ color: var(--mpc-text) !important;
+}
+
+.mdc-list-divider {
+ border-bottom-color: var(--mpc-separator);
+}
+
+.mdc-list-item__text {
+ color: var(--mpc-text);
+}
+
+.mdc-list-item.mdc-list-item--activated .mdc-list-item__text {
+ color: var(--mpc-menu-selected);
+}
+
+.ttdemo {
+ padding: 10px;
+ font-family: "CMS", "Ubuntu", "Roboto", "Google Sans", "Segoe UI", "Noto Sans", Tahoma, Geneva, Verdana, sans-serif !important;
+}
+
+* {
+ font-family: "CMS", "Ubuntu", "Roboto", "Google Sans", "Segoe UI", "Noto Sans", Tahoma, Geneva, Verdana, sans-serif;
+}
+
+span, p, body, div, h1, h2, h3, h4, h5, h6 {
+ font-family: "CMS", "Ubuntu", "Roboto", "Google Sans", "Segoe UI", "Noto Sans", Tahoma, Geneva, Verdana, sans-serif !important;
+}
+
+#main-content {
+ padding: 16px;
+ margin-top: 64px;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ overflow-y: auto;
+}
+
+html, body, #app-grid {
+ height: 100%;
+}
+
+#app-frame {
+ margin: -16px;
+ border: none;
+ width: calc(100% + 32px);
+ height: calc(100% + 32px);
+}
+
+.mdc-top-app-bar--fixed-adjust {
+ margin: 0;
+ padding: 0;
+ height: calc(100% - 64px);
+}
+
+.dualtitle-top {
+ margin-bottom: 4px;
+}
+
+.dualtitle-bottom {
+ margin-top: 4px;
+}
+
+.mdc-top-app-bar__section.mdc-top-app-bar__section--align-start > a {
+ color: inherit;
+ text-decoration: inherit;
+}
+
+code {
+ font-family: monospace
+}
+
+a {
+ color: slategray;
+}
+
+a:hover {
+ color: gray;
+}
+
+a:active {
+ color: lightgray;
+}
+
+.mdc-card__primary-action {
+ padding: 0 16px;
+}
+
+.mdc-icon-button.material-icons.mdc-card__action.mdc-card__action--icon--unbounded {
+ color: whitesmoke;
+}
+
+img[width="128px"] {
+ border-radius: 9999px;
+}
+
+.demo-card__primary {
+ display: grid;
+ grid-template-columns: 69.6px 1fr;
+}
+
+.ccard_p1 {
+ margin-left: -15px;
+ border-top-right-radius: 2px;
+ border-top-left-radius: 2px;
+ height: 100%;
+ background-size: 100%;
+}
+
+.ccard_p2 {
+ margin-left: 10px;
+}
+
+.ccard_p2 h2 {
+ margin-bottom: 0;
+}
+
+.ccard_p2 h3 {
+ margin-top: 0;
+}
+
+.card_link, .card_link:hover, .card_link:active {
+ color: var(--mpc-text);
+ text-decoration: none;
+}
+
+.mdc-list-item {
+ cursor: pointer;
+}
+
+.mdc-list-item > i {
+ transform: rotate(0deg);
+ transition: transform 500ms;
+}
+
+.mdc-list-item:hover > i {
+ transform: rotate(360deg) scale(125%);
+}
+
+.mdc-drawer__header {
+ background: linear-gradient(to bottom, var(--mpc-menu-background-image) 50%, var(--mpc-menu-background)), url('../../../resources/image/codename.jpg');
+ background-size: 100%;
+}
+
+.mdc-top-app-bar__row {
+ width: 100% !important;
+}
+
+#header-desktop {
+ height: 190px;
+ z-index: 2;
+}
+
+#app-grid {
+ z-index: 5;
+ position: absolute;
+ width: 100%;
+ top: 170px;
+}
+
+#main-content {
+ z-index: 5;
+ background: var(--mpc-background);
+ border-radius: 15px;
+ position: initial;
+ margin: 0;
+ min-height: 200px;
+}
+
+#portal-background {
+ position: fixed;
+ top: -20px;
+ left: -20px;
+ right: -20px;
+ height: 230px;
+ background-image: linear-gradient(to bottom, var(--mpc-menu-background-image) 50%, var(--mpc-menu-background-image)), url('../../../resources/image/codename.jpg');
+ background-size: 100%;
+ background-position: center;
+ transition: filter 200ms, background-size 200ms, background-image 200ms;
+ filter: none;
+}
+
+#portal-background.updates {
+ z-index: 2;
+}
+
+#portal-background.scrolled {
+ background-image: linear-gradient(to bottom, var(--mpc-menu-background-image-more) 50%, var(--mpc-menu-background-image-more)), url('../../../resources/image/codename.jpg');
+ filter: blur(5px);
+ background-size: 110%;
+}
+
+#header-desktop {
+ background: transparent;
+ color: var(--mpc-text);
+}
+
+.mdc-top-app-bar__section.mdc-top-app-bar__section--align-end .material-icons-outlined.mdc-top-app-bar__navigation-icon.mdc-icon-button {
+ color: var(--mpc-text);
+}
+
+#version-place {
+ position: absolute;
+ top: -20px;
+ font-size: 12px;
+ opacity: .5;
+}
+
+#language-selector {
+ position: absolute;
+ font-size: 18px;
+ opacity: .5;
+ left: 0;
+ top: 0;
+}
+
+#home-grid {
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+}
+
+.home-grid-item {
+ margin: 20px;
+}
+
+#home-grid-item-pages {
+ color: var(--mpc-home-pages);
+ --mpc-icons: var(--mpc-home-pages);
+}
+
+#home-grid-item-calendar {
+ color: var(--mpc-home-calendar);
+ --mpc-icons: var(--mpc-home-calendar);
+}
+
+#home-grid-item-gallery {
+ color: var(--mpc-home-gallery);
+ --mpc-icons: var(--mpc-home-gallery);
+}
+
+#home-grid-item-appearance {
+ color: var(--mpc-home-appearance);
+ --mpc-icons: var(--mpc-home-appearance);
+}
+
+#home-grid-item-data {
+ color: var(--mpc-home-data);
+ --mpc-icons: var(--mpc-home-data);
+}
+
+#home-grid-item-housekeeping {
+ color: var(--mpc-home-housekeeping);
+ --mpc-icons: var(--mpc-home-housekeeping);
+}
+
+.home-grid-item-button {
+ font-size: 64px;
+ width: 86px;
+ height: 86px;
+}
+
+a:not(.material-icons):not(.material-icons-outlined):not(.button):not(.spotlight-link) {
+ color: var(--codename-theme);
+ text-decoration-color: var(--codename-theme);
+}
+
+a:not(.material-icons):not(.material-icons-outlined):not(.button):active, a:not(.material-icons):not(.material-icons-outlined):not(.button):focus:not(.spotlight-link) {
+ opacity: .75;
+}
+
+.ck.ck-editor__main a {
+ color: inherit !important;
+ text-decoration-color: inherit !important;
+}
+
+.all-item-icon {
+ margin-right: 5px;
+ vertical-align: middle;
+}
+
+.all-item-text {
+ vertical-align: middle;
+}
+
+.all-item-link {
+ color: white !important;
+ text-decoration: none !important;
+}
+
+.nd_Field {
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
+ min-width: 0;
+ position: relative;
+ margin: 1em 0;
+ border-radius: 4px;
+ -webkit-transition: border-color .25s;
+ transition: border-color .25s;
+ border: 1px solid var(--codename-theme);
+}
+
+.nd_Field input {
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.nd_Field input, .nd_Field select {
+ color: var(--mpc-text);
+}
+
+.nd_Field input[type="password"], .nd_Field input[type="text"] {
+ color: var(--mpc-text);
+}
+
+.nd_Field input, .nd_Field select, .nd_Field textarea {
+ font-weight: 400;
+ font-size: 1.4rem;
+ border: none;
+ border-radius: 4px;
+ padding: 8px 9px;
+ color: var(--mpc-text);
+ background-color: transparent;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
+ min-width: 0;
+}
+
+.nd_Field input[type="password"], .nd_Field input[type="text"], .nd_Field textarea {
+ background-color: transparent;
+ color: var(--mpc-text);
+}
+
+.nd_Field input[type="password"]::placeholder, .nd_Field input[type="text"]::placeholder, .nd_Field textarea::placeholder {
+ color: transparent;
+}
+
+.nd_Field.fallback input[type="password"]::placeholder, .nd_Field.fallback input[type="text"]::placeholder, .nd_Field.fallback textarea::placeholder {
+ color: var(--codename-theme);
+ opacity: 1;
+}
+
+.nd_Field input[type="password"], .nd_Field input[type="search"], .nd_Field input[type="text"] {
+ padding: 9px;
+ font-size: 14px;
+ font-weight: 600;
+ min-width: 0;
+}
+
+.nd_Field_labelAlwaysTopLeft label, .nd_Field input:focus + label, .nd_Field input:not(:placeholder-shown) + label, .nd_Field select + label, .nd_Field textarea:focus + label, .nd_Field textarea:not(:placeholder-shown) + label {
+ background-color: transparent;
+}
+
+.nd_Field_labelAlwaysTopLeft label, .nd_Field input:focus + label, .nd_Field input:not(:placeholder-shown) + label, .nd_Field select + label, .nd_Field textarea:focus + label, .nd_Field textarea:not(:placeholder-shown) + label {
+ -webkit-transition: font-size .25s ease-out 0s,color .25s ease-out 0s,top .25s ease-out 0s,background-color .25s ease-out 0s;
+ transition: font-size .25s ease-out 0s,width .25s ease-out 0s,color .25s ease-out 0s,top .25s ease-out 0s,background-color .25s ease-out 0s;
+ font-size: 14px;
+ top: -14px;
+ padding: 0 2px;
+ background-color: var(--mpc-background);
+ pointer-events: auto;
+}
+
+.nd_Field label {
+ width: 100%;
+ -webkit-transition: font-size .25s ease-out .1s,color .25s ease-out .1s,top .25s ease-out .1s,background-color .25s ease-out .1s;
+ transition: font-size .25s ease-out .1s,color .25s ease-out .1s,top .25s ease-out .1s,background-color .25s ease-out .1s;
+ color: var(--codename-theme);
+ background-color: transparent;
+ font-size: 14px;
+ position: absolute;
+ left: 0;
+ top: 0;
+ margin: 7px 8px;
+ padding: 2px;
+ pointer-events: none;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ max-width: calc(100% - 20px);
+}
+
+#search {
+ width: 256px;
+}
+
+#searchbox {
+ width: 256px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.nd_Field input {
+ border: none !important;
+ font-weight: normal !important;
+}
+
+.search-match {
+ color: var(--codename-theme);
+ text-decoration: underline;
+}
+
+a.discreet, a.discreet:hover, a.discreet:active {
+ color: inherit !important;
+ text-decoration: none;
+}
+
+.updates-status {
+ font-size: 64px;
+}
+
+.separator {
+ border-bottom: none;
+ border-color: rgba(0, 0, 0, .5);
+}
+
+#updates-available {
+ background-color: rgba(211, 211, 0, 0.5);
+ text-align: center;
+ z-index: 999999;
+ position: relative;
+}
+
+.admin-pages-list {
+ display: grid;
+ grid-template-columns: 256px 256px 256px 256px 256px;
+ grid-column-gap: 20px;
+}
+
+@media (max-width: 1424px) {
+ .admin-pages-list {
+ grid-template-columns: 256px 256px 256px 256px;
+ }
+}
+
+@media (max-width: 968px) {
+ .admin-pages-list {
+ grid-template-columns: 256px 256px 256px;
+ }
+}
+
+@media (max-width: 712px) {
+ .admin-pages-list {
+ grid-template-columns: 256px 256px;
+ }
+}
+
+@media (max-width: 556px) {
+ .admin-pages-list {
+ grid-template-columns: 256px;
+ }
+}
+
+.mdc-card__actions-pages-list {
+ position: absolute;
+ bottom: 0;
+}
+
+.mdc-button--raised {
+ color: var(--mdc-theme-on-primary) !important;
+}
+
+.nd_Field, .nd_Field * {
+ outline: none;
+}
+
+.nd_Field input {
+ padding-top: 10px !important;
+}
+
+.nd_Field {
+ width: 256px;
+}
+
+.nd_Field label {
+ text-align: center;
+}
+
+.nd_Field__centered {
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.nd_Field__disabled {
+ opacity: .5;
+} \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/header.php b/Neutron-trunk/cms-special/admin-v2/$resources/header.php
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/header.php
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css b/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css
new file mode 100644
index 0000000..773eab9
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/index-auto.css
@@ -0,0 +1,3 @@
+@import url("./index.css") only screen and (prefers-color-scheme: light);
+@import url("./index.css") only screen and (prefers-color-scheme: no-preference);
+@import url("./index-dark.css") only screen and (prefers-color-scheme: dark); \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css b/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css
new file mode 100644
index 0000000..1683192
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/index-dark.css
@@ -0,0 +1,45 @@
+@import "./common.css";
+
+:root {
+ --mdc-theme-primary: var(--codename-theme);
+ --mdc-theme-secondary: var(--codename-secondary);
+ --mdc-theme-secondary-light: var(--codename-light);
+ --mdc-theme-on-primary: #ffffff;
+ --mdc-theme-on-secondary: white;
+ --mdc-theme-surface: rgb(44, 44, 44);
+ --mdc-theme-on-surface: whitesmoke;
+ --mpc-background: rgb(46, 46, 46);
+ --mpc-menu-background: rgb(22, 22, 22);
+ --mpc-menu-background-image: rgb(22, 22, 22, .5);
+ --mpc-menu-background-image-more: rgb(22, 22, 22, .75);
+ --mpc-text: whitesmoke;
+ --mpc-menu-selected: var(--mdc-theme-secondary-light);
+ --mpc-menu-header: rgb(223, 223, 223);
+ --mpc-menu-subtitle: rgb(182, 182, 182);
+ --mpc-icons: rgb(226, 226, 226);
+ --mpc-separator: rgb(138, 138, 138);
+
+ --mpc-home-pages: rgb(179, 229, 252);
+ --mpc-home-calendar: rgb(200, 230, 201);
+ --mpc-home-gallery: rgb(255, 205, 210);
+ --mpc-home-appearance: rgb(255, 249, 196);
+ --mpc-home-data: rgb(178, 223, 219);
+ --mpc-home-housekeeping: rgb(209, 196, 233);
+
+ --mpc-slse-hover1: rgba(255, 255, 255, 0.25);
+ --mpc-slse-hover2: rgba(255, 255, 255, 0.1);
+}
+
+/* --------------------- */
+
+.ck.ck-content {
+ background: #4a4a4a !important;
+}
+
+.message_img {
+ filter: invert(100%);
+}
+
+.mdi-icbtn-card {
+ color: rgba(255,255,255,1) !important;
+} \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/index.css b/Neutron-trunk/cms-special/admin-v2/$resources/index.css
new file mode 100644
index 0000000..57dd995
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/index.css
@@ -0,0 +1,31 @@
+@import "./common.css";
+
+:root {
+ --mdc-theme-primary: var(--codename-theme);
+ --mdc-theme-secondary: var(--codename-secondary);
+ --mdc-theme-secondary-light: var(--codename-light);
+ --mdc-theme-on-primary: white;
+ --mdc-theme-on-secondary: white;
+ --mdc-theme-surface: rgb(238, 238, 238);
+ --mdc-theme-on-surface: #000000;
+ --mpc-background: rgb(255, 255, 255);
+ --mpc-menu-background: rgb(240, 240, 240);
+ --mpc-menu-background-image: rgb(240, 240, 240, .5);
+ --mpc-menu-background-image-more: rgb(240, 240, 240, .75);
+ --mpc-text: rgb(0, 0, 0);
+ --mpc-menu-selected: var(--mdc-theme-secondary-light);
+ --mpc-menu-header: rgb(80, 80, 80);
+ --mpc-menu-subtitle: rgb(34, 34, 34);
+ --mpc-icons: rgb(78, 78, 78);
+ --mpc-separator: rgb(202, 202, 202);
+
+ --mpc-home-pages: rgb(25, 118, 210);
+ --mpc-home-calendar: rgb(56, 142, 60);
+ --mpc-home-gallery: rgb(211, 47, 47);
+ --mpc-home-appearance: rgb(251, 192, 45);
+ --mpc-home-data: rgb(0, 121, 107);
+ --mpc-home-housekeeping: rgb(81, 45, 168);
+
+ --mpc-slse-hover1: rgba(0, 0, 0, 0.25);
+ --mpc-slse-hover2: rgba(0, 0, 0, 0.1);
+} \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php b/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php
new file mode 100644
index 0000000..573a1d9
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/postcontent.php
@@ -0,0 +1,6 @@
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/debug.php";debugDump(); ?>
+ </div>
+</body>
+</html>
+
+<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/admin.js" charset="utf-8"></script> \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php b/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php
new file mode 100644
index 0000000..af8d999
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php
@@ -0,0 +1,223 @@
+<?php
+
+require $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php";
+
+$pageid = explode("/", $_SERVER['REQUEST_URI'])[3];
+if (isset(explode("/", $_SERVER['REQUEST_URI'])[4])) {
+ if (explode("/", $_SERVER['REQUEST_URI'])[4] != "index.php" && substr(explode("/", $_SERVER['REQUEST_URI'])[4], 0, 1) != "?" && substr(explode("/", $_SERVER['REQUEST_URI'])[4], 0, 1) != "#") {
+ if (isset($lang["admin-titles"][$pageid]['subpages'])) {
+ $subpageid = explode("/", $_SERVER['REQUEST_URI'])[4];
+ $subpageel = (array)$lang["admin-titles"][$pageid]['subpages'];
+ } else {
+ $subpageid = "";
+ }
+ } else {
+ $subpageid = "";
+ }
+} else {
+ $subpageid = "";
+}
+
+if (isset($lang["admin-titles"][$pageid])) {
+ if (isset($lang["admin-titles"][$pageid]['dom']) && isset($lang["admin-titles"][$pageid]['header'])) {
+ if (isset($lang["admin-titles"][$pageid]['subpages'])) {
+ if ($subpageid != "") {
+ $subpages = $lang["admin-titles"][$pageid]['subpages'];
+ if (isset($subpageel)) {
+ if (isset($subpageel[$subpageid])) {
+ $pageConfig = [ "domName" => $subpageel[$subpageid]['dom'] . " — " . $lang["admin-titles"][$pageid]['dom'], "headerName" => $subpageel[$subpageid]['header'] ];
+ } else {
+ $pageConfig = [ "domName" => $lang["admin-titles"]["fallback-subpages"] . " — " . $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"]["fallback-subpages"] ];
+ }
+ } else {
+ $pageConfig = [ "domName" => $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"][$pageid]['header'] ];
+ }
+ } else {
+ $pageConfig = [ "domName" => $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"][$pageid]['header'] ];
+ }
+ } else {
+ $pageConfig = [ "domName" => $lang["admin-titles"][$pageid]['dom'], "headerName" => $lang["admin-titles"][$pageid]['header'] ];
+ }
+ } else {
+ $pageConfig = [ "domName" => $lang["admin-titles"]["fallback"]['dom'], "headerName" => $lang["admin-titles"]["fallback"]['header'] ];
+ }
+} else {
+ $pageConfig = [ "domName" => $lang["admin-titles"]["fallback"], "headerName" => $lang["admin-titles"]["fallback"] ];
+}
+
+$invalid = false;
+
+if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/") {
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) {
+
+ } else {
+ require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin/?pr=" . str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']) . "&pa=" . urlencode("?" . explode("?", $_SERVER['REQUEST_URI'])[1]) . "'</script>");
+ }
+} else {
+ require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin/?pr=" . str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']) . "&pa=" . urlencode("?" . explode("?", $_SERVER['REQUEST_URI'])[1]) . "'</script>");
+}
+
+if (isset($_POST['password'])) {
+ if (password_verify($_POST['password'], file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/password"))) {
+ require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin/home';</script>");
+ return;
+ } else {
+ $invalid = true;
+ }
+}
+
+?>
+
+<?php ob_start();echo("<!--\n\n" . str_replace('%year%', date('Y'), file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/private/license")) . "\n\n-->") ?>
+<?php
+
+if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent")) {
+ $ready = true;
+} else {
+ $ready = false;
+}
+
+function startsWith ($string, $startString) {
+ $len = strlen($startString);
+ return (substr($string, 0, $len) === $startString);
+}
+
+function getData(string $dir, $ignoreUploadDir = false) {
+ global $size;
+ $dircontent = scandir($dir);
+ foreach ($dircontent as $direl) {
+ if (($ignoreUploadDir && ($direl == "/upload" || $dir . "/" . $direl == $_SERVER['DOCUMENT_ROOT'] . "/resources/upload")) || $direl == ".git") {} else {
+ if ($direl == "." || $direl == "..") {} else {
+ if (is_link($dir . "/" . $direl)) {} else {
+ if (is_dir($dir . "/" . $direl)) {
+ getData($dir . "/" . $direl);
+ } else {
+ try {
+ $size = $size + filesize($dir . "/" . $direl);
+ } catch (Error $err) {}
+ }
+ }
+ }
+ }
+ }
+}
+
+function isJson(string $json) {
+ json_decode($json);
+ return (json_last_error() == JSON_ERROR_NONE);
+}
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocessor.php";
+
+?>
+
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css">
+ <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/alerts.css">
+ <link href="<?= $_MD_INCLUDES ?>/material-components-web.min.css" rel="stylesheet">
+ <script src="<?= $_MD_INCLUDES ?>/material-components-web.min.js"></script>
+ <link rel="stylesheet" href="<?= $_MDI_PATH ?>">
+ <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/spotlight.css">
+ <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css">
+ <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css">
+ <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/codename.css">
+ <link rel="icon" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/siteicon.png">
+ <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/admin.js"></script>
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css" as="style">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/alerts.css" as="style">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css" as="style">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css" as="style">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/common.css" as="style">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/index.css" as="style">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/responsive.css" as="style">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/index-dark.css" as="style">
+ <link rel="preload" href="<?= $_MD_INCLUDES ?>/material-components-web.min.css" as="style">
+ <link rel="preload" href="<?= $_MDI_PATH ?>" as="style">
+ <link rel="preload" href="<?= $_MD_INCLUDES ?>/material-components-web.min.js" as="script">
+ <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/admin.js" as="script">
+ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documenthead.php"; ?>
+
+ <?php
+
+ if (!isset($loadEditor)) {
+ $loadEditor = true;
+ }
+
+ if ($loadEditor) {
+ echo('<script src="' . $GLOBALS["SYSTEM_ROOT"] . '/resources/js/ckeditor5/ckeditor.js"></script><script src="' . $GLOBALS["SYSTEM_ROOT"] . '/resources/js/ckeditor5/translations/fr.js"></script><script src="' . $GLOBALS["SYSTEM_ROOT"] . '/resources/js/ckeditor5/translations/en.js"></script>');
+ }
+
+ ?>
+ <?php
+ if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "dark") {
+ echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/$resources/index-dark.css">');
+ } elseif (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "auto") {
+ echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/$resources/index-auto.css">');
+ } else {
+ echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/$resources/index.css">');
+ }
+ ?>
+ <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/lib/pushbar.js/library.css">
+ <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/lib/pushbar.js/library.js"></script>
+ <title><?php
+
+ if ($ready) {
+ echo("{$lang["admin-titles"]["suffix"]} — " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename"));
+ } else {
+ echo("{$lang["admin-titles"]["suffix"]} — Neutron");
+ }
+
+ ?></title>
+ <?php
+ if (!$ready) {
+ require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/setup';</script></head>");
+ }
+ ?>
+ <?php
+
+ getData($_SERVER['DOCUMENT_ROOT']);
+ $sizestr = $size . " " . $lang["sizes"]["bytes"];
+ if ($size > 1024) {
+ if ($size > 1048576) {
+ if ($size > 1073741824) {
+ $sizestr = round($size / 1073741824, 2) . " " . $lang["sizes"]["gib"];
+ } else {
+ $sizestr = round($size / 1048576, 2) . " " . $lang["sizes"]["mib"];
+ }
+ } else {
+ $sizestr = round($size / 1024, 2) . " " . $lang["sizes"]["kib"];
+ }
+ } else {
+ $sizestr = $size . " " . $lang["sizes"]["bytes"];
+ }
+ $sizestr = str_replace(".", $lang["sizes"]["separator"], $sizestr);
+
+ ?>
+</head>
+<body id="settings" style="overflow-x:hidden;">
+ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/spotlight.php"; ?>
+ <?php
+
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documentbody.php";
+
+ $path = str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']);
+ $name = $pageConfig['headerName'];
+
+ ?>
+ <div id="admin">
+ <?php
+
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/updates")) {
+ echo("<div id=\"updates-available\">" . $lang["admin-home"]["updates"][0] . " — <a href=\"/cms-special/admin/updates\">" . $lang["admin-home"]["updates"][1] . "</a></div>");
+ $updatable = true;
+ } else {
+ $updatable = false;
+ }
+
+ ?>
+ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/header.php"; ?> \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css b/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css
new file mode 100644
index 0000000..75810b1
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/responsive.css
@@ -0,0 +1,31 @@
+@media (max-width: 500px) {
+ /* The following CSS will apply ONLY to smartphones or small screens */
+ .error-desktop {
+ display: none;
+ }
+ .error-mobile {
+ display: initial;
+ }
+ div#home-grid {
+ display: grid;
+ grid-template-columns: 1fr !important;
+ }
+}
+
+@media (max-width: 720px) {
+ /* The following CSS will apply ONLY to medium screens (less than 720p) */
+ #home-grid {
+ display: grid;
+ grid-template-columns: 1fr 1fr !important;
+ }
+}
+
+@media (min-width: 500px) {
+ /* The following CSS will NEVER apply to smartphones or small screens */
+ .error-desktop {
+ display: initial;
+ }
+ .error-mobile {
+ display: none;
+ }
+} \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php
new file mode 100644
index 0000000..bffaa87
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight-test.php
@@ -0,0 +1,14 @@
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; ?>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Spotlight search test</title>
+ <link rel="stylesheet" href="/resources/css/spotlight.css">
+ <link rel="stylesheet" href="/resources/lib/material/iconfont.css">
+</head>
+<body>
+ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/spotlight.php"; ?>
+</body>
+</html> \ No newline at end of file
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php
new file mode 100644
index 0000000..f803f52
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php
@@ -0,0 +1,24 @@
+<?php // Tutoriel utilisé : https://www.youtube.com/watch?v=5Y3Urj_DVMw
+?>
+<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/spotlight.js" defer></script>
+
+<?php
+
+$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/home/all/db.json"));
+
+?>
+<ul class="spotlight-elements">
+ <?php foreach ($data as $category): ?>
+ <?php foreach ($category->items as $item): ?>
+ <li class="spotlight-element">
+ <a href="#/<?= $item->page ?>" cat="<?= $category->name ?>" icon="<?= $category->icon ?>" class="spotlight-link"><?= $lang["admin-home"]["allitems"][$item->id] ?></a>
+ </li>
+
+ <script>
+ sysroot = "<?= $GLOBALS["SYSTEM_ROOT"] ?>";
+ </script>
+ <?php endforeach; ?>
+ <?php endforeach; ?>
+</ul>
+<spotlight-bar target=".spotlight-elements a" placeholder="<?= $lang["spotlight"]["search"] ?>">
+</spotlight-bar> \ No newline at end of file