/static-catalog-101

static-catalog-101

Primary LanguageJavaScript

static-catalog-101

TeachTech

This simple project has been created as an example during TeachTech 2023 to illustrate concepts in mentoring assignments.

TeachTech is a non-profit initiative, composed solely of volunteer IT professionals, whose goal is to teach the basics of programming to people with no previous knowledge, free of charge.

Introduction

The goal of this repository is to show how to start and evolve a simple static catalog site using the most common web technologies such as HTML, CSS and Javascript.

The purpose is not no create a complex excercise but to explain the basic usage of the mentioned technologies and provide guidance to people with low experience with their first steps.

The best way to run the examples

Download Git and Visual Studio Code.

Install Live Server extension in Visual Studio Code.

Clone the project in your computer.

git clone https://github.com/marcosDLCS/static-catalog-101.git

With VSCode, go to the desired folder and open the file static-catalog.html. Find the "Go Live" button in the right bottom part of the editor interface and press it.

The journey, step by step

On our way to programming a static catalog, we will start with a version with a very basic structure and, step by step, we will add styles and functionality to make the page look better and better using just plain HTML, CSS and JS.

Step 1
Step 6

☠️ 01. HTML skeleton and initial content

First of all, the HTML structure to support the catalog must be created. The document will consist of different areas:

  • Header

  • Navigation / Actions

  • Catalog

  • Footer

Start with basic HTML structures and 10-15 fake products with Lorem Ipsum text and basic stock images.


💅🏻 02. Apply basic CSS styles

In the following step simple styles will be applied to make the website more usable and better looking.

Based on the sketches we will try to centre the content and make it "responsive" to some extent. Also we are going to style the buttons and the other elements.

The introduction of custom text fonts and the use of background colors and shading will be an asset.


🏎 03. Load content dynamically

The main goals for this step are 2:

  • Create a separate file with an array of products and load it as a module.

  • Use the new information in the array to generate the catalog dynamically.


🌪️ 04. Add a filter based on product tags

The main objectives for this step are:

  • Use the tag information inside of the products array and show it in the interface.

  • Create a dropdown with the available tags that filters the elements of the catalog.


❤️‍🔥 05. Favourite button and persist data in LocalStorage

The main objectives for this step are:

  • Create a button to indicate if you like the house or not.

  • Persist this info in the LocalStorage section of the browser and retrieve it in every page load.


🛁 06. Final refactor and cleanup

References