From de1b5afbbb24b809912f55fed13c5721151ac93e Mon Sep 17 00:00:00 2001 From: Terence Eden Date: Sat, 2 Mar 2024 23:33:59 +0000 Subject: [PATCH] Rationalise HTML and CSS --- index.php | 123 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 71 insertions(+), 52 deletions(-) diff --git a/index.php b/index.php index f602510..494416b 100644 --- a/index.php +++ b/index.php @@ -493,45 +493,46 @@ echo <<< HTML {$realName} - - - -
-
- -
-

{$realName}

-

-
-

{$summary}

-
-

This software is licenced under AGPL 3.0.

-

This site is a basic ActivityPub server designed to be a lightweight educational tool.

-
+ + + +
+
+ -
+
    +HTML; // Get all posts, most recent first $posts = array_reverse( glob( $directories["posts"] . "/*.json") ); @@ -555,12 +556,12 @@ echo <<< HTML } // Display the post - echo "
  • "; + echo "
  • "; } echo <<< HTML
-
+ HTML; @@ -1223,15 +1224,30 @@ echo <<< HTML + + Reader + body { margin:0; padding: 0; font-family:sans-serif; } + @media screen and (max-width: 800px) { body { width: 100%; }} + @media screen and (min-width: 799px) { body { width: 800px; margin: 0 auto; }} + img { max-width: 50%; } + .h-feed { margin:auto; width: 100%; } + .h-feed > header { text-align: center; margin: 0 auto; } + .h-feed .banner { text-align: center; margin:0 auto; max-width: 650px; } + .h-feed > h1, .h-feed > h2 { margin-top: 10px; margin-bottom: 0; } + .h-feed > header > h1:has(span.p-author), h2:has(a.p-nickname) { word-break: break-all; max-width: 90%; padding-left:20px; } + .h-feed .u-feature:first-child { margin-top: 10px; margin-bottom: -150px; max-width: 100%;} + .h-feed > ul { padding-left: 0; list-style-type: none; } + .h-feed > ul > li { padding: 10px; border-bottom: dotted 1px #808080; } + .h-entry { padding-right: 10px; } + .h-entry time { font-weight: bold; } + .h-entry .e-content a { word-wrap: break-all; } + - + HTML;