This commit is contained in:
7
web/frontend/parts/favicon.php
Normal file
7
web/frontend/parts/favicon.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg width="41" height="42" viewBox="0 0 41 42" fill="<?=htmlspecialchars(\Aternos\Mclogs\Config\Config::getInstance()->get(\Aternos\Mclogs\Config\ConfigKey::FRONTEND_COLOR_ACCENT)); ?>" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="41" height="5" rx="2"/>
|
||||
<rect y="9.25" width="33" height="5" rx="2"/>
|
||||
<rect y="18.5" width="19" height="5" rx="2"/>
|
||||
<rect y="27.75" width="33" height="5" rx="2"/>
|
||||
<rect y="37" width="41" height="5" rx="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 470 B |
28
web/frontend/parts/footer.php
Normal file
28
web/frontend/parts/footer.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
use Aternos\Mclogs\Config\Config;use Aternos\Mclogs\Config\ConfigKey;use Aternos\Mclogs\Util\URL;
|
||||
|
||||
$imprintUrl = Config::getInstance()->get(ConfigKey::LEGAL_IMPRINT);
|
||||
$privacyUrl = Config::getInstance()->get(ConfigKey::LEGAL_PRIVACY);
|
||||
?>
|
||||
<footer>
|
||||
<?php if($imprintUrl || $privacyUrl): ?>
|
||||
<nav class="legal">
|
||||
<?php if ($imprintUrl): ?>
|
||||
<a href="<?=htmlspecialchars($imprintUrl); ?>" class="footer-link" title="Imprint" target="_blank">Imprint</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($imprintUrl && $privacyUrl): ?>
|
||||
<span class="footer-separator"> - </span>
|
||||
<?php endif; ?>
|
||||
<?php if ($privacyUrl): ?>
|
||||
<a href="<?=htmlspecialchars($privacyUrl); ?>" class="footer-link" title="Privacy Policy" target="_blank">Privacy Policy</a>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<nav class="footer-nav">
|
||||
<a href="https://github.com/aternosorg/mclogs" title="mclo.gs on Github" target="_blank"><i class="fa-brands fa-github"></i>GitHub</a>
|
||||
<a href="https://modrinth.com/plugin/mclogs" title="Download mclo.gs Mod/Plugin" target="_blank"><i class="fa-solid fa-cube"></i>Mod/Plugin</a>
|
||||
<a href="<?=htmlspecialchars(URL::getApi()->toString()); ?>" title="mclo.gs API"><i class="fa-solid fa-code"></i>API</a>
|
||||
</nav>
|
||||
<span class="footer-text">developed by <a href="https://aternos.org" target="_blank" title="Aternos website">Aternos</a>
|
||||
</span>
|
||||
</footer>
|
||||
44
web/frontend/parts/head.php
Normal file
44
web/frontend/parts/head.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Aternos\Mclogs\Config\Config;
|
||||
use Aternos\Mclogs\Config\ConfigKey;
|
||||
use Aternos\Mclogs\Frontend\Assets\AssetLoader;
|
||||
use Aternos\Mclogs\Frontend\Assets\AssetType;
|
||||
use Aternos\Mclogs\Util\URL;
|
||||
|
||||
?>
|
||||
<meta charset="utf-8"/>
|
||||
|
||||
<base href="/"/>
|
||||
<?= AssetLoader::getInstance()->getHTML(AssetType::CSS, "vendor/fontawesome/css/fontawesome.min.css"); ?>
|
||||
<?= AssetLoader::getInstance()->getHTML(AssetType::CSS, "css/mclogs.css"); ?>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--bg: <?= htmlspecialchars(Config::getInstance()->get(ConfigKey::FRONTEND_COLOR_BACKGROUND)); ?>;
|
||||
--text: <?= htmlspecialchars(Config::getInstance()->get(ConfigKey::FRONTEND_COLOR_TEXT)); ?>;
|
||||
--accent: <?= htmlspecialchars(Config::getInstance()->get(ConfigKey::FRONTEND_COLOR_ACCENT)); ?>;
|
||||
--error: <?= htmlspecialchars(Config::getInstance()->get(ConfigKey::FRONTEND_COLOR_ERROR)); ?>;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" sizes="any"/>
|
||||
<link rel="shortcut icon" href="<?= htmlspecialchars(URL::getBase()->withPath("/favicon.svg")->toString()); ?>" type="image/svg+xml">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||
<?php if (Config::getInstance()->get(ConfigKey::FRONTEND_ANALYTICS)): ?>
|
||||
<script>
|
||||
let _paq = window._paq = window._paq || [];
|
||||
_paq.push(['disableCookies']);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function () {
|
||||
_paq.push(['setTrackerUrl', '/data']);
|
||||
_paq.push(['setSiteId', '5']);
|
||||
let d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
|
||||
g.async = true;
|
||||
g.src = '/data.js';
|
||||
s.parentNode.insertBefore(g, s);
|
||||
})();
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
49
web/frontend/parts/header.php
Normal file
49
web/frontend/parts/header.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<header>
|
||||
<a href="<?=htmlspecialchars(\Aternos\Mclogs\Util\URL::getBase()->toString()); ?>" class="logo">
|
||||
<svg class="logo-icon" width="41" height="42" viewBox="0 0 41 42" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="41" height="5" rx="2" fill="currentColor"/>
|
||||
<rect y="9.25" width="33" height="5" rx="2" fill="currentColor"/>
|
||||
<rect y="18.5" width="19" height="5" rx="2" fill="currentColor"/>
|
||||
<rect y="27.75" width="33" height="5" rx="2" fill="currentColor"/>
|
||||
<rect y="37" width="41" height="5" rx="2" fill="currentColor"/>
|
||||
</svg>
|
||||
<span class="logo-text"><?= htmlspecialchars(\Aternos\Mclogs\Config\Config::getInstance()->getName()); ?></span>
|
||||
</a>
|
||||
<div class="tagline">
|
||||
<h1 class="tagline-main"><span class="title-verb">Paste</span> your logs.</h1>
|
||||
<div class="tagline-sub">Built for Minecraft & Hytale</div>
|
||||
</div>
|
||||
<script>
|
||||
const titles = ["Paste", "Share", "Analyse"];
|
||||
let currentTitle = 0;
|
||||
let speed = 30;
|
||||
let pause = 3000;
|
||||
const titleElement = document.querySelector('.title-verb');
|
||||
|
||||
setTimeout(nextTitle, pause);
|
||||
|
||||
function nextTitle() {
|
||||
currentTitle++;
|
||||
if (typeof (titles[currentTitle]) === "undefined") {
|
||||
currentTitle = 0;
|
||||
}
|
||||
|
||||
const title = titleElement.innerHTML;
|
||||
for (let i = 0; i < title.length - 1; i++) {
|
||||
setTimeout(function () {
|
||||
titleElement.innerHTML = titleElement.innerHTML.substring(0, titleElement.innerHTML.length - 1);
|
||||
}, i * speed);
|
||||
}
|
||||
|
||||
const newTitle = titles[currentTitle];
|
||||
for (let i = 1; i <= newTitle.length; i++) {
|
||||
setTimeout(function () {
|
||||
titleElement.innerHTML = newTitle.substring(0, titleElement.innerHTML.length + 1);
|
||||
}, title.length * speed + i * speed);
|
||||
}
|
||||
|
||||
setTimeout(nextTitle, title.length * speed + newTitle.length * speed + pause);
|
||||
}
|
||||
</script>
|
||||
</header>
|
||||
Reference in New Issue
Block a user