Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/Footer/Footer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import styles from "./Footer.module.css";

import { Container } from "../";
import { Container, Waves } from "../";

export default function Footer() {
return (
<footer className={styles.container}>
<Container>
<Waves flip image="/images/wave--infinite-grey.svg" />
<div>
<svg width="118" height="37" viewBox="0 0 118 37" fill="none">
<path
Expand Down
6 changes: 2 additions & 4 deletions components/Footer/Footer.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
.container {
--textColor: var(--white);
--hColor: var(--white);
--textColor: var(--white);
position: relative;
height: 580px;
background-size: cover;
background-image: url("/images/footer.svg");
background: linear-gradient(0.25turn, var(--pink) 30%, var(--blue));
padding-top: 240px;
padding-bottom: 120px;
}

.grid {
Expand Down
6 changes: 4 additions & 2 deletions components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ import Meta from "../meta";

import { Footer } from "../../components";

import styles from "./Layout.module.css";

export default function Layout({ preview, children }) {
return (
<>
<Meta />
<div className="min-h-screen">
<div className={styles.container}>
<main>{children}</main>
<Footer />
</div>
<Footer />
</>
);
}
5 changes: 5 additions & 0 deletions components/Layout/Layout.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.container {
max-width: 2250px;
margin: 0 auto;
box-shadow: var(--shadow-4);
}
4 changes: 2 additions & 2 deletions components/PostPreview/PostPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export default function PostPreview({
src={coverImage}
alt={`Cover Image for ${title}`}
className={styles.image}
height={350}
width={350}
height={400}
width={400}
/>

<div>
Expand Down
32 changes: 32 additions & 0 deletions components/Waves/Waves.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import styles from "./Waves.module.css";

const defaultImage = "/images/wave--infinite.svg";

export default function Waves({ flip, image }) {
return (
<div
className={`${styles.waveContainer} ${
flip ? styles.waveContainerTop : styles.waveContainerBottom
}`}
>
<div
className={styles.wave}
style={{
backgroundImage: `url(${image || defaultImage})`,
}}
/>
<div
className={styles.wave}
style={{
backgroundImage: `url(${image || defaultImage})`,
}}
/>
<div
className={styles.wave}
style={{
backgroundImage: `url(${image || defaultImage})`,
}}
/>
</div>
);
}
52 changes: 52 additions & 0 deletions components/Waves/Waves.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.waveContainer {
position: absolute;
left: 0;
right: 0;
height: 12vh;
overflow: hidden;
}

.waveContainerBottom {
bottom: -1%;
}

.waveContainerTop {
top: -1%;
transform: rotate(180deg);
}

.wave {
animation: wave calc(var(--speed, 0) * 1s) infinite linear;
background-size: 50% 100%;
bottom: -5%;
height: calc(var(--height, 0) * 1vh);
left: 0;
opacity: var(--opacity);
position: absolute;
right: 0;
width: calc(var(--width, 0) * 1vw);
overflow: visible;
}
@keyframes wave {
to {
transform: translate(-50%, 0);
}
}
.wave:nth-of-type(1) {
--height: 12;
--opacity: 0.3;
--speed: 30;
--width: 800;
}
.wave:nth-of-type(2) {
--height: 12;
--opacity: 0.6;
--speed: 45;
--width: 800;
}
.wave:nth-of-type(3) {
--height: 6;
--opacity: 1;
--speed: 15;
--width: 400;
}
1 change: 1 addition & 0 deletions components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export { default as Footer } from "./Footer/Footer";
export { default as Container } from "./Container/Container";
export { default as PostPreview } from "./PostPreview/PostPreview";
export { default as Layout } from "./Layout/Layout";
export { default as Waves } from "./Waves/Waves";
2 changes: 1 addition & 1 deletion pages/posts/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import PostHeader from "../../components/post-header";
import { getPostBySlug, getAllPosts } from "../../lib/api";
import PostTitle from "../../components/post-title";
import Head from "next/head";
import { CMS_NAME } from "../../lib/constants";

import markdownToHtml from "../../lib/markdownToHtml";

import { Layout } from "../../components";
Expand Down
Binary file added public/images/herobg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/heroboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/images/wave--infinite-grey.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/images/wave--infinite-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions sections/Blog/Blog.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PostPreview } from "../../components";
import { PostPreview, Waves } from "../../components";

import styles from "./Blog.module.css";

Expand Down Expand Up @@ -27,7 +27,7 @@ export default function Blog({ posts }) {
);
})}
</div>
{/* <button>See More</button> */}
<Waves image="/images/wave--infinite-grey.svg" />
</section>
);
}
19 changes: 4 additions & 15 deletions sections/Blog/Blog.module.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
.container {
margin-top: 350px;
margin-bottom: 400px;
padding-bottom: 300px;
padding-top: 200px;
background: var(--white);
padding: 40px 0;
position: relative;
}

