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
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 <zxce3@gnuweeb.org> --- 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
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 <zxce3@gnuweeb.org> --- 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
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
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