From cf5dd6581e75a5947606e8f3ab2233e8b6978394 Mon Sep 17 00:00:00 2001 From: Connor Thomson Date: Sun, 20 Sep 2026 08:56:59 -0700 Subject: Seperate some stuff --- LICENSE | 0 content.html | 1 - css/desktop/button.css | 0 css/desktop/container.css | 0 css/desktop/header.css | 19 ------------------- css/desktop/input.css | 0 css/desktop/login.css | 0 css/desktop/navbar.css | 27 +++++++++++++++++++++++++++ html/footer.html | 2 +- html/header.html | 8 +------- html/main.html | 9 +-------- html/navbar.html | 0 html/stylesheets.html | 27 +++++++++++++++++++++++++++ images/logos/logo.gif | Bin images/logos/taya.gif | Bin php/execute.php | 0 php/footer.php | 2 +- php/header.php | 30 ++++++++++++++++++++++++++++++ php/index.php | 2 +- php/render.php | 11 ++++++----- signin/content.html | 0 signin/index.php | 2 +- signup/content.html | 0 signup/index.php | 1 - signup/signup.php | 0 signup/verify/content.html | 0 signup/verify/index.php | 1 - signup/verify/verify.php | 0 28 files changed, 96 insertions(+), 46 deletions(-) mode change 100644 => 100755 LICENSE mode change 100644 => 100755 css/desktop/button.css mode change 100644 => 100755 css/desktop/container.css mode change 100644 => 100755 css/desktop/input.css mode change 100644 => 100755 css/desktop/login.css create mode 100755 css/desktop/navbar.css create mode 100755 html/navbar.html create mode 100755 html/stylesheets.html mode change 100644 => 100755 images/logos/logo.gif mode change 100644 => 100755 images/logos/taya.gif mode change 100644 => 100755 php/execute.php create mode 100755 php/header.php mode change 100644 => 100755 php/index.php mode change 100644 => 100755 signin/content.html mode change 100644 => 100755 signin/index.php mode change 100644 => 100755 signup/content.html delete mode 120000 signup/index.php mode change 100644 => 100755 signup/signup.php mode change 100644 => 100755 signup/verify/content.html delete mode 120000 signup/verify/index.php mode change 100644 => 100755 signup/verify/verify.php diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/content.html b/content.html index ff8feb5..e69de29 100755 --- a/content.html +++ b/content.html @@ -1 +0,0 @@ -

Hello, World!

