Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add swiper and change jumbotron in landing page #18

Merged
merged 2 commits into from
Dec 4, 2024
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"react-image-lightbox-rotation": "5.1.4-rotate",
"react-select": "^5.8.1",
"sonner": "^1.7.0",
"swiper": "^11.1.15",
"tailwind-merge": "^2.5.3"
}
}
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/images/basket.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/lamp.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/landing-1.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/mirror.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/shelf.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/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 108 additions & 26 deletions resources/js/Pages/Welcome.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,121 @@
import ButtonLink from "@/Components/ButtonLink";
import Typography from "@/Components/Typography";
import Layout from "@/Layouts/Layout";
import { Head } from "@inertiajs/react";
import { A11y, Autoplay } from "swiper/modules";

import { Swiper, SwiperSlide } from "swiper/react";

import "swiper/css";
import ButtonLink from "@/Components/ButtonLink";

export default function Welcome() {
return (
<Layout>
<Head title="Welcome" />
<section className="h-screen flex justify-center items-center">
<div className="px-8 text-center">
<Typography variant="j1" className="text-primary-500">
FURNIXY
</Typography>
<Typography className="h5">
Elevate Your Space,{" "}
<span className="text-secondary-900">Redefine Your Comfort</span>
<section className="relative h-screen overflow-hidden">
<div className="absolute inset-0">
<img
src="/images/landing-1.png"
alt="kursi"
className="w-full h-full object-cover"
/>
</div>
<div className="absolute right-0 top-20 flex flex-col items-end gap-4 justify-end p-8 z-10">
<Typography variant="j1" className="text-right text-primary-700">
Elevate Your Space, <br /> Redefine Your Comfort
</Typography>
<ButtonLink className="mt-4" href="/product">
Check Our Products
</ButtonLink>
<ButtonLink href="/product">Shop Now</ButtonLink>
</div>
</section>

<div className="my-8 flex justify-center space-x-2">
<span className="w-1 h-1 bg-primary-300 rounded-full"></span>
<span className="w-1 h-1 bg-primary-300 rounded-full"></span>
<span className="w-1 h-1 bg-primary-300 rounded-full"></span>
<div className="px-6">
<Swiper
modules={[A11y, Autoplay]}
spaceBetween={50}
slidesPerView={1}
navigation
pagination={{ clickable: true }}
loop={true}
autoplay={{ delay: 2500, disableOnInteraction: false }}
className="w-full rounded-lg py-[96px!important]"
>
<SwiperSlide>
<div className="flex flex-col justify-center w-full bg-secondary-400 h-[500px] md:h-[250px] rounded-lg">
<div className="px-8 md:px-16 flex flex-col md:justify-between md:flex-row items-center gap-6">
<div>
<Typography variant="j1" className="text-primary-400">
Enjoy Discounts Up to 70%!
</Typography>
<Typography className="text-secondary-900">
Shop now and grab special prices on selected items. Don’t
miss out—promo ends this month!
</Typography>
</div>
<div>
<img
src="/images/lamp.png"
alt="lampu"
width={200}
height={200}
/>
</div>
</div>
</div>
</SwiperSlide>
<SwiperSlide>
<div className="flex flex-col justify-center w-full bg-secondary-400 h-[500px] md:h-[250px] rounded-lg">
<div className="px-8 md:px-16 flex flex-col-reverse md:justify-between md:flex-row-reverse items-center gap-6">
<div>
<Typography variant="j1" className="text-primary-400">
New Arrivals Are Here
</Typography>
<Typography className="text-secondary-900">
Explore our newest designs made just for you. Limited
stock—get yours before they’re gone!
</Typography>
</div>
<div>
<img
src="/images/basket.png"
alt="keranjang"
width={200}
height={200}
/>
</div>
</div>
</div>
</SwiperSlide>
<SwiperSlide>
<div className="flex flex-col justify-center w-full bg-secondary-400 h-[500px] md:h-[250px] rounded-lg">
<div className="px-8 md:px-16 flex flex-col md:justify-between md:flex-row items-center gap-6">
<div>
<Typography variant="j1" className="text-primary-400">
Today's Flash Sale!
</Typography>
<Typography className="text-secondary-900">
Prices start at Rp99.999 on top-selling products. Available
for a few hours only—shop now!
</Typography>
</div>
<div>
<img
src="/images/mirror.png"
alt="mirror"
width={200}
height={200}
/>
</div>
</div>
</div>
</SwiperSlide>
</Swiper>
</div>

<section className="flex flex-col py-8">
{/* 1 */}
<div className="flex flex-col lg:flex-row items-center justify-center">
<div className="lg:w-1/2 flex justify-center">
<img
src="/images/jumbotron-2.png"
src="/images/jumbotron.png"
alt="kursi"
width={960}
height={1200}
Expand All @@ -59,10 +141,10 @@ export default function Welcome() {
</div>
<div className="lg:w-1/2 flex justify-center">
<img
src="/images/jumbotron.png"
alt="kursi"
width={960}
height={1200}
src="/images/shelf.png"
alt="rak"
width={1000}
height={1000}
className="w-1/2"
/>
</div>
Expand All @@ -71,10 +153,10 @@ export default function Welcome() {
<div className="flex flex-col lg:flex-row items-center justify-center">
<div className="lg:w-1/2 flex justify-center">
<img
src="/images/jumbotron-3.png"
alt="kursi"
width={960}
height={1200}
src="/images/table.png"
alt="meja"
width={1000}
height={1000}
className="w-1/2"
/>
</div>
Expand Down
Loading