Coder Social home page Coder Social logo

coffeeroasters-subscription-site's Introduction

Table of contents

Overview

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

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • Svelte - JS library

What I learned

1- Adding background by assigning variable in html tag;

<div
    class="section-coffeepresso"
    style={`background-image: url(${srcHeroCoffeepress});`}

2- Assign variable to style in html tag;

export let textGrey;

<div class="text-white" class:text-grey={textGrey}>

3- Using router to switch pages;

export const routes = {
"/": Home,
"/about": AboutUsPage,
"/subscribe": Subscribe,
"*": Home,
}

4- Assign $ to a variable to update the value of the variables in the function;

$: totalPrice = total(valueQuantity, valueDeliveries);

5- Turning PopUp on and off within the page;

--Assign variable to popup with condition;

{#if showOrderSummaryPopUp}
    <main class:closeOrderSummaryPopUp>
    <div class="order-summary-background" on:click|self />
{/if}

--Show-hide Popup within the page;

export const togglePopUp = () => {
showOrderSummaryPopUp = !showOrderSummaryPopUp;

};

Continued development

While working on this project, I improved my missing knowledge in js, css and svelte. I will continue to develop my skills in future projects.

Useful resources

https://css-tricks.com/ - This site helped me with its simple and fun explanation. I would recommend it to anyone who is still learning this concept.

Author

Acknowledgments

Thanks to Erdem Alpay and Esra Alpay for their help and support.

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.