Git Product home page Git Product logo

project0's Introduction

Project 0 - CS50

Requirements:

  • 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

Content

HTML pages:

This project has five HTML files that contains:

  1. index: Home page. From here you can access to the "about" and other pages.
  2. 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.
  3. about: This page contains info about the course and me. Also there is an implemetation of html tables.

CSS files:

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.

Sass

In this project there is just one scss file. content.scss file contains the style applied to this three html files:

  1. git.html
  2. htm.html
  3. css.html

Also there you can find the implementation of scss variables ($size variable), scss inheritance, scss nesting and one @media query.

Compiling SCSS to CSS

To compile the content.scss file and keep on track the changes I followed the next steps.

  1. Install node.js

  2. Initialize NPM: In the directory of the project open a terminal and run the command npm init. Then a package.json file will be generated.

  3. 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.

  4. 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"
     }
    
  5. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.