From a5a5177a5b171968c1b538918e29377d9c8c05c8 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Wed, 23 Nov 2022 23:57:06 +0100 Subject: [PATCH] ++ Animation fixed in Home pic. ++"Dark Mode" --- src/server/models/myelem.js | 80 ++++++++++++++++++------------------- src/server/models/site.js | 1 + 2 files changed, 39 insertions(+), 42 deletions(-) diff --git a/src/server/models/myelem.js b/src/server/models/myelem.js index 38e1517..2209655 100755 --- a/src/server/models/myelem.js +++ b/src/server/models/myelem.js @@ -13,6 +13,37 @@ mongoose.plugin(schema => { schema.options.usePushEach = true }); +const myCard = new Schema( + { + imagefile: String, + alt: String, + description: String, + style: String, + size: String, + color: String, + content: String, + colorsub: String, + } +) +const animation = new Schema( + { + name: String, + clduration: String, + cldelay: String, + timingtype: String, + } +); + +const elemText = new Schema( + { + text: String, + color: String, + class: String, + size: String, + anim: animation, + } +); + const MyElemSchema = new Schema({ _id: { type: ObjectId, @@ -41,6 +72,9 @@ const MyElemSchema = new Schema({ container3: { type: String, }, + container4: { + type: String, + }, align: { type: Number, }, @@ -105,10 +139,9 @@ const MyElemSchema = new Schema({ color: { type: String, }, - colorsub: { - type: String - }, -active: { + elemsText: [elemText], + anim: animation, + active: { type: Boolean, }, class: { @@ -123,50 +156,13 @@ active: { class4: { type: String, }, - anim: { - name: { type: String}, - clduration: { type: String}, - cldelay: { type: String}, - }, - anim2: { - name: { type: String}, - clduration: { type: String}, - cldelay: { type: String}, - }, styleadd: { type: String, }, image: { type: String, }, - listcards: [ - { - imagefile: { - type: String, - }, - alt: { - type: String, - }, - description: { - type: String, - }, - style: { - type: String, - }, - size: { - type: String, - }, - color: { - type: String - }, - content: { - type: String - }, - colorsub: { - type: String - }, - } - ], + listcards: [myCard], list: [ { imagefile: { diff --git a/src/server/models/site.js b/src/server/models/site.js index fa86315..1080a59 100755 --- a/src/server/models/site.js +++ b/src/server/models/site.js @@ -99,6 +99,7 @@ const SiteSchema = new Schema({ font: { type: String }, col_toolbar: { type: String }, col_bgfooter: { type: String }, + show_darkopt: { type: Boolean }, }, confsite: { options: { // ConfSite