Added Picnic CSS

Fixed spelling errors
This commit is contained in:
Furentes
2019-05-22 13:54:26 +02:00
parent 62e4c56658
commit ba97176e37
14 changed files with 129 additions and 444 deletions

View File

@ -5,60 +5,24 @@ $posts = $auth->getAllPosts();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Home - <?= (defined("SITE_TITLE")) ? SITE_TITLE : 'A Bloggr Site' ?></title>
</head>
<?php
$title = "Home";
require_once(__DIR__."/inc/head.php");
?>
<body>
<?php
if ($auth->hasRole([ \Bloggr\Roles::ADMIN ])) {
?>
<p>
<a href="/users.php">Users</a>
</p>
<?php
}
if ($auth->hasRole([ \Bloggr\Roles::ADMIN, \Bloggr\Roles::AUTHOR ])) {
?>
<p>
<a href="/post.php?new">Neuer Beitrag</a>
</p>
<?php
}
if (!$auth->isLoggedIn()) {
?>
<p>
<a href="/login.php">Login</a>
</p>
<p>
<a href="/register.php">Registrieren</a>
</p>
<?php
} else {
?>
<p>
<a href="/settings.php">Einstellungen</a>
</p>
<p>
<a href="/logout.php">Logout</a>
</p>
<?php
}
?>
<div>
<?php require_once(__DIR__."/inc/nav.php"); ?>
<section class="main">
<h2>Posts</h2>
<?php
if ($posts) {
foreach($posts as $post) {
?>
<p>
<h2>Titel: <a href="/post.php?view=<?= $post['id'] ?>"><?= $post['title'] ?></a></h2>
<h2><a href="/post.php?view=<?= $post['id'] ?>"><?= $post['title'] ?></a></h2>
<p>
Text:
<?= substr($post['text'], 0, 512) ?><?= (substr($post['text'], 0, 512) !== $post['text']) ? '... <br><a href="/post.php?view='.$post["id"].'">Weiterlesen...</a>' : '' ?>
</p>
<p>Author: <?= $post['user'] ?></p>
<p><small>von <?= $post['user'] ?> am <?= date('H:i d.m.Y', $post['created_at']) ?></p>
</p>
<?php
}
@ -66,6 +30,6 @@ $posts = $auth->getAllPosts();
echo 'Noch kein Beitrag vorhanden. :(';
}
?>
</div>
</section>
</body>
</html>