Compare commits

..

No commits in common. "5dff6233176a34db01158b83e763e607ecbdcf27" and "dc715a96d34d30c158a26189f861ccd358e44db3" have entirely different histories.

7 changed files with 89 additions and 121 deletions

View File

@ -1,45 +1,33 @@
@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@500;700;900&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@500;700;900&display=swap");
/* /*
Mobile Screen Width: 375 x 709 Mobile 375 x 709
Figma Box : 327 x 567 Box roughly: 327 x 567
Ratio 0.872 x 0.7997179126 Ratio 0.872 x 0.7997179126
Desktop Width: 1440 x 900 Desktop: 1440 x 900
Figma Box: 450 x 697 Box roughly: 450 x 697
Ratio 0.3125 x 0.7744444444 Ratio 0.3125 x 0.7744444444
*/ */
:root { :root {
/* Colors */ /* colors */
--clr-pale-blue: hsl(225, 100%, 94%); --clr-pale-blue: hsl(225, 100%, 94%);
--clr-bright-blue: hsl(245, 75%, 52%); --clr-bright-blue: hsl(245, 75%, 52%);
--clr-very-pale-blue: hsl(225, 100%, 98%); --clr-very-pale-blue: hsl(225, 100%, 98%);
--clr-desaturated-blue: hsl(224, 23%, 55%); --clr-desaturated-blue: hsl(224, 23%, 55%);
--clr-dark-blue: hsl(223, 47%, 23%); --clr-dark-blue: hsl(223, 47%, 23%);
--clr-light-purple: hsla(245, 83%, 68%, 1);
/* Fonts */ /* fonts */
--fs-p: 1rem; --fs-p: 1rem;
--fw-500: 500; --fw-500: 500;
--fw-700: 700; --fw-700: 700;
--fw-900: 900; --fw-900: 900;
/* Border Radii */ /* Border Radius */
--br-11: 11px; --br-11: 11px;
--br-20: 20px; --br-20: 20px;
/* Scaling fonts between the left and right sizes */
--font-width-15px-16px: clamp(0.94rem, 0.92rem + 0.09vw, 1rem);
--font-width-14px-16px: clamp(0.88rem, 0.83rem + 0.19vw, 1rem);
/*
Used for the Price Plan box and the Proceed to Payment button
sensibly these should be two seperate variables in case the
components where used in different places */
--box-width: 85%;
--page-background-img: url("../images/pattern-background-mobile.svg");
} }
*, *,
@ -48,133 +36,114 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
/* because I want it to affect the link color */
color: var(--clr-desaturated-blue);
} }
/* General Formatting */ /* General Formating */
html,
body {
min-height: 100vh;
width: 100%;
}
body { body {
font-family: "Red Hat Display", sans-serif; font-family: "Red Hat Display", sans-serif;
width: 100vw;
height: 100vh;
background-color: var(--clr-pale-blue); background-color: var(--clr-pale-blue);
} }
main { main {
background-image: var(--page-background-img); background-image: url(../images/pattern-background-mobile.svg);
background-repeat: no-repeat; background-repeat: no-repeat;
min-height: inherit; /* margin: 0 auto; */
width: 100%;
height: 100%;
margin: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
/* Order Summary Card formatting */
.card { .card {
width: clamp(327px, 32%, 450px); width: 87.2%;
border-radius: var(--br-20); border-radius: var(--br-20);
background-color: white; background-color: white;
text-align: center; text-align: center;
box-shadow: 0px 40px 40px -20px rgba(13, 48, 189, 0.151826);
} }
.card__hero-image { .hero-image img {
width: 100%; width: 100%;
border-radius: var(--br-20) var(--br-20) 0 0; border-radius: var(--br-20) var(--br-20) 0 0;
margin-bottom: clamp(2rem, 8vw, 2.815rem); margin-bottom: 2rem;
} }
.card__title { .card h1 {
font-weight: var(--fw-900); font-weight: var(--fw-900);
font-size: clamp(1.375rem, 2.5vw, 1.815rem); font-size: 1.375rem;
line-height: 1.3195; line-height: 1.2;
margin-bottom: 1rem; margin-bottom: 1rem;
color: var(--clr-dark-blue); color: var(--clr-dark-blue);
} }
.card__info { .card p {
font-weight: var(--fw-500); font-weight: var(--fw-500);
margin: 0 clamp(2rem, 4vw, 3rem); color: var(--clr-desaturated-blue);
font-size: var(--font-width-15px-16px); margin: 0 2rem;
font-size: 0.9375rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
line-height: 162%; line-height: 25px;
} }
.card__price-plan { .price-plan {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
width: var(--box-width); width: 85%;
margin: 0 auto clamp(1.5rem, 2vw, 2rem) auto; margin: 0 auto 1.5rem auto;
padding: clamp(1rem, 2vw, 1.5315rem) 0; padding: 1rem 0;
border-radius: var(--br-11); border-radius: var(--br-11);
background-color: var(--clr-very-pale-blue); background-color: var(--clr-very-pale-blue);
} }
.card__plan-type-area { .plan-type {
line-height: 1.3125;
}
.card__plan-type {
color: var(--clr-dark-blue); color: var(--clr-dark-blue);
font-size: var(--font-width-14px-16px); font-size: 0.875rem;
font-weight: var(--fw-900); font-weight: var(--fw-900);
margin-bottom: clamp(0.1875rem, 0.8vw, 0.375rem); margin-bottom: 0.1875rem;
} }
.card__plan-price { .plan-price {
font-size: var(--font-width-14px-16px); color: var(--clr-desaturated-blue);
font-size: 0.875rem;
font-weight: 500; font-weight: 500;
} }
.card__change-button { .change-button {
font-size: clamp(0.813rem, 0.79rem + 0.09vw, 0.88rem); font-size: 0.8125rem;
font-weight: var(--fw-700); font-weight: var(--fw-700);
color: var(--clr-bright-blue); color: var(--clr-bright-blue);
} }
.card__button-area a { .button-area a {
display: block; display: block;
text-decoration: none; text-decoration: none;
font-weight: var(--fw-900); font-weight: var(--fw-900);
font-size: 0.9375rem; font-size: 0.9375rem;
line-height: 20px; line-height: 20px;
} }
.card__payment-button { .payment-button {
color: white; color: white;
/* margin-bottom: 1.5rem; */
background-color: var(--clr-bright-blue); background-color: var(--clr-bright-blue);
width: var(--box-width); width: 85%;
margin: 0 auto clamp(1.5rem, 4vw, 2rem) auto; margin: 0 auto 1.5rem auto;
box-shadow: 0px 20px 20px rgba(56, 42, 225, 0.190291); box-shadow: 0px 20px 20px rgba(56, 42, 225, 0.190291);
border-radius: var(--br-11); border-radius: var(--br-11);
padding: 15px 0; padding: 15px 0;
} }
.card__cancel-button { .cancel-button {
margin-bottom: clamp(2rem, 8vw, 3rem); color: var(--clr-desaturated-blue);
} margin-bottom: 2rem;
.card__change-button:is(:hover, :focus) {
color: var(--clr-light-purple);
}
.card__payment-button:is(:hover, :focus) {
background-color: var(--clr-light-purple);
}
.card__cancel-button:is(:hover, :focus) {
color: var(--clr-dark-blue);
} }
@media screen and (min-width: 376px) { @media screen and (min-width: 376px) {
:root { main {
--box-width: 80%; background-image: url(../images/pattern-background-desktop.svg);
--page-background-img: url("../images/pattern-background-desktop.svg");
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

@ -29,26 +29,26 @@
<main> <main>
<div class="card"> <div class="card">
<img class="card__hero-image" src="./images/illustration-hero.svg" <div class="hero-image">
<img src="./images/illustration-hero.svg"
alt="Hero Image Person holding an audio device and wearing headphones"> alt="Hero Image Person holding an audio device and wearing headphones">
<h1 class="card__title">Order Summary</h1> </div>
<p class="card__info"> <h1>Order Summary</h1>
<p>
You can now listen to millions of songs, audiobooks, and podcasts on any You can now listen to millions of songs, audiobooks, and podcasts on any
device anywhere you like! device anywhere you like!
</p> </p>
<div class="card__price-plan"> <div class="price-plan">
<!-- maybe price-plan, then price-plan__icon, __plan-type, __plan-price, __change-button? --> <img class="icon" src="./images/icon-music.svg" alt="Music icon" aria-hidden="true">
<img class="card__icon" src="./images/icon-music.svg" alt="Music icon" aria-hidden="true"> <div class="plan-type-area">
<div class="card__plan-type-area"> <div class="plan-type">Annual Plan</div>
<p class="card__plan-type">Annual Plan</p> <div class="plan-price">$59.99/year</div>
<p class="card__plan-price">$59.99/year</p>
</div> </div>
<a href="#" class="card__change-button">Change</a> <a href="#" class="change-button">Change</a>
</div> </div>
<!-- maybe button-area, button-area__payment-button, button-area__cancel-button? --> <div class="button-area">
<div class="card__button-area"> <a href="#" class="payment-button">Proceed to Payment</a>
<a href="#" class="card__payment-button">Proceed to Payment</a> <a href="#" class="cancel-button">Cancel Order</a>
<a href="#" class="card__cancel-button">Cancel Order</a>
</div> </div>
</div> </div>
</main> </main>

View File

@ -44,32 +44,7 @@
<h3>Newbie Challenges</h3> <h3>Newbie Challenges</h3>
<div class="projects-grid"> <div class="projects-grid">
<div class="project-card stacked featured"> <div class="project-card stacked featured">
<a href="./FrontendMentor/newbie/order-summary-component/">
<img class="card__img" src="./screenshots/fem-newbie-order-summary-component.png"
alt="Order Summary Component Challenge from FrontendMentor" />
</a>
<div class="card__content">
<h3 class="card__title">
Order Summary Card Component
</h3>
<!-- <p class="card__description">
Lorem ipsum dolor sit amet consectetur
adipisicing elit.
</p> -->
<ul class="card__techUsed">
<li>
<img src="./svgs/html5.svg" alt="HTML5" />
</li>
<li>
<img src="./svgs/css3.svg" alt="CSS3" />
</li>
</ul>
</div>
</div>
<div class="project-card stacked">
<a href="./FrontendMentor/newbie/huddle-landing-page-with-single-introductory-section-master/"> <a href="./FrontendMentor/newbie/huddle-landing-page-with-single-introductory-section-master/">
<img class="card__img" <img class="card__img"
src="./screenshots/fem-newbie-huddle-landing-page-with-single-introductory-section.png" src="./screenshots/fem-newbie-huddle-landing-page-with-single-introductory-section.png"
@ -242,6 +217,30 @@
</div> </div>
</div> </div>
<div class="project-card stacked">
<a href="./FrontendMentor/newbie/order-summary-component/">
<img class="card__img" src="./svgs/image-photo-svgrepo-com.svg"
alt="Order Summary Component Challenge from FrontendMentor" />
</a>
<div class="card__content">
<h3 class="card__title">
Order Summary Card Component
</h3>
<!-- <p class="card__description">
Lorem ipsum dolor sit amet consectetur
adipisicing elit.
</p> -->
<ul class="card__techUsed">
<li>
<img src="./svgs/html5.svg" alt="HTML5" />
</li>
<li>
<img src="./svgs/css3.svg" alt="CSS3" />
</li>
</ul>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB