Skip to content

Commit b076254

Browse files
authored
Merge pull request #6 from oslabs-beta/compMerge
integrated new feature slide and Team Section, restyled NavBar
2 parents ff7de62 + dfc2d34 commit b076254

File tree

8 files changed

+122
-153
lines changed

8 files changed

+122
-153
lines changed

www/src/pages/components/FeatureSlider.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Swiper, SwiperSlide } from 'swiper/react'
22
import { Navigation, Pagination, Scrollbar, A11y } from 'swiper'
3-
import FeatureSliderCard from "./FeatureSliderCard"
43

54
import 'swiper/css';
65
import 'swiper/css/navigation';

www/src/pages/components/FeatureSliderCard.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import {
2+
ArrowPathIcon,
3+
CloudArrowUpIcon,
4+
CogIcon,
5+
LockClosedIcon,
6+
ServerIcon,
7+
ShieldCheckIcon,
8+
} from '@heroicons/react/24/outline'
9+
10+
const features = [
11+
{
12+
name: 'Push to Deploy',
13+
description: 'Ac tincidunt sapien vehicula erat auctor pellentesque rhoncus. Et magna sit morbi lobortis.',
14+
icon: CloudArrowUpIcon,
15+
},
16+
{
17+
name: 'SSL Certificates',
18+
description: 'Ac tincidunt sapien vehicula erat auctor pellentesque rhoncus. Et magna sit morbi lobortis.',
19+
icon: LockClosedIcon,
20+
},
21+
{
22+
name: 'Simple Queues',
23+
description: 'Ac tincidunt sapien vehicula erat auctor pellentesque rhoncus. Et magna sit morbi lobortis.',
24+
icon: ArrowPathIcon,
25+
},
26+
{
27+
name: 'Advanced Security',
28+
description: 'Ac tincidunt sapien vehicula erat auctor pellentesque rhoncus. Et magna sit morbi lobortis.',
29+
icon: ShieldCheckIcon,
30+
},
31+
{
32+
name: 'Powerful API',
33+
description: 'Ac tincidunt sapien vehicula erat auctor pellentesque rhoncus. Et magna sit morbi lobortis.',
34+
icon: CogIcon,
35+
},
36+
{
37+
name: 'Database Backups',
38+
description: 'Ac tincidunt sapien vehicula erat auctor pellentesque rhoncus. Et magna sit morbi lobortis.',
39+
icon: ServerIcon,
40+
},
41+
]
42+
43+
export default function FeaturesSection() {
44+
return (
45+
<div className="relative bg-white py-24 sm:py-32 lg:py-40">
46+
<div className="mx-auto max-w-md px-6 text-center sm:max-w-3xl lg:max-w-7xl lg:px-8">
47+
<h2 className="text-lg font-semibold text-indigo-600">Deploy faster</h2>
48+
<p className="mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
49+
Everything you need to deploy your app
50+
</p>
51+
<p className="mx-auto mt-5 max-w-prose text-xl text-gray-500">
52+
Phasellus lorem quam molestie id quisque diam aenean nulla in. Accumsan in quis quis nunc, ullamcorper
53+
malesuada. Eleifend condimentum id viverra nulla.
54+
</p>
55+
<div className="mt-20">
56+
<div className="grid grid-cols-1 gap-12 sm:grid-cols-2 lg:grid-cols-3">
57+
{features.map((feature) => (
58+
<div key={feature.name} className="pt-6">
59+
<div className="flow-root rounded-lg bg-gray-50 px-6 pb-8">
60+
<div className="-mt-6">
61+
<div>
62+
<span className="inline-flex items-center justify-center rounded-xl bg-indigo-500 p-3 shadow-lg">
63+
<feature.icon className="h-8 w-8 text-white" aria-hidden="true" />
64+
</span>
65+
</div>
66+
<h3 className="mt-8 text-lg font-semibold leading-8 tracking-tight text-gray-900">
67+
{feature.name}
68+
</h3>
69+
<p className="mt-5 text-base leading-7 text-gray-600">{feature.description}</p>
70+
</div>
71+
</div>
72+
</div>
73+
))}
74+
</div>
75+
</div>
76+
</div>
77+
</div>
78+
)
79+
}

www/src/pages/components/LandingPage.tsx

Lines changed: 5 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { ChevronRightIcon, StarIcon } from '@heroicons/react/20/solid';
22
import { string } from 'prop-types';
33
import TeamSection from '../components/TeamSection';
4+
import FeaturesSection from '../components/FeaturesSection';
45
import Image from 'next/image';
6+
import Blogs from './Blogs';
57