.container::after {
content: "";
background-image: url("/images/blogbottom.svg");
background-size: cover;
position: absolute;
left: 0;
right: 0;
height: 400px;
bottom: -398px;
}

.title {
flex-direction: column;
display: flex;
Expand All @@ -33,7 +22,7 @@

.grid {
display: grid;
grid-template-columns: 350px 350px 350px;
gap: 30px;
grid-template-columns: 400px 400px 400px;
gap: 60px;
justify-content: center;
}
1 change: 1 addition & 0 deletions sections/CallToAction/CallToAction.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.container {
background-color: var(--grey);
text-align: center;
--h4: var(--h2);
padding: 100px 0;
Expand Down
31 changes: 17 additions & 14 deletions sections/Hero/Hero.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import Image from "next/image";
import { Waves } from "../../components";

import styles from "./Hero.module.css";

export default function () {
export default function Hero() {
return (
<section className={styles.container}>
<h1>Grow your business</h1>
<p>
<span className={styles.highlight}>Designs</span> products and
experience for users.
</p>
<button className={styles.buttonSecondary} type="button">
Contact us today
</button>

<div className={[styles.waveContainer, styles.waveContainerBottom]}>
<div className={styles.wave} />
<div className={styles.wave} />
<div className={styles.wave} />
<div>
<h1>Grow your business</h1>
<p>
<span className={styles.highlight}>Designs</span> products and
experience for users.
</p>
<button className={styles.buttonSecondary} type="button">
Contact us today
</button>
</div>
<div>
<Image src="/images/heroboard.png" height="448" width="797" />
</div>
<Waves />
</section>
);
}
64 changes: 9 additions & 55 deletions sections/Hero/Hero.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
.container {
--p: var(--h3);
--hColor: var(--white);
--textColor: var(--white);
background: var(--blue);
padding: 200px;
position: relative;
background-image: url("/images/herobg.png");
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
height: 95vh;
}

.container > * {
Expand Down Expand Up @@ -29,57 +37,3 @@
min-width: 200px;
transition: 0.3s all ease-in-out;
}

.waveContainer {
position: absolute;
left: 0;
right: 0;
height: 12vh;
overflow: hidden;
}

.waveContainerBottom {
bottom: -1%;
}

.waveContainerTop {
top: -1%;
transform: rotate(180deg);
}

.wave {
animation: wave calc(var(--speed, 0) * 1s) infinite linear;
background-image: url("/images/wave--infinite.svg");
background-size: 50% 100%;
bottom: -5%;
height: calc(var(--height, 0) * 1vh);
left: 0;
opacity: var(--opacity);
position: absolute;
right: 0;
width: calc(var(--width, 0) * 1vw);
overflow: visible;
}
@keyframes wave {
to {
transform: translate(-50%, 0);
}
}
.wave:nth-of-type(1) {
--height: 12;
--opacity: 0.3;
--speed: 30;
--width: 800;
}
.wave:nth-of-type(2) {
--height: 12;
--opacity: 0.6;
--speed: 45;
--width: 800;
}
.wave:nth-of-type(3) {
--height: 6;
--opacity: 1;
--speed: 15;
--width: 400;
}
2 changes: 1 addition & 1 deletion sections/HowWeWork/HowWeWork.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.container {
background: var(--lightGrey);
padding: 0 0 100px;
padding: 60px 0 100px;
position: relative;
}

Expand Down
18 changes: 4 additions & 14 deletions sections/Services/Services.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import styles from "./Services.module.css";
import heroStyles from "../Hero/Hero.module.css";
import { data, buttons } from "./ServicesData";

import { Waves } from "../../components";

export default function Services() {
const [[panel, direction], setPanel] = useState([0, 0]);
const index = wrap(0, data.length, panel);
Expand Down Expand Up @@ -80,13 +82,7 @@ export default function Services() {
};
return (
<section className={styles.container}>
<div
className={`${heroStyles.waveContainer} ${heroStyles.waveContainerTop}`}
>
<div className={heroStyles.wave} />
<div className={heroStyles.wave} />
<div className={heroStyles.wave} />
</div>
<Waves flip />
<div className={styles.title}>
<h1>Services</h1>
<p>
Expand Down Expand Up @@ -142,13 +138,7 @@ export default function Services() {
</motion.div>
</AnimatePresence>
</div>
<div
className={`${heroStyles.waveContainer} ${heroStyles.waveContainerBottom}`}
>
<div className={heroStyles.wave} />
<div className={heroStyles.wave} />
<div className={heroStyles.wave} />
</div>
<Waves image="/images/wave--infinite-white.svg" />
</section>
);
}
2 changes: 1 addition & 1 deletion sections/Services/Services.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--textColor: var(--white);
--hColor: var(--white);
background: linear-gradient(0.3turn, var(--pink) 30%, var(--blue));
padding: 140px 0 350px;
padding: 240px 0 350px;
margin-bottom: -350px;
height: 450px;
position: relative;
Expand Down
Loading