Umstrukturierung und readme überarbeitet

This commit is contained in:
xoy 2023-02-27 08:34:39 +01:00
parent 18e83f52a6
commit f067fd6651
20 changed files with 101 additions and 15 deletions

View File

@ -20,15 +20,31 @@
Datei im Elementverzeichnis Anlegen: *YYYY-MM-DD.html*
Strukturierung:
```
<h1 class="title"> Event Titel </h1>
<p class="date"> Event Datum </p>
<p class="desc"> Event Beschreibung </p>
<div class="content">
Event Content
...
</div>
title: Event Titel
date: Event Datum
desc: Event Beschreibung
------------------------
#Content below here!
```
Strukturierung:
- Header
```
title: Event Titel
date: Event Datum
desc: Event Beschreibung
```
- Trenner zwischen Header und Content
```
------------------------
```
- Kommentar
```
#Content below here!
```
Eigenes CSS kann in der Datei *events_custom.css* hinzugefügt werden.

View File

@ -1,7 +1,5 @@
<h1 class="title"> Event Titel </h1>
<p class="date"> Event Datum </p>
<p class="desc"> Event Beschreibung </p>
<div class="content">
Event Content
...
</div>
title: Event Titel
date: Event Datum
desc: Event Beschreibung
------------------------
#Content below here!

10
index.php Normal file
View File

@ -0,0 +1,10 @@
<?php
$loader = new \Twig\Loader\FilesystemLoader('templates');
$twig = new \Twig\Environment($loader, [
'cache' => '/path/to/compilation_cache',
]);
if (isset($_GET["page"]) && $_GET["page"] != "") {
echo $twig->render('page.html', ['title' => $_GET["page"]]);
}
?>

31
templates/event.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ctdo - {{ title }}</title>
<link rel="stylesheet" href="/styles/main.css">
<link rel="stylesheet" href="/styles/home.css">
<link rel="stylesheet" href="/styles/events.css">
</head>
<body>
<div class="newBanner">Rundgang</div>
<header>
<img src="/images/logo_ctdo.svg" alt="ctdo logo">
{{ nav }}
</header>
<main>
<h2> {{ title }} </h2>
{{ content }}
</main>
<footer>
{{ footer }}
</footer>
</body>
</html>

31
templates/page.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ctdo - {{ title }}</title>
<link rel="stylesheet" href="/styles/main.css">
<link rel="stylesheet" href="/styles/home.css">
<link rel="stylesheet" href="/styles/events.css">
</head>
<body>
<div class="newBanner">Rundgang</div>
<header>
<img src="/images/logo_ctdo.svg" alt="ctdo logo">
{{ nav }}
</header>
<main>
<h2> {{ title }} </h2>
{{ content }}
</main>
<footer>
{{ footer }}
</footer>
</body>
</html>