8000 GitHub - momin-riyadh/ecommerce-product-page
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

momin-riyadh/ecommerce-product-page

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - E-commerce product page solution

This is a solution to the E-commerce product page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Open a lightbox gallery by clicking on the large product image
  • Switch the large product image by clicking on the small thumbnail images
  • Add items to the cart
  • View the cart and remove items from it

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • React - JS library
  • Next.js - React framework
  • Styled Components - For styles

Note: These are just examples. Delete this note and replace the list above with your own choices

What I learned

The main lesson that I learned from this challenge is how to use a dialog element to create quick modals in html.

<button id="dialog-trigger">Open Dialog</button>
<dialog id="my-dialog"></dialog>
const dialogTrigger = document.getElementById("dialog-trigger");
const myDialog = document.getElementById("my-dialog");
const handleMyDialog = (e) => {
    if (myDialog.open) {
        myDialog.close();
    } else {
        myDialog.show();
    }
};
dialogTrigger.addEventListener("click", handleMyDialog);

Author

Releases

No releases published

Packages

No packages published

Languages

  • HTML 43.6%
  • CSS 36.8%
  • JavaScript 19.6%
0