From 584ef2f40ab820403c7ea504fd3ed7e29ed37ad6 Mon Sep 17 00:00:00 2001 From: Floorb <132411956+Neetpone@users.noreply.github.com> Date: Thu, 26 Aug 2021 05:58:37 -0400 Subject: [PATCH] Make markup more valid --- includes/common.php | 10 +++ theme/bulma/archive.php | 5 +- theme/bulma/common.php | 167 ++++++++++++++--------------------- theme/bulma/discover.php | 1 + theme/bulma/event.php | 2 +- theme/bulma/login.php | 2 +- theme/bulma/main.php | 11 +-- theme/bulma/user_profile.php | 29 +++--- theme/bulma/view.php | 2 +- user.php | 6 +- 10 files changed, 106 insertions(+), 129 deletions(-) diff --git a/includes/common.php b/includes/common.php index e910908..0908990 100644 --- a/includes/common.php +++ b/includes/common.php @@ -10,6 +10,16 @@ require_once(__DIR__ . '/User.class.php'); require_once(__DIR__ . '/ViewBag.class.php'); /* View functions */ +function urlForPage($page = '') : string { + if (!PP_MOD_REWRITE) { + $page .= '.php'; + } + + return (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . '/' . $page; +} + + + function urlForPaste($paste_id) : string { if (PP_MOD_REWRITE) { return "/${paste_id}"; diff --git a/theme/bulma/archive.php b/theme/bulma/archive.php index 1a15f18..398287a 100644 --- a/theme/bulma/archive.php +++ b/theme/bulma/archive.php @@ -44,6 +44,9 @@
>A fucking badge, plus the best pony game the host can find.
-Note: This is a steam game, winner will be sent a cdkey
and diff --git a/theme/bulma/main.php b/theme/bulma/main.php index 3445034..27a285e 100644 --- a/theme/bulma/main.php +++ b/theme/bulma/main.php @@ -164,7 +164,7 @@
and press @@ -325,6 +325,7 @@