diff --git a/components/Header/HeaderImage.tsx b/components/Header/HeaderImage.tsx index 4931adf..3707745 100644 --- a/components/Header/HeaderImage.tsx +++ b/components/Header/HeaderImage.tsx @@ -32,8 +32,8 @@ export default function HeaderImage({ dat }) { >
-
-

+
+

{dat.title}

diff --git a/components/Layout.tsx b/components/Layout.tsx index c00a2bf..472f59b 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -14,6 +14,12 @@ export default function Layout({ }) { return ( <> + + +
@@ -23,3 +29,5 @@ export default function Layout({ ) } + + diff --git a/components/Navbar/MobileMenu.tsx b/components/Navbar/MobileMenu.tsx index 6c8d1ac..106a3e7 100644 --- a/components/Navbar/MobileMenu.tsx +++ b/components/Navbar/MobileMenu.tsx @@ -99,6 +99,18 @@ function MobileMenu() { The Story +
  • + + Wedding + +
  • {/*
  • News & Media
  • -
  • - - Wedding - -
  • +
    -
    +
    diff --git a/pages/pages/wedding.tsx b/pages/pages/wedding.tsx index 55a1f9f..73cb48c 100644 --- a/pages/pages/wedding.tsx +++ b/pages/pages/wedding.tsx @@ -2,13 +2,15 @@ import axios from 'axios' import React, { useEffect, useState } from 'react' import { Fade, Slide } from 'react-awesome-reveal' import { NextSeo } from 'next-seo' - +import Link from 'next/link' import HeaderImage from '../../components/Header/HeaderImage' import Container from 'components/BlogContainer' -import CTA from 'components/Cta' import Layout from 'components/Layout' -import { GetServerSideProps } from 'next' +import { GetServerSideProps, } from 'next' import { getWedding } from 'pages/api/wedding' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faWhatsapp } from '@fortawesome/free-brands-svg-icons' +import { faEnvelope } from '@fortawesome/free-solid-svg-icons' export interface TheEventsProps { preview?: boolean @@ -70,7 +72,38 @@ const ContentTag2 = ({ dat }: any) => { } } - return
    {i > 2 ? ' - ' : ''}{x.text}
    + return
    + {i == 0 ? <> +
    ${x.text.split(" ").shift()}

    +

    ${(function () { + let o = x.text.split(" ") + o.shift(); + return o.join(' ') + })()}

    + ` }}>
    + : <> +
    2 && x.text.replace(/\ /g, '') != '' ? ` +
    + +
    ${x.text}
    +
    + ` : ` + ${x.text} + `} + ` }}> + +
    + + } + +

    } return <> })(x) @@ -80,7 +113,7 @@ const ContentTag2 = ({ dat }: any) => { } export default function Wedding(props) { - console.log(props.dt) + //console.log(props.dt) const { loading, preview } = props const [dataHeader, setDataHeader] = useState({}) const [dataEvent, dataContentSet] = useState([]) @@ -127,11 +160,11 @@ export default function Wedding(props) {
    -
    +

    {props.dt?.descriptionTitle}

    -
    +
    @@ -144,22 +177,22 @@ export default function Wedding(props) { ))}
    -
    - + +
    + + Enchanted Wedding in GWK Cultural Park +
    -
    +
    {Array.isArray(props.dt?.package) && props.dt?.package.map((v: any, i: any) => (
    -
    +
    -
    - +
    @@ -167,20 +200,22 @@ export default function Wedding(props) {
    ))}
    - - {/*
    -

    Connect with us to get extraordinary offer

    -
    -
    - - 62 896-1059-5452 -
    -
    - - bookmywedding@gwkbali.com + +
    +

    Connect With Us to Get Extraordinary Offer

    +
    +
    +
    + + 62 896-1059-5452 +
    +
    + + bookmywedding@gwkbali.com +
    -
    */} +
    @@ -199,7 +234,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => { title: dt.title, subTitle: dt.subtitle, imageUrl: dt.coverImageUrl, - hideButton:true + hideButton: true }; return { diff --git a/schemas/wedding/wedding.ts b/schemas/wedding/wedding.ts index e17bcdc..f7178df 100644 --- a/schemas/wedding/wedding.ts +++ b/schemas/wedding/wedding.ts @@ -4,6 +4,7 @@ import { defineField, defineType } from 'sanity' import weddingpost from './weddingpost' import weddingPackage from './weddingPackage' +import gallery from 'schemas/gallery' export default { name: 'WeddingSection', @@ -50,16 +51,22 @@ export default { }), { name: 'Wedding', - title: 'Wedding Posts', - description: 'Pilih content untuk halaman', + title: 'Wedding Gallery', + description: 'Tambahkan gallery wedding', type: 'array', of: [ { type: 'reference', - to: { type: weddingpost.name }, + to: { type: gallery.name }, }, ], }, + defineField({ + title: 'Pixieset URL', + name: 'pixiesetURL', + type: 'url', + description: 'Alamat album di Pixieset', + }), { name: 'Weddingpackage', title: 'Wedding Package', diff --git a/schemas/wedding/weddingpost.ts b/schemas/wedding/weddingpost.ts index 0ec1e40..2d109fb 100644 --- a/schemas/wedding/weddingpost.ts +++ b/schemas/wedding/weddingpost.ts @@ -30,16 +30,12 @@ export default defineType({ }), defineField({ name: 'coverImage', - title: 'Thumbnail', - type: 'reference', - to: [{ type: 'gallery' }], - fields: [ - { - type: 'string', - title: 'Alternative text', - name: 'alt', - }, - ], + title: 'Image', + description: 'Image untuk cover', + type: 'image', + options: { + hotspot: true, + }, }), defineField({ name: 'posterImage',