f8ab082614afe2dea11fe2158c269f52114e8a46
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
- install apps :
[only for info] at project creation, the following actions where done, no need to do them again
- creates package.json and installs browser-sync as a dev dependency (already done,
npm cirestores it) :- run :
npm init -y && npm install --save-dev browser-sync
- run :
- adds the
devscript to package.json > scripts, this is the command behindnpm run dev:- add in package.jsons > scripts :
php -S localhost:8000 & browser-sync start --proxy localhost:8000 --files "**/*.php,**/*.css,**/*.js" --port 3000php -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
- add in package.jsons > scripts :
ressources
html validator : https://validator.w3.org/nu
difficulties
- accessibility with ascii art titles
- I finally decided to go with a structure like this :
<h1 aria-label="hugo lamy"> <span aria-hidden="true" class="pre"> hugo (ascii) </span> <span aria-hidden="true" class="pre"> lamy (ascii) </span> </h1>
- I finally decided to go with a structure like this :
- links accessibility
- accessibility gone wild
- don't use title attribute
- I thought title text improved accessibility. I was wrong.
- Things I learned by pretending to be blind for a week
- create the full screen hero section with the navbar under the title
Languages
HTML
72.1%
CSS
25.7%
PHP
2.2%