diff --git a/www/router.php b/www/router.php index 2f2d0e8..f43829d 100644 --- a/www/router.php +++ b/www/router.php @@ -68,33 +68,23 @@ if($SURI == '/') { exit(0); } - echo $twig->render('directory.html', [ + echo $twig->render('post_types/directory.html', [ "post" => $post, "subposts" => $post['subposts'] ]); } elseif($post['post_metadata']['type'] == 'text/markdown') { - echo $twig->render('about.html', [ + echo $twig->render('post_types/markdown.html', [ "post" => $post, "subposts" => $post['subposts'] ]); } elseif($post['post_metadata']['type'] == 'file') { - echo $twig->render('image.html', [ + echo $twig->render('post_types/image.html', [ "post" => $post ]); } -} elseif(preg_match('/^\/about(.html)?$/', $SURI)) { - echo $twig->render('about.html'); -} elseif(preg_match('/^\/gallery\/([^\?]+)/', $SURI)) { - echo $twig->render('/gallery/gallery_entry.html', [ - 'image_url' => '/static/banner/0.png', - 'image_title' => 'Test!', - 'image_desc' => 'A soft piece made by a dear friend', - 'artist_name' => 'Doggonaut', - 'artist_src_link' => 'https://twitter.com/doggonaut' - ]); } else { echo $twig->render('rrror.html',[ "error_code" => '404 Hoard not found!', diff --git a/www/static/dergstyle.css b/www/static/dergstyle.css index 9bf4f29..f0b486d 100644 --- a/www/static/dergstyle.css +++ b/www/static/dergstyle.css @@ -1,4 +1,5 @@ + * { box-sizing: border-box; margin: 0; @@ -6,8 +7,17 @@ } body { - color: #B0B0B0; - background: #201c2a; + --bg_1: #0e0a2a; + --bg_2: #2c2943; + --bg_3: #3f4148; + + --highlight_1: #ee9015; + --highlight_2: #edd29e; + + --text_1: #FFFFFF; + + color: var(--text_1); + background: var(--bg_1); margin: 0px; position: relative; @@ -17,17 +27,17 @@ body { } :link { - color: cyan; + color: var(--highlight_1); font-style: italic; text-decoration: none; transition: color 0.2s; } a:visited { - color: cyan; + color: var(--highlight_1); } a:hover { - color: lightblue; + color: var(--highlight_2); } #main_header { @@ -89,20 +99,62 @@ a:hover { } #main_content_wrapper { - padding: 3vmin 1em 1em 1em; + padding: 0em 1em 1em 1em; width: auto; margin-left: max(0.75em, min(max(20vmin, 50vw - 30rem), 50vw - 25rem)); margin-right: max(0.75em, min(max(20vmin, 50vw - 30rem), 50vw - 25rem)); + margin-top: 0px; min-height: 100%; - background: #3e355479; + background: var(--bg_2); +} + +#post_file_bar { + position: sticky; + + top: 0px; + + background: var(--bg_2); +} + +#post_file_titles { + display: flex; + flex-direction: row; + justify-content: left; + + list-style-type: none; + padding: 0px; +} + +#post_file_titles * { + padding: 0.5em; + font-style: bold; + font-size: 1.3em; + + background: var(--highlight_1); +} + +#post_file_path { + width: 100%; + font-style: italic; + padding-left: 0.5em; + + background: var(--highlight_1); + + display: flex; + flex-direction: row; + list-style-type: none; +} +#post_file_path a { + color: var(--text_1); + padding-right: 0.2em; } #main_content_wrapper article { - background: #3e3554; - color: #c6c3c3; - border-radius: 0.3em; + background: var(--bg_3); + + border-radius: 0em 0em 0.8em 0.8em; box-shadow: 3px 7px 7px 0px #00000040; padding: 0.75em; @@ -115,6 +167,17 @@ a:hover { border-bottom: solid 1px darkgrey; } +#main_content_wrapper article img { + display: block; + max-width: 100%; + + max-height: 80vh; + + margin: 1vmin; + margin-right: auto; + margin-left: auto; +} + #main_footer { display: flex; diff --git a/www/static/directorystyle.css b/www/static/directorystyle.css new file mode 100644 index 0000000..c1bca25 --- /dev/null +++ b/www/static/directorystyle.css @@ -0,0 +1,36 @@ + + +table.directory { + width: 100%; +} + +table.directory caption { + text-align: left; + font-size: 1.5em; + + padding-left: 2em; +} + +table.directory td { + padding: 0.2em; + text-align: left; +} +table.directory th { + padding: 0.2em; + text-align: left; + + padding-bottom: 0.05em; +} + +table.directory tr.entry:hover { + background: rgba(255, 255, 255, 0.1); +} + +table.directory tr.entry .entry_title { + width: 100%; +} + +table.directory .entry_update_time { + display: block; + width: 10em; +} \ No newline at end of file diff --git a/www/static/gallerystyle.css b/www/static/imagestyle.css similarity index 100% rename from www/static/gallerystyle.css rename to www/static/imagestyle.css diff --git a/www/templates/about.html b/www/templates/about.html deleted file mode 100644 index 2b8619d..0000000 --- a/www/templates/about.html +++ /dev/null @@ -1,25 +0,0 @@ - - -{% extends "root.html" %} - -{% block second_title %} -
+ | Name | +Title | +Modified | +
---|---|---|---|
+ ICN + | ++ {{subpost.post_basename}} + | ++ {{ subpost.post_metadata.title }} + | ++ {{ subpost.post_update_time }} + | +