From dc483ea4fde55cb212319153f16e1443ca30db27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer=20=28Macbook=29?= Date: Thu, 16 Jan 2020 10:56:12 +0100 Subject: [PATCH] BlogList --- www/frames/default_frame.php | 2 +- www/frames/error_frame.php | 2 +- www/pages/blog_list.php | 67 ++++++++++++--------------------- www/pages/blog_view.php | 2 +- www/pages/error_notfound.php | 2 +- www/pages/error_servererror.php | 2 +- www/pages/main.php | 2 +- 7 files changed, 31 insertions(+), 48 deletions(-) diff --git a/www/frames/default_frame.php b/www/frames/default_frame.php index 46247fc..d0221c6 100644 --- a/www/frames/default_frame.php +++ b/www/frames/default_frame.php @@ -12,7 +12,7 @@ require_once (__DIR__ . '/../internals/website.php'); - <?php echo htmlspecialchars($FRAME_OPTIONS->title); ?> + <?php echo ($FRAME_OPTIONS->title !== '') ? htmlspecialchars('Mikescher.com - ' . $FRAME_OPTIONS->title) : 'Mikescher.com'; ?> - <?php echo htmlspecialchars($FRAME_OPTIONS->title); ?> + <?php echo ($FRAME_OPTIONS->title !== '') ? htmlspecialchars('Mikescher.com - ' . $FRAME_OPTIONS->title) : 'Mikescher.com'; ?> diff --git a/www/pages/blog_list.php b/www/pages/blog_list.php index 0c5a494..e97483a 100644 --- a/www/pages/blog_list.php +++ b/www/pages/blog_list.php @@ -1,55 +1,38 @@ - - - - - Mikescher.com - Blog - - - - - -
- +title = 'Blog'; +$FRAME_OPTIONS->canonical_url = 'https://www.mikescher.com/blog'; +$FRAME_OPTIONS->activeHeader = 'blog'; -
+$allposts = $SITE->modules->Blog()->listAllNewestFirst(); +?> -
+
-

Blogposts and other stuff


+

Blogposts and other stuff


- - -
+ ?> +
- - - -
- - - - \ No newline at end of file diff --git a/www/pages/blog_view.php b/www/pages/blog_view.php index 5d676fa..62fb473 100644 --- a/www/pages/blog_view.php +++ b/www/pages/blog_view.php @@ -13,7 +13,7 @@ $subview = $ROUTE->parameter['subview']; $post = $SITE->modules->Blog()->getFullBlogpost($id, $subview, $err); if ($post === null) { $FRAME_OPTIONS->setForced404($err); return; } -$FRAME_OPTIONS->title = 'Mikescher.com - ' . $post['title']; +$FRAME_OPTIONS->title = $post['title']; $FRAME_OPTIONS->canonical_url = $post['canonical']; if ($post['type'] == 'euler') diff --git a/www/pages/error_notfound.php b/www/pages/error_notfound.php index 1e7ee02..d1cc388 100644 --- a/www/pages/error_notfound.php +++ b/www/pages/error_notfound.php @@ -9,7 +9,7 @@ require_once (__DIR__ . '/../internals/website.php'); parameter['message']) ? $ROUTE->parameter['message'] : ''; -$FRAME_OPTIONS->title = 'Mikescher.com - ' . $message; +$FRAME_OPTIONS->title = $message; $FRAME_OPTIONS->canonical_url = null; $FRAME_OPTIONS->activeHeader = null; $FRAME_OPTIONS->contentCSSClasses []= 'content-fullheight'; diff --git a/www/pages/error_servererror.php b/www/pages/error_servererror.php index 10097d0..5a61038 100644 --- a/www/pages/error_servererror.php +++ b/www/pages/error_servererror.php @@ -7,7 +7,7 @@ require_once (__DIR__ . '/../internals/website.php'); ?> title = 'Mikescher.com - Error'; +$FRAME_OPTIONS->title = 'Error'; $FRAME_OPTIONS->canonical_url = null; $FRAME_OPTIONS->activeHeader = null; $FRAME_OPTIONS->contentCSSClasses []= 'content-fullheight'; diff --git a/www/pages/main.php b/www/pages/main.php index 3bda4c9..917d890 100644 --- a/www/pages/main.php +++ b/www/pages/main.php @@ -7,7 +7,7 @@ require_once (__DIR__ . '/../internals/website.php'); ?> title = 'Mikescher.com'; +$FRAME_OPTIONS->title = ''; $FRAME_OPTIONS->canonical_url = 'https://www.mikescher.com'; $FRAME_OPTIONS->activeHeader = 'home'; ?>