-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arif Hesenov
committed
May 29, 2024
1 parent
a096386
commit 0021ef1
Showing
18 changed files
with
224 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
'use client' | ||
|
||
import Image from "next/image"; | ||
|
||
const Banner = () => { | ||
return null | ||
return <div className="relative mt-2 max-w-fullScreen max-h-80 mx-auto md:mt-8 isolate overflow-hidden bg-gray-900 py-24 sm:py-32"> | ||
<Image | ||
fill | ||
src='/images/banner.webp' | ||
alt="" | ||
className="absolute inset-0 -z-10 h-auto w-full object-cover" | ||
/> | ||
<div className="mx-auto max-w-7xl px-6 lg:px-8"> | ||
<div className="mx-auto max-w-2xl lg:mx-0"> | ||
<h2 className="text-4xl font-bold tracking-tight text-white sm:text-6xl">Support center</h2> | ||
<p className="mt-6 text-lg leading-8 text-gray-300"> | ||
Get inspired to create something great. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
} | ||
export default Banner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Link from "next/link"; | ||
|
||
const Container = ({ children, title, href }) => { | ||
return ( | ||
<div className="max-w-container my-8 mx-auto"> | ||
<div className="flex justify-between "> | ||
<h2 className="text-lg md:text-xl font-bold">{title}</h2> | ||
{href && <Link className="text-main font-semibold" href={href} > | ||
View All | ||
</Link> | ||
} | ||
</div> | ||
{children} | ||
</div> | ||
) | ||
} | ||
export default Container; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {default as Container} from './Container' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export * from './banner' | ||
export * from './button' | ||
export * from './button' | ||
export * from './container' | ||
export * from './list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
const List =({children})=>{ | ||
return ( | ||
<ul role="list" className="grid grid-cols-2 gap-x-4 gap-y-4 sm:grid-cols-3 sm:gap-x-6 lg:grid-cols-4 xl:gap-x-8"> | ||
{children} | ||
</ul> | ||
) | ||
} | ||
|
||
export default List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {default as List} from './List'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Container, List } from "common"; | ||
import { Card } from "./ui"; | ||
import { items } from "./consts"; | ||
|
||
const Items = () => { | ||
return ( | ||
<Container href={'/'} title='Featured'> | ||
<List> | ||
{items.map((item) => ( | ||
<Card key={item.id} data={item} /> | ||
))} | ||
</List> | ||
</Container> | ||
) | ||
} | ||
|
||
export default Items; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
export const items=[ | ||
{ | ||
name: '2024 State of Marketing Report – by Hubspot', | ||
author:"Hubspot", | ||
likes: 100, | ||
view: 200, | ||
images:[ | ||
{ | ||
url: '/images/card-1.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
{ | ||
url: '/images/card-2.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
], | ||
}, | ||
{ | ||
name: '2024 State of Marketing Report – by Hubspot', | ||
author:"Hubspot", | ||
likes: 100, | ||
view: 200, | ||
images:[ | ||
{ | ||
url: '/images/card-1.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
{ | ||
url: '/images/card-2.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
], | ||
}, | ||
{ | ||
name: '2024 State of Marketing Report – by Hubspot', | ||
author:"Hubspot", | ||
likes: 100, | ||
view: 200, | ||
images:[ | ||
{ | ||
url: '/images/card-1.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
{ | ||
url: '/images/card-2.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
], | ||
}, | ||
{ | ||
name: '2024 State of Marketing Report – by Hubspot', | ||
author:"Hubspot", | ||
likes: 100, | ||
view: 200, | ||
images:[ | ||
{ | ||
url: '/images/card-1.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
{ | ||
url: '/images/card-2.webp', | ||
alt: '2024 State of Marketing Report – by Hubspot', | ||
}, | ||
], | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {default as Items} from './Items' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Link from "next/link"; | ||
|
||
import Slider from "../Slider/SliderCard"; | ||
|
||
const Card = ({ data }) => { | ||
|
||
return ( | ||
<li key={data.id}> | ||
<Slider images={data?.images}/> | ||
<Link href='/' className="text-base font-semibold leading-2 tracking-tight line-clamp-2 text-gray-900">{data.name}</Link> | ||
<p className="text-sm leading-7 text-main font-semibold">{data.author}</p> | ||
<ul role="list" className="mt-4 flex gap-x-2"> | ||
<li> | ||
<div className="text-gray-400 text-xs hover:text-gray-500"> | ||
<span>{data.likes} likes</span> | ||
</div> | ||
</li> | ||
<li> | ||
<div className="text-gray-400 text-xs hover:text-gray-500"> | ||
<span>{data.view} viewa</span> | ||
</div> | ||
</li> | ||
</ul> | ||
</li> | ||
) | ||
} | ||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use client' | ||
|
||
import { Swiper, SwiperSlide } from 'swiper/react'; | ||
|
||
import 'swiper/css'; | ||
import 'swiper/css/pagination'; | ||
|
||
import { Pagination } from 'swiper/modules'; | ||
import Image from 'next/image'; | ||
|
||
|
||
const SliderCard = ({ images }) => { | ||
return ( | ||
<Swiper pa pagination={true} modules={[Pagination]} className="mySwiper"> | ||
{images.map((image, index) => ( | ||
<SwiperSlide key={index}> | ||
<Image width={200} height={200} className="aspect-[3/2] w-full rounded-2xl object-cover" src={image.url} alt="" /> | ||
</SwiperSlide> | ||
))} | ||
</Swiper> | ||
) | ||
} | ||
export default SliderCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export {default as Card} from './Card/Card'; | ||
export {default as Slider} from './Slider/SliderCard'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters