created media queries for images and stories component

This commit is contained in:
Yusuf Ipek
2021-05-06 13:21:48 +03:00
parent d72346a221
commit c93a134aed
3 changed files with 37 additions and 7 deletions
+17 -6
View File
@@ -1,6 +1,9 @@
import nat1Large from "../../commons/images/nat-1-large.jpg"; import nat1Large from "../../commons/images/nat-1-large.jpg";
import nat1 from "../../commons/images/nat-1.jpg";
import nat2Large from "../../commons/images/nat-2-large.jpg"; import nat2Large from "../../commons/images/nat-2-large.jpg";
import nat2 from "../../commons/images/nat-2.jpg";
import nat3Large from "../../commons/images/nat-3-large.jpg"; import nat3Large from "../../commons/images/nat-3-large.jpg";
import nat3 from "../../commons/images/nat-3.jpg";
function About() { function About() {
return ( return (
@@ -36,19 +39,27 @@ function About() {
<div className="col-1-of-2"> <div className="col-1-of-2">
<div className="composition"> <div className="composition">
<img <img
src={nat1Large} srcSet={`${nat1} 300w, ${nat1Large} 1000w`}
alt="Nature 1" sizes="(max-width: 900px) 20vw, (max-width: 600px) 30vw, 300px"
alt="Photo 1"
className="composition__photo composition__photo--p1" className="composition__photo composition__photo--p1"
src={nat1Large}
/> />
<img <img
src={nat2Large} srcSet={`${nat2} 300w, ${nat2Large} 1000w`}
alt="Nature 2" sizes="(max-width: 900px) 20vw, (max-width: 600px) 30vw, 300px"
alt="Photo 2"
className="composition__photo composition__photo--p2" className="composition__photo composition__photo--p2"
src={nat2Large}
/> />
<img <img
src={nat3Large} srcSet={`${nat3} 300w, ${nat3Large} 1000w`}
alt="Nature 3" sizes="(max-width: 900px) 20vw, (max-width: 600px) 30vw, 300px"
alt="Photo 3"
className="composition__photo composition__photo--p3" className="composition__photo composition__photo--p3"
src={nat3Large}
/> />
</div> </div>
</div> </div>
+14 -1
View File
@@ -1,10 +1,23 @@
import logoLarge from "../images/logo-green-2x.png"; import logoLarge from "../images/logo-green-2x.png";
import logoSmall from "../images/logo-green-1x.png";
import logoGreenSmall from "../images/logo-green-small-1x.png";
import logoGreenLarge from "../images/logo-green-small-2x.png";
function Footer() { function Footer() {
return ( return (
<footer className="footer"> <footer className="footer">
<div className="footer__logo-box"> <div className="footer__logo-box">
<img src={logoLarge} alt="Large logo" className="footer__logo" /> <picture className="footer__logo">
<source
srcSet={`${logoGreenSmall} 1x, ${logoGreenLarge} 2x`}
media="(max-width: 37.5em)"
/>
<img
srcSet={`${logoSmall} 1x, ${logoLarge} 2x`}
alt="Large logo"
src={logoLarge}
/>
</picture>
</div> </div>
<div className="row"> <div className="row">
<div className="col-1-of-2"> <div className="col-1-of-2">
+6
View File
@@ -30,6 +30,11 @@
@include respond(phone) { @include respond(phone) {
transform: translateX(-3rem) skewX(0); transform: translateX(-3rem) skewX(0);
shape-outside: none;
clip-path: circle(50%);
left: 22%;
margin-bottom: 1rem;
margin-top: -2rem;
} }
} }
@@ -44,6 +49,7 @@
@include respond(phone) { @include respond(phone) {
transform: skewX(0); transform: skewX(0);
display: inline-block;
} }
} }