diff --git a/next/schemas/single/Footer.ts b/next/schemas/single/Footer.ts
index 14b1614..8937e55 100644
--- a/next/schemas/single/Footer.ts
+++ b/next/schemas/single/Footer.ts
@@ -2,6 +2,12 @@ import { z } from "zod";
import { imageSchema } from "../Image";
export const footerSchema = z.object({
+ topFooter: z.array(
+ z.object({
+ url: z.string(),
+ image: imageSchema,
+ }),
+ ),
logoSection: z.array(
z.object({
url: z.string(),
diff --git a/strapi/src/api/footer/content-types/footer/schema.json b/strapi/src/api/footer/content-types/footer/schema.json
index e9c4bc3..8bc3f63 100644
--- a/strapi/src/api/footer/content-types/footer/schema.json
+++ b/strapi/src/api/footer/content-types/footer/schema.json
@@ -12,14 +12,17 @@
},
"pluginOptions": {},
"attributes": {
+ "topFooter": {
+ "type": "component",
+ "repeatable": true,
+ "component": "content-block.top-footer"
+ },
"logoSection": {
- "displayName": "logoSection",
"type": "component",
"repeatable": true,
"component": "content-block.logo-section"
},
"younite": {
- "displayName": "younite",
"type": "component",
"repeatable": false,
"component": "content-block.younite"
diff --git a/strapi/src/components/content-block/top-footer.json b/strapi/src/components/content-block/top-footer.json
new file mode 100644
index 0000000..96a189c
--- /dev/null
+++ b/strapi/src/components/content-block/top-footer.json
@@ -0,0 +1,24 @@
+{
+ "collectionName": "components_content_block_top_footers",
+ "info": {
+ "displayName": "topFooter",
+ "description": ""
+ },
+ "options": {},
+ "attributes": {
+ "url": {
+ "type": "string"
+ },
+ "image": {
+ "type": "media",
+ "multiple": true,
+ "required": false,
+ "allowedTypes": [
+ "images",
+ "files",
+ "videos",
+ "audios"
+ ]
+ }
+ }
+}
From eb4935c48b4ca5cd19288f1d4311500f1b1f026c Mon Sep 17 00:00:00 2001
From: belleyong <136943913+belleyong@users.noreply.github.com>
Date: Tue, 26 Nov 2024 22:10:32 +1300
Subject: [PATCH 14/14] deleted nullable in image.ts and changed minimal css to
top footer
---
next/components/footer/footer.module.css | 11 ++++++-----
next/components/footer/footer.tsx | 8 ++++----
next/schemas/Image.ts | 2 +-
strapi/src/components/content-block/top-footer.json | 2 +-
4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/next/components/footer/footer.module.css b/next/components/footer/footer.module.css
index aca2bab..9731b30 100644
--- a/next/components/footer/footer.module.css
+++ b/next/components/footer/footer.module.css
@@ -6,11 +6,11 @@
.top {
display: flex;
justify-content: space-between;
- /* gap: 1rem; */
- /* grid-template-columns: repeat(3, 1fr); */
+ gap: 0.5rem;
+ grid-template-columns: repeat(3, 1fr);
align-items: center;
background-color: white;
- padding: 1.5rem calc(var(--gutter) + 2rem);
+ padding: 0.75rem calc(var(--gutter) + 1rem);
}
.bottom {
@@ -24,8 +24,9 @@
.brandLogo {
object-fit: contain;
- max-width: 100px;
- flex: 1 0 auto;
+ height: 80px;
+ width: 80px;
+ flex-shrink: 0;
}
.bottom .younite {
diff --git a/next/components/footer/footer.tsx b/next/components/footer/footer.tsx
index 910ae2c..4e1e0a0 100644
--- a/next/components/footer/footer.tsx
+++ b/next/components/footer/footer.tsx
@@ -4,10 +4,10 @@ import fetchStrapi from "@/util/strapi";
import Image from "next/image";
import styles from "./footer.module.css";
// socials
-// brands
-import lakeHouseLogo from "@/assets/footer/lakeHouseLogo.png";
-import localBoardLogo from "@/assets/footer/localBoardLogo.png";
-import shoreJunctionLogo from "@/assets/footer/shoreJunction.png";
+// // brands
+// import lakeHouseLogo from "@/assets/footer/lakeHouseLogo.png";
+// import localBoardLogo from "@/assets/footer/localBoardLogo.png";
+// import shoreJunctionLogo from "@/assets/footer/shoreJunction.png";
//lost links to socials
async function getFooterData() {
const resData = await fetchStrapi("footer", footerSchema);
diff --git a/next/schemas/Image.ts b/next/schemas/Image.ts
index 3c0a892..d64b2bb 100644
--- a/next/schemas/Image.ts
+++ b/next/schemas/Image.ts
@@ -39,7 +39,7 @@ export const imageSchema = z.object({
createdAt: z.string(),
updatedAt: z.string(),
}),
- }).nullable(),
+ }),
});
export type ImageType = z.infer;
diff --git a/strapi/src/components/content-block/top-footer.json b/strapi/src/components/content-block/top-footer.json
index 96a189c..04f2a32 100644
--- a/strapi/src/components/content-block/top-footer.json
+++ b/strapi/src/components/content-block/top-footer.json
@@ -11,7 +11,7 @@
},
"image": {
"type": "media",
- "multiple": true,
+ "multiple": false,
"required": false,
"allowedTypes": [
"images",