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 @@