68
export default function LandingPage(): JSX.Element {
79
return (
8-
<div className="bg-white">
10+
<div className="bg-gray-50">
911
<main>
1012
{/* Hero section */}
1113
<div className="overflow-hidden pt-8 sm:pt-12 lg:relative lg:py-48">
@@ -114,135 +116,12 @@ export default function LandingPage(): JSX.Element {
114116
</div>
115117

116118
<div className="relative mt-16">
119+
<Blogs />
120+
<FeaturesSection />
117121
<TeamSection />
118122
</div>
119123

120124

121-
<<<<<<< HEAD
122-
<div className="relative mx-auto max-w-md px-4 sm:max-w-3xl sm:px-6 lg:px-0">
123-
{/* Content area */}
124-
<div className="pt-12 sm:pt-16 lg:pt-20">
125-
126-
<div className="mt-6 space-y-6 text-gray-500">
127-
128-
</div>
129-
</div>
130-
131-
{/* Stats section */}
132-
133-
</div>
134-
</div>
135-
</div>
136-
137-
{/* Logo cloud section */}
138-
<div className="mt-32">
139-
<div className="mx-auto max-w-md px-4 sm:max-w-3xl sm:px-6 lg:max-w-7xl lg:px-8">
140-
<div className="lg:grid lg:grid-cols-2 lg:items-center lg:gap-24">
141-
<div>
142-
<h2 className="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
143-
Backed by world-renowned investors
144-
</h2>
145-
<p className="mt-6 max-w-3xl text-lg leading-7 text-gray-500">
146-
Sagittis scelerisque nulla cursus in enim consectetur quam. Dictum urna sed consectetur neque
147-
tristique pellentesque. Blandit amet, sed aenean erat arcu morbi. Cursus faucibus nunc nisl netus
148-
morbi vel porttitor vitae ut. Amet vitae fames senectus vitae.
149-
</p>
150-
<div className="mt-6">
151-
<a href="#" className="text-base font-medium text-rose-500">
152-
Meet our investors and advisors&nbsp&rarr;
153-
</a>
154-
</div>
155-
</div>
156-
<div className="mt-12 grid grid-cols-2 gap-0.5 md:grid-cols-3 lg:mt-0 lg:grid-cols-2">
157-
{logos.map((logo) => (
158-
<div key={logo.name} className="col-span-1 flex justify-center bg-gray-50 py-8 px-8">
159-
<img className="max-h-12" src={logo.url} alt={logo.name} />
160-
</div>
161-
))}
162-
</div>
163-
</div>
164-
</div>
165-
</div>
166-
167-
{/* CTA section */}
168-
<div className="relative mt-24 sm:mt-32 sm:py-16">
169-
<div aria-hidden="true" className="hidden sm:block">
170-
<div className="absolute inset-y-0 left-0 w-1/2 rounded-r-3xl bg-gray-50" />
171-
<svg className="absolute top-8 left-1/2 -ml-3" width={404} height={392} fill="none" viewBox="0 0 404 392">
172-
<defs>
173-
<pattern
174-
id="8228f071-bcee-4ec8-905a-2a059a2cc4fb"
175-
x={0}
176-
y={0}
177-
width={20}
178-
height={20}
179-
patternUnits="userSpaceOnUse"
180-
>
181-
<rect x={0} y={0} width={4} height={4} className="text-gray-200" fill="currentColor" />
182-
</pattern>
183-
</defs>
184-
<rect width={404} height={392} fill="url(#8228f071-bcee-4ec8-905a-2a059a2cc4fb)" />
185-
</svg>
186-
</div>
187-
<div className="mx-auto max-w-md px-4 sm:max-w-3xl sm:px-6 lg:max-w-7xl lg:px-8">
188-
<div className="relative overflow-hidden rounded-2xl bg-rose-500 px-6 py-10 shadow-xl sm:px-12 sm:py-20">
189-
<div aria-hidden="true" className="absolute inset-0 -mt-72 sm:-mt-32 md:mt-0">
190-
<svg
191-
className="absolute inset-0 h-full w-full"
192-
preserveAspectRatio="xMidYMid slice"
193-
xmlns="http://www.w3.org/2000/svg"
194-
fill="none"
195-
viewBox="0 0 1463 360"
196-
>
197-
<path
198-
className="text-rose-400 text-opacity-40"
199-
fill="currentColor"
200-
d="M-82.673 72l1761.849 472.086-134.327 501.315-1761.85-472.086z"
201-
/>
202-
<path
203-
className="text-rose-600 text-opacity-40"
204-
fill="currentColor"
205-
d="M-217.088 544.086L1544.761 72l134.327 501.316-1761.849 472.086z"
206-
/>
207-
</svg>
208-
</div>
209-
<div className="relative">
210-
<div className="sm:text-center">
211-
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
212-
Get notified when we&rsquo;re launching.
213-
</h2>
214-
<p className="mx-auto mt-6 max-w-2xl text-lg text-rose-100">
215-
Sagittis scelerisque nulla cursus in enim consectetur quam. Dictum urna sed consectetur neque
216-
tristique pellentesque.
217-
</p>
218-
</div>
219-
<form action="#" className="mt-12 sm:mx-auto sm:flex sm:max-w-lg">
220-
<div className="min-w-0 flex-1">
221-
<label htmlFor="cta-email" className="sr-only">
222-
Email address
223-
</label>
224-
<input
225-
id="cta-email"
226-
type="email"
227-
className="block w-full rounded-md border border-transparent px-5 py-3 text-base text-gray-900 placeholder-gray-500 shadow-sm focus:border-transparent focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-rose-500"
228-
placeholder="Enter your email"
229-
/>
230-
</div>
231-
<div className="mt-4 sm:mt-0 sm:ml-3">
232-
<button
233-
type="submit"
234-
className="block w-full rounded-md border border-transparent bg-gray-900 px-5 py-3 text-base font-medium text-white shadow hover:bg-black focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-rose-500 sm:px-10"
235-
>
236-
Notify me
237-
</button>
238-
</div>
239-
</form>
240-
</div>
241-
</div>
242-
</div>
243-
</div>
244-
=======
245-
>>>>>>> master
246125
</main>
247126

248127
{/* Footer section */}

www/src/pages/components/NavBar.tsx

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
1-
import { Fragment } from 'react'
1+
import { Fragment, useEffect, useState } from 'react'
22
import { Disclosure, Menu, Transition } from '@headlessui/react'
33
import { Bars3Icon, BellIcon, XMarkIcon } from '@heroicons/react/24/outline'
44

55
function classNames(...classes: string[]) {
66
return classes.filter(Boolean).join(' ')
77
}
88

9+
10+
911
export default function NavBar() {
12+
13+
const [scrollPosition, setScrollPosition] = useState(0);
14+
15+
const handleScroll = () => {
16+
const position = window.pageYOffset;
17+
setScrollPosition(position);
18+
};
19+
20+
useEffect(() => {
21+
window.addEventListener('scroll', handleScroll, { passive: true });
22+
23+
return () => {
24+
window.removeEventListener('scroll', handleScroll);
25+
};
26+
}, []);
27+
28+
function NavBarSytling() {
29+
return scrollPosition === 0 ? "sticky top-0 bg-gray-50 w-screen z-20 border-b" : "sticky top-0 bg-gray-50 w-screen z-20 shadow-xl";
30+
}
31+
32+
1033
return (
11-
<Disclosure as="nav" className="bg-[#333333]">
34+
<Disclosure as="nav" className={NavBarSytling()}>
1235
{({ open }) => (
1336
<>
1437
<div className="mx-auto max-w9xl px-4 sm:px-6 lg:px-8">
@@ -21,7 +44,7 @@ export default function NavBar() {
2144
alt="Your Company"
2245
/>
2346
<img
24-
className="hidden h-8 w-auto lg:block invert"
47+
className="hidden h-8 w-auto lg:block"
2548
src="https://i.imgur.com/ELBAyVb.png"
2649
alt="Your Company"
2750
/>
@@ -40,19 +63,19 @@ export default function NavBar() {
4063
</a>
4164
<a
4265
href="#"
43-
className="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
66+
className="rounded-md px-3 py-2 text-sm font-medium text-gray-500 hover:bg-gray-700 hover:text-white"
4467
>
4568
Team
4669
</a>
4770
<a
4871
href="#"
49-
className="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
72+
className="rounded-md px-3 py-2 text-sm font-medium text-gray-500 hover:bg-gray-700 hover:text-white"
5073
>
5174
Projects
5275
</a>
5376
<a
5477
href="#"
55-
className="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white"
78+
className="rounded-md px-3 py-2 text-sm font-medium text-gray-500 hover:bg-gray-700 hover:text-white"
5679
>
5780
Calendar
5881
</a>

www/src/pages/components/TeamSection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const people: string[][] = [
7272
]
7373

7474
function replace(e: React.SyntheticEvent<HTMLImageElement>): void{
75+
console.log('test');
7576
e.currentTarget.onerror = null;
7677
e.currentTarget.src = "/profileFallback.png"
7778
}

www/src/pages/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ const Home: NextPage = () => {
1212

1313
return (
1414
<>
15-
<FeatureSlider/>
15+
1616
<NavBar />
17+
1718
<LandingPage />
18-
<Blogs />
19+
{/* <FeatureSlider/> */}
20+
{/* <Blogs /> */}
1921
</>
2022
);
2123
};

www/src/styles/globals.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4+
5+
body {
6+
background-color: rgba(249, 250, 251);
7+
}

0 commit comments

Comments
 (0)