|
| 1 | +import Link from 'next/link' |
| 2 | +import { Button } from '../ui/button' |
| 3 | +import heroLogo from '@/assets/hero_logo.webp' |
| 4 | +import Image from 'next/image' |
| 5 | + |
| 6 | +const Hero = () => { |
| 7 | + return ( |
| 8 | + <div className="w-full flex flex-col items-center gap-8 max-w-7xl relative isolate bg-stone-100 text-stone-950 p-3 sm:p-4 lg:p-6 my-6 lg:my-8"> |
| 9 | + <h1 className="text-extremely-large font-mono font-semibold"> |
| 10 | + Infinite Scroll Feed |
| 11 | + </h1> |
| 12 | + <div className="flex justify-center gap-16 text-normal"> |
| 13 | + <div className="max-w-xl"> |
| 14 | + <p className="pb-4 border-b-2 border-stone-400"> |
| 15 | + This website serves as a{' '} |
| 16 | + <strong className="font-mono px-0.5 text-large"> |
| 17 | + Landing Page |
| 18 | + </strong>{' '} |
| 19 | + for implementing an infinite scroll feed based on fake |
| 20 | + API data from |
| 21 | + <Button asChild variant="link"> |
| 22 | + <Link |
| 23 | + href="https://jsonplaceholder.typicode.com/" |
| 24 | + target="_blank" |
| 25 | + rel="noopener noreferrer" |
| 26 | + className="underline text-normal" |
| 27 | + aria-label="Link to JSON Placeholder (opens in a new tab)" |
| 28 | + title="Link to JSON Placeholder (opens in a new tab)" |
| 29 | + > |
| 30 | + JSON Placeholder |
| 31 | + </Link> |
| 32 | + </Button> |
| 33 | + and using UI elements from the React component library |
| 34 | + <Button asChild variant="link"> |
| 35 | + <Link |
| 36 | + href="https://ui.shadcn.com/" |
| 37 | + target="_blank" |
| 38 | + rel="noopener noreferrer" |
| 39 | + className="underline text-normal" |
| 40 | + aria-label="Link to shadcn (opens in a new tab)" |
| 41 | + title="Link to shadcn (opens in a new tab)" |
| 42 | + > |
| 43 | + shadcn |
| 44 | + </Link> |
| 45 | + </Button> |
| 46 | + </p> |
| 47 | + <p className="py-4 border-b-2 border-stone-400"> |
| 48 | + It makes use of the{' '} |
| 49 | + <strong className="font-mono px-0.5 text-large"> |
| 50 | + /comments |
| 51 | + </strong>{' '} |
| 52 | + and{' '} |
| 53 | + <strong className="font-mono px-0.5 text-large"> |
| 54 | + /users |
| 55 | + </strong>{' '} |
| 56 | + routes from JSON Placeholder to fetch and display |
| 57 | + comments along with user information in a card format. |
| 58 | + </p> |
| 59 | + <p className="text-center p-4 mt-4 bg-stone-300 rounded-lg"> |
| 60 | + Check out the top 10 posts of the week right now! |
| 61 | + <Button |
| 62 | + asChild |
| 63 | + variant="outline" |
| 64 | + className="flex m-auto mt-4 px-8 w-fit" |
| 65 | + > |
| 66 | + <Link |
| 67 | + href="" |
| 68 | + className="text-normal" |
| 69 | + aria-label="Link to Top 10 Posts (scrolls to section)" |
| 70 | + title="Link to Top 10 Posts" |
| 71 | + > |
| 72 | + Top 10 Posts |
| 73 | + </Link> |
| 74 | + </Button> |
| 75 | + </p> |
| 76 | + </div> |
| 77 | + <div className="hidden min-[864px]:flex flex-col gap-2 self-center justify-center items-center p-4 h-fit bg-stone-300 outline-4 outline-stone-600 rounded-lg"> |
| 78 | + <Image |
| 79 | + src={heroLogo} |
| 80 | + alt="Infinite Scroll Feed Logo" |
| 81 | + width={192} |
| 82 | + height={192} |
| 83 | + /> |
| 84 | + </div> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | + ) |
| 88 | +} |
| 89 | + |
| 90 | +export default Hero |
0 commit comments