feat: enhance newsletter component with customizable properties and add search/filter adj dashboard
This commit is contained in:
parent
a333b7924f
commit
7eb38d03a0
@ -4,7 +4,7 @@ import { APP } from '~/configs/meta'
|
|||||||
|
|
||||||
export const Banner = () => {
|
export const Banner = () => {
|
||||||
return (
|
return (
|
||||||
<div className="min-h-[65px] sm:mx-10">
|
<div className="min-h-[65px] lg:mx-10">
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<Link
|
<Link
|
||||||
to="/#"
|
to="/#"
|
||||||
@ -13,12 +13,9 @@ export const Banner = () => {
|
|||||||
<img
|
<img
|
||||||
src={'/images/banner.png'}
|
src={'/images/banner.png'}
|
||||||
alt={APP.title}
|
alt={APP.title}
|
||||||
className="h-[70px] w-[100%] sm:h-full"
|
className="h-[70px] w-[100%] content-center sm:h-full"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<p className="absolute top-2 mx-10">
|
|
||||||
Lorem ipsum dolor sit, amet consectetur
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,37 +1,57 @@
|
|||||||
|
import { twMerge } from 'tailwind-merge'
|
||||||
|
|
||||||
import { Button } from '~/components/ui/button'
|
import { Button } from '~/components/ui/button'
|
||||||
|
|
||||||
export const Newsletter = () => {
|
type NewsletterProperties = {
|
||||||
return (
|
className?: string
|
||||||
<div className="flex h-[300px] w-full flex-col md:flex-row">
|
title?: string
|
||||||
<div className="flex w-full flex-col justify-center gap-5 bg-[#2E2F7C] px-6 py-5 text-white sm:px-30 md:w-[50%]">
|
description?: string
|
||||||
<h2 className="text-2xl font-bold sm:text-4xl">Join Our Newsletter</h2>
|
textButton?: string
|
||||||
<p className="text:md sm:text-lg">
|
onClick?: () => void
|
||||||
Tidak ingin ketinggalan Berita Hukum terhangat? Ingin mendapat
|
}
|
||||||
informasi kajian dan networking terbaru? Ikuti Newsletter kami dan
|
export const Newsletter = (property: NewsletterProperties) => {
|
||||||
Stay up to Speed!
|
const { className, title, description } = property
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="relative">
|
||||||
<div
|
<div
|
||||||
className="flex flex-col justify-center bg-cover bg-center px-20 py-5 sm:w-full md:w-[50%]"
|
className={`absolute flex h-[400px] w-screen flex-col sm:h-[300px] md:flex-row ${twMerge('', className)}`}
|
||||||
style={{
|
|
||||||
backgroundImage: "url('https://placehold.co/400x300.png')",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<form className="grid gap-5">
|
<div className="flex h-1/2 w-full flex-col justify-center gap-5 bg-[#2E2F7C] px-6 py-5 text-white sm:h-full sm:w-[50%] sm:px-30">
|
||||||
<input
|
<h2 className="text-2xl font-bold sm:text-4xl">
|
||||||
type="email"
|
{title ? `${title}` : 'Join Our Newsletter'}
|
||||||
placeholder="Daftarkan Email Disini"
|
</h2>
|
||||||
className="w-full rounded-md border border-gray-300 bg-white p-4 text-sm focus:outline-none"
|
<p className="text:md sm:text-lg">
|
||||||
/>
|
{description
|
||||||
<Button
|
? `${description}`
|
||||||
type="submit"
|
: `Tidak ingin ketinggalan Berita Hukum terhangat?
|
||||||
variant="newsPrimary"
|
Ingin mendapat informasi kajian dan networking terbaru?
|
||||||
size="block"
|
Ikuti Newsletter kami dan Stay up to Speed!`}
|
||||||
>
|
</p>
|
||||||
Subscribe
|
</div>
|
||||||
</Button>
|
<div
|
||||||
</form>
|
style={{
|
||||||
|
backgroundImage: "url('/images/bg-newsletter.png')",
|
||||||
|
backgroundSize: 'cover',
|
||||||
|
backgroundPosition: 'center',
|
||||||
|
}}
|
||||||
|
className="flex h-1/2 w-full flex-col items-center justify-center text-center sm:h-full sm:w-[50%]"
|
||||||
|
>
|
||||||
|
<form className="grid w-[50%] gap-5">
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
placeholder="Daftarkan Email Disini"
|
||||||
|
className="w-full rounded-md border border-gray-300 bg-white p-4 text-sm focus:outline-none"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
variant="newsPrimary"
|
||||||
|
size="block"
|
||||||
|
>
|
||||||
|
Subscribe
|
||||||
|
</Button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
|
import { Field, Input, Label, Select } from '@headlessui/react'
|
||||||
import DT from 'datatables.net-dt'
|
import DT from 'datatables.net-dt'
|
||||||
import DataTable from 'datatables.net-react'
|
import DataTable from 'datatables.net-react'
|
||||||
|
|
||||||
|
import { SearchIcon } from '~/components/icons/search'
|
||||||
import { TitleDashboard } from '~/components/ui/title-dashboard'
|
import { TitleDashboard } from '~/components/ui/title-dashboard'
|
||||||
|
|
||||||
import { CONTENTS } from './data'
|
import { CONTENTS } from './data'
|
||||||
@ -34,6 +36,34 @@ export const ContentsPage = () => {
|
|||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<TitleDashboard title="Konten" />
|
<TitleDashboard title="Konten" />
|
||||||
|
<div className="mb-8 flex items-center gap-5 rounded-lg bg-gray-50 text-[#363636]">
|
||||||
|
<div className="w-[400px]">
|
||||||
|
<Field>
|
||||||
|
<Label className="mb-2 block text-sm font-medium">Cari User</Label>
|
||||||
|
<div className="relative">
|
||||||
|
<Input
|
||||||
|
type="text"
|
||||||
|
placeholder="Cari Nama"
|
||||||
|
className="w-full rounded-lg bg-white p-2 pr-10 pl-4 shadow focus:ring-1 focus:ring-[#2E2F7C] focus:outline-none"
|
||||||
|
/>
|
||||||
|
<div className="absolute inset-y-0 right-0 flex items-center pr-3">
|
||||||
|
<SearchIcon className="h-5 w-5" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="w-[235px]">
|
||||||
|
<Field>
|
||||||
|
<Label className="mb-2 block text-sm font-medium">Status</Label>
|
||||||
|
<Select className="w-full rounded-lg bg-white p-2 shadow focus:ring-1 focus:ring-[#2E2F7C] focus:outline-none">
|
||||||
|
<option>Pilih Status</option>
|
||||||
|
<option>Aktif</option>
|
||||||
|
<option>Nonaktif</option>
|
||||||
|
</Select>
|
||||||
|
</Field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div className="rounded-lg bg-white p-6 shadow-md">
|
<div className="rounded-lg bg-white p-6 shadow-md">
|
||||||
<h3 className="py-1 font-semibold text-[#4C5CA0]">Daftar Content</h3>
|
<h3 className="py-1 font-semibold text-[#4C5CA0]">Daftar Content</h3>
|
||||||
<DataTable
|
<DataTable
|
||||||
|
|||||||
@ -44,7 +44,7 @@ export const SubscriptionsPage = () => {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const switchViee = () => {
|
const switchView = () => {
|
||||||
setSubscribtionOpen(!SubscribtionOpen)
|
setSubscribtionOpen(!SubscribtionOpen)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ export const SubscriptionsPage = () => {
|
|||||||
<TitleDashboard title="Subscription" />
|
<TitleDashboard title="Subscription" />
|
||||||
<Button
|
<Button
|
||||||
className="float-right mt-7 h-10 w-[160px] rounded-md"
|
className="float-right mt-7 h-10 w-[160px] rounded-md"
|
||||||
onClick={switchViee}
|
onClick={switchView}
|
||||||
>
|
>
|
||||||
{SubscribtionOpen ? 'Subscriptions' : 'Save'}
|
{SubscribtionOpen ? 'Subscriptions' : 'Save'}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -10,7 +10,9 @@ export const NewsPage = () => {
|
|||||||
<Card>
|
<Card>
|
||||||
<Carousel {...SPOTLIGHT} />
|
<Carousel {...SPOTLIGHT} />
|
||||||
</Card>
|
</Card>
|
||||||
<Newsletter />
|
<div className="min-h-[400px] sm:min-h-[300px]">
|
||||||
|
<Newsletter className="mr-0 lg:-ml-14" />
|
||||||
|
</div>
|
||||||
<Card>
|
<Card>
|
||||||
<Carousel {...BERITA} />
|
<Carousel {...BERITA} />
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
BIN
public/images/bg-newsletter.png
Normal file
BIN
public/images/bg-newsletter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.7 MiB |
Loading…
x
Reference in New Issue
Block a user