GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [PATCH: Website v1 0/2] Changes to head.php and addition of README.md
@ 2023-04-15  7:59 Memet Zx
  2023-04-15  7:59 ` [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section Memet Zx
  2023-04-15  7:59 ` [PATCH: Website v1 2/2] README.md: Initialize the information Memet Zx
  0 siblings, 2 replies; 5+ messages in thread
From: Memet Zx @ 2023-04-15  7:59 UTC (permalink / raw)
  To: GNU/Weeb Mailing List; +Cc: Ammar Faizi, Memet Zx

Heloo there,
in this series of commit contains:

- head.php: Fix issue with css/js head section
- README.md: Initialize the information

Memet Zx (2):
  head.php: Fix issue with css/js head section
  README.md: Initialize the information

 README.md               | 55 +++++++++++++++++++++++++++++++++++++++++
 src/components/head.php | 16 ++++++------
 2 files changed, 63 insertions(+), 8 deletions(-)
 create mode 100644 README.md


base-commit: 562a3dd5c47093c106063f1877e96e266ec0eece
-- 
Memet Zx


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section
  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
  2023-04-15 13:40   ` Ammar Faizi
  2023-04-15  7:59 ` [PATCH: Website v1 2/2] README.md: Initialize the information Memet Zx
  1 sibling, 1 reply; 5+ messages in thread
From: Memet Zx @ 2023-04-15  7:59 UTC (permalink / raw)
  To: GNU/Weeb Mailing List; +Cc: Ammar Faizi, Memet Zx

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH: Website v1 2/2] README.md: Initialize the information
  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 ` [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section Memet Zx
@ 2023-04-15  7:59 ` Memet Zx
  2023-04-15 13:43   ` Ammar Faizi
  1 sibling, 1 reply; 5+ messages in thread
From: Memet Zx @ 2023-04-15  7:59 UTC (permalink / raw)
  To: GNU/Weeb Mailing List; +Cc: Ammar Faizi, Memet Zx

The README.md file provides important information about the project,
including its purpose, how to install and run it, and any dependencies or requirements.
This file will help other developers understand the project and contribute to it more easily.
Additionally, it will serve as a reference for future development and maintenance tasks.

Signed-off-by: Memet Zx <[email protected]>
---
 README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..87929b4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,55 @@
+# GNU/Weeb Website
+
+Build comunity through Open Source technology.
+
+Welcome to new website repo for GNU/Weeb. This is a new website for GNU/Weeb. This website is built with pure PHP native and HTML5.
+
+## How to contribute
+
+You can contribute to this website by forking this repo and make a pull request. You can also contribute by opening an issue.
+
+## Installation
+
+- Clone this repo.
+- `cd` into the root directory.
+- copy `config.example.php` to `config.php` and edit it.
+- and run this command:
+
+    ```bash
+    php -S localhost:8000 -t public public/index.php
+    ```
+
+- Open your browser and go to `localhost:8000`
+
+## Configuration
+
+default configuration is:
+
+```php
+<?php
+
+define("BASEURL", "http://127.0.0.1:8000");
+define("LOGS_DIR", __DIR__."/logs");
+define("PUBLIC_DIR", __DIR__."/public");
+define("APP_TITLE", "The GNU/Weeb Website");
+```
+
+you can call the `config` like this:
+
+```php
+<title><?= e(APP_TITLE); ?></title>
+```
+
+### Custom config
+
+you can made a custom config for each page for example:
+
+```php
+<?php
+
+$opt["type"] = "Something";
+
+?>
+```
+
+and call it with `<?= e($opt["type"] ?? "") ?>`
-- 
Memet Zx


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section
  2023-04-15  7:59 ` [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section Memet Zx
@ 2023-04-15 13:40   ` Ammar Faizi
  0 siblings, 0 replies; 5+ messages in thread
From: Ammar Faizi @ 2023-04-15 13:40 UTC (permalink / raw)
  To: Memet Zx, GNU/Weeb Mailing List

On 4/15/23 2:59 PM, Memet Zx wrote:
> 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.

Please fix the formatting (word-wrap issue).

-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH: Website v1 2/2] README.md: Initialize the information
  2023-04-15  7:59 ` [PATCH: Website v1 2/2] README.md: Initialize the information Memet Zx
@ 2023-04-15 13:43   ` Ammar Faizi
  0 siblings, 0 replies; 5+ messages in thread
From: Ammar Faizi @ 2023-04-15 13:43 UTC (permalink / raw)
  To: Memet Zx, GNU/Weeb Mailing List

On 4/15/23 2:59 PM, Memet Zx wrote:
> The README.md file provides important information about the project,
> including its purpose, how to install and run it, and any dependencies or requirements.
> This file will help other developers understand the project and contribute to it more easily.
> Additionally, it will serve as a reference for future development and maintenance tasks.

Another word-wrap issue.

> +Welcome to new website repo for GNU/Weeb. This is a new website for GNU/Weeb. This website is built with pure PHP native and HTML5.

Word-wrap the README file as well.

-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-15 13:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH: Website v1 1/2] head.php: Fix issue with css/js head section Memet Zx
2023-04-15 13:40   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox