commit 23b3d77634df4895315eb90f1a9b57a53e4453c9
parent fad06deb4758bbecb4d140531b0e867946e53fcb
Author: René Wagner <rwa@clttr.info>
Date: Sat, 27 May 2023 21:04:52 +0200
unify link behaviour between index and admin page
especially open custom footer links in a new tab on the admin
page as well (index page already had that behaviour and
fix some broken links
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/admin.php b/admin.php
@@ -9,7 +9,7 @@ $stats_path = implode(DIRECTORY_SEPARATOR, array(__DIR__, "data", "stats.json"))
$stats_content = json_decode(file_get_contents($stats_path), true);
// convert the old timestamp format in the stats file to the now used date-format
-my $converted = 0;
+$converted = 0;
foreach ( $stats_content as &$stats_entry ) {
foreach ($stats_entry as $key => $value) {
if ( is_numeric($key) ) {
@@ -67,7 +67,7 @@ if (isset($_GET["delete"]) || isset($_GET["add"])) {
$links_string = "";
if ($config_content["settings"]["custom_links"]) {
foreach ($config_content["settings"]["custom_links"] as $name => $url) {
- $links_string = $links_string . "<a href=\"$url\" class=\"badge badge-secondary\">$name</a> ";
+ $links_string = $links_string . "<a href=\"$url\" class=\"badge badge-primary\" target=\"_blank\">$name</a> ";
}
$links_string = substr($links_string, 0, -1);
}
@@ -129,7 +129,7 @@ if ($config_content["settings"]["custom_links"]) {
</div>
<div class="card d-none d-md-block mb-3">
<div class="card-body">
- <p class="mb-0" id="version-1">powered by <a href="https://src.clttr.info/rwa/devshort" target="_blank">devShort</a></p>
+ <p class="mb-0" id="version-1">powered by <a href="https://sr.ht/~rwa/devshort" target="_blank">devShort</a></p>
</div>
</div>
<div class="card d-md-none mb-3">
@@ -151,10 +151,10 @@ if ($config_content["settings"]["custom_links"]) {
</div>
</main>
- <footer class="footer mt-auto py-3 bg-light">
+ <footer class="footer mt-auto py-3 bg-dark">
<div class="container">
<div class="d-flex justify-content-between align-items-center">
- <span class="text-muted">© 2020 <?php $config_content["settings"]["author"]; ?> and <a href="https://src.clttr.info/rwa/devshort" target="_blank">devShort</a></span>
+ <span class="text-light">© 2020-2023 <a href="<?php echo $config_content["settings"]["author_link"]; ?>" target="_blank"><?php echo $config_content["settings"]["author"]; ?></a> and <a href="https://sr.ht/~rwa/devshort" target="_blank">devShort</a></span>
<?php if ($links_string) { echo "<span class=\"text-muted\">$links_string</span>"; } ?>
</div>
</div>
diff --git a/index.php b/index.php
@@ -88,7 +88,7 @@ function show_random_shortlink() {
<footer class="footer mt-auto py-3 bg-dark">
<div class="container">
<div class="d-flex justify-content-between align-items-center">
- <span class="text-light">© 2020-2023 <?php echo $author_string; ?> and <a href="https://git.sr.ht/~rwa/devshort" target="_blank">devShort</a></span>
+ <span class="text-light">© 2020-2023 <a href="<?php echo $config_content["settings"]["author_link"]; ?>" target="_blank"><?php echo $author_string; ?></a> and <a href="https://sr.ht/~rwa/devshort" target="_blank">devShort</a></span>
<?php if ($links_string) { echo "<span class=\"text-muted\">$links_string</span>"; } ?>
</div>
</div>