update page wedding
This commit is contained in:
parent
90053be1a2
commit
5ecbec478f
@ -18,6 +18,7 @@ export const getWedding = async () => {
|
||||
title,
|
||||
subtitle,
|
||||
"coverImageUrl": coverImage.asset->url,
|
||||
pixiesetURL,
|
||||
descriptionTitle,
|
||||
content[]{
|
||||
children[]{
|
||||
@ -52,11 +53,13 @@ export const getWedding = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line import/no-anonymous-default-export
|
||||
export default async (req, res) => {
|
||||
const query = `*[_type == "WeddingSection"][]{
|
||||
title,
|
||||
subtitle,
|
||||
"coverImageUrl": coverImage.asset->url,
|
||||
pixiesetURL,
|
||||
descriptionTitle,
|
||||
content[]{
|
||||
children[]{
|
||||
|
@ -163,7 +163,7 @@ export default function page(props) {
|
||||
<li
|
||||
key={uniqid('page-')}
|
||||
className={`border-1 mx-1 w-7 rounded bg-stone-600 py-2 text-center font-sans text-sm font-semibold text-stone-50 hover:bg-yellow-500 ${
|
||||
page.active
|
||||
props.pageActive == page.page
|
||||
? 'bg-yellow-500'
|
||||
: 'text-stone-500 hover:bg-yellow-500 hover:text-stone-50'
|
||||
}`}
|
||||
@ -182,16 +182,18 @@ export default function page(props) {
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async ({ params }:any) => {
|
||||
console.log('params', params)
|
||||
let pagehal = params && params.page ? Number(params.page) : 1
|
||||
const { posts, paginations } = await getPage(
|
||||
url,
|
||||
'/monthly-release/page/',
|
||||
(typeof params.page === 'number' ? params.page : '1')
|
||||
pagehal
|
||||
)
|
||||
|
||||
return {
|
||||
props: {
|
||||
newsroomposts: posts,
|
||||
paginations,
|
||||
pageActive: pagehal,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ const ContentTag = ({ dat }: any) => {
|
||||
</>) : (<></>)
|
||||
}
|
||||
|
||||
//wedding packages
|
||||
const ContentTag2 = ({ dat }: any) => {
|
||||
return Array.isArray(dat) ? (<>
|
||||
{dat.map((v: any, i) =>
|
||||
@ -160,8 +161,8 @@ export default function Wedding(props) {
|
||||
<Container>
|
||||
<div className='mt-10 p-5 bg-white'>
|
||||
|
||||
<div className='mx-auto sm:w-2/3 w-full text-center'>
|
||||
<h2 className="heading-h2 mb-14 text-4xl font-semibold sm:text-5xl">{props.dt?.descriptionTitle}</h2>
|
||||
<div className='mx-auto sm:w-2/4 w-full text-center'>
|
||||
<h2 className="heading-h2 mr-5 mb-14 ml-5 text-4xl font-medium sm:text-4xl">{props.dt?.descriptionTitle}</h2>
|
||||
</div>
|
||||
|
||||
<div className='mx-auto sm:w-2/3 w-full text-center'>
|
||||
@ -179,8 +180,8 @@ export default function Wedding(props) {
|
||||
</div>
|
||||
|
||||
<div className='mt-10 p-5 bg-white text-center w-full'>
|
||||
<Link href={`https://gwkculturalpark.pixieset.com/enchantedweddingatgwkculturalpark/`} target='_blank' className="animate-fade-up rounded-md bg-yellow-600 px-5 py-4 font-sans text-xs sm:text-base font-semibold leading-7 tracking-wide text-stone-50 shadow-sm duration-300 ease-in animate-delay-[600ms] animate-duration-[1200ms] animate-once hover:bg-yellow-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-yellow-500">
|
||||
Enchanted Wedding in GWK Cultural Park
|
||||
<Link href={props.dt.pixiesetURL ? props.dt.pixiesetURL : `https://gwkculturalpark.pixieset.com/enchantedweddingatgwkculturalpark/`} target='_blank' className="animate-fade-up rounded-md bg-yellow-600 px-5 py-4 font-sans text-xs sm:text-base font-semibold leading-7 tracking-wide text-stone-50 shadow-sm duration-300 ease-in animate-delay-[600ms] animate-duration-[1200ms] animate-once hover:bg-yellow-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-yellow-500">
|
||||
View more photos in the Gallery
|
||||
</Link>
|
||||
|
||||
</div>
|
||||
@ -201,17 +202,19 @@ export default function Wedding(props) {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className='grid grid-cols-1 mt-10 mb-10 p-5 bg-white gap-10'>
|
||||
<div className='grid grid-cols-1 mt-10 mb-10 p-5 bg-white gap-5'>
|
||||
<h3 className='text-center font-sans font-middle text-xl sm:text-3xl text-stone-600'>Connect With Us to Get Extraordinary Offer</h3>
|
||||
<div className='flex justify-center'>
|
||||
<div className='w-[600px]'>
|
||||
<div className='text-center text-stone-600'>
|
||||
<a href='https://wa.me/6289610595452' target='_blank'>
|
||||
<FontAwesomeIcon icon={faWhatsapp} />
|
||||
<span className='font-sans' style={{ marginLeft: '10px' }}>62 896-1059-5452</span>
|
||||
<span className='font-sans hover:text-orange-600' style={{ marginLeft: '10px' }}>62 896-1059-5452</span>
|
||||
</a>
|
||||
</div>
|
||||
<div className='text-center text-stone-600'>
|
||||
<FontAwesomeIcon icon={faEnvelope} />
|
||||
<span className='font-sans' style={{ marginLeft: '10px' }}>bookmywedding@gwkbali.com</span>
|
||||
<a href='mailto:bookmywedding@gwkbali.com' target='_blank'><FontAwesomeIcon icon={faEnvelope} />
|
||||
<span className='font-sans hover:text-orange-600' style={{ marginLeft: '10px' }}>bookmywedding@gwkbali.com</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable import/no-anonymous-default-export */
|
||||
import { format, parseISO } from 'date-fns'
|
||||
import { TiPuzzleOutline } from 'react-icons/ti'
|
||||
import { defineField, defineType } from 'sanity'
|
||||
@ -17,14 +18,14 @@ export default {
|
||||
title: 'Title Page',
|
||||
description: 'Judul halaman',
|
||||
type: 'string',
|
||||
validation: (rule) => rule.required(),
|
||||
// validation: (rule) => rule.required(),
|
||||
},
|
||||
{
|
||||
name: 'subtitle',
|
||||
title: 'Sub Title Page',
|
||||
description: 'Sub judul halaman',
|
||||
type: 'string',
|
||||
validation: (rule) => rule.required(),
|
||||
// validation: (rule) => rule.required(),
|
||||
},
|
||||
{
|
||||
name: 'coverImage',
|
||||
@ -45,7 +46,7 @@ export default {
|
||||
defineField({
|
||||
name: 'content',
|
||||
title: 'Description',
|
||||
description: 'kontent deskripsi',
|
||||
description: 'Paragraf utama',
|
||||
type: 'array',
|
||||
of: [{ type: 'block' }],
|
||||
}),
|
||||
|
@ -7,7 +7,7 @@ import authorType from '../author'
|
||||
|
||||
export default defineType({
|
||||
name: 'weddingpackage',
|
||||
title: 'Wedding Main Page',
|
||||
title: 'Wedding Brosur',
|
||||
icon: TiCalendarOutline,
|
||||
type: 'document',
|
||||
fields: [
|
||||
@ -19,7 +19,7 @@ export default defineType({
|
||||
}),
|
||||
defineField({
|
||||
name: 'content',
|
||||
title: 'Content Wedding',
|
||||
title: 'Detail paket wedding',
|
||||
type: 'array',
|
||||
of: [{
|
||||
type: 'block',
|
||||
@ -59,7 +59,7 @@ export default defineType({
|
||||
}),
|
||||
defineField({
|
||||
name: 'fileWedding',
|
||||
title: 'File Wedding',
|
||||
title: 'File Brosur',
|
||||
type: 'file',
|
||||
options: {
|
||||
accept: 'application/pdf',
|
||||
|
@ -47,7 +47,7 @@ export default defineType({
|
||||
}),
|
||||
defineField({
|
||||
name: 'galeryImage',
|
||||
title: 'Galery Fotos',
|
||||
title: 'Galery Photos',
|
||||
description: 'Tambahkan galery foto untuk halaman',
|
||||
type: 'array',
|
||||
of: [{ type: 'image' }],
|
||||
|
Loading…
Reference in New Issue
Block a user