- At least four html pages
- At least one list
- At least one table
- At least one image
- At least one stylesheet file
- at least five different CSS properties
- At least five different types of CSS selectors (at least once: #id, .class).
- At least one mobile-responsive @media query
- At least one Bootstrap component
- At least two Bootstrap columns for layout purposes using Bootstrap’s grid model.
- At least one SCSS variable
- SCSS nesting
- SCSS inheritance
- Readme info
This project has five HTML files that contains:
- index: Home page. From here you can access to the "about" and other pages.
- htm/git/css: These three pages contain a summary taken from the notes of the first two lectures of the CS50 web course. In this 3 files you can find the implementation of unordered lists, Boostrap grid model using two colums, a nav boostrap component and images.
- about: This page contains info about the course and me. Also there is an implemetation of html tables.
Into the css folder you can find 3 stylesheets:
style.css
: This stylesheet is is applied to the home page. Contains more than five css properties, five different types of css selectors and one@media
query.nav.css
: Contains the styles applied to navbar in all html pages.content.css
: this file is the result of the compiled scss file.
In this project there is just one scss file. content.scss file contains the style applied to this three html files:
git.html
htm.html
css.html
Also there you can find the implementation of scss variables ($size
variable), scss inheritance, scss nesting and one @media
query.
To compile the content.scss file and keep on track the changes I followed the next steps.
-
Install node.js
-
Initialize NPM: In the directory of the project open a terminal and run the command
npm init
. Then apackage.json
file will be generated. -
Install Node-Sass: Now you have to type on the terminal the command
npm install node-sass
. This package will allow you to compile the Sass file to CSS. -
Writing the Node-Sass command: In the
package.json
file into the script section you write the following code:"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "scss": "node-sass -watch scss -o css" }
-
Running the script: For run the script open the terminal and type the command
npm run scss
.
This is how I compile the SCSS file to CSS.