pull and update footer
This commit is contained in:
commit
b9a9dba8f1
@ -15,7 +15,8 @@ const eslintConfig = [
|
|||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/no-unused-vars": "warn",
|
"@typescript-eslint/no-unused-vars": "warn",
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
"@typescript-eslint/ban-ts-comment": "off"
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
|
"@next/next/no-html-link-for-pages": "off"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
|
||||||
import BlogDetail, { BlogDetailContentSkeleton } from "@/components/Blogs/BlogDetail";
|
import BlogDetail, { BlogDetailContentSkeleton } from "@/components/Blogs/BlogDetail";
|
||||||
import { fetchBlogDetail } from "@/services/payload/blog";
|
import { fetchBlogDetail } from "@/services/payload/blog";
|
||||||
import { Metadata } from "next";
|
import { Metadata } from "next";
|
||||||
@ -5,28 +6,30 @@ import Image from "next/image";
|
|||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
|
|
||||||
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
|
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
|
||||||
|
const name = "Cochise Oncology";
|
||||||
const slug = (await params).slug;
|
const slug = (await params).slug;
|
||||||
const blog = await fetchBlogDetail(slug);
|
const blog = await fetchBlogDetail(slug);
|
||||||
|
|
||||||
if (!blog) {
|
if (!blog) {
|
||||||
return {
|
return {
|
||||||
title: "Cochise Oncology",
|
title: name,
|
||||||
description: "Cochise Oncology",
|
description: name,
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: "Cochise Oncology",
|
title: name,
|
||||||
description: "Cochise Oncology",
|
description: name,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = `${blog.data.title} - Cochise Oncology`;
|
const title = `${!!blog.data?.meta?.title ? blog.data?.meta?.title : blog.data.title} - ${name}`;
|
||||||
|
const description = `${!!blog.data?.meta?.description ? blog.data?.meta?.description : blog.data.title} - ${name}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: title,
|
title: title,
|
||||||
description: title,
|
description: description,
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: title,
|
title: title,
|
||||||
description: title,
|
description: description,
|
||||||
images: [{ url: blog.imgUrl }],
|
images: [{ url: blog.imgUrl }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -39,6 +42,7 @@ export default async function SingleBlogPage({ params }: { params: Promise<{ slu
|
|||||||
<>
|
<>
|
||||||
<Suspense fallback={<Loading />}>
|
<Suspense fallback={<Loading />}>
|
||||||
<BlogDetail slug={slug} />
|
<BlogDetail slug={slug} />
|
||||||
|
<BeforeFooterBlock />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
|
||||||
import { BlogCardItemSkeleton } from "@/components/Blogs/BlogCardItem";
|
import { BlogCardItemSkeleton } from "@/components/Blogs/BlogCardItem";
|
||||||
import Blogs from "@/components/Blogs/Blogs";
|
import Blogs from "@/components/Blogs/Blogs";
|
||||||
import { sanitizePageNumber } from "@/utils/sanitize";
|
import { sanitizePageNumber } from "@/utils/sanitize";
|
||||||
@ -5,8 +6,8 @@ import Image from "next/image";
|
|||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: "Blogs | Cochise Oncology",
|
title: "Blog - Cochise Oncology",
|
||||||
description: "Blogs | Cochise Oncology",
|
description: "Blog - Cochise Oncology",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function BlogPage({ searchParams }: { searchParams?: Promise<{ page?: string }> }) {
|
export default async function BlogPage({ searchParams }: { searchParams?: Promise<{ page?: string }> }) {
|
||||||
@ -36,6 +37,8 @@ export default async function BlogPage({ searchParams }: { searchParams?: Promis
|
|||||||
<Blogs page={page} />
|
<Blogs page={page} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<BeforeFooterBlock />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
import { ImageSliderBlock } from "@/components/Blocks/ImageSlider";
|
|
||||||
|
|
||||||
export default function CobaPage() {
|
export default function CobaPage() {
|
||||||
return (
|
return <>{/* <ImageSliderBlock /> */}</>;
|
||||||
<>
|
|
||||||
<ImageSliderBlock />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import Hero from "@/components/Hero";
|
|||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
|
|
||||||
const ParallaxContainer = dynamic(() => import("@/components/ParallaxContainer"), {
|
const ParallaxContainer = dynamic(() => import("@/components/ParallaxContainer"), {
|
||||||
ssr: true,
|
ssr: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default function Home1BGVideoMultiPage() {
|
export default function Home1BGVideoMultiPage() {
|
||||||
|
34
src/app/(main)/testimonials/page.tsx
Normal file
34
src/app/(main)/testimonials/page.tsx
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
|
||||||
|
import { GoogleReviewsBlock } from "@/components/Blocks/GoogleReviews";
|
||||||
|
import Image from "next/image";
|
||||||
|
|
||||||
|
export const metadata = {
|
||||||
|
title: "Testimonials - Cochise Oncology",
|
||||||
|
description: "Testimonials - Cochise Oncology",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function SlickAboutPage() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<section className="page-section bg-dark-1 bg-gradient-gray-dark-1 light-content bg-scroll overflow-hidden">
|
||||||
|
{/* <!-- Background Shape --> */}
|
||||||
|
<div className="absolute top-0 left-0 w-full h-full opacity-20">
|
||||||
|
<Image src="/assets/images/hero-default.webp" width="0" height="0" sizes="100vw" className="w-full" alt="" />
|
||||||
|
</div>
|
||||||
|
{/* <!-- End Background Shape --> */}
|
||||||
|
|
||||||
|
<div className="container position-relative pt-sm-40 text-center">
|
||||||
|
<div className="row">
|
||||||
|
<div className="col-md-10 offset-md-1 col-lg-8 offset-lg-2">
|
||||||
|
<h1 className="hs-title-10 mb-10">Testimonials</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section className="page-section scrollSpysection" id="testimonials">
|
||||||
|
<GoogleReviewsBlock />
|
||||||
|
</section>
|
||||||
|
<BeforeFooterBlock />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
@ -1,19 +0,0 @@
|
|||||||
import React from 'react'
|
|
||||||
import './styles.css'
|
|
||||||
|
|
||||||
export const metadata = {
|
|
||||||
description: 'A blank template using Payload in a Next.js app.',
|
|
||||||
title: 'Payload Blank Template',
|
|
||||||
}
|
|
||||||
|
|
||||||
export default async function RootLayout(props: { children: React.ReactNode }) {
|
|
||||||
const { children } = props
|
|
||||||
|
|
||||||
return (
|
|
||||||
<html lang="en">
|
|
||||||
<body>
|
|
||||||
<main>{children}</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
)
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
import { headers as getHeaders } from 'next/headers.js'
|
|
||||||
import Image from 'next/image'
|
|
||||||
import { getPayload } from 'payload'
|
|
||||||
import React from 'react'
|
|
||||||
import { fileURLToPath } from 'url'
|
|
||||||
|
|
||||||
import config from '@/payload.config'
|
|
||||||
import './styles.css'
|
|
||||||
|
|
||||||
export default async function HomePage() {
|
|
||||||
const headers = await getHeaders()
|
|
||||||
const payloadConfig = await config
|
|
||||||
const payload = await getPayload({ config: payloadConfig })
|
|
||||||
const { user } = await payload.auth({ headers })
|
|
||||||
|
|
||||||
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="home">
|
|
||||||
<div className="content">
|
|
||||||
<picture>
|
|
||||||
<source srcSet="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-favicon.svg" />
|
|
||||||
<Image
|
|
||||||
alt="Payload Logo"
|
|
||||||
height={65}
|
|
||||||
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-favicon.svg"
|
|
||||||
width={65}
|
|
||||||
/>
|
|
||||||
</picture>
|
|
||||||
{!user && <h1>Welcome to your new project.</h1>}
|
|
||||||
{user && <h1>Welcome back, {user.email}</h1>}
|
|
||||||
<div className="links">
|
|
||||||
<a
|
|
||||||
className="admin"
|
|
||||||
href={payloadConfig.routes.admin}
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
Go to admin panel
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
className="docs"
|
|
||||||
href="https://payloadcms.com/docs"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
Documentation
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="footer">
|
|
||||||
<p>Update this page by editing</p>
|
|
||||||
<a className="codeLink" href={fileURL}>
|
|
||||||
<code>app/(frontend)/page.tsx</code>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
@ -1,164 +0,0 @@
|
|||||||
:root {
|
|
||||||
--font-mono: 'Roboto Mono', monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
background: rgb(0, 0, 0);
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
}
|
|
||||||
|
|
||||||
html,
|
|
||||||
body,
|
|
||||||
#app {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: system-ui;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
margin: 0;
|
|
||||||
color: rgb(1000, 1000, 1000);
|
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
margin: 40px 0;
|
|
||||||
font-size: 64px;
|
|
||||||
line-height: 70px;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
|
||||||
margin: 24px 0;
|
|
||||||
font-size: 42px;
|
|
||||||
line-height: 42px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
font-size: 38px;
|
|
||||||
line-height: 38px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 400px) {
|
|
||||||
font-size: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 24px 0;
|
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
|
||||||
margin: calc(var(--base) * 0.75) 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: currentColor;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
opacity: 0.8;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
opacity: 0.7;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.home {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 100vh;
|
|
||||||
padding: 45px;
|
|
||||||
max-width: 1024px;
|
|
||||||
margin: 0 auto;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
@media (max-width: 400px) {
|
|
||||||
padding: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.links {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 0.25rem 0.5rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admin {
|
|
||||||
color: rgb(0, 0, 0);
|
|
||||||
background: rgb(1000, 1000, 1000);
|
|
||||||
border: 1px solid rgb(0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.docs {
|
|
||||||
color: rgb(1000, 1000, 1000);
|
|
||||||
background: rgb(0, 0, 0);
|
|
||||||
border: 1px solid rgb(1000, 1000, 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.codeLink {
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 0 0.5rem;
|
|
||||||
background: rgb(60, 60, 60);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
import configPromise from '@payload-config'
|
|
||||||
import { getPayload } from 'payload'
|
|
||||||
|
|
||||||
export const GET = async () => {
|
|
||||||
const payload = await getPayload({
|
|
||||||
config: configPromise,
|
|
||||||
})
|
|
||||||
|
|
||||||
const data = await payload.find({
|
|
||||||
collection: 'users',
|
|
||||||
})
|
|
||||||
|
|
||||||
return Response.json(data)
|
|
||||||
}
|
|
39
src/collections/BlogCategories.ts
Normal file
39
src/collections/BlogCategories.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import formatSlug from "@/utils/formatSlug";
|
||||||
|
import type { CollectionConfig } from "payload";
|
||||||
|
|
||||||
|
export const BlogCategories: CollectionConfig = {
|
||||||
|
slug: "blogCategories",
|
||||||
|
labels: { plural: "Categories", singular: "Category" },
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
type: "text",
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "slug",
|
||||||
|
type: "text",
|
||||||
|
admin: {
|
||||||
|
position: "sidebar",
|
||||||
|
},
|
||||||
|
hooks: {
|
||||||
|
beforeValidate: [formatSlug("name")],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "parent_category",
|
||||||
|
label: "Parent Category",
|
||||||
|
type: "relationship",
|
||||||
|
relationTo: "blogCategories",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
type: "textarea",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
admin: {
|
||||||
|
hideAPIURL: true,
|
||||||
|
group: "Blogs",
|
||||||
|
useAsTitle: "name",
|
||||||
|
},
|
||||||
|
};
|
32
src/collections/BlogTags.tsx
Normal file
32
src/collections/BlogTags.tsx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import formatSlug from "@/utils/formatSlug";
|
||||||
|
import type { CollectionConfig } from "payload";
|
||||||
|
|
||||||
|
export const BlogTags: CollectionConfig = {
|
||||||
|
slug: "blogTags",
|
||||||
|
labels: { plural: "Tags", singular: "Tag" },
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
type: "text",
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "slug",
|
||||||
|
type: "text",
|
||||||
|
admin: {
|
||||||
|
position: "sidebar",
|
||||||
|
},
|
||||||
|
hooks: {
|
||||||
|
beforeValidate: [formatSlug("name")],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
type: "textarea",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
admin: {
|
||||||
|
hideAPIURL: true,
|
||||||
|
group: "Blogs",
|
||||||
|
},
|
||||||
|
};
|
@ -4,6 +4,7 @@ import formatSlug from "@/utils/formatSlug";
|
|||||||
|
|
||||||
export const Blogs: CollectionConfig = {
|
export const Blogs: CollectionConfig = {
|
||||||
slug: "blogs",
|
slug: "blogs",
|
||||||
|
labels: { plural: "Posts", singular: "Post" },
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "title",
|
name: "title",
|
||||||
@ -13,9 +14,6 @@ export const Blogs: CollectionConfig = {
|
|||||||
{
|
{
|
||||||
name: "slug",
|
name: "slug",
|
||||||
type: "text",
|
type: "text",
|
||||||
admin: {
|
|
||||||
position: "sidebar",
|
|
||||||
},
|
|
||||||
hooks: {
|
hooks: {
|
||||||
beforeValidate: [formatSlug("title")],
|
beforeValidate: [formatSlug("title")],
|
||||||
},
|
},
|
||||||
@ -33,8 +31,47 @@ export const Blogs: CollectionConfig = {
|
|||||||
required: true,
|
required: true,
|
||||||
editor: lexicalEditor({}),
|
editor: lexicalEditor({}),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "categories",
|
||||||
|
type: "relationship",
|
||||||
|
relationTo: "blogCategories",
|
||||||
|
hasMany: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tags",
|
||||||
|
type: "relationship",
|
||||||
|
relationTo: "blogTags",
|
||||||
|
hasMany: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "meta",
|
||||||
|
label: "Page Meta",
|
||||||
|
type: "group",
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "title",
|
||||||
|
label: "Title",
|
||||||
|
type: "text",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
label: "Description",
|
||||||
|
type: "textarea",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "is_published",
|
||||||
|
label: "Published",
|
||||||
|
type: "checkbox",
|
||||||
|
defaultValue: true,
|
||||||
|
admin: {
|
||||||
|
position: "sidebar",
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
admin: {
|
admin: {
|
||||||
hideAPIURL: true,
|
hideAPIURL: true,
|
||||||
|
group: "Blogs",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { BeforeFooterBlock } from "@/blocks/BeforeFooter";
|
import { BeforeFooterBlock } from "@/blocks/BeforeFooter";
|
||||||
import { ContentBlock } from "@/blocks/Content";
|
import { ContentBlock } from "@/blocks/Content";
|
||||||
import { HorizontalImageContentBlock } from "@/blocks/HorizontalImageContent";
|
import { HorizontalImageContentBlock } from "@/blocks/HorizontalImageContent";
|
||||||
|
import { ImageSliderBlock } from "@/blocks/ImageSlider";
|
||||||
import { OurTeamBlock } from "@/blocks/OurTeam";
|
import { OurTeamBlock } from "@/blocks/OurTeam";
|
||||||
import formatSlug from "@/utils/formatSlug";
|
import formatSlug from "@/utils/formatSlug";
|
||||||
import { CollectionConfig } from "payload";
|
import { CollectionConfig } from "payload";
|
||||||
@ -36,7 +37,7 @@ export const Pages: CollectionConfig = {
|
|||||||
label: "Page Layout",
|
label: "Page Layout",
|
||||||
type: "blocks",
|
type: "blocks",
|
||||||
minRows: 1,
|
minRows: 1,
|
||||||
blocks: [ContentBlock, BeforeFooterBlock, OurTeamBlock, HorizontalImageContentBlock],
|
blocks: [ContentBlock, BeforeFooterBlock, OurTeamBlock, HorizontalImageContentBlock, ImageSliderBlock],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "meta",
|
name: "meta",
|
||||||
@ -53,11 +54,6 @@ export const Pages: CollectionConfig = {
|
|||||||
label: "Description",
|
label: "Description",
|
||||||
type: "textarea",
|
type: "textarea",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "keywords",
|
|
||||||
label: "Keywords",
|
|
||||||
type: "text",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -1,28 +1,33 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
export interface BeforeFooterBlockProps {
|
export interface BeforeFooterBlockProps {
|
||||||
id: string;
|
id?: string;
|
||||||
title: string;
|
title?: string;
|
||||||
description: string;
|
description?: string;
|
||||||
buttonText: string;
|
buttonText?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const placeholderTitle = "Begin your path to healing with Cochise Oncology";
|
||||||
|
const placeholderDescription =
|
||||||
|
"Our dedicated team in Sierra Vista, AZ is here to support you with hope, strength, and courage. We offer personalized cancer care using innovative treatments in our state-of-the-art facility. Take the first step towards comprehensive, patient-focused treatment by scheduling a consultation. Let us listen to your needs, answer your questions, and create a tailored plan for your journey. Fill out our form to connect with our compassionate experts and discover how Cochise Oncology can stand with you in your fight against cancer.";
|
||||||
|
const placeholderButtonText = "Get Started";
|
||||||
|
|
||||||
export function BeforeFooterBlock({ title, description, buttonText }: BeforeFooterBlockProps) {
|
export function BeforeFooterBlock({ title, description, buttonText }: BeforeFooterBlockProps) {
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
className={`page-section text-white text-center scrollSpysection bg-dark-1 light-content bg-scroll relative`}
|
className={`page-section text-white text-center scrollSpysection bg-dark-1 light-content bg-scroll relative`}
|
||||||
id="about"
|
id="about"
|
||||||
>
|
>
|
||||||
|
<div className="decoration-12 bg-white" />
|
||||||
|
<div className="decoration-13 bg-white" />
|
||||||
<div className="container mx-auto px-6 z-50">
|
<div className="container mx-auto px-6 z-50">
|
||||||
<h2 className="text-3xl font-bold mb-4">{title}</h2>
|
<h2 className="text-3xl font-bold mb-4">{title ?? placeholderTitle}</h2>
|
||||||
<p className="text-lg mb-6">{description}</p>
|
<p className="text-lg mb-6">{description ?? placeholderDescription}</p>
|
||||||
{!!buttonText && (
|
|
||||||
<div className="pt-5">
|
<div className="pt-5">
|
||||||
<Link href="/contact" className="bg-purple-600 hover:bg-purple-700 text-white py-3 px-6 rounded-lg text-lg">
|
<Link href="/contact" className="bg-purple-600 hover:bg-purple-700 text-white py-3 px-6 rounded-lg text-lg">
|
||||||
{buttonText}
|
{buttonText ?? placeholderButtonText}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
@ -1,13 +1,59 @@
|
|||||||
import { CardStarRating } from "@/components/Ratings/CardStarRating";
|
"use client";
|
||||||
|
|
||||||
|
import { CardStarRating, CardStarRatingProps } from "@/components/Ratings/CardStarRating";
|
||||||
import StarRating from "@/components/Ratings/StarRating";
|
import StarRating from "@/components/Ratings/StarRating";
|
||||||
import { teamMembers } from "@/data/team";
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { Navigation } from "swiper/modules";
|
import { Navigation } from "swiper/modules";
|
||||||
import { Swiper, SwiperSlide } from "swiper/react";
|
import { Swiper, SwiperSlide } from "swiper/react";
|
||||||
|
|
||||||
|
const data: CardStarRatingProps["data"][] = [
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description:
|
||||||
|
"Today i did my cat scan , and met Raymond, he radiates hope and good will, i then met Larry who showed me the hospitality suite, i was overwhelmed by thier kindness, every one i have met so far has been truly amazing.while at physical therapy the doc said i had made a wise",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description: "Great and caring service. Completely satisfied.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description: "Sincere and caring attitude...very professional and inspires confidence.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description:
|
||||||
|
"I've been going to cochise oncology for many years and everyone is always professional and take the time to explain everything",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description: "One fine person\n Very concerning. Glad to see her",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description:
|
||||||
|
"Barbara was very professional and friendly. She shared all info with me and gave me a copy of my lab results.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description:
|
||||||
|
"Barbara is great! She listens and ask questions on other issues outside her area just to be sure you’re well taken care of.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description:
|
||||||
|
"Today, at Cochise Oncology, I had an appointment with Dr. Reid Culton. He explained in great detail from the medical chart of the blood work and listen to my concerns. Dr. Reid Culton also answered my questions in great detail. Thank you.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
star: 5,
|
||||||
|
description:
|
||||||
|
"I absolutely love the people that work at this place. From the front desk to radiation room. Everyone is loving and caring.",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export function GoogleReviewsBlock() {
|
export function GoogleReviewsBlock() {
|
||||||
return (
|
return (
|
||||||
<section className="bg-scroll relative py-20">
|
<section className="bg-scroll relative">
|
||||||
<div className="decoration-14" />
|
<div className="decoration-14" />
|
||||||
<div className="decoration-15" />
|
<div className="decoration-15" />
|
||||||
<div className="decoration-16 opacity-035 d-none d-md-block">
|
<div className="decoration-16 opacity-035 d-none d-md-block">
|
||||||
@ -22,7 +68,7 @@ export function GoogleReviewsBlock() {
|
|||||||
<div className="flex justify-center space-x-2">
|
<div className="flex justify-center space-x-2">
|
||||||
<h2 className="text-xl text-center font-bold">4.8</h2>
|
<h2 className="text-xl text-center font-bold">4.8</h2>
|
||||||
<div className="mt-1">
|
<div className="mt-1">
|
||||||
<StarRating size={20} value={3} />
|
<StarRating size={20} value={4.8} />
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs font-semibold mt-1 text-neutral-500">Over 200 Reviews</div>
|
<div className="text-xs font-semibold mt-1 text-neutral-500">Over 200 Reviews</div>
|
||||||
</div>
|
</div>
|
||||||
@ -56,16 +102,16 @@ export function GoogleReviewsBlock() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Group item */}
|
{/* Group item */}
|
||||||
{teamMembers.map((member, index) => (
|
{data.map((rev, index) => (
|
||||||
<SwiperSlide className="owl-item py-2 mt-5" key={index}>
|
<SwiperSlide className="owl-item py-2 mt-5" key={index}>
|
||||||
<div>
|
<div>
|
||||||
<CardStarRating />
|
<CardStarRating data={rev} />
|
||||||
</div>
|
</div>
|
||||||
</SwiperSlide>
|
</SwiperSlide>
|
||||||
))}
|
))}
|
||||||
<div className="owl-controls clickable">
|
<div className="owl-controls clickable absolute top-6 w-full">
|
||||||
<div className="owl-buttons">
|
<div className="owl-buttons">
|
||||||
<div className="owl-prev snbp1 lef" role="button" tabIndex={0}>
|
<div className="owl-prev snbp1 left" role="button" tabIndex={0}>
|
||||||
<span className="visually-hidden">Previous Slide</span>
|
<span className="visually-hidden">Previous Slide</span>
|
||||||
<i className="mi-arrow-left" aria-hidden="true"></i>
|
<i className="mi-arrow-left" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,12 +5,14 @@ import { ContentBlock } from "./Content";
|
|||||||
import { BeforeFooterBlock } from "./BeforeFooter";
|
import { BeforeFooterBlock } from "./BeforeFooter";
|
||||||
import { OurTeamBlock } from "./OurTeam";
|
import { OurTeamBlock } from "./OurTeam";
|
||||||
import { HorizontalImageContentBlock } from "./HorizontalImageContent";
|
import { HorizontalImageContentBlock } from "./HorizontalImageContent";
|
||||||
|
import { ImageSliderBlock } from "./ImageSlider";
|
||||||
|
|
||||||
const blockComponents = {
|
const blockComponents = {
|
||||||
contentBlock: ContentBlock,
|
contentBlock: ContentBlock,
|
||||||
beforeFooterBlock: BeforeFooterBlock,
|
beforeFooterBlock: BeforeFooterBlock,
|
||||||
ourTeamBlock: OurTeamBlock,
|
ourTeamBlock: OurTeamBlock,
|
||||||
horizontalImageContentBlock: HorizontalImageContentBlock,
|
horizontalImageContentBlock: HorizontalImageContentBlock,
|
||||||
|
imageSliderBlock: ImageSliderBlock,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RenderBlocks: React.FC<{
|
export const RenderBlocks: React.FC<{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { fetchBlogDetail } from "@/services/payload/blog";
|
import { fetchBlogDetail } from "@/services/payload/blog";
|
||||||
import { RichText } from "@payloadcms/richtext-lexical/react";
|
import { RichText } from "@payloadcms/richtext-lexical/react";
|
||||||
|
import { headers } from "next/headers";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
import { FaFacebook, FaLinkedin, FaTwitter } from "react-icons/fa";
|
||||||
|
|
||||||
export interface BlogDetailProps {
|
export interface BlogDetailProps {
|
||||||
slug: string;
|
slug: string;
|
||||||
@ -8,6 +10,14 @@ export interface BlogDetailProps {
|
|||||||
|
|
||||||
export default async function BlogDetail({ slug }: BlogDetailProps) {
|
export default async function BlogDetail({ slug }: BlogDetailProps) {
|
||||||
const data = await fetchBlogDetail(slug);
|
const data = await fetchBlogDetail(slug);
|
||||||
|
const headersList = await headers();
|
||||||
|
const fullUrl = headersList.get("x-full-url");
|
||||||
|
|
||||||
|
const shareUrl = {
|
||||||
|
facebook: `https://www.facebook.com/sharer/sharer.php?u=${fullUrl}`,
|
||||||
|
linkedin: `https://www.linkedin.com/sharing/share-offsite/?url=${fullUrl}`,
|
||||||
|
twitter: `https://twitter.com/intent/tweet?url=${fullUrl}`,
|
||||||
|
};
|
||||||
|
|
||||||
if (!data) return <></>;
|
if (!data) return <></>;
|
||||||
|
|
||||||
@ -32,6 +42,18 @@ export default async function BlogDetail({ slug }: BlogDetailProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* End Author, Categories, Comments */}
|
{/* End Author, Categories, Comments */}
|
||||||
|
|
||||||
|
<div className="flex justify-center space-x-5 mt-8 wow fadeIn">
|
||||||
|
<a className="cursor-pointer" href={shareUrl["facebook"]} target="_blank">
|
||||||
|
<FaFacebook className="text-2xl text-gray-300" />
|
||||||
|
</a>
|
||||||
|
<a className="cursor-pointer" href={shareUrl["linkedin"]} target="_blank">
|
||||||
|
<FaLinkedin className="text-2xl text-gray-300" />
|
||||||
|
</a>
|
||||||
|
<a className="cursor-pointer" href={shareUrl["twitter"]} target="_blank">
|
||||||
|
<FaTwitter className="text-2xl text-gray-300" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,6 @@ export default function Footer() {
|
|||||||
<div className="w-full md:w-1/4 mb-6 md:mb-0 flex flex-col items-start">
|
<div className="w-full md:w-1/4 mb-6 md:mb-0 flex flex-col items-start">
|
||||||
<Image src="/assets/images/demo-slick/logo-dark.webp" alt="Cochise Oncology Logo" width={363} height={138} />
|
<Image src="/assets/images/demo-slick/logo-dark.webp" alt="Cochise Oncology Logo" width={363} height={138} />
|
||||||
<p className="text-sm mt-3">© {new Date().getFullYear()} All Rights Reserved</p>
|
<p className="text-sm mt-3">© {new Date().getFullYear()} All Rights Reserved</p>
|
||||||
<p className="text-sm text-orange-300 font-semibold">Website by Megaphone Designs</p>
|
|
||||||
<a href="/privacy-policy" className="text-sm text-orange-300 font-semibold">
|
<a href="/privacy-policy" className="text-sm text-orange-300 font-semibold">
|
||||||
Privacy Policy
|
Privacy Policy
|
||||||
</a>
|
</a>
|
||||||
|
@ -60,9 +60,9 @@ export default function Hero6() {
|
|||||||
>
|
>
|
||||||
Learn More
|
Learn More
|
||||||
</a>
|
</a>
|
||||||
<Link href="/radixact">
|
<Link href="/contact">
|
||||||
<button className="btn btn-mod btn-w btn-border-w btn-round btn-large btn-hover-anim ms-1 me-1 mt-2 align-middle w-full md:w-1/4">
|
<button className="btn btn-mod btn-w btn-border-w btn-round btn-large btn-hover-anim ms-1 me-1 mt-2 align-middle w-full md:w-1/4">
|
||||||
<span>Request Consultant</span>
|
<span>Request Consultation</span>
|
||||||
</button>
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import React from "react";
|
import { features4 } from "@/data/features";
|
||||||
|
import Image from "next/image";
|
||||||
|
import Link from "next/link";
|
||||||
|
import Blog from "./Blogs/Blog";
|
||||||
|
import Cta3 from "./cta3";
|
||||||
import Facts from "./Facts";
|
import Facts from "./Facts";
|
||||||
import Service from "./Service";
|
import Service from "./Service";
|
||||||
|
<<<<<<< HEAD
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import Testimonials from "./Testimonials";
|
import Testimonials from "./Testimonials";
|
||||||
import Blog from "./Blogs/Blog";
|
import Blog from "./Blogs/Blog";
|
||||||
@ -13,6 +17,8 @@ import ContactDark from "./ContactDark";
|
|||||||
import { features4 } from "@/data/features";
|
import { features4 } from "@/data/features";
|
||||||
import Cta3 from "./cta3";
|
import Cta3 from "./cta3";
|
||||||
import { fetchBlog } from "@/services/payload/blog";
|
import { fetchBlog } from "@/services/payload/blog";
|
||||||
|
=======
|
||||||
|
>>>>>>> a16f9d0ca8184e03b85217be1656938178f0ce00
|
||||||
|
|
||||||
export default function homepage({ onePage = false, dark = false }) {
|
export default function homepage({ onePage = false, dark = false }) {
|
||||||
return (
|
return (
|
||||||
@ -58,7 +64,7 @@ export default function homepage({ onePage = false, dark = false }) {
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Link
|
<Link
|
||||||
href={`/slick-contact${dark ? "-dark" : ""}`}
|
href={`/contact`}
|
||||||
className="btn btn-mod btn-color btn-large btn-circle btn-hover-anim mb-xs-10"
|
className="btn btn-mod btn-color btn-large btn-circle btn-hover-anim mb-xs-10"
|
||||||
>
|
>
|
||||||
<span>Contact us</span>
|
<span>Contact us</span>
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import StarRating from "./StarRating";
|
import StarRating from "./StarRating";
|
||||||
|
|
||||||
export function CardStarRating() {
|
export interface CardStarRatingProps {
|
||||||
|
data: {
|
||||||
|
star: number;
|
||||||
|
description: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function CardStarRating({ data }: CardStarRatingProps) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-white p-2 rounded-lg shadow-md">
|
<div className="bg-white p-2 rounded-lg shadow-md">
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<StarRating size={20} value={3} />
|
<StarRating size={20} value={data.star} />
|
||||||
<Image src="/assets/images/google-provider.svg" width={20} height={20} alt="" />
|
<Image src="/assets/images/google-provider.svg" width={20} height={20} alt="" />
|
||||||
</div>
|
</div>
|
||||||
<p className="text-xs pl-1 mt-4">Today my cat scan</p>
|
<p className="text-xs pl-1 mt-4">{data.description}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
34
src/middleware.ts
Normal file
34
src/middleware.ts
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// middleware.ts
|
||||||
|
import { NextResponse } from "next/server";
|
||||||
|
import type { NextRequest } from "next/server";
|
||||||
|
|
||||||
|
// the following code is taken from : https://nextjs.org/docs/advanced-features/middleware#setting-headers
|
||||||
|
export function middleware(request: NextRequest) {
|
||||||
|
const protocol = request.headers.get("x-forwarded-proto") || "http"; // Default to 'http' if not provided
|
||||||
|
const host = request.headers.get("x-forwarded-host") || request.nextUrl.hostname;
|
||||||
|
const path = request.nextUrl.pathname + request.nextUrl.search;
|
||||||
|
// Construct the full URL
|
||||||
|
const fullUrl = `${protocol}://${host}${path}`;
|
||||||
|
request.headers.set("x-full-url", fullUrl);
|
||||||
|
|
||||||
|
return NextResponse.next({
|
||||||
|
request: {
|
||||||
|
// New request headers
|
||||||
|
headers: request.headers,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// the following code has been copied from https://nextjs.org/docs/advanced-features/middleware#matcher
|
||||||
|
export const config = {
|
||||||
|
matcher: [
|
||||||
|
/*
|
||||||
|
* Match all request paths except for the ones starting with:
|
||||||
|
* - api (API routes)
|
||||||
|
* - _next/static (static files)
|
||||||
|
* - _next/image (image optimization files)
|
||||||
|
* - favicon.ico, sitemap.xml, robots.txt (metadata files)
|
||||||
|
*/
|
||||||
|
"/((?!api|_next/static|_next/image|assets|sw.js|favicon.ico|sitemap.xml|robots.txt).*)",
|
||||||
|
],
|
||||||
|
};
|
@ -6,6 +6,60 @@
|
|||||||
* and re-run `payload generate:types` to regenerate this file.
|
* and re-run `payload generate:types` to regenerate this file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Supported timezones in IANA format.
|
||||||
|
*
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "supportedTimezones".
|
||||||
|
*/
|
||||||
|
export type SupportedTimezones =
|
||||||
|
| 'Pacific/Midway'
|
||||||
|
| 'Pacific/Niue'
|
||||||
|
| 'Pacific/Honolulu'
|
||||||
|
| 'Pacific/Rarotonga'
|
||||||
|
| 'America/Anchorage'
|
||||||
|
| 'Pacific/Gambier'
|
||||||
|
| 'America/Los_Angeles'
|
||||||
|
| 'America/Tijuana'
|
||||||
|
| 'America/Denver'
|
||||||
|
| 'America/Phoenix'
|
||||||
|
| 'America/Chicago'
|
||||||
|
| 'America/Guatemala'
|
||||||
|
| 'America/New_York'
|
||||||
|
| 'America/Bogota'
|
||||||
|
| 'America/Caracas'
|
||||||
|
| 'America/Santiago'
|
||||||
|
| 'America/Buenos_Aires'
|
||||||
|
| 'America/Sao_Paulo'
|
||||||
|
| 'Atlantic/South_Georgia'
|
||||||
|
| 'Atlantic/Azores'
|
||||||
|
| 'Atlantic/Cape_Verde'
|
||||||
|
| 'Europe/London'
|
||||||
|
| 'Europe/Berlin'
|
||||||
|
| 'Africa/Lagos'
|
||||||
|
| 'Europe/Athens'
|
||||||
|
| 'Africa/Cairo'
|
||||||
|
| 'Europe/Moscow'
|
||||||
|
| 'Asia/Riyadh'
|
||||||
|
| 'Asia/Dubai'
|
||||||
|
| 'Asia/Baku'
|
||||||
|
| 'Asia/Karachi'
|
||||||
|
| 'Asia/Tashkent'
|
||||||
|
| 'Asia/Calcutta'
|
||||||
|
| 'Asia/Dhaka'
|
||||||
|
| 'Asia/Almaty'
|
||||||
|
| 'Asia/Jakarta'
|
||||||
|
| 'Asia/Bangkok'
|
||||||
|
| 'Asia/Shanghai'
|
||||||
|
| 'Asia/Singapore'
|
||||||
|
| 'Asia/Tokyo'
|
||||||
|
| 'Asia/Seoul'
|
||||||
|
| 'Australia/Sydney'
|
||||||
|
| 'Pacific/Guam'
|
||||||
|
| 'Pacific/Noumea'
|
||||||
|
| 'Pacific/Auckland'
|
||||||
|
| 'Pacific/Fiji';
|
||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
auth: {
|
auth: {
|
||||||
users: UserAuthOperations;
|
users: UserAuthOperations;
|
||||||
@ -16,6 +70,8 @@ export interface Config {
|
|||||||
blogs: Blog;
|
blogs: Blog;
|
||||||
pages: Page;
|
pages: Page;
|
||||||
teams: Team;
|
teams: Team;
|
||||||
|
blogCategories: BlogCategory;
|
||||||
|
blogTags: BlogTag;
|
||||||
forms: Form;
|
forms: Form;
|
||||||
'form-submissions': FormSubmission;
|
'form-submissions': FormSubmission;
|
||||||
'payload-locked-documents': PayloadLockedDocument;
|
'payload-locked-documents': PayloadLockedDocument;
|
||||||
@ -29,6 +85,8 @@ export interface Config {
|
|||||||
blogs: BlogsSelect<false> | BlogsSelect<true>;
|
blogs: BlogsSelect<false> | BlogsSelect<true>;
|
||||||
pages: PagesSelect<false> | PagesSelect<true>;
|
pages: PagesSelect<false> | PagesSelect<true>;
|
||||||
teams: TeamsSelect<false> | TeamsSelect<true>;
|
teams: TeamsSelect<false> | TeamsSelect<true>;
|
||||||
|
blogCategories: BlogCategoriesSelect<false> | BlogCategoriesSelect<true>;
|
||||||
|
blogTags: BlogTagsSelect<false> | BlogTagsSelect<true>;
|
||||||
forms: FormsSelect<false> | FormsSelect<true>;
|
forms: FormsSelect<false> | FormsSelect<true>;
|
||||||
'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
|
'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
|
||||||
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
||||||
@ -128,6 +186,38 @@ export interface Blog {
|
|||||||
};
|
};
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
};
|
};
|
||||||
|
categories?: (number | BlogCategory)[] | null;
|
||||||
|
tags?: (number | BlogTag)[] | null;
|
||||||
|
meta?: {
|
||||||
|
title?: string | null;
|
||||||
|
description?: string | null;
|
||||||
|
};
|
||||||
|
is_published?: boolean | null;
|
||||||
|
updatedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "blogCategories".
|
||||||
|
*/
|
||||||
|
export interface BlogCategory {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
slug?: string | null;
|
||||||
|
parent_category?: (number | null) | BlogCategory;
|
||||||
|
description?: string | null;
|
||||||
|
updatedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "blogTags".
|
||||||
|
*/
|
||||||
|
export interface BlogTag {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
slug?: string | null;
|
||||||
|
description?: string | null;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
@ -197,12 +287,22 @@ export interface Page {
|
|||||||
blockName?: string | null;
|
blockName?: string | null;
|
||||||
blockType: 'horizontalImageContentBlock';
|
blockType: 'horizontalImageContentBlock';
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
images?:
|
||||||
|
| {
|
||||||
|
image?: (number | null) | Media;
|
||||||
|
id?: string | null;
|
||||||
|
}[]
|
||||||
|
| null;
|
||||||
|
id?: string | null;
|
||||||
|
blockName?: string | null;
|
||||||
|
blockType: 'imageSliderBlock';
|
||||||
|
}
|
||||||
)[]
|
)[]
|
||||||
| null;
|
| null;
|
||||||
meta?: {
|
meta?: {
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
description?: string | null;
|
description?: string | null;
|
||||||
keywords?: string | null;
|
|
||||||
};
|
};
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
@ -431,6 +531,14 @@ export interface PayloadLockedDocument {
|
|||||||
relationTo: 'teams';
|
relationTo: 'teams';
|
||||||
value: number | Team;
|
value: number | Team;
|
||||||
} | null)
|
} | null)
|
||||||
|
| ({
|
||||||
|
relationTo: 'blogCategories';
|
||||||
|
value: number | BlogCategory;
|
||||||
|
} | null)
|
||||||
|
| ({
|
||||||
|
relationTo: 'blogTags';
|
||||||
|
value: number | BlogTag;
|
||||||
|
} | null)
|
||||||
| ({
|
| ({
|
||||||
relationTo: 'forms';
|
relationTo: 'forms';
|
||||||
value: number | Form;
|
value: number | Form;
|
||||||
@ -524,6 +632,15 @@ export interface BlogsSelect<T extends boolean = true> {
|
|||||||
slug?: T;
|
slug?: T;
|
||||||
img?: T;
|
img?: T;
|
||||||
content?: T;
|
content?: T;
|
||||||
|
categories?: T;
|
||||||
|
tags?: T;
|
||||||
|
meta?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
title?: T;
|
||||||
|
description?: T;
|
||||||
|
};
|
||||||
|
is_published?: T;
|
||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
createdAt?: T;
|
createdAt?: T;
|
||||||
}
|
}
|
||||||
@ -569,13 +686,24 @@ export interface PagesSelect<T extends boolean = true> {
|
|||||||
id?: T;
|
id?: T;
|
||||||
blockName?: T;
|
blockName?: T;
|
||||||
};
|
};
|
||||||
|
imageSliderBlock?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
images?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
image?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
id?: T;
|
||||||
|
blockName?: T;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
meta?:
|
meta?:
|
||||||
| T
|
| T
|
||||||
| {
|
| {
|
||||||
title?: T;
|
title?: T;
|
||||||
description?: T;
|
description?: T;
|
||||||
keywords?: T;
|
|
||||||
};
|
};
|
||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
createdAt?: T;
|
createdAt?: T;
|
||||||
@ -592,6 +720,29 @@ export interface TeamsSelect<T extends boolean = true> {
|
|||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
createdAt?: T;
|
createdAt?: T;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "blogCategories_select".
|
||||||
|
*/
|
||||||
|
export interface BlogCategoriesSelect<T extends boolean = true> {
|
||||||
|
name?: T;
|
||||||
|
slug?: T;
|
||||||
|
parent_category?: T;
|
||||||
|
description?: T;
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "blogTags_select".
|
||||||
|
*/
|
||||||
|
export interface BlogTagsSelect<T extends boolean = true> {
|
||||||
|
name?: T;
|
||||||
|
slug?: T;
|
||||||
|
description?: T;
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "forms_select".
|
* via the `definition` "forms_select".
|
||||||
|
@ -8,7 +8,9 @@ import { buildConfig } from "payload";
|
|||||||
import sharp from "sharp";
|
import sharp from "sharp";
|
||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
|
|
||||||
|
import { BlogCategories } from "@/collections/BlogCategories";
|
||||||
import { Blogs } from "@/collections/Blogs";
|
import { Blogs } from "@/collections/Blogs";
|
||||||
|
import { BlogTags } from "@/collections/BlogTags";
|
||||||
import { Media } from "@/collections/Media";
|
import { Media } from "@/collections/Media";
|
||||||
import { Pages } from "@/collections/Pages";
|
import { Pages } from "@/collections/Pages";
|
||||||
import { Teams } from "@/collections/Teams";
|
import { Teams } from "@/collections/Teams";
|
||||||
@ -47,7 +49,7 @@ export default buildConfig({
|
|||||||
},
|
},
|
||||||
theme: "dark",
|
theme: "dark",
|
||||||
},
|
},
|
||||||
collections: [Users, Media, Blogs, Pages, Teams],
|
collections: [Users, Media, Blogs, Pages, Teams, BlogCategories, BlogTags],
|
||||||
secret: process.env.PAYLOAD_SECRET || "",
|
secret: process.env.PAYLOAD_SECRET || "",
|
||||||
typescript: {
|
typescript: {
|
||||||
outputFile: path.resolve(dirname, "payload-types.ts"),
|
outputFile: path.resolve(dirname, "payload-types.ts"),
|
||||||
|
@ -9,6 +9,11 @@ export async function fetchBlog(page: number | undefined) {
|
|||||||
page,
|
page,
|
||||||
pagination: true,
|
pagination: true,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
|
where: {
|
||||||
|
is_published: {
|
||||||
|
equals: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const formattedData = blogDataQuery.docs.map((item) => {
|
const formattedData = blogDataQuery.docs.map((item) => {
|
||||||
@ -31,6 +36,9 @@ export async function fetchBlogDetail(slug: string) {
|
|||||||
collection: "blogs",
|
collection: "blogs",
|
||||||
where: {
|
where: {
|
||||||
slug: { equals: slug },
|
slug: { equals: slug },
|
||||||
|
is_published: {
|
||||||
|
equals: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
limit: 1,
|
limit: 1,
|
||||||
pagination: false,
|
pagination: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user