Skip to content

jkellerman/crowdfunding-product-page-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Crowdfunding product page solution

This is a solution to the Crowdfunding 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 depending on their device's screen size
  • See hover states for interactive elements
  • Make a selection of which pledge to make
  • See an updated progress bar and total money raised based on their pledge total after confirming a pledge
  • See the number of total backers increment by one after confirming a pledge
  • Toggle whether or not the product is bookmarked

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS
  • Javascript
  • Mobile-first workflow
  • Design from Figma

What I learned

I learned how to create a modal and dim the entire page background. The trick is not to use opacity but to use rgba for background and make sure that the modal is positioned absolute and the dimmed background is a div which is positioned fixed. This div should be not be a child of any other element.

I also learned how to use the scrollIntoView method which scrolls to the element you want. This is usefel when you have a long webpage and click events across the page pop up the modal. Instead of the user scrolling to find the modal, they will automatically be taken to it. See below:

function scrollToModal(modal) {
  modal.scrollIntoView();
}

Useful resources

  • YouTube - Custom radio button
  • CSS Tricks - How to change color of svg image.
  • YouTube - transparent background for popup modal.
  • Stack Overflow - how to scroll to an element using Javascript.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published