1
0
www.mikescher.com/www/pages/blog_view.php

72 lines
1.9 KiB
PHP
Raw Normal View History

2017-12-30 23:11:51 +01:00
<!DOCTYPE html>
<html lang="en">
<?php
require_once (__DIR__ . '/../internals/base.php');
require_once (__DIR__ . '/../internals/blog.php');
$id = $OPTIONS['id'];
$subview = $OPTIONS['subview'];
2019-12-02 14:57:01 +01:00
$post = Blog::getFullBlogpost($id, $subview, $err);
if ($post === null) httpError(404, $err);
2019-11-02 20:19:34 +01:00
2017-12-30 23:11:51 +01:00
?>
<head>
<meta charset="utf-8">
2019-12-02 14:57:01 +01:00
<title>Mikescher.com - <?php echo htmlspecialchars($post['title']); ?></title>
2017-12-30 23:11:51 +01:00
<link rel="icon" type="image/png" href="/data/images/favicon.png"/>
<?php printHeaderCSS(); ?>
2019-12-02 14:57:01 +01:00
<?php echo '<link rel="canonical" href="' . $post['canonical'] . '"/>'; ?>
2017-12-30 23:11:51 +01:00
</head>
<body>
<div id="mastercontainer">
2019-12-02 14:57:01 +01:00
<?php
if ($post['type'] == 'euler') $HEADER_ACTIVE = 'euler';
else if ($post['type'] == 'euler' && $post['issubview']) $HEADER_ACTIVE = 'aoc';
else $HEADER_ACTIVE = 'blog';
include (__DIR__ . '/../fragments/header.php');
?>
2017-12-30 23:11:51 +01:00
<div id="content" class="content-responsive">
<div class="blockcontent">
<div class="contentheader"><h1><?php echo htmlspecialchars($post['title']); ?></h1><hr/></div>
<?php
if ($post['type'] === 'plain') {
include (__DIR__ . '/../fragments/blogview_plain.php');
} elseif ($post['type'] === 'markdown') {
include (__DIR__ . '/../fragments/blogview_markdown.php');
} elseif ($post['type'] === 'euler') {
2017-12-31 17:53:59 +01:00
if ($subview === '') include (__DIR__ . '/../fragments/blogview_euler_list.php');
else include (__DIR__ . '/../fragments/blogview_euler_single.php');
2017-12-30 23:11:51 +01:00
2019-11-02 20:19:34 +01:00
} elseif ($post['type'] === 'aoc') {
if ($subview === '') include (__DIR__ . '/../fragments/blogview_aoc_list.php');
else include (__DIR__ . '/../fragments/blogview_aoc_single.php');
2017-12-30 23:11:51 +01:00
}
?>
</div>
</div>
<?php include (__DIR__ . '/../fragments/footer.php'); ?>
</div>
<?php printAdditionalScripts(); ?>
<?php printAdditionalStylesheets(); ?>
2017-12-30 23:11:51 +01:00
</body>
</html>