first commit
This commit is contained in:
17
views/blogmain.twig
Normal file
17
views/blogmain.twig
Normal file
@ -0,0 +1,17 @@
|
||||
{% extends layout %}
|
||||
|
||||
{% block title %}Blog{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="overview">
|
||||
<h1>Blog Overview</h1>
|
||||
{% foreach($posts as $post): %}
|
||||
<div class="post">
|
||||
<a href="/post/{{ $post->getId() }}">{{ $post->getTitle() }}</a>
|
||||
<p>{{ $post->getContent(50) }}</p>
|
||||
<p>Datum: 2025-03-04</p>
|
||||
<p>Autor: Beispielautor</p>
|
||||
</div>
|
||||
{% endforeach; %}
|
||||
</div>
|
||||
{% endblock %}
|
13
views/blogpost.twig
Normal file
13
views/blogpost.twig
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends layout %}
|
||||
|
||||
{% block title %}{{ $post->getTitle() }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="overview">
|
||||
<h1>{{ $post->getTitle() }}</h1>
|
||||
<section class="post-view">
|
||||
<p>{{ $post->getContent() }}</p>
|
||||
</section>
|
||||
<a href="/">back</a>
|
||||
</div>
|
||||
{% endblock %}
|
14
views/layout.twig
Normal file
14
views/layout.twig
Normal file
@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{% yield title %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<base href="https://blog.flumm.io">
|
||||
<link rel="stylesheet" href="./css/blog.css?v={{ filemtime(__dir__ . '/../../public/css/blog.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="blog">
|
||||
{% yield content %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
12
views/login.twig
Normal file
12
views/login.twig
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends layout %}
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="/login">
|
||||
<input type="text" name="username" placeholder="Benutzername" required>
|
||||
<input type="password" name="password" placeholder="Passwort" required>
|
||||
<input type="hidden" name="_csrf_token" value="{{ $csrf }}">
|
||||
<button type="submit">Einloggen</button>
|
||||
</form>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user