From dd07125df64071d4ba931a7ece950fc4fc788034 Mon Sep 17 00:00:00 2001 From: Brandon Krigbaum Date: Wed, 8 Feb 2023 10:59:14 -0600 Subject: [PATCH] Add desktopLeaderboard injection support --- .../components/content/body-with-injection.marko | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/marko-web-theme-monorail/components/content/body-with-injection.marko b/packages/marko-web-theme-monorail/components/content/body-with-injection.marko index 5f4007aab..966745b96 100644 --- a/packages/marko-web-theme-monorail/components/content/body-with-injection.marko +++ b/packages/marko-web-theme-monorail/components/content/body-with-injection.marko @@ -12,11 +12,17 @@ $ const aliases = getAsArray(input, 'aliases'); $ const selector = defaultValue(input.selector, `content-body-${content.id}`); -$ const desktopAdCounts = defaultValue(input.desktopAdCounts, [350, 1500, 2750, 4500, 6250, 8000, 9750, 11500, 13250, 15000, 16750, 18500]); +$ const desktopAdCounts = defaultValue(input.desktopAdCounts, [1500, 2750, 4500, 6250, 8000, 9750, 11500, 13250, 15000, 16750, 18500]); $ const desktopAdName = defaultValue(input.desktopAdName, "inline-content-desktop"); $ const desktopAdModifiers = defaultValue(input.desktopAdModifiers, ["margin-auto-x", "inline-content", "inline-content-desktop"]); $ const desktopAdDataPropToPreventDupes = defaultValue(input.desktopAdDataPropToPreventDupes, "gamTemplateName"); + +$ const desktopLeaderboardAdCounts = defaultValue(input.desktopLeaderboardAdCounts, [350]); +$ const desktopLeaderboardAdName = defaultValue(input.desktopLeaderboardAdName, desktopAdName); +$ const desktopLeaderboardAdModifiers = defaultValue(input.desktopLeaderboardAdModifiers, desktopAdModifiers); +$ const desktopLeaderboardAdDataPropToPreventDupes = defaultValue(input.desktopLeaderboardAdDataPropToPreventDupes, desktopAdDataPropToPreventDupes); + $ const mobileAdCounts = defaultValue(input.mobileAdCounts, [900, 1650, 2950, 4250, 5550, 6850, 8150, 9450, 10750, 12050, 13350, 14650, 15950, 17250]); $ const mobileAdName = defaultValue(input.mobileAdName, "inline-content-mobile"); @@ -31,6 +37,12 @@ $ const mobileLeaderboardAdDataPropToPreventDupes = defaultValue(input.mobileLea $ const gamAdInjection = (GAM) ? [ + { + counts: desktopLeaderboardAdCounts, + name: desktopLeaderboardAdName, + modifiers: desktopLeaderboardAdModifiers, + dataPropToPreventDupes: desktopLeaderboardAdDataPropToPreventDupes + }, { counts: desktopAdCounts, name: desktopAdName,