Frontend Mentor - E-commerce product page solution

Overview

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

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
  • Flexbox
  • Tailwind CSS - CSS Frameworks

What I learned

Since this is my first project using TailwindCSS, it feels like i am writing CSS in a whole different universe, it's really a life changing. Even though, things didn't quite works well with what i want at first because i realized that TailwindCSS is using mobile-first workflow right after i finished designing my desktop version. Eventually, i managed to fix some things related to responsive design and finally finishing up.

Example implementation of TailwindCSS

">
<button
	class="bg-white w-10 h-10 flex items-center justify-center pr-1 rounded-full absolute left-6 z-10 sm:hidden"
	id="previous-mobile"
>
	<svg
		width="12"
		height="18"
		xmlns="http://www.w3.org/2000/svg"
		id="previous-mobile"
	>
		<path
			d="M11 1 3 9l8 8"
			stroke="#1D2026"
			stroke-width="3"
			fill="none"
			fill-rule="evenodd"
			id="previous-mobile"
		/>
	svg>
button>

Local storage usage

= 1) { amountCart.classList.replace("scale-0", "scale-1"); } }">
// Config localStrogae
if (localStorage["total"] == 0) {
	localStorage.setItem("total", amount.innerHTML);
} else {
	amountCart.innerHTML = items;
	if (amountCart.innerHTML >= 1) {
		amountCart.classList.replace("scale-0", "scale-1");
	}
}
You might also like...

Tiny API that provide product/library name for a URL

JSer.info Product Name API Tiny API that provide product/library name for a URL. Usage Supported All products. curl https://jser-product-name.deno.dev

Oct 21, 2022

Fusion of Twitter and Discord and getting a single product as a outcome.

TWTCORD Connect your cords through TWTCORD What is TWTCORD? TWTCORD is derived from the combination of twitter and discord. It is basically the fusion

May 11, 2022

A product system made with NestJS. It's a service where you list products, create products or even delete them.

Products-API A product system made with NestJS. It's a service where you list products, create products or even delete them. What I used in this proje

May 18, 2022

A full query console for Cloudflare's D1 database product.

D1 Console A console/REPL for Cloudflare's D1 Database product. NPM | GitHub Supports all the features expected of a modern database client, including

Dec 23, 2022

scaffold-stark is a forkable StarkNet dev stack focused on fast product iterations, inspired by scaffold-eth.

scaffold-stark is a forkable StarkNet dev stack focused on fast product iterations, inspired by scaffold-eth.

💠 scaffold-stark scaffold-stark is a forkable StarkNet dev stack focused on fast product iterations, inspired by scaffold-eth. Drop in your Cairo sma

Oct 7, 2022

Event Bus Demo - This product is built with Remix

Event Bus Demo - This product is built with Remix

Event Bus Demo This product is built with Remix Remix Docs Netlify Functions Google Maps API Development The project requires an API key. You can get

Jan 4, 2023

Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries.

Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries.

Image Zoom (jQuery) Plugin Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries that is less th

Aug 3, 2022

A simple, lightweight, clean and small library for creating guided product tours for your web app.

A simple, lightweight, clean and small library for creating guided product tours for your web app.

Tourguide.js Simple, lightweight library for creating guided tours for your web, apps and more. A tour guide is a person who provides assistance, info

Dec 12, 2022

JS Cloudimage 360 View - A simple, interactive resource that can be used to provide a virtual tour of your product

JS Cloudimage 360 View - A simple, interactive resource that can be used to provide a virtual tour of your product

JS Cloudimage 360 View - A simple, interactive resource that can be used to provide a virtual tour of your product

Jan 7, 2023
Second-challinge - Frontend Mentor - Social proof section

Frontend Mentor - Social proof section Welcome! ?? Thanks for checking out this

Ahmed-Abdalmagid 1 Feb 8, 2022
An e-commerce web application that allows people to buy clothes product

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Jamila Moseka 5 Aug 4, 2022
A dashboard for managing orders and inventory for a wordpress e-commerce site which has woo commerce plugin installed

WordPressWooCommerceDashboard - A dashboard for managing orders and inventory for a wordpress e-commerce site which has woo commerce plugin installed. This program provides shipping tracking for Delhivery.

Vikrama Reddy 1 Jan 3, 2022
E-Commerce solution for security of databases and transactions.

commerce_new_era AMAÇ Amacımız günümüzde E-Ticaret sitelerinde bulunan sahte ürünlerin ve mağduriyetlerin önüne geçmektir. Bunu yapmak için Blockchai

Ayberk ESER 4 May 14, 2022
Mentor(a): Michelle Hanne

Secretum Chat Developed by Tessera. Índice Introdução Recursos Comentários Desenvolvedores Processo de compilação Tecnologias Login Screen / Signup Sc

Will-I-Am 2 Jun 20, 2022
Front-End mentor project for rest maps API😊👍

REST Countries API with color theme switcher Live | Solution | Challenge Solution for a challenge from frontendmentor.io. About The Project If you're

Ashutosh Mohanty 3 Sep 4, 2022
The awesomebooks project is a simple list, but separated into 3 parts and given a retro feel. The main page is where we can add books, and on another page we can see the list, and remove items. There is also a "contact-us" page.

Awesome Books This is the restructured version of the famous awesome-books project! Here you can find JavaScript broken into modules, using import-exp

Matt Gombos 12 Nov 15, 2022
O objetivo dessa aplicação era criar um frontend feito totalmente em Javascript, sem nenhum arquivo HTML ou CSS pré-criado. Além disso, esse projeto também é o frontend da minha API 100% NodeJS.

Projeto HTML 100% Javascript Front-end feito "sem HTML" Conteúdos ➜ Sobre o projeto ➜ O que aprendi ➜ Como usar ?? Sobre o projeto Voltar ao topo O ob

João Victor Negreiros 19 Aug 3, 2021
Simple scripts for crawling shopee's shop and product information from shopee.vn

Table of Contents About The Project Built With Getting Started Prerequisites Installation Usage License About The Project shopee-crawler is a simple p

Hoàng Kim Minh 5 Dec 13, 2022
Pay Creators to Promote your Product in $CRYPTO

Next.js + Tailwind CSS Example This example shows how to use Tailwind CSS (v3.0) with Next.js. It follows the steps outlined in the official Tailwind

Satyam Kulkarni 1 Feb 7, 2022