forked from UKSOURCE/cms.lams
header
This commit is contained in:
+12
-77
@@ -1,84 +1,7 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
const socialLinkSchema = new mongoose.Schema(
|
||||
{
|
||||
platform: {
|
||||
type: String,
|
||||
required: true,
|
||||
enum: ["linkedin", "twitter", "instagram", "youtube", "facebook"],
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
icon: String,
|
||||
order: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
const languageSchema = new mongoose.Schema(
|
||||
{
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
const menuItemSchema = new mongoose.Schema(
|
||||
{
|
||||
label: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
href: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
icon: String,
|
||||
order: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
children: [this],
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
const headerSchema = new mongoose.Schema(
|
||||
{
|
||||
// Top bar
|
||||
top: {
|
||||
phone: String,
|
||||
email: String,
|
||||
location: String,
|
||||
socialLinks: [socialLinkSchema],
|
||||
languages: [languageSchema],
|
||||
},
|
||||
|
||||
// Offcanvas
|
||||
offcanvas: {
|
||||
description: String,
|
||||
contactInfo: {
|
||||
address: String,
|
||||
email: String,
|
||||
workingHours: String,
|
||||
phone: String,
|
||||
},
|
||||
},
|
||||
|
||||
// Menu
|
||||
menu: [menuItemSchema],
|
||||
|
||||
// Logo
|
||||
logo: {
|
||||
light: String,
|
||||
@@ -86,6 +9,18 @@ const headerSchema = new mongoose.Schema(
|
||||
alt: String,
|
||||
},
|
||||
|
||||
// Sign In Button
|
||||
signInButton: {
|
||||
label: {
|
||||
type: String,
|
||||
default: "Sign In",
|
||||
},
|
||||
href: {
|
||||
type: String,
|
||||
default: "/signin",
|
||||
},
|
||||
},
|
||||
|
||||
// CTA Button
|
||||
ctaButton: {
|
||||
label: String,
|
||||
|
||||
Reference in New Issue
Block a user