Skip to content

Create a library while practice working with objects. Weekly project where we practice working with arrays and objects.

Notifications You must be signed in to change notification settings

sofia32057/project-library-solo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project-library

This project is a group project for week 3 in Technigos Web Development Bootcamp. As a study tool I decided to attempt the project myself as well.

The problem

Going in to the project we were given an array with object, each a book to be shown in our library. We should add at least one filter, one sorting option and provide a button to show a random book.

  • This week we focus on javascript and therefor I chose to load the books by js (I'm guessing this is a requirement). I added a small delay to showcase that they are indeed loading and not there from the start.

  • I created selects for the filters and sorting.

  • The sorting options are created in html, while the filters are fetched from the object properties.

  • I added event listeners with event handelers to execute the sorting and filtering respectively.

  • Both sorting and filtering creates new arrays with books, and loads them to the page.

  • Sorting and filter works together by pushing the current list toa variable, and checking the same filter isn't already applied.

  • To create a random book I randomized a book index and loaded the correspoding book.

  • For the search function from the stretch goals, I wanted to compare the search value to each word in each objects values. Therefor a created arrays with the words as items, and then used the include method. I also made it not case sensetive.

  • Got design outlines from Technigo example

Next step

If I have time, I will try

  • Get the search function to accept multiple words

  • Adding further styling.

View it live

Netlify Status

About

Create a library while practice working with objects. Weekly project where we practice working with arrays and objects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 65.6%
  • CSS 21.0%
  • HTML 13.4%