diff --git a/.vscode/settings.json b/.vscode/settings.json index c3b087b..fbe188f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,13 @@ { - // Use Prettier as the default formatter for HTML and CSS + // Use Prettier as the default formatter for HTML, CSS, and PHP "editor.defaultFormatter": "esbenp.prettier-vscode", "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[php]": { + "editor.defaultFormatter": "bmewburn.vscode-intelephense-client" } } diff --git a/README.md b/README.md index c333345..5693368 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,29 @@ +### instructions + +- start server with php, and browser-sync for auto reload : + - `npm run dev` +- setup instructions : + - install apps : `sudo apt update && sudo apt install php-cli nodejs npm` + - verify : `php -v` & `node -v` & `npm -v` + - install dependencies : `npm ci` +- -> only for info, at project creation setup : + - run : `npm init -y && npm install --save-dev browser-sync` + - add in package.jsons > scripts : `php -S localhost:8000 & browser-sync start --proxy localhost:8000 --files "**/*.php,**/*.css,**/*.js" --port 3000` + - `php -S localhost:8000` → starts PHP built-in server + - `&` → runs PHP server in the background (Linux/macOS) + - `browser-sync start --proxy localhost:8000` → proxies PHP server + - `--files "**/*.php,**/*.css,**/*.js"` → watches files for changes + - `--port 3000` → BrowserSync UI accessible at http://localhost:3000 + +--- + +### ressources + html validator : https://validator.w3.org/nu --- -- start server with php, and nodemon for auto reload : - - `npm run dev` - -- setup : - - install apps : `sudo apt update && sudo apt install php-cli nodejs npm` - - verify : `php -v` & `node -v` & `npm -v` - - -> only for info, at project creation setup : - - run : `npm init -y && npm install --save-dev nodemon` - - add in package.jsons > scripts : `"dev": "nodemon --exec 'php -S localhost:8000' --ext php,html"` - - install dependencies : `npm ci` - ---- - -difficulties : +### difficulties - [accessibility with ascii art titles](https://stackoverflow.com/questions/77537096/make-text-in-ascii-art-more-accessible) - I finally decided to go with a structure like this : diff --git a/index.php b/index.php index 20f8f40..0661c36 100644 --- a/index.php +++ b/index.php @@ -1,33 +1,25 @@ -
- - - - -