From 530e01df737629e96aa90c2ac66681186b11eeb6 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Sat, 29 Jun 2024 11:49:05 -0500 Subject: [PATCH] Update blog page --- app/templates/blog/footer.htm | 32 ------------ app/templates/blog/header.htm | 59 ----------------------- app/templates/blog/{list.htm => list.php} | 0 app/templates/blog/{read.htm => read.php} | 0 public/blog/index.php | 38 +++++---------- public/index.php | 21 ++++---- 6 files changed, 23 insertions(+), 127 deletions(-) delete mode 100755 app/templates/blog/footer.htm delete mode 100755 app/templates/blog/header.htm rename app/templates/blog/{list.htm => list.php} (100%) rename app/templates/blog/{read.htm => read.php} (100%) diff --git a/app/templates/blog/footer.htm b/app/templates/blog/footer.htm deleted file mode 100755 index 5c1ff7b..0000000 --- a/app/templates/blog/footer.htm +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/app/templates/blog/header.htm b/app/templates/blog/header.htm deleted file mode 100755 index 9863c7d..0000000 --- a/app/templates/blog/header.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - Blog | Mad Splash! - - - - - - - - - - - - - -
- - - -
- -
-

THE BLOG

- - -
diff --git a/app/templates/blog/list.htm b/app/templates/blog/list.php similarity index 100% rename from app/templates/blog/list.htm rename to app/templates/blog/list.php diff --git a/app/templates/blog/read.htm b/app/templates/blog/read.php similarity index 100% rename from app/templates/blog/read.htm rename to app/templates/blog/read.php diff --git a/public/blog/index.php b/public/blog/index.php index ee03d8a..0f2a047 100755 --- a/public/blog/index.php +++ b/public/blog/index.php @@ -1,27 +1,13 @@ \ No newline at end of file + +require '../app/bootstrap.php'; + +const PAGES = ['list', 'read']; + +echo render('header'); + +$do = !empty($_GET['do']) && in_array($_GET['do'], PAGES) ? $_GET['do'] : 'list'; + +echo render("blog/$do"); + +echo render('footer'); diff --git a/public/index.php b/public/index.php index 4f54ab8..ad553f4 100755 --- a/public/index.php +++ b/public/index.php @@ -1,18 +1,19 @@