GithubHelp home page GithubHelp logo

dragosidle / fem_coffeeroasters-subscription-site Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13.8 MB

Multi page site with a subscribtion plan builder.

Home Page: https://coffeeroast.netlify.app

HTML 32.08% JavaScript 19.72% SCSS 48.20%
javascript mobile-first-workflow html frontend-mentor showcase sass

fem_coffeeroasters-subscription-site's Introduction

Frontend Mentor - Coffeeroasters subscription site solution

This is a solution to the Coffeeroasters subscription site challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

This challenge took me exactely 8 days, with 4-5 hours of work daily. I added a few small details such as an overlay behind the modal on the plan page when checking out, sticky position and additional styling on the left side content map to give a better feedback on the completion progess. I used a mobile-first approach and imported all the SVG's through a sprite, a thing I wish I knew about longer before.

The challenge

Users should be able to:

  • View the optimal layout for each page depending on their device's screen size
  • See hover states for all interactive elements throughout the site
  • Make selections to create a coffee subscription and see an order summary modal of their choices

Screenshot

Links

Built with

  • Mobile-first workflow
  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Javascript

What I learned

First time I used a sprite sheet. Cool and easy way to get all the benefits of SVG while only making one http request for all the elements on the page.

<div class="socials">
  <svg class="icon" role="img">
    <use xlink:href="sprite.svg#icon-facebook"></use>
  </svg>
  <svg class="icon" role="img">
    <use xlink:href="sprite.svg#icon-instagram"></use>
  </svg>
  <svg class="icon" role="img">
    <use xlink:href="sprite.svg#icon-twitter"></use>
  </svg>
</div>

Using em, rem, and vw with 'clamp'. These units save you from the 'media queries hell'! Paddings, margins and border radiuses dynamically update while maintaining good proportions. No longer the need to rewrite them for each media query.

.illustration {
  width: clamp(30px, 15vh, 100px);
}

button {
  user-select: none;
  display: flex;
  color: #fefcf7;
  padding: 1em 2em;
  border-radius: 0.5rem;
  font-family: 'Fraunces', sans-serif;
  margin: 3em auto 1em auto;
  border: none;
  font-size: 1rem;
  background-color: hsl(179, 81%, 29%);
  transition: 100ms background-color;
  &:hover {
    cursor: pointer;
    background-color: #66d2cf;
  }
}

Continued development

In the future I will only write my css from mobile to desktop. Doing this I will end up with a more fluid development, less unexpected behaviors and a way cleaner stylesheet. I have to work more on the JS logic that happens behind the scenes. In this one a lot of the 'magic' is based on the DOM, so if you inspect element the price of one card on the plan page and change it to any number you will affect the checkout generated price. I will completely separate the javascript logic from the visual stuff on the next challenges. One aspect that I have avoided in my learning journey was transitions. The arrows in the plan page are not rotating naturally, because of this I found myself wasting a lot of time trying to get them to work, they only rotate beautifully when clicking on the left side choices map on desktop view. Weird. I'm looking forward learn new ways of accelerating my workflow and get a better grip of transitions.

Useful resources

  • Kevin Powell's Youtube channel - I can't not credit Kevin, he is amazing! His videos and online resources are the best. If you're in a process of learning/mastering CSS you've surely stumbled across his videos, if not, you must check him out asap. I took a lot of good practices from him including the 'mobile first' type of development which substantially accelerated my workflow on this one.

Author

fem_coffeeroasters-subscription-site's People

Contributors

dragosidle avatar

Stargazers

 avatar

Watchers

 avatar

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.