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