diff --git a/css/desktop/button.css b/css/desktop/button.css old mode 100644 new mode 100755 diff --git a/css/desktop/container.css b/css/desktop/container.css old mode 100644 new mode 100755 diff --git a/css/desktop/header.css b/css/desktop/header.css index 0364bfa..7b72c7c 100755 --- a/css/desktop/header.css +++ b/css/desktop/header.css @@ -42,22 +42,3 @@ .header .banner a { text-decoration: none; } - -.header .navbar { - height: 35px; - padding: 5px; - background-color: #CADCEB; - display: flex; - align-items: center; - border-bottom: 1px solid #98A5B0; - justify-content: space-between; -} - -.header .navbar a { - text-decoration: none; - color: black; -} - -.header .navbar a:hover { - text-decoration: underline; -} diff --git a/css/desktop/input.css b/css/desktop/input.css old mode 100644 new mode 100755 diff --git a/css/desktop/login.css b/css/desktop/login.css old mode 100644 new mode 100755 diff --git a/css/desktop/navbar.css b/css/desktop/navbar.css new file mode 100755 index 0000000..a94d539 --- /dev/null +++ b/css/desktop/navbar.css @@ -0,0 +1,27 @@ +/* + * GNUfault.org - GNUfault's website + * Copyright (C) 2026 Connor Thomson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +.header .navbar { + height: 35px; + padding: 5px; + background-color: #CADCEB; + display: flex; + align-items: center; + border-bottom: 1px solid #98A5B0; + gap: 5px; +} diff --git a/html/footer.html b/html/footer.html index 3a15050..678e9ff 100755 --- a/html/footer.html +++ b/html/footer.html @@ -17,5 +17,5 @@ --> diff --git a/html/header.html b/html/header.html index 827ac18..dccb0f3 100755 --- a/html/header.html +++ b/html/header.html @@ -28,12 +28,6 @@ diff --git a/html/main.html b/html/main.html index d4a3534..690d257 100755 --- a/html/main.html +++ b/html/main.html @@ -25,14 +25,7 @@ - - - - - - - - + {{stylesheets}}
diff --git a/html/navbar.html b/html/navbar.html new file mode 100755 index 0000000..e69de29 diff --git a/html/stylesheets.html b/html/stylesheets.html new file mode 100755 index 0000000..bd8c9f7 --- /dev/null +++ b/html/stylesheets.html @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/images/logos/logo.gif b/images/logos/logo.gif old mode 100644 new mode 100755 diff --git a/images/logos/taya.gif b/images/logos/taya.gif old mode 100644 new mode 100755 diff --git a/php/execute.php b/php/execute.php old mode 100644 new mode 100755 diff --git a/php/footer.php b/php/footer.php index 695b39f..652bf3e 100755 --- a/php/footer.php +++ b/php/footer.php @@ -22,7 +22,7 @@ require_once ROOT . '/php/replace.php'; $year = date('Y'); $targets = [ - '{{YEAR}}' => $year + '{{year}}' => $year ]; $html = replace(ROOT . '/html/footer.html', $targets); diff --git a/php/header.php b/php/header.php new file mode 100755 index 0000000..93cdbf9 --- /dev/null +++ b/php/header.php @@ -0,0 +1,30 @@ +. + */ + +require_once ROOT . '/php/replace.php'; + +$targets = [ + '{{navbar}}' => file_get_contents(ROOT . '/html/navbar.html') +]; + +$html = replace(ROOT . '/html/header.html', $targets); + +echo $html; + +?> \ No newline at end of file diff --git a/php/index.php b/php/index.php old mode 100644 new mode 100755 index 2f2377d..cdf976d --- a/php/index.php +++ b/php/index.php @@ -24,6 +24,6 @@ require_once ROOT . '/php/render.php'; $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); $file = rtrim($path, '/') . '/content.html'; -render_page(ROOT . $file); +render_content(ROOT . $file); ?> diff --git a/php/render.php b/php/render.php index eab7c82..68d1b96 100755 --- a/php/render.php +++ b/php/render.php @@ -20,14 +20,15 @@ require_once ROOT . '/php/replace.php'; require_once ROOT . '/php/execute.php'; -function render_page(string $page) { +function render_content(string $page) { $device = 'desktop'; $targets = [ - '{{header}}' => file_get_contents(ROOT . '/html/header.html'), - '{{content}}' => file_get_contents($page), - '{{footer}}' => execute(ROOT . '/php/footer.php'), - '{{device}}' => $device + '{{stylesheets}}' => file_get_contents(ROOT . '/html/stylesheets.html'), + '{{header}}' => execute(ROOT . '/php/header.php'), + '{{content}}' => file_get_contents($page), + '{{footer}}' => execute(ROOT . '/php/footer.php'), + '{{device}}' => $device ]; $main_html = replace(ROOT . '/html/main.html', $targets); diff --git a/signin/content.html b/signin/content.html old mode 100644 new mode 100755 diff --git a/signin/index.php b/signin/index.php old mode 100644 new mode 100755 index 2f2377d..cdf976d --- a/signin/index.php +++ b/signin/index.php @@ -24,6 +24,6 @@ require_once ROOT . '/php/render.php'; $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); $file = rtrim($path, '/') . '/content.html'; -render_page(ROOT . $file); +render_content(ROOT . $file); ?> diff --git a/signup/content.html b/signup/content.html old mode 100644 new mode 100755 diff --git a/signup/index.php b/signup/index.php deleted file mode 120000 index 1876f97..0000000 --- a/signup/index.php +++ /dev/null @@ -1 +0,0 @@ -../php/index.php \ No newline at end of file diff --git a/signup/signup.php b/signup/signup.php old mode 100644 new mode 100755 diff --git a/signup/verify/content.html b/signup/verify/content.html old mode 100644 new mode 100755 diff --git a/signup/verify/index.php b/signup/verify/index.php deleted file mode 120000 index 3e5d98e..0000000 --- a/signup/verify/index.php +++ /dev/null @@ -1 +0,0 @@ -../../php/index.php \ No newline at end of file diff --git a/signup/verify/verify.php b/signup/verify/verify.php old mode 100644 new mode 100755 -- cgit v1.2.3