From 26ee16c9fdd918a0eb4993e28b15745631cfc2d8 Mon Sep 17 00:00:00 2001 From: Sperling-0 Date: Mon, 25 Nov 2024 10:47:01 +0100 Subject: [PATCH] Prepare Campaign for C24_WMDE_Desktop_DE_16 Ticket: https://phabricator.wikimedia.org/T380353 --- .../C24_WMDE_Desktop_DE_16/banner_ctrl.ts | 73 ++++++++ .../C24_WMDE_Desktop_DE_16/banner_var.ts | 73 ++++++++ .../components/BannerCtrl.vue | 170 ++++++++++++++++++ .../components/BannerVar.vue | 170 ++++++++++++++++++ .../components/FallbackBanner.vue | 108 +++++++++++ .../components/MainBanner.vue | 47 +++++ .../content/BannerSlides.vue | 48 +++++ .../content/BannerText.vue | 32 ++++ .../content/BannerTitle.vue | 19 ++ .../content/FallbackSlides.vue | 27 +++ .../content/FallbackText.vue | 25 +++ .../C24_WMDE_Desktop_DE_16/event_map.ts | 47 +++++ .../C24_WMDE_Desktop_DE_16/form_items.ts | 23 +++ .../C24_WMDE_Desktop_DE_16/messages.ts | 32 ++++ .../C24_WMDE_Desktop_DE_16/styles/Banner.scss | 22 +++ .../styles/FallbackBanner.scss | 121 +++++++++++++ .../styles/MainBanner.scss | 61 +++++++ .../styles/MainBannerVar.scss | 58 ++++++ .../C24_WMDE_Desktop_DE_16/styles/styles.scss | 57 ++++++ .../styles/styles_var.scss | 54 ++++++ campaign_info.toml | 18 +- 21 files changed, 1276 insertions(+), 9 deletions(-) create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/banner_ctrl.ts create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/banner_var.ts create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerCtrl.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerVar.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/components/FallbackBanner.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/components/MainBanner.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerSlides.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerText.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerTitle.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackSlides.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackText.vue create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/event_map.ts create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/form_items.ts create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/messages.ts create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/styles/Banner.scss create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/styles/FallbackBanner.scss create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBanner.scss create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBannerVar.scss create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles.scss create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles_var.scss diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/banner_ctrl.ts b/banners/desktop/C24_WMDE_Desktop_DE_16/banner_ctrl.ts new file mode 100644 index 000000000..512ed5512 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/banner_ctrl.ts @@ -0,0 +1,73 @@ +import { createVueApp } from '@src/createVueApp'; + +import './styles/styles.scss'; + +import BannerConductor from '@src/components/BannerConductor/FallbackBannerConductor.vue'; +import Banner from './components/BannerCtrl.vue'; +import FallbackBanner from './components/FallbackBanner.vue'; +import { UrlRuntimeEnvironment } from '@src/utils/RuntimeEnvironment'; +import { WindowResizeHandler } from '@src/utils/ResizeHandler'; +import PageWPORG from '@src/page/PageWPORG'; +import { WindowMediaWiki } from '@src/page/MediaWiki/WindowMediaWiki'; +import { SkinFactory } from '@src/page/skin/SkinFactory'; +import { WindowSizeIssueChecker } from '@src/utils/SizeIssueChecker/WindowSizeIssueChecker'; +import TranslationPlugin from '@src/TranslationPlugin'; +import { Translator } from '@src/Translator'; +import DynamicTextPlugin from '@src/DynamicTextPlugin'; +import { LocalImpressionCount } from '@src/utils/LocalImpressionCount'; +import { LegacyTrackerWPORG } from '@src/tracking/LegacyTrackerWPORG'; +import eventMappings from './event_map'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; +import { LocalStorageCloseTracker } from '@src/utils/LocalCloseTracker'; +import messages from './messages'; +import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; +import { createFormItems } from './form_items'; +import { createFormActions } from '@src/createFormActions'; +import { WindowTimer } from '@src/utils/Timer'; + +const date = new Date(); +const localeFactory = new LocaleFactoryDe(); +const translator = new Translator( messages ); +const mediaWiki = new WindowMediaWiki(); +const page = new PageWPORG( mediaWiki, ( new SkinFactory( mediaWiki ) ).getSkin(), new WindowSizeIssueChecker( 400 ) ); +const runtimeEnvironment = new UrlRuntimeEnvironment( window.location ); +const impressionCount = new LocalImpressionCount( page.getTracking().keyword, runtimeEnvironment ); +const tracker = new LegacyTrackerWPORG( mediaWiki, page.getTracking().keyword, eventMappings, runtimeEnvironment ); + +const app = createVueApp( BannerConductor, { + page, + bannerConfig: { + delay: runtimeEnvironment.getBannerDelay( 7500 ), + transitionDuration: 1000 + }, + bannerProps: { + useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), + remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), + localCloseTracker: new LocalStorageCloseTracker(), + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) + }, + resizeHandler: new WindowResizeHandler(), + banner: Banner, + fallbackBanner: FallbackBanner, + minWidthForMainBanner: 800, + impressionCount +} ); + +app.use( TranslationPlugin, translator ); +app.use( DynamicTextPlugin, { + campaignParameters: page.getCampaignParameters(), + date, + formatters: localeFactory.getFormatters(), + impressionCount, + translator +} ); + +const currencyFormatter = localeFactory.getCurrencyFormatter(); + +app.provide( 'currencyFormatter', currencyFormatter ); +app.provide( 'formItems', createFormItems( translator, currencyFormatter.euroAmount.bind( currencyFormatter ) ) ); +app.provide( 'formActions', createFormActions( page.getTracking(), impressionCount, { afo: '1', ap: '0' } ) ); +app.provide( 'tracker', tracker ); +app.provide( 'timer', new WindowTimer() ); + +app.mount( page.getBannerContainer() ); diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/banner_var.ts b/banners/desktop/C24_WMDE_Desktop_DE_16/banner_var.ts new file mode 100644 index 000000000..b387d885f --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/banner_var.ts @@ -0,0 +1,73 @@ +import { createVueApp } from '@src/createVueApp'; + +import './styles/styles_var.scss'; + +import BannerConductor from '@src/components/BannerConductor/FallbackBannerConductor.vue'; +import Banner from './components/BannerVar.vue'; +import FallbackBanner from './components/FallbackBanner.vue'; +import { UrlRuntimeEnvironment } from '@src/utils/RuntimeEnvironment'; +import { WindowResizeHandler } from '@src/utils/ResizeHandler'; +import PageWPORG from '@src/page/PageWPORG'; +import { WindowMediaWiki } from '@src/page/MediaWiki/WindowMediaWiki'; +import { SkinFactory } from '@src/page/skin/SkinFactory'; +import { WindowSizeIssueChecker } from '@src/utils/SizeIssueChecker/WindowSizeIssueChecker'; +import TranslationPlugin from '@src/TranslationPlugin'; +import { Translator } from '@src/Translator'; +import DynamicTextPlugin from '@src/DynamicTextPlugin'; +import { LocalImpressionCount } from '@src/utils/LocalImpressionCount'; +import { LegacyTrackerWPORG } from '@src/tracking/LegacyTrackerWPORG'; +import eventMappings from './event_map'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; +import { LocalStorageCloseTracker } from '@src/utils/LocalCloseTracker'; +import messages from './messages'; +import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; +import { createFormItems } from './form_items'; +import { createFormActions } from '@src/createFormActions'; +import { WindowTimer } from '@src/utils/Timer'; + +const date = new Date(); +const localeFactory = new LocaleFactoryDe(); +const translator = new Translator( messages ); +const mediaWiki = new WindowMediaWiki(); +const page = new PageWPORG( mediaWiki, ( new SkinFactory( mediaWiki ) ).getSkin(), new WindowSizeIssueChecker( 400 ) ); +const runtimeEnvironment = new UrlRuntimeEnvironment( window.location ); +const impressionCount = new LocalImpressionCount( page.getTracking().keyword, runtimeEnvironment ); +const tracker = new LegacyTrackerWPORG( mediaWiki, page.getTracking().keyword, eventMappings, runtimeEnvironment ); + +const app = createVueApp( BannerConductor, { + page, + bannerConfig: { + delay: runtimeEnvironment.getBannerDelay( 7500 ), + transitionDuration: 1000 + }, + bannerProps: { + useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), + remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), + localCloseTracker: new LocalStorageCloseTracker(), + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) + }, + resizeHandler: new WindowResizeHandler(), + banner: Banner, + fallbackBanner: FallbackBanner, + minWidthForMainBanner: 800, + impressionCount +} ); + +app.use( TranslationPlugin, translator ); +app.use( DynamicTextPlugin, { + campaignParameters: page.getCampaignParameters(), + date, + formatters: localeFactory.getFormatters(), + impressionCount, + translator +} ); + +const currencyFormatter = localeFactory.getCurrencyFormatter(); + +app.provide( 'currencyFormatter', currencyFormatter ); +app.provide( 'formItems', createFormItems( translator, currencyFormatter.euroAmount.bind( currencyFormatter ) ) ); +app.provide( 'formActions', createFormActions( page.getTracking(), impressionCount, { afo: '1', ap: '0' } ) ); +app.provide( 'tracker', tracker ); +app.provide( 'timer', new WindowTimer() ); + +app.mount( page.getBannerContainer() ); diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerCtrl.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerCtrl.vue new file mode 100644 index 000000000..8387c894c --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerCtrl.vue @@ -0,0 +1,170 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerVar.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerVar.vue new file mode 100644 index 000000000..8387c894c --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/components/BannerVar.vue @@ -0,0 +1,170 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/components/FallbackBanner.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/components/FallbackBanner.vue new file mode 100644 index 000000000..6550131fa --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/components/FallbackBanner.vue @@ -0,0 +1,108 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/components/MainBanner.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/components/MainBanner.vue new file mode 100644 index 000000000..20c886d6c --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/components/MainBanner.vue @@ -0,0 +1,47 @@ +tart + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerSlides.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerSlides.vue new file mode 100644 index 000000000..991443c11 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerSlides.vue @@ -0,0 +1,48 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerText.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerText.vue new file mode 100644 index 000000000..e7280312f --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerText.vue @@ -0,0 +1,32 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerTitle.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerTitle.vue new file mode 100644 index 000000000..ff61ed34e --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/content/BannerTitle.vue @@ -0,0 +1,19 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackSlides.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackSlides.vue new file mode 100644 index 000000000..b5e4af29d --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackSlides.vue @@ -0,0 +1,27 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackText.vue b/banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackText.vue new file mode 100644 index 000000000..f3622de30 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/content/FallbackText.vue @@ -0,0 +1,25 @@ + + + diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/event_map.ts b/banners/desktop/C24_WMDE_Desktop_DE_16/event_map.ts new file mode 100644 index 000000000..88eb4714e --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/event_map.ts @@ -0,0 +1,47 @@ +import { TrackingEventConverterFactory } from '@src/tracking/LegacyTrackerWPORG'; +import { WMDELegacyBannerEvent } from '@src/tracking/WPORG/WMDELegacyBannerEvent'; +import { WMDESizeIssueEvent } from '@src/tracking/WPORG/WMDEBannerSizeIssue'; +import { BannerSubmitEvent } from '@src/tracking/events/BannerSubmitEvent'; +import { FormStepShownEvent } from '@src/tracking/events/FormStepShownEvent'; +import { mapFormStepShownEvent } from '@src/tracking/LegacyEventTracking/mapFormStepShownEvent'; +import { CustomAmountChangedEvent } from '@src/tracking/events/CustomAmountChangedEvent'; +import { CloseEvent } from '@src/tracking/events/CloseEvent'; +import { mapCloseEvent } from '@src/tracking/LegacyEventTracking/mapCloseEvent'; +import { NotShownEvent } from '@src/tracking/events/NotShownEvent'; +import { mapNotShownEvent } from '@src/tracking/LegacyEventTracking/mapNotShownEvent'; +import { createViewportInfo } from '@src/tracking/LegacyEventTracking/createViewportInfo'; +import { AlreadyDonatedShownEvent } from '@src/tracking/events/AlreadyDonatedShownEvent'; +import { FallbackBannerSubmitEvent } from '@src/tracking/events/FallbackBannerSubmitEvent'; +import { ShownEvent } from '@src/tracking/events/ShownEvent'; +import { mapShownEvent } from '@src/tracking/LegacyEventTracking/mapShownEvent'; +import { BannerSubmitOnReturnEvent } from '@src/tracking/events/BannerSubmitOnReturnEvent'; + +export default new Map( [ + [ ShownEvent.EVENT_NAME, mapShownEvent ], + [ CloseEvent.EVENT_NAME, mapCloseEvent ], + [ FormStepShownEvent.EVENT_NAME, mapFormStepShownEvent ], + [ CustomAmountChangedEvent.EVENT_NAME, + ( e: CustomAmountChangedEvent ): WMDELegacyBannerEvent => + new WMDELegacyBannerEvent( e.userChoice + '-amount', 1 ) + ], + [ AlreadyDonatedShownEvent.EVENT_NAME, ( e: AlreadyDonatedShownEvent ): WMDELegacyBannerEvent => new WMDELegacyBannerEvent( e.eventName, 1 ) ], + [ NotShownEvent.EVENT_NAME, mapNotShownEvent ], + [ BannerSubmitEvent.EVENT_NAME, ( e: BannerSubmitEvent ): WMDESizeIssueEvent => { + switch ( e.feature ) { + case 'UpgradeToYearlyForm': + return new WMDESizeIssueEvent( `submit-${e.userChoice}`, createViewportInfo(), 1 ); + case 'UpgradeToMonthlyForm': + return new WMDESizeIssueEvent( `submit-${e.userChoice}`, createViewportInfo(), 1 ); + default: + return new WMDESizeIssueEvent( `submit`, createViewportInfo(), 1 ); + } + } ], + [ FallbackBannerSubmitEvent.EVENT_NAME, + ( e: FallbackBannerSubmitEvent ): WMDESizeIssueEvent => + new WMDESizeIssueEvent( e.eventName, createViewportInfo(), 1 ) + ], + [ BannerSubmitOnReturnEvent.EVENT_NAME, + ( e: BannerSubmitOnReturnEvent ): WMDELegacyBannerEvent => + new WMDELegacyBannerEvent( e.eventName + ( e.userChoice !== '' ? `-${e.userChoice}` : '' ), 1 ) + ] +] ); diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/form_items.ts b/banners/desktop/C24_WMDE_Desktop_DE_16/form_items.ts new file mode 100644 index 000000000..b70650d19 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/form_items.ts @@ -0,0 +1,23 @@ +import FormItemsBuilder from '@src/utils/FormItemsBuilder/FormItemsBuilder'; +import { Translator } from '@src/Translator'; +import { DonationFormItems } from '@src/utils/FormItemsBuilder/DonationFormItems'; +import { Intervals } from '@src/utils/FormItemsBuilder/fields/Intervals'; +import { PaymentMethods } from '@src/utils/FormItemsBuilder/fields/PaymentMethods'; +import { NumberFormatter } from '@src/utils/DynamicContent/formatters/NumberFormatter'; + +export function createFormItems( translations: Translator, amountFormatter: NumberFormatter ): DonationFormItems { + return new FormItemsBuilder( translations, amountFormatter ) + .setIntervals( + Intervals.ONCE, + Intervals.MONTHLY, + Intervals.QUARTERLY, + Intervals.YEARLY + ) + .setAmounts( 5, 10, 20, 25, 50, 100 ) + .setPaymentMethods( + PaymentMethods.PAYPAL, + PaymentMethods.BANK_TRANSFER, + PaymentMethods.CREDIT_CARD, + PaymentMethods.DIRECT_DEBIT + ).getItems(); +} diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/messages.ts b/banners/desktop/C24_WMDE_Desktop_DE_16/messages.ts new file mode 100644 index 000000000..8bb2ea2d4 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/messages.ts @@ -0,0 +1,32 @@ +import CustomAmountFormDe from '@src/components/DonationForm/Forms/messages/CustomAmountForm.de'; +import DynamicCampaignTextDe from '@src/utils/DynamicContent/messages/DynamicCampaignText.de'; +import { TranslationMessages } from '@src/Translator'; +import UpgradeToYearlyDe from '@src/components/DonationForm/Forms/messages/UpgradeToYearly.de'; +import AddressFormDe from '@src/components/DonationForm/Forms/messages/AddressForm.de'; +import FooterDe from '@src/components/Footer/messages/Footer.de'; +import MainDonationFormDe from '@src/components/DonationForm/Forms/messages/MainDonationForm.de'; +import FallbackBanner from '@src/components/FallbackBanner/messages/FallbackBanner.de'; +import AlreadyDonatedModal from '@src/components/AlreadyDonatedModal/translations/AlreadyDonatedModal.de'; +import SoftCloseDe from '@src/components/SoftClose/messages/SoftClose.de'; + +const messages: TranslationMessages = { + ...CustomAmountFormDe, + ...DynamicCampaignTextDe, + ...UpgradeToYearlyDe, + ...AddressFormDe, + ...FooterDe, + ...MainDonationFormDe, + ...AlreadyDonatedModal, + ...FallbackBanner, + ...SoftCloseDe, + 'already-donated-go-away-button': 'Im Moment nicht', + 'soft-close-prompt': 'Dürfen wir später nochmal fragen?', + 'upgrade-to-yearly-copy': `

Jedes Jahr sind wir auf Menschen wie Sie angewiesen. Jährliche Spenden helfen uns besonders und ermöglichen langfristige Weiterentwicklungen.

+

Sie gehen kein Risiko ein: Jederzeit formlos zu sofort kündbar.

`, + 'upgrade-to-yearly-no': 'Nein, ich spende einmalig {{amount}}', + 'upgrade-to-yearly-yes': 'Ja, ich spende {{amount}} jährlich', + 'campaign-day-only-n-days': 'Heute sind es nur noch {{days}} Tage bis zum Ende unserer Spendenkampagne.', + 'custom-amount-placeholder': 'Wahlbetrag' +}; + +export default messages; diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/styles/Banner.scss b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/Banner.scss new file mode 100644 index 000000000..1e7d13842 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/Banner.scss @@ -0,0 +1,22 @@ +@use 'src/themes/Svingle/variables/fonts'; + +.wmde-banner { + &-wrapper { + font-size: 14px; + font-family: fonts.$ui; + box-shadow: 0 3px 0.6em rgba( 60 60 60 / 40% ); + background-color: var( --main-background ); + } + + &--pending { + .wmde-banner-wrapper { + box-shadow: none; + } + } + + &--closed { + .wmde-banner-wrapper { + display: none; + } + } +} diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/styles/FallbackBanner.scss b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/FallbackBanner.scss new file mode 100644 index 000000000..a0d40542d --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/FallbackBanner.scss @@ -0,0 +1,121 @@ +@use 'src/themes/Svingle/variables/fonts'; + +$breakpoint: 800px; + +.wmde-banner { + &-fallback { + width: 100%; + height: 150px; + display: flex; + flex-direction: column; + background: var( --fallback-background ); + box-shadow: 0 3px 0.6em rgba( 60 60 60 / 40% ); + + @media ( min-width: $breakpoint ) { + height: auto; + min-height: 250px; + padding: 4px; + } + + &-small, + &-large { + display: flex; + flex-direction: column; + flex: 1 1 auto; + } + + &-small { + align-items: center; + border: 4px solid var( --fallback-border ); + border-radius: 4px; + padding: 8px; + + .wmde-banner-selection-input-text, + .wmde-banner-selection-input-input { + font-family: fonts.$content; + font-size: 14px; + font-weight: normal; + } + } + + &-large { + align-items: stretch; + } + + &-usage-link { + color: var( --fallback-uof-link ); + } + + &-message { + flex: 1 1 auto; + display: flex; + flex-direction: column; + border: 4px solid var( --fallback-message-border ); + border-radius: 4px; + padding: 8px 0; + } + + &-bank-item { + display: block; + + &-label { + font-weight: bold; + } + } + + .wmde-banner-close { + height: 16px; + width: 16px; + top: 8px; + right: 8px; + + @media ( min-width: $breakpoint ) { + height: 30px; + width: 30px; + top: 12px; + right: 12px; + } + } + + .wmde-banner-message { + flex: 1 1 auto; + display: flex; + flex-direction: column; + padding: 8px 0; + color: var( --fallback-message-color ); + background-color: var( --fallback-message-background ); + margin: 15px; + + p { + margin-bottom: 0; + } + } + + .wmde-banner-slider-container { + padding: 0 0 8px; + margin: 0; + } + + .wmde-banner-slide-content { + font-size: 14px; + p { + margin-bottom: 8px; + } + } + + .wmde-banner-slider-navigation-previous, + .wmde-banner-slider-navigation-next { + align-items: end; + } + + .wmde-banner-slider-pagination-dot { + cursor: default; + } + } + + &--pending { + .wmde-banner-fallback { + box-shadow: none; + } + } +} diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBanner.scss b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBanner.scss new file mode 100644 index 000000000..321fa4cc8 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBanner.scss @@ -0,0 +1,61 @@ +$banner-height: 357px !default; +$form-width: 300px !default; + +.wmde-banner { + + .previous { + --slider-chevron: var( --previous-button-fill ); + } + + &-main { + min-height: $banner-height; + display: flex; + flex-direction: column; + padding: 12px 24px 0; + } + + &-content { + display: flex; + flex-direction: row; + flex-grow: 1; + } + + .wmde-banner-message { + height: auto; + } + + &-message-container { + display: flex; + flex: 1 1 auto; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 11px; + color: var( --message-color ); + background-color: var( --message-background ); + border: none; + border-radius: 9px; + margin-bottom: 15px; + } + + &-column-left { + position: relative; + display: flex; + flex-direction: column; + flex: 1 1 auto; + margin-bottom: 0; + overflow-y: hidden; + margin-right: 30px; + padding: 0; + border: none; + } + + &-column-right { + order: 2; + flex: 0 0 $form-width; + display: flex; + flex-direction: column; + width: $form-width; + padding: 10px 0 0; + } +} diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBannerVar.scss b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBannerVar.scss new file mode 100644 index 000000000..1bf067da0 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/MainBannerVar.scss @@ -0,0 +1,58 @@ +$banner-height: 357px !default; +$form-width: 300px !default; + +.wmde-banner { + + .previous { + --slider-chevron: var( --previous-button-fill ); + } + + &-main { + min-height: $banner-height; + display: flex; + flex-direction: column; + padding: 12px 24px 0; + } + + &-content { + display: flex; + flex-direction: row; + flex-grow: 1; + } + + &-message { + height: auto; + } + + &-message-container { + display: flex; + flex: 1 1 auto; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 11px; + } + + &-column-left { + display: flex; + flex-direction: column; + justify-content: center; + flex: 1 1 auto; + margin-bottom: 0; + overflow-y: hidden; + margin-right: 30px; + padding: 0 0 10px; + background: var( --message-background ); + border: 5px solid var( --message-border ); + border-radius: 9px; + } + + &-column-right { + order: 2; + flex: 0 0 $form-width; + display: flex; + flex-direction: column; + width: $form-width; + padding: 10px 0 0; + } +} diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles.scss b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles.scss new file mode 100644 index 000000000..9ab810180 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles.scss @@ -0,0 +1,57 @@ +// This is the file where we import the theme-specific component styles +@use '../../../../src/themes/Svingle/swatches/skin_default' with ( + $slider: true, + $select-group: true, + $upgrade-to-yearly: true, + $fallback-banner: true, + $progress-bar: true, + $soft-close: true, +); +@use 'src/components/BannerConductor/banner-transition'; +@use 'src/themes/UseOfFunds/swatches/skin_default' as uof-default; +@use 'Banner'; +@use 'src/themes/UseOfFunds/UseOfFunds'; +@use 'MainBanner' with ( + $banner-height: 357px, + $form-width: 300px +); +@use 'src/themes/Svingle/defaults'; +@use 'src/themes/Svingle/ButtonClose/ButtonClose'; +@use 'src/themes/Svingle/ProgressBar/ProgressBar'; +@use 'src/themes/Svingle/DonationForm/DonationForm'; +@use 'src/themes/Svingle/DonationForm/MultiStepDonation'; +@use 'src/themes/Svingle/DonationForm/SubComponents/SelectGroup'; +@use 'src/themes/Svingle/DonationForm/SubComponents/SelectGroupRadios' with ( + $font-size: 14px +); +@use 'src/themes/Svingle/DonationForm/SubComponents/SelectCustomAmountRadio' with ( + $font-size: 14px +); +@use 'src/themes/Svingle/DonationForm/SubComponents/SmsBox'; +@use 'src/themes/Svingle/DonationForm/Forms/MainDonationForm'; +@use 'src/themes/Svingle/DonationForm/Forms/UpgradeToYearlyButtonForm' with ( + $font-size: 14px +); +@use 'src/themes/Svingle/DonationForm/Forms/CustomAmountForm'; +@use 'src/themes/Svingle/Footer/FooterAlreadyDonated'; +@use 'src/themes/Svingle/Footer/SelectionInput'; +@use 'src/themes/Svingle/Message/Message'; +@use 'src/themes/Svingle/SoftClose/SoftClose'; +@use 'src/themes/Svingle/Slider/KeenSlider' with ( + $slider-padding: 0, + $margin-bottom: 0 +); + +/** + * Fallback banner with "Fijitiv" theme + * All selectors in Fijitiv theme are prefixed with the ".wmde-banner-fallback" class selector, + so they override the "default" styles with the same selector + */ +@use 'FallbackBanner'; +@use 'src/themes/Fijitiv/FallbackBanner/FallbackButton'; +@use 'src/themes/Fijitiv/FallbackBanner/LargeFooter'; +@use 'src/themes/Fijitiv/FallbackBanner/SmallFooter'; +@use 'src/themes/Fijitiv/ProgressBar/ProgressBar' as FallbackProgressBar with ( + $progress-bar-margin: 0 15px +); +@use 'src/themes/Fijitiv/Slider/KeenSlider' as FallbackSlider; diff --git a/banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles_var.scss b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles_var.scss new file mode 100644 index 000000000..9c517548d --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_16/styles/styles_var.scss @@ -0,0 +1,54 @@ +// This is the file where we import the theme-specific component styles +@use 'src/themes/Treedip/swatches/skin_default' with ( + $slider: true, + $select-group: true, + $upgrade-to-yearly: true, + $fallback-banner: true, + $progress-bar: true, + $soft-close: true, +); +@use 'src/components/BannerConductor/banner-transition'; +@use 'src/themes/UseOfFunds/swatches/skin_default' as uof-default; +@use 'Banner'; +@use 'src/themes/UseOfFunds/UseOfFunds'; +@use 'MainBannerVar' with ( + $banner-height: 357px, + $form-width: 300px +); +@use 'src/themes/Treedip/defaults'; +@use 'src/themes/Treedip/ButtonClose/ButtonClose'; +@use 'src/themes/Treedip/ProgressBar/ProgressBar' with ( + $progress-bar-margin: 0 15px +); +@use 'src/themes/Treedip/DonationForm/DonationForm'; +@use 'src/themes/Treedip/DonationForm/MultiStepDonation'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SelectGroup'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SelectGroupRadios'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SelectCustomAmountRadio'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SmsBox'; +@use 'src/themes/Treedip/DonationForm/Forms/MainDonationForm'; +@use 'src/themes/Treedip/DonationForm/Forms/UpgradeToYearlyButtonForm' with ( + $font-size: 14px +); +@use 'src/themes/Treedip/DonationForm/Forms/CustomAmountForm'; +@use 'src/themes/Treedip/Footer/FooterAlreadyDonated'; +@use 'src/themes/Treedip/Footer/SelectionInput'; +@use 'src/themes/Treedip/Message/Message'; +@use 'src/themes/Treedip/SoftClose/SoftClose'; +@use 'src/themes/Treedip/Slider/KeenSlider' with ( + $slider-padding: 0 +); + +/** + * Fallback banner with "Fijitiv" theme + * All selectors in Fijitiv theme are prefixed with the ".wmde-banner-fallback" class selector, + so they override the "default" styles with the same selector + */ +@use 'FallbackBanner'; +@use 'src/themes/Fijitiv/FallbackBanner/FallbackButton'; +@use 'src/themes/Fijitiv/FallbackBanner/LargeFooter'; +@use 'src/themes/Fijitiv/FallbackBanner/SmallFooter'; +@use 'src/themes/Fijitiv/ProgressBar/ProgressBar' as FallbackProgressBar with ( + $progress-bar-margin: 0 15px +); +@use 'src/themes/Fijitiv/Slider/KeenSlider' as FallbackSlider; diff --git a/campaign_info.toml b/campaign_info.toml index 061468322..64fc80837 100644 --- a/campaign_info.toml +++ b/campaign_info.toml @@ -6,9 +6,9 @@ [desktop] name = "Desktop" icon = "desktop" -campaign = "C24_WMDE_Desktop_DE_15" -description = "Based on the CTRL banner of test 14, VAR uses EN banner theme" -campaign_tracking = "15-ba-241122" +campaign = "C24_WMDE_Desktop_DE_16" +description = "Based on the VAR banner of test 15, VAR uses different copy" +campaign_tracking = "16-ba-241125" preview_link = "/wiki/Hamster?devbanner={{banner}}&banner=B22_WMDE_local_prototype" preview_link_darkmode = "/wiki/Hamster?devbanner={{banner}}&banner=B22_WMDE_local_prototype&vectornightmode=1" preview_url = 'https://de.wikipedia.org/wiki/Hamster?banner={{banner}}&devMode' @@ -17,14 +17,14 @@ use_of_funds_source = "MediaWiki:WMDE_Fundraising/UseOfFunds_2024_DE" # Banners of the campaign, key after "banners" can be anything [desktop.banners.ctrl] -filename = "./banners/desktop/C24_WMDE_Desktop_DE_15/banner_ctrl.ts" -pagename = "B24_WMDE_Desktop_DE_15_ctrl" -tracking = "org-15-241122-ctrl" +filename = "./banners/desktop/C24_WMDE_Desktop_DE_16/banner_ctrl.ts" +pagename = "B24_WMDE_Desktop_DE_16_ctrl" +tracking = "org-16-241125-ctrl" [desktop.banners.var] -filename = "./banners/desktop/C24_WMDE_Desktop_DE_15/banner_var.ts" -pagename = "B24_WMDE_Desktop_DE_15_var" -tracking = "org-15-241122-var" +filename = "./banners/desktop/C24_WMDE_Desktop_DE_16/banner_var.ts" +pagename = "B24_WMDE_Desktop_DE_16_var" +tracking = "org-16-241125-var" [desktop.test_matrix] platform = ["edge", "firefox_win10", "chrome_win10", "safari", "firefox_macos", "chrome_macos", "firefox_linux", "chrome_linux"]