Compare commits

..

1 Commits

Author SHA1 Message Date
81f1819d3a
Add support for articles 2023-12-31 12:08:15 +01:00
7 changed files with 76 additions and 19 deletions

View File

@ -15,19 +15,11 @@
<div class="section container">
<h1>Contact</h1>
<picture>
<source type="image/svg+xml" srcset="/assets/icons/email.svg">
<img class="icon" src="/assets/icons/email.png" alt="">
</picture>
<span>Email: </span>
<a href="mailto:?to=Reimar%20<%6D%61%69%6C%40%72%65%69%6D%2E%61%72>">&#109;&#97;&#105;&#108;&commat;&#114;&#101;&#105;&#109;&period;&#97;&#114;</a>
<br>
<picture>
<source type="image/svg+xml" srcset="/assets/icons/discord.svg">
<img class="icon" src="/assets/icons/discord.png" alt="">
</picture>
<span>Discord: reimarpb</span>
<span>Discord: &#82;&#101;&#105;&#109;&#97;&#114;&#80;&#66;&#35;&#53;&#55;&#51;&#54;</span>
<br>
<picture>
@ -35,7 +27,7 @@
<img class="icon" src="/assets/icons/xmpp.png" alt="">
</picture>
<span>XMPP:</span>
<a href="xmpp://%72%65%69%6D%61%72%40%72%65%69%6D%2E%61%72">&#114;&#101;&#105;&#109;&#97;&#114;&commat;&#114;&#101;&#105;&#109;&period;&#97;&#114;</a>
<a href="xmpp://%72%65%69%6D%61%72%40%72%65%69%6D%2E%61%72">&#114;&#101;&#105;&#109;&#97;&#114;@&#114;&#101;&#105;&#109;.&#97;&#114;</a>
<br>
<picture>

40
articles/index.php Normal file
View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<?php require "../inc/head.inc" ?>
</head>
<body>
<?php require "../inc/nav.inc" ?>
<div id="main-and-sidebar" dir="rtl" class="inline-block">
<div id="main-wrapper" class="inline-block">
<div id="main" class="inline-block">
<main>
<div class="section container">
<h1>Articles</h1>
This is a collection of articles written by me and my friends
</div>
<div class="section container">
<?php $articles = json_decode(file_get_contents("../data/articles.json")) ?>
<?php foreach ($articles as $i=>$article): ?>
<a class="reverse-link" href="/articles/<?= $article->slug ?>">
<h2 style="margin: 0"><?= $article->title ?></h2>
</a>
by <?= $article->author ?> &bull; <i>written <?= $article->created ?></i>
<?php if ($i != count($articles) - 1): ?><hr><?php endif ?>
<?php endforeach ?>
</div>
</main>
</div>
</div><!--
--><?php require "../inc/sidebar.inc" ?>
</div>
<?php require "../inc/background.inc" ?>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

View File

@ -1,5 +0,0 @@
<svg version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<polygon points="0 15 100 15 50 45" fill="#BDBDBD" />
<polygon points="0 22 50 52 100 22 100 85 0 85" fill="#BDBDBD" />
</svg>

Before

Width:  |  Height:  |  Size: 207 B

View File

@ -27,12 +27,15 @@ body {
-webkit-transition: all 0.2s linear, width 0s;
-moz-transition: all 0.2s linear, width 0s;
}
a {
outline: none;
}
a:hover {
text-decoration: none;
}
a.reverse-link {
text-decoration: none;
}
a.reverse-link:hover {
text-decoration: underline;
}
.loading, .loading * {
cursor: wait !important;
}
@ -265,3 +268,14 @@ object {
img {
border: none; /* Fix ico images on internet explorer */
}
@media print {
#grass, .light.tree, .dark.tree {
display: none !important;
}
.container {
background-color: red !important;
}
}

15
data/articles.json Normal file
View File

@ -0,0 +1,15 @@
[
{
"author": "Reimar",
"title": "Test",
"slug": "test",
"created": "2022-08-15"
},
{
"author": "Reimar",
"title": "Test",
"slug": "test",
"created": "2022-08-15"
}
]

View File

@ -4,7 +4,8 @@
$links = [
["/", "Home"],
["/about", "About"]
["/articles", "Articles"],
["/about", "About"],
];
$path = parse_url("http://test" . $_SERVER["REQUEST_URI"])["path"];