Giter Site home page Giter Site logo

fabio-kumilachew-awesome-books's Introduction

Awesome Books

A book recommendation website done by Fábio and Kumilachew as part of Microverse Program. In this project, we have been created "fabio-kumilachew-awesome-books". This have been done by first creating add-initial-layout branch then add a README.md file. The project will have a .gitignore file to ignore all unneccesary files together with three files for HTML, CSS and JavaScript.

Built With

  • Major Languages
    • HTML
    • CSS
    • JavaScript

Getting Started

To get a local copy up and running, follow these simple steps:

Usage

First copy this repo and clone it on your machine using this [link]https://github.com/limavfabio/fabio-kumilachew-awesome-books.git. Then cd into fabio-kumilachew-awesome-books directory.

Authors

🧑 Fábio Vinícius Dias Lima

🧑 Kumilachew Getie

Contributing

Live Demo

Show your support

Kindly give a ♥️ if you like this.

Acknowledgement

  • We expressed our gratitude for everyone.

fabio-kumilachew-awesome-books's People

Contributors

kumilachew-g avatar limavfabio avatar

Stargazers

Federico Luna avatar Aron  avatar  Habeeb Efiamotu Musa Owolewa avatar

Watchers

 avatar

fabio-kumilachew-awesome-books's Issues

peer-to-peer code review

Great job, all looks ok, but please address these issues

  • Each Class must be in their own class, and then use import in the js, and use <script type="module" src="script/script.js">
    class BooksClass {
    constructor() {
    return [];
    }
    }
    // Create a new books object
    const books = new BooksClass();
    // Books array to store the books information
    class Book {
    constructor(title, author) {
    this.title = title;
    this.author = author;
    }
    // Method to load newly added books
    static loadBook(index) {
    booksContainer.innerHTML += `<div class="book-card">
    <div class="book-title"><strong>"${books[index].title}"</strong>&nbsp;by</div>
    <div class="book-author">${books[index].author}</div>
    <button class="card-remove-button" onclick="Book.removeCard(${index})">Remove</button>
    </div>`;
    }
    // A Method to remove current object from the array
    static removeCard(index) {
    books.splice(index, 1);
    localStorage.setItem('books', JSON.stringify(books));
    Book.reloadBooks();
    }
    // A Method to reload the books cards
    static reloadBooks() {
    booksContainer.innerHTML = '';
    for (let index = 0; index < books.length; index += 1) {
    booksContainer.innerHTML += `<div class="book-card">
    <div class="book-title"><strong>"${books[index].title}"</strong>&nbsp;by</div>
    <div class="book-author">${books[index].author}</div>
    <button class="card-remove-button" onclick="Book.removeCard(${index})">Remove</button>
    </div>`;
    }
    }
    }

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.