public inbox for [email protected]
 help / color / mirror / Atom feed
From: Memet Zx <[email protected]>
To: GNU/Weeb Mailing List <[email protected]>
Cc: Ammar Faizi <[email protected]>, Memet Zx <[email protected]>
Subject: [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section
Date: Sat, 15 Apr 2023 14:59:03 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

When visiting a web page that ends with a forward slash `/`,
the associated CSS and JS files may fail to load properly.
This issue can be resolved by adding the `BASE_URL` to the links used to call the CSS and JS files.
By doing so, the browser will be able to locate and load the required resources,
ensuring that the web page displays correctly.

Signed-off-by: Memet Zx <[email protected]>
---
 src/components/head.php | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/components/head.php b/src/components/head.php
index 4a5c238..f443eaa 100644
--- a/src/components/head.php
+++ b/src/components/head.php
@@ -1,10 +1,10 @@
 <head>
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title><?= e($opt["title"] ?? "") ?> - <?= e(APP_TITLE); ?></title>
-<?php require __DIR__."/meta.php"; ?>
-<!-- styles -->
-<link rel="stylesheet" href="assets/css/style.css">
-<!-- script -->
-<script async type="module" src="assets/js/turbo.js"></script>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title><?= e($opt["title"] ?? "") ?> - <?= e(APP_TITLE); ?></title>
+    <?php require __DIR__ . "/meta.php"; ?>
+    <!-- styles -->
+    <link rel="stylesheet" href="<?= e(BASEURL); ?>/assets/css/style.css">
+    <!-- script -->
+    <script async type="module" src="<?= e(BASEURL); ?>/assets/js/turbo.js"></script>
 </head>
-- 
Memet Zx


  reply	other threads:[~2023-04-15  7:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15  7:59 [PATCH: Website v1 0/2] Changes to head.php and addition of README.md Memet Zx
2023-04-15  7:59 ` Memet Zx [this message]
2023-04-15 13:40   ` [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section Ammar Faizi
2023-04-15  7:59 ` [PATCH: Website v1 2/2] README.md: Initialize the information Memet Zx
2023-04-15 13:43   ` Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox