reworked first blog entry; added imprint and privacy policy to blog

This commit is contained in:
Ludwig Lehnert 2025-04-15 22:12:37 +02:00
parent f96146d649
commit 4b2e543f07
28 changed files with 113 additions and 20501 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 40 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -13,6 +13,11 @@ if ($blog === null) {
$svgs = $blog->getSVGs(); $svgs = $blog->getSVGs();
$rand_imprint = mt_rand() % 6;
$rand_privacy = mt_rand() % 6;
$rand_comments = mt_rand() % 6;
$rand_send_comment = mt_rand() % 5;
?><!DOCTYPE html> ?><!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -30,6 +35,7 @@ $svgs = $blog->getSVGs();
html, html,
body { body {
min-height: max(100%, 100vh); min-height: max(100%, 100vh);
background: white;
} }
* { * {
@ -40,21 +46,49 @@ $svgs = $blog->getSVGs();
main { main {
display: flex; display: flex;
justify-content: center; flex-direction: column;
align-items: center;
} }
main>svg { main>* {
display: block;
width: min(100vw, 1000px); width: min(100vw, 1000px);
height: auto; height: auto;
} }
main>svg a { svg .hyperref {
cursor: pointer; cursor: pointer;
} }
main>svg a:hover { svg .hyperref:hover {
opacity: 0.6; opacity: 0.6;
} }
.send-comment {
display: flex;
flex-direction: column;
align-items: center;
}
.send-comment svg {
max-height: 3rem;
height: 7vw;
min-height: 1.5rem;
width: auto;
}
.bottom-links {
display: flex;
justify-content: space-between;
}
.bottom-links svg {
max-height: 4rem;
height: 10vw;
min-height: 2rem;
width: auto;
padding: 0 2rem 0 2rem;
}
</style> </style>
</head> </head>
@ -63,6 +97,19 @@ $svgs = $blog->getSVGs();
<?php foreach ($svgs as $svg): ?> <?php foreach ($svgs as $svg): ?>
<?= $svg ?> <?= $svg ?>
<?php endforeach; ?> <?php endforeach; ?>
<div class="send-comment">
<?= get_svg(__DIR__ . "/assets/blog/send-comment$rand_send_comment.svg") ?>
</div>
<div style="height: 100px"></div>
<div class="bottom-links">
<?= get_svg(__DIR__ . "/assets/blog/imprint$rand_imprint.svg") ?>
<?= get_svg(__DIR__ . "/assets/blog/privacy$rand_privacy.svg") ?>
</div>
<div style="height: 100px"></div>
</main> </main>
</body> </body>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -4,3 +4,4 @@ require_once __DIR__ . '/style.php';
require_once __DIR__ . '/stars.php'; require_once __DIR__ . '/stars.php';
require_once __DIR__ . '/fill.php'; require_once __DIR__ . '/fill.php';
require_once __DIR__ . '/blog.php'; require_once __DIR__ . '/blog.php';
require_once __DIR__ . '/svg.php';

View File

@ -23,13 +23,7 @@ class Blog
public function getSVGs(): array public function getSVGs(): array
{ {
return array_map(function ($file) { return array_map(function ($file) {
$svg = file_get_contents(__DIR__ . '/../blog/' . $file); return get_svg(__DIR__ . '/../blog/' . $file);
if (str_starts_with($svg, '<?xml')) {
$svg = preg_replace('/^\s*<\?xml[^>]+>\s*/', '', $svg);
}
return $svg;
}, $this->files); }, $this->files);
} }

12
www/lib/svg.php Normal file
View File

@ -0,0 +1,12 @@
<?php
function get_svg($path)
{
$svg = file_get_contents($path);
if (str_starts_with($svg, '<?xml')) {
$svg = preg_replace('/^\s*<\?xml[^>]+>\s*/', '', $svg);
}
return $svg;
}