aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-05-06 21:56:31 +0200
committerMinteck <contact@minteck.org>2022-05-06 21:56:31 +0200
commit66225fedd25567a2fe06da392b29171774842264 (patch)
treec7166ce2db0693fe678138982ab5a23a6bf7c381
parente5e876a3601182c7364544c12ea0aae08c5603c5 (diff)
downloadember-66225fedd25567a2fe06da392b29171774842264.tar.gz
ember-66225fedd25567a2fe06da392b29171774842264.tar.bz2
ember-66225fedd25567a2fe06da392b29171774842264.zip
Add details to build
-rw-r--r--assets/css/main.css10
-rw-r--r--includes/footer.php2
-rw-r--r--includes/functions.php24
3 files changed, 35 insertions, 1 deletions
diff --git a/assets/css/main.css b/assets/css/main.css
index 45be831..8b401cf 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -173,6 +173,16 @@ pre {
text-decoration: none;
}
+.footer-link-mini {
+ text-decoration: none;
+ color: white;
+}
+
+.footer-link-mini:hover {
+ text-decoration: underline;
+ color: white;
+}
+
#scoots {
background: linear-gradient(90deg, #bf5d93 0%, #f9b764 100%);
background-clip: text;
diff --git a/includes/footer.php b/includes/footer.php
index c0e325e..a87a0d5 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -7,7 +7,7 @@
<div id="footer-links">
</div>
- © <?= date('Y') ?> Minteck. | <span id="cutie">❤️ Twi <span id="cutie-inner">(cutie ^^)</span></span> | version <?= version() ?> (#<?= build() ?>)
+ © <?= date('Y') ?> Minteck. | <a href="https://tumblr.conep.one" target="_blank" class="footer-link-mini"><span id="cutie">❤️ Twi <span id="cutie-inner">(cutie ^^)</span></span></a> | <a href="https://gitlab.minteck.org/minteck/ember/-/tree/<?= version() ?>" target="_blank" class="footer-link-mini">version <?= version() ?></a> (#<?= build_dom() ?>)
</div>
<br>
diff --git a/includes/functions.php b/includes/functions.php
index 258ea97..80d663f 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -24,6 +24,30 @@ function build(): string {
return "$a.$b";
}
+function build_dom(): string {
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.build")) {
+ $a = trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.build"));
+ } else {
+ $a = "dev";
+ }
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.prjbuild")) {
+ $b = trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.prjbuild"));
+ } else {
+ $b = "testing";
+ }
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.build.id")) {
+ $aa = trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.build.id"));
+ } else {
+ $aa = "-1";
+ }
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.prjbuild.id")) {
+ $ba = trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.prjbuild.id"));
+ } else {
+ $ba = "-1";
+ }
+ return "<a href='https://ci.minteck.org/buildConfiguration/WebX_Stable/$aa' target='_blank' class='footer-link-mini'>$a</a>.<a href='https://ci.minteck.org/buildConfiguration/WebX_Projects/$ba' target='_blank' class='footer-link-mini'>$b</a>";
+}
+
function getLetters(string $project): string {
$words = explode(" ", preg_replace('/#+/m', "#", preg_replace('/[^a-z0-9 ]/m', "#", strtolower(trim(preg_replace('/[A-Z]/m', ' $0', $project))))));