summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--include/prelude.php14
-rw-r--r--index.php4
3 files changed, 16 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fae4b4f..387ee6c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog
+## 11.9
+
+* Refactor server scripts
+* Fix 404 with no page query
+
## 11.8
* Update overview styling
diff --git a/include/prelude.php b/include/prelude.php
index bebcdf5..f772ad4 100644
--- a/include/prelude.php
+++ b/include/prelude.php
@@ -125,7 +125,7 @@
function add_nav_bar_link($title, $page) {
global $current_page;
- $ariaCurrent = match ($page) {
+ $aria_current = match ($page) {
$current_page => "page",
default => "false",
};
@@ -135,7 +135,7 @@
default => "",
};
- echo "<a aria-current=\"$ariaCurrent\" href=\"?p=$page\" id=\"$id\">$title</a>";
+ echo "<a aria-current=\"$aria_current\" href=\"?p=$page\" id=\"$id\">$title</a>";
}
function add_heading($title, $anchor) {
@@ -145,14 +145,14 @@
}
function add_image($image, $alt) {
- $sourceAddr = "/image/source/" . $image . ".webp";
- $thumbnailAddr = "/image/thumbnail/" . $image . ".avif";
+ $source_addr = "/image/source/" . $image . ".webp";
+ $thumbnail_addr = "/image/thumbnail/" . $image . ".avif";
echo <<<HTML
<div class="image">
- <img class="blur" src="$thumbnailAddr">
- <a href="$sourceAddr" rel="noopener noreferrer" target="_blank" title="Click to view image source.">
- <img alt="$alt" src="$thumbnailAddr">
+ <img class="blur" src="$thumbnail_addr">
+ <a href="$source_addr" rel="noopener noreferrer" target="_blank" title="Click to view image source.">
+ <img alt="$alt" src="$thumbnail_addr">
</a>
</div>
HTML;
diff --git a/index.php b/index.php
index 0628922..0b8fbeb 100644
--- a/index.php
+++ b/index.php
@@ -23,6 +23,10 @@
case "u8c":
break;
+ case null:
+ $current_page = "achernar";
+ break;
+
default:
http_response_code(404);
require "html/404.html";