aboutsummaryrefslogtreecommitdiff
path: root/admin/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/index.php')
-rw-r--r--admin/index.php441
1 files changed, 261 insertions, 180 deletions
diff --git a/admin/index.php b/admin/index.php
index edfa596..a7b4ced 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,181 +1,262 @@
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php"; ?>
-
-<!--suppress CssFloatPxLength -->
-<style>
- .section {
- color: gray;
- font-variant: all-petite-caps;
- font-size: 18px;
- margin: 20px 20px 5px;
- padding: 5px 7.5px 0 7.5px;
- border-top: 1px solid rgba(128, 128, 128, 0.25);
- }
-
- .item {
- cursor: pointer;
- margin: 0 20px;
- border-radius: 5px;
- padding: 2.5px 7.5px;
- color: lightgray;
- }
-
- .item:hover {
- background: rgba(255, 255, 255, .1);
- color: #c2c2c2;
- }
-
- .item:active, .item:focus, .item.selected {
- color: #e7e7e7 !important;
- background: rgba(255, 255, 255, .2) !important;
- cursor: default;
- }
-
- ::-webkit-scrollbar {
- width: 5px;
- }
-
- ::-webkit-scrollbar-track {
- border-radius: 9999px;
- background: transparent;
- }
-
- ::-webkit-scrollbar-thumb {
- border-radius: 9999px;
- background-color: rgba(136, 136, 136, 0.5);
- transition: background 200ms;
- }
-
- ::-webkit-scrollbar-thumb:hover {
- background-color: rgba(85, 85, 85, 0.75);
- }
-
- ::-webkit-scrollbar-thumb:active {
- background-color: #222;
- }
-
- .credits {
- margin: 15px 20px 0 20px;
- border-radius: 5px;
- padding: 2.5px 7.5px;
- color: lightgray;
- opacity: .25;
- font-size: 12px;
- }
-
- .reloadbtn {
- vertical-align: middle;
- float: right;
- display: none;
- opacity: 0;
- transition: opacity 200ms, transform 500ms;
- transform: rotate(0deg);
- }
-
- .item.selected .reloadbtn {
- display: inline-block;
- opacity: 1;
- }
-</style>
-
-<div style="position: fixed;inset: 0;z-index: 5;backdrop-filter:blur(10px);background:rgba(47,49,54,1);height:100%;display:grid;grid-template-columns: 256px 1fr;">
- <div id="menu" style="height:100%;overflow-y: scroll;">
- <div class="item selected" id="activity-home" style="margin-top:15vh;">
- Home
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
-
- <h3 class="section">System</h3>
- <div class="item" id="activity-uptime">
- Uptime
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-version">
- Software Versions
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
-
- <h3 class="section">Member Management</h3>
- <div class="item" id="activity-unchained">
- UnchainedTech
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-kartik">
- Kartik Online
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
-
- <h3 class="section">Minteck Space</h3>
- <div class="item" id="activity-blog">
- Blog
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-telemetry">
- Telemetry
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-code">
- Code of Conduct
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
-
- <h3 class="section">Neutron Cloud</h3>
- <div class="item" id="activity-quotas">
- Quotas
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-neutroning">
- Sites Map
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
-
- <div class="credits" style="margin-bottom:15vh;">
- Release <?= substr(md5_file($_SERVER['DOCUMENT_ROOT'] . "/admin/index.php"), 0, 7); ?><br>
- Host <?= PHP_VERSION ?><br>
- <?= php_uname('s') ?> <?= php_uname('r') ?>
- </div>
- </div>
-
- <div id="content" style="background:rgba(54,57,63,1);">
- <iframe id="content-frame" src="/admin/panes/home.php" style="background: transparent;border: none;height: 100%;width: 100%;"></iframe>
- </div>
-
- <script>
-
- function activity(id, url, target) {
- if (target.classList.contains("selected")) return;
- if (target.classList.contains("reloadbtn")) return;
-
- Array.from(document.getElementsByClassName("item")).forEach((item) => {
- item.classList.remove("selected");
- })
-
- document.getElementById(id).classList.add("selected");
- document.getElementById("content-frame").src = url;
- }
-
- document.getElementById("activity-home").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/home.php", event.target); }, true)
- document.getElementById("activity-uptime").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/uptime.php", event.target); }, true)
- document.getElementById("activity-version").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/version.php", event.target); }, true)
- document.getElementById("activity-kartik").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/kartik.php", event.target); }, true)
- document.getElementById("activity-blog").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/blog.php", event.target); }, true)
- document.getElementById("activity-code").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/code.php", event.target); }, true)
- document.getElementById("activity-quotas").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/quotas.php", event.target); }, true)
- document.getElementById("activity-neutroning").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/neutroning.php", event.target); }, true)
- document.getElementById("activity-telemetry").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/telemetry.php", event.target); }, true)
- document.getElementById("activity-unchained").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/unchained.php", event.target); }, true)
-
- Array.from(document.getElementsByClassName("reloadbtn")).forEach((item) => {
- item.addEventListener("click", (event) => {
- if (event.target.style.transform === "rotate(-360deg)") {
- event.target.style.transform = "rotate(0deg)";
- } else {
- event.target.style.transform = "rotate(-360deg)";
- }
- document.getElementById("content-frame").contentWindow.location.reload(true);
- })
- })
-
- </script>
-</div>
-
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php"; ?>
+
+<div id="--loader" style="background:rgba(47,49,54,1);position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;">
+ <img src="/logo-mono.png" width="64px">
+</div>
+
+<script>
+ window.addEventListener("load", () => {
+ setTimeout(() => {
+ $("#--loader").fadeOut(200);
+ }, 2000)
+ })
+</script>
+
+<!--suppress CssFloatPxLength -->
+<style>
+ .section {
+ color: gray;
+ font-variant: all-petite-caps;
+ font-size: 18px;
+ margin: 20px 20px 5px;
+ padding: 5px 7.5px 0 7.5px;
+ border-top: 1px solid rgba(128, 128, 128, 0.25);
+ }
+
+ .item {
+ cursor: pointer;
+ margin: 0 20px;
+ border-radius: 99px;
+ padding: 2.5px 15px;
+ color: lightgray;
+ margin-right: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+
+ .item:hover {
+ background: rgba(255, 255, 255, .1);
+ color: #c2c2c2;
+ }
+
+ .item:active, .item:focus, .item.selected {
+ color: #e7e7e7 !important;
+ background: rgba(255, 255, 255, .2) !important;
+ cursor: default;
+ }
+
+ ::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ ::-webkit-scrollbar-track {
+ border-radius: 9999px;
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ border-radius: 9999px;
+ background-color: rgba(136, 136, 136, 0.5);
+ transition: background 200ms;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(85, 85, 85, 0.75);
+ }
+
+ ::-webkit-scrollbar-thumb:active {
+ background-color: #222;
+ }
+
+ .credits {
+ margin: 15px 20px 0 20px;
+ border-radius: 5px;
+ padding: 2.5px 7.5px;
+ color: lightgray;
+ opacity: .25;
+ font-size: 12px;
+ }
+
+ .reloadbtn {
+ vertical-align: middle;
+ float: right;
+ display: none;
+ opacity: 0;
+ transition: opacity 200ms, transform 500ms;
+ transform: rotate(0deg);
+ }
+
+ .item.selected .reloadbtn {
+ display: inline-block;
+ opacity: 1;
+ }
+
+ .item-text {
+ vertical-align: middle;
+ position: relative;
+ top: 2px;
+ pointer-events: none;
+ }
+
+ .item-icon {
+ vertical-align: middle;
+ width: 24px;
+ filter: invert(1);
+ pointer-events: none;
+ }
+
+ @media (max-width: 700px) {
+ .admin > div {
+ grid-template-columns: 64px 1fr !important;
+ }
+
+ .item-text, .credits {
+ display: none;
+ }
+
+ .reloadbtn {
+ display: none !important;
+ opacity: 0 !important;
+ pointer-events: none !important;
+ }
+
+ .item {
+ padding: 5px;
+ margin-left: 8px;
+ margin-right: 8px;
+ border-radius: 999px;
+ width: 48px;
+ height: 48px;
+ margin-bottom: 5px;
+ }
+
+ .item:nth-child(1) {
+ margin-top: 10px !important;
+ }
+
+ .item-icon {
+ position: relative;
+ top: 1px;
+ width: 36px;
+ left: 1px;
+ }
+ }
+</style>
+
+<div style="position: fixed;inset: 0;z-index: 5;backdrop-filter:blur(10px);background:rgba(47,49,54,1);height:100%;display:grid;grid-template-columns: 256px 1fr;">
+ <div id="menu" style="height:100%;">
+ <div class="item selected" id="activity-home" style="margin-top:15vh;">
+ <img src="/static/admin/home.svg" class="item-icon" alt="">
+ <span class="item-text">Home</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-files">
+ <img src="/static/admin/files.svg" class="item-icon" alt="">
+ <span class="item-text">Files</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-hardware">
+ <img src="/static/admin/hardware.svg" class="item-icon" alt="">
+ <span class="item-text">Hardware</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-disk">
+ <img src="/static/admin/disk.svg" class="item-icon" alt="">
+ <span class="item-text">Disk Space</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-uptime">
+ <img src="/static/admin/uptime.svg" class="item-icon" alt="">
+ <span class="item-text">Uptime</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-version">
+ <img src="/static/admin/version.svg" class="item-icon" alt="">
+ <span class="item-text">Software Versions</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-unchained">
+ <img src="/static/admin/unchained.svg" class="item-icon" alt="">
+ <span class="item-text">UnchainedTech</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-kartik">
+ <img src="/static/admin/kartik.svg" class="item-icon" alt="">
+ <span class="item-text">Kartik Online
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-telemetry">
+ <img src="/static/admin/telemetry.svg" class="item-icon" alt="">
+ <span class="item-text">Telemetry</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-code">
+ <img src="/static/admin/code.svg" class="item-icon" alt="">
+ <span class="item-text">Code of Conduct</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-quotas">
+ <img src="/static/admin/quotas.svg" class="item-icon" alt="">
+ <span class="item-text">Quotas</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+ <div class="item" id="activity-neutroning">
+ <img src="/static/admin/neutroning.svg" class="item-icon" alt="">
+ <span class="item-text">Sites Map</span>
+ <img alt="" src="/static/reload.png" class="reloadbtn">
+ </div>
+
+ <div class="credits" style="margin-bottom:15vh;">
+ Admin <?= substr(md5_file($_SERVER['DOCUMENT_ROOT'] . "/admin/index.php"), 0, 7); ?><br>
+ Release <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/version.txt") ?><br>
+ Host <?= PHP_VERSION ?><br>
+ <?= php_uname('s') ?> <?= php_uname('r') ?>
+ </div>
+ </div>
+
+ <div id="content" style="background:rgba(54,57,63,1);">
+ <iframe id="content-frame" src="/admin/panes/home.php" style="background: transparent;border: none;height: 100%;width: 100%;"></iframe>
+ </div>
+
+ <script>
+
+ function activity(id, url, target) {
+ if (target.classList.contains("selected")) return;
+ if (target.classList.contains("reloadbtn")) return;
+
+ Array.from(document.getElementsByClassName("item")).forEach((item) => {
+ item.classList.remove("selected");
+ })
+
+ document.getElementById(id).classList.add("selected");
+ document.getElementById("content-frame").src = url;
+ }
+
+ document.getElementById("activity-home").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/home.php", event.target); }, true)
+ document.getElementById("activity-files").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/files.php", event.target); }, true)
+ document.getElementById("activity-hardware").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/hardware.php", event.target); }, true)
+ document.getElementById("activity-disk").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/disk.php", event.target); }, true)
+ document.getElementById("activity-uptime").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/uptime.php", event.target); }, true)
+ document.getElementById("activity-version").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/version.php", event.target); }, true)
+ document.getElementById("activity-kartik").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/kartik.php", event.target); }, true)
+ document.getElementById("activity-code").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/code.php", event.target); }, true)
+ document.getElementById("activity-quotas").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/quotas.php", event.target); }, true)
+ document.getElementById("activity-neutroning").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/neutroning.php", event.target); }, true)
+ document.getElementById("activity-telemetry").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/telemetry.php", event.target); }, true)
+ document.getElementById("activity-unchained").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/unchained.php", event.target); }, true)
+
+ Array.from(document.getElementsByClassName("reloadbtn")).forEach((item) => {
+ item.addEventListener("click", (event) => {
+ if (event.target.style.transform === "rotate(-360deg)") {
+ event.target.style.transform = "rotate(0deg)";
+ } else {
+ event.target.style.transform = "rotate(-360deg)";
+ }
+ document.getElementById("content-frame").contentWindow.location.reload(true);
+ })
+ })
+
+ </script>
+</div>
+
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?> \ No newline at end of file