diff --git a/sites/diverseeducation.com/server/components/blocks/marko.json b/sites/diverseeducation.com/server/components/blocks/marko.json index 4c2721e0..dea17e82 100644 --- a/sites/diverseeducation.com/server/components/blocks/marko.json +++ b/sites/diverseeducation.com/server/components/blocks/marko.json @@ -5,5 +5,8 @@ "type" : "string", "required": true } + }, + "": { + "template": "./promo-card-rotation.marko" } } diff --git a/sites/diverseeducation.com/server/components/blocks/promo-card-rotation.marko b/sites/diverseeducation.com/server/components/blocks/promo-card-rotation.marko new file mode 100644 index 00000000..2e377b39 --- /dev/null +++ b/sites/diverseeducation.com/server/components/blocks/promo-card-rotation.marko @@ -0,0 +1,28 @@ +import { defaultValue } from "@parameter1/base-cms-marko-web/utils"; +import convertAdToNode from "@parameter1/base-cms-marko-web-native-x/utils/convert-ad-to-node"; +import shuffle from "@cox-matthews-associates/package-global/utils/shuffle-array"; + +$ const { nativeX: nxConfig } = out.global; +$ const placementName = "promotion"; +$ const aliases = defaultValue(input.aliases, []); +$ const blockName = "callout-cards"; +$ const uri = nxConfig.getUri(); +$ const placement = nxConfig.getPlacement({ name: placementName, aliases }); + + + + + + + + $ const hasAd = ads && ads.length && ads[0] && ads[0].hasCampaign; + + + + + + + + + + diff --git a/sites/diverseeducation.com/server/templates/index.marko b/sites/diverseeducation.com/server/templates/index.marko index 6ac7f813..676fe984 100644 --- a/sites/diverseeducation.com/server/templates/index.marko +++ b/sites/diverseeducation.com/server/templates/index.marko @@ -74,7 +74,7 @@ $ const { id, alias, name, pageNode } = input; <@section> - + <@section>