aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/api/engine-cyclic/components
diff options
context:
space:
mode:
authorGitea <gitea@fake.local>2021-11-10 17:53:50 +0100
committerGitea <gitea@fake.local>2021-11-10 17:53:50 +0100
commit8fabf77b2a7720a357c63817c07035a9908818a0 (patch)
treed689fcac1403e2473010fe80bc337599a78c21a4 /Neutron-trunk/api/engine-cyclic/components
parent7b4af63a90a726b98a59b83e53f040a7a566a11d (diff)
downloadelectrode-8fabf77b2a7720a357c63817c07035a9908818a0.tar.gz
electrode-8fabf77b2a7720a357c63817c07035a9908818a0.tar.bz2
electrode-8fabf77b2a7720a357c63817c07035a9908818a0.zip
Update
Diffstat (limited to 'Neutron-trunk/api/engine-cyclic/components')
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/banner.php10
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/content.php22
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/drawer.php54
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/favicon.php88
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/footer.php18
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/init.php14
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/menubar.php52
-rw-r--r--Neutron-trunk/api/engine-cyclic/components/widgets.php18
8 files changed, 0 insertions, 276 deletions
diff --git a/Neutron-trunk/api/engine-cyclic/components/banner.php b/Neutron-trunk/api/engine-cyclic/components/banner.php
deleted file mode 100644
index 800ead1..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/banner.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<div id="page-banner"></div>
-<style>:root { --mpcms-banner: url(<?php
-rlgps("Loaded banner image");
-if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) {
- echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"');
-} else {
- echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"');
-}
-
-?>); }</style> \ No newline at end of file
diff --git a/Neutron-trunk/api/engine-cyclic/components/content.php b/Neutron-trunk/api/engine-cyclic/components/content.php
deleted file mode 100644
index e3e3be5..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/content.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<article id="page-content">
- <div id="page-elements">
- <div id="page-content-inner">
- <span id="page-content-colorbar"></span>
- <h1><?= getPageName() ?></h1>
- <?= getPageContent() ?>
- </div>
- <div id="page-content-widgets-desktop"><?php rlgps("Generating desktop widgets..."); ?>
- <h3><?= $lang["menu"]["info"] ?></h3>
- <?php require $_SERVER['DOCUMENT_ROOT'] . "/api/engine-cyclic/components/widgets.php"; ?>
- </div>
- <div id="page-content-widgets-mobile" data-pushbar-id="widgets" data-pushbar-direction="right"><?php rlgps("Generating mobile widgets..."); ?>
- <span class="mdc-list-item" onclick="pushbar.close();">
- <i class="material-icons-outlined mdc-list-item__graphic" aria-hidden="true">close</i>
- <span class="mdc-list-item__text"><?= $lang["viewer"]["close"] ?></span>
- </span>
- <hr class="mdc-list-divider">
- <h3><?= $lang["menu"]["info"] ?></h3>
- <?php require $_SERVER['DOCUMENT_ROOT'] . "/api/engine-cyclic/components/widgets.php"; ?>
- </div>
- </div>
-</article>
diff --git a/Neutron-trunk/api/engine-cyclic/components/drawer.php b/Neutron-trunk/api/engine-cyclic/components/drawer.php
deleted file mode 100644
index f0e1db7..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/drawer.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist.mtd") || (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist.mtd") && strpos(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist.mtd"), "|") === false)) {
- rlgps("Regenerating cache");
- require_once $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_pages_update.php";
-}
-
-if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd") || (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd") && strpos(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd"), "|") === false)) {
- rlgps("Regenerating cache");
- require_once $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_pages_update.php";
-}
-
-?>
-
-<aside class="mdc-drawer" data-pushbar-direction="right" data-pushbar-id="navigation">
- <div class="mdc-drawer__content">
- <nav class="mdc-list">
- <a class="mdc-list-item" onclick="pushbar.close();">
- <i class="material-icons-outlined mdc-list-item__graphic" aria-hidden="true">close</i>
- <span class="mdc-list-item__text"><?= $lang["viewer"]["close"] ?></span>
- </a>
- <hr class="mdc-list-divider">
- <a class="mdc-list-item <?= $_SERVER['PHP_SELF'] == "/index.php" ? " mdc-list-item--activated" : "" ?>" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/" aria-current="page">
- <i class="material-icons-outlined mdc-list-item__graphic" aria-hidden="true">home</i>
- <span class="mdc-list-item__text"><?= $lang["viewer"]["home"] ?></span>
- </a>
- <?php
- rlgps("Loading pages list from cache...");
- $preels = explode("\n", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd"));
- $els = [];
- foreach ($preels as $el) {
- if (substr($el, 0, 1) != "@") {
- $parts = explode("|", $el);
- array_push($els, $parts);
- }
- }
- rlgps("Generating menu");
- ?>
- <?php foreach ($els as $el): if (trim($el[0]) !== ""): ?>
- <a class="mdc-list-item" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/<?= $el[0] ?>">
- <i class="material-icons-outlined mdc-list-item__graphic" aria-hidden="true">insert_drive_file</i>
- <span class="mdc-list-item__text"><?= $el[1] ?></span>
- </a>
- <?php endif;endforeach ?>
- <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures") && count(scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures")) > 2): ?>
- <a class="mdc-list-item<?= $_SERVER['PHP_SELF'] == "/cms-special/gallery/index.php" ? " mdc-list-item--activated" : "" ?>" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/gallery" aria-current="page">
- <i class="material-icons-outlined mdc-list-item__graphic" aria-hidden="true">image</i>
- <span class="mdc-list-item__text"><?= $lang["viewer"]["gallery"] ?></span>
- </a>
- <?php rlgps("Putting gallery link");endif ?>
- </nav>
- </div>
-</aside>
-<div class="mdc-drawer-app-content"> \ No newline at end of file
diff --git a/Neutron-trunk/api/engine-cyclic/components/favicon.php b/Neutron-trunk/api/engine-cyclic/components/favicon.php
deleted file mode 100644
index 3d078a1..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/favicon.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
- class CircleCrop
- {
-
- private $src_img;
- private $src_w;
- private $src_h;
- private $dst_img;
- private $dst_w;
- private $dst_h;
-
- public function __construct($img, $dstWidth, $dstHeight)
- {
- $this->src_img = $img;
- $this->src_w = imagesx($img);
- $this->src_h = imagesy($img);
- $this->dst_w = $dstWidth;
- $this->dst_h = $dstHeight;
- }
-
- public function __destruct()
- {
- if (is_resource($this->dst_img))
- {
- imagedestroy($this->dst_img);
- }
- }
-
- public function display()
- {
- imagepng($this->dst_img, $_SERVER['DOCUMENT_ROOT'] . "/resources/upload/favicon.png");
- return $this;
- }
-
- public function reset()
- {
- if (is_resource(($this->dst_img)))
- {
- imagedestroy($this->dst_img);
- }
- $this->dst_img = imagecreatetruecolor($this->dst_w, $this->dst_h);
- imagecopy($this->dst_img, $this->src_img, 0, 0, 0, 0, $this->dst_w, $this->dst_h);
- return $this;
- }
-
- public function size($dstWidth, $dstHeight)
- {
- $this->dst_w = $dstWidth;
- $this->dst_h = $dstHeight;
- return $this->reset();
- }
-
- public function crop()
- {
- $this->reset();
-
- $mask = imagecreatetruecolor($this->dst_w, $this->dst_h);
- $maskTransparent = imagecolorallocate($mask, 255, 0, 255);
- imagecolortransparent($mask, $maskTransparent);
- imagefilledellipse($mask, $this->dst_w / 2, $this->dst_h / 2, $this->dst_w, $this->dst_h, $maskTransparent);
-
- imagecopymerge($this->dst_img, $mask, 0, 0, 0, 0, $this->dst_w, $this->dst_h, 100);
-
- $dstTransparent = imagecolorallocate($this->dst_img, 255, 0, 255);
- imagefill($this->dst_img, 0, 0, $dstTransparent);
- imagefill($this->dst_img, $this->dst_w - 1, 0, $dstTransparent);
- imagefill($this->dst_img, 0, $this->dst_h - 1, $dstTransparent);
- imagefill($this->dst_img, $this->dst_w - 1, $this->dst_h - 1, $dstTransparent);
- imagecolortransparent($this->dst_img, $dstTransparent);
-
- return $this;
- }
-
- }
-
- if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/siteicon-uncomp.png")) {
- $path = $_SERVER['DOCUMENT_ROOT'] . "/resources/upload/siteicon-uncomp.png";
- } else {
- $path = $_SERVER['DOCUMENT_ROOT'] . "/resources/upload/siteicon.png";
- }
-
- $image = imagecreatefrompng($path);
-
- $width = imagesx($image);
- $height = imagesy($image);
- $crop = new CircleCrop($image,$width,$height);
- $crop->crop()->display(); \ No newline at end of file
diff --git a/Neutron-trunk/api/engine-cyclic/components/footer.php b/Neutron-trunk/api/engine-cyclic/components/footer.php
deleted file mode 100644
index ca571cb..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/footer.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<div id="footer-container"><?php rlgps("Generating footer"); ?>
- <span id="page-footer-colorbar"></span>
- <footer id="page-footer">
- <div id="page-footer-title">
- <div id="page-footer-title-inner" class="title"><?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename") ?></div>
- <div id="page-footer-title-buttons">
- <a id="page-footer-title-top-button" onclick="$('html, body').animate({scrollTop:0},'20');"><button class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button" id="page-footer-title-top-button-inner" onclick="$('html, body').animate({scrollTop:0},'20');">arrow_upward</button></a>
- <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2" id="page-footer-title-settings-button"><button class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button" id="page-footer-title-settings-button-inner">settings</button></a>
- </div>
- </div>
- <div id="page-footer-content">
- <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/footer") ?>
- </div>
- <div id="page-footer-links">
- <a href="<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/public") ?>" target="_blank">Neutron <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/version") ?></a> · <a href="<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/bugs") ?>" target="_blank"><?= $lang["viewer"]["bugs"] ?></a> · <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/version"><?= $lang["viewer"]["system"] ?></a>
- </div>
- </footer>
-</div> \ No newline at end of file
diff --git a/Neutron-trunk/api/engine-cyclic/components/init.php b/Neutron-trunk/api/engine-cyclic/components/init.php
deleted file mode 100644
index d17792e..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/init.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-rlgps("Loading widgets");
-$json = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widgets.json"));
-$widgets = $json->list;
-foreach ($widgets as $widget): ?>
-<?php $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/widgets/" . $widget . "/feature.json")); ?>
-<?php
-
-if (isset($data->class) && is_string($data->class)) {
- require $_SERVER['DOCUMENT_ROOT'] . "/widgets/" . $widget . "/source.php";
-}
-
-?>
-<?php endforeach ?> \ No newline at end of file
diff --git a/Neutron-trunk/api/engine-cyclic/components/menubar.php b/Neutron-trunk/api/engine-cyclic/components/menubar.php
deleted file mode 100644
index b6bce59..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/menubar.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-if ((!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-old.mtd") || (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd") && strpos(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-old.mtd"), "<a") === false)) || (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd") || (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd") && strpos(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-full.mtd"), "|") === false)) || (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist-old.mtd") || (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist.mtd") && strpos(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist.mtd"), "|") === false))) {
- rlgps("Regenerating pages cache");
- require_once $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_pages_update.php";
-}
-
-?>
-
-<header class="mdc-top-app-bar">
- <div class="mdc-top-app-bar__row">
- <section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-start">
- <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/" id="menubar-home-link">
- <span id="menubar-logo"></span>
- <span class="mdc-top-app-bar__title title rsp-desktoponly"><?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename") ?></span>
- </a>
- </section>
- <section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end" role="toolbar">
- <span class="rsp-desktoponly" id="menuitems">
- <?php
- rlgps("Loading pages from cache...");
-
- $preels = explode("\n", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/pagelist.mtd"));
- $els = [];
- foreach ($preels as $el) {
- if (substr($el, 0, 1) != "@") {
- $parts = explode("|", $el);
- array_push($els, $parts);
- }
- }
-
- ?>
- <?php rlgps("Generating menubar");foreach ($els as $el): ?>
- <?php if (trim($el[1]) != ""): ?>
- <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/<?= $el[0] ?>" class="mdc-button rsp-desktoponly">
- <div class="mdc-button__ripple"></div>
- <span class="mdc-button__label menubutton"><?= $el[1] ?></span>
- </a>
- <?php endif;endforeach; ?>
- <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures") && count(scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures")) > 2): ?>
- <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/gallery" class="mdc-button rsp-desktoponly">
- <div class="mdc-button__ripple"></div>
- <span class="mdc-button__label menubutton"><?= $lang["viewer"]["gallery"] ?></span>
- </a>
- <?php endif ?>
- </span>
- <a href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/" class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button">home</a>
- <button class="material-icons-outlined mdc-top-app-bar__navigation-icon mdc-icon-button" onclick="pushbar.open('navigation');">menu</button>
- <button class="material-icons-outlined mdc-top-app-bar__action-item mdc-icon-button rsp-mobileonly rsp-widgetbar" onclick="pushbar.open('widgets');">info</button>
- </section>
- </div>
-</header>
diff --git a/Neutron-trunk/api/engine-cyclic/components/widgets.php b/Neutron-trunk/api/engine-cyclic/components/widgets.php
deleted file mode 100644
index c2a903c..0000000
--- a/Neutron-trunk/api/engine-cyclic/components/widgets.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-rlgps("Loading widgets");
-$json = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widgets.json"));
-$widgets = $json->list;
-foreach ($widgets as $widget): ?>
-<?php $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/widgets/" . $widget . "/feature.json")); ?>
-<h6 class="widgets-header"><?= getName($data) ?></h6>
-<?php
-
-if (isset($data->class) && is_string($data->class)) {
- $class = $data->class;
- new $class();
-} else {
- require $_SERVER['DOCUMENT_ROOT'] . "/widgets/" . $widget . "/source.php";
-}
-
-?>
-<?php endforeach ?> \ No newline at end of file