From 065174271d5b521b3bab54d48bb1c91569f8e56f Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 19 Jan 2025 18:25:14 +0200 Subject: feat: Implement the home page --- apache/httpd.conf.tpl | 1 + apache/sites/nowayforward_human.conf.tpl | 4 ++ views/home/index.php | 38 +++++++++++++++++++ views/styles.css | 65 ++++++++++++++++++++++++++++++-- 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 views/home/index.php diff --git a/apache/httpd.conf.tpl b/apache/httpd.conf.tpl index 3c87dab..950ff21 100644 --- a/apache/httpd.conf.tpl +++ b/apache/httpd.conf.tpl @@ -15,6 +15,7 @@ LoadModule unixd_module modules/mod_unixd.so LoadModule mime_module modules/mod_mime.so LoadModule alias_module modules/mod_alias.so LoadModule env_module modules/mod_env.so +LoadModule rewrite_module modules/mod_rewrite.so #LoadModule log_config_module modules/mod_log_config.so Define ROOT ${ROOT_DIR} diff --git a/apache/sites/nowayforward_human.conf.tpl b/apache/sites/nowayforward_human.conf.tpl index 46fa9c1..e94e13e 100644 --- a/apache/sites/nowayforward_human.conf.tpl +++ b/apache/sites/nowayforward_human.conf.tpl @@ -5,4 +5,8 @@ SetHandler "proxy:unix:${PHP_FPM_SOCKET}|fcgi://localhost/" + + RedirectMatch "^/$" /home/index.php + RedirectMatch "^/index.html$" /home/index.php + RedirectMatch "^/index.php$" /home/index.php diff --git a/views/home/index.php b/views/home/index.php new file mode 100644 index 0000000..33f123d --- /dev/null +++ b/views/home/index.php @@ -0,0 +1,38 @@ + + +
+

Explore the archives or add a new page

+
+ + +
+
+ +
+ +

Most popular archives

+ + +
+
+ URL ?> + Date ?> +
+
+ + +
+
+ Visits: Visits ?> + +
+
+ +

...

+ +
+ + + diff --git a/views/styles.css b/views/styles.css index cbfc3b8..9ace7bf 100644 --- a/views/styles.css +++ b/views/styles.css @@ -5,6 +5,8 @@ --highlight-border-color: #cecec9; --orange: #cc7000; --cherry: #703d46; + + --card-expand-with: 6em; } /* Global */ @@ -16,6 +18,7 @@ body { color: var(--foreground-color); width: 100vw; + max-width: 100%; height: 100vh; margin: 0; @@ -32,7 +35,7 @@ strong { color: #ff7233; } -h1, h2, h3, h4, h5, h6 { +h1 { text-align: center; } @@ -46,6 +49,8 @@ input { border: none; border-radius: 0.25em; + + min-width: 1em; } input[type=text]:focus { @@ -56,6 +61,48 @@ input[type=submit]:hover { cursor: pointer; } +/* Generic */ + +.float-right { + float: right; +} + +.width-80 { + width: 80%; +} + +.width-100 { + width: 100%; +} + +.font-125 { + font-size: 1.25em; +} + +.font-150 { + font-size: 1.5em; +} + +.center-margin { + margin-left: auto; + margin-right: auto; +} + +.separate-margin { + margin-top: 5em; + margin-bottom: 8em; +} + +.flex-row { + display: flex; + flex-direction: row; + gap: 0.5em; +} + +.flex-expand { + flex: 1; +} + /* Main containers */ header, article { max-width: 60rem; @@ -78,7 +125,7 @@ nav > * { width: fit-content; - color: color(--foreground-color); + color: white; background-color: var(--orange); text-decoration: none; @@ -100,6 +147,14 @@ article > * { } /* Page elements */ +hr.new-section { + height: 3px; + border-width: 0; + color: var(--orange); + background-color: var(--orange); + margin-bottom: 5em; +} + .card { display: flex; flex-direction: column; @@ -128,7 +183,7 @@ article > * { .card:hover { cursor: pointer; - height: 12.5em; + height: calc(6.5em + var(--card-expand-with)); } .card > .quickinfo { @@ -136,3 +191,7 @@ article > * { padding-bottom: 0.5em; border-bottom: 3px dotted #909090; } + +.card-blank-afterspace { + height: var(--card-expand-with); +} -- cgit v1.2.3