From 81f1819d3a64de5f11a2bdb788060c0710d6148e Mon Sep 17 00:00:00 2001 From: Reimar Date: Sun, 31 Dec 2023 12:08:15 +0100 Subject: [PATCH] Add support for articles --- articles/index.php | 40 ++++++++++++++++++++++++++++++++++++++++ assets/style/main.css | 20 +++++++++++++++++--- data/articles.json | 15 +++++++++++++++ inc/nav.inc | 3 ++- 4 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 articles/index.php create mode 100644 data/articles.json diff --git a/articles/index.php b/articles/index.php new file mode 100644 index 0000000..ec5d1fa --- /dev/null +++ b/articles/index.php @@ -0,0 +1,40 @@ + + + + + + + + +
+
+
+
+ +
+

Articles

+ This is a collection of articles written by me and my friends +
+ +
+ + $article): ?> + +

title ?>

+
+ by author ?> • written created ?> +
+ +
+ +
+
+
+
+ + + + + diff --git a/assets/style/main.css b/assets/style/main.css index 56f757f..d2ca2db 100644 --- a/assets/style/main.css +++ b/assets/style/main.css @@ -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; + } +} + diff --git a/data/articles.json b/data/articles.json new file mode 100644 index 0000000..dbb0229 --- /dev/null +++ b/data/articles.json @@ -0,0 +1,15 @@ +[ + { + "author": "Reimar", + "title": "Test", + "slug": "test", + "created": "2022-08-15" + }, + { + "author": "Reimar", + "title": "Test", + "slug": "test", + "created": "2022-08-15" + } +] + diff --git a/inc/nav.inc b/inc/nav.inc index 846a63c..d2bf9e7 100644 --- a/inc/nav.inc +++ b/inc/nav.inc @@ -4,7 +4,8 @@ $links = [ ["/", "Home"], - ["/about", "About"] + ["/articles", "Articles"], + ["/about", "About"], ]; $path = parse_url("http://test" . $_SERVER["REQUEST_URI"])["path"];