diff --git a/archive/desktop/C23_WMDE_Desktop_DE_14/banner_ctrl.ts b/archive/desktop/C23_WMDE_Desktop_DE_14/banner_ctrl.ts index e23b384a0..d39b85b96 100644 --- a/archive/desktop/C23_WMDE_Desktop_DE_14/banner_ctrl.ts +++ b/archive/desktop/C23_WMDE_Desktop_DE_14/banner_ctrl.ts @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup import { createFormItems } from './form_items'; import { createFormActions } from '@src/createFormActions'; -import { createFallbackDonationLink } from '@src/createFallbackDonationLink'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; const localeFactory = new LocaleFactoryDe(); const translator = new Translator( messages ); @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, { bannerProps: { useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), - donationLink: createFallbackDonationLink( page.getTracking(), impressionCount ) + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) }, resizeHandler: new WindowResizeHandler(), banner: Banner, diff --git a/archive/desktop/C23_WMDE_Desktop_DE_14/banner_var.ts b/archive/desktop/C23_WMDE_Desktop_DE_14/banner_var.ts index 32efe12c6..0a9d1795b 100644 --- a/archive/desktop/C23_WMDE_Desktop_DE_14/banner_var.ts +++ b/archive/desktop/C23_WMDE_Desktop_DE_14/banner_var.ts @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup import { createFormItems } from './form_items'; import { createFormActions } from '@src/createFormActions'; -import { createFallbackDonationLink } from '@src/createFallbackDonationLink'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; const localeFactory = new LocaleFactoryDe(); const translator = new Translator( messages ); @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, { bannerProps: { useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), - donationLink: createFallbackDonationLink( page.getTracking(), impressionCount ) + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) }, resizeHandler: new WindowResizeHandler(), banner: Banner, diff --git a/archive/desktop/C23_WMDE_Desktop_DE_15/banner_ctrl.ts b/archive/desktop/C23_WMDE_Desktop_DE_15/banner_ctrl.ts index e23b384a0..d39b85b96 100644 --- a/archive/desktop/C23_WMDE_Desktop_DE_15/banner_ctrl.ts +++ b/archive/desktop/C23_WMDE_Desktop_DE_15/banner_ctrl.ts @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup import { createFormItems } from './form_items'; import { createFormActions } from '@src/createFormActions'; -import { createFallbackDonationLink } from '@src/createFallbackDonationLink'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; const localeFactory = new LocaleFactoryDe(); const translator = new Translator( messages ); @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, { bannerProps: { useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), - donationLink: createFallbackDonationLink( page.getTracking(), impressionCount ) + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) }, resizeHandler: new WindowResizeHandler(), banner: Banner, diff --git a/archive/desktop/C23_WMDE_Desktop_DE_15/banner_var.ts b/archive/desktop/C23_WMDE_Desktop_DE_15/banner_var.ts index 0f55d41d2..dce2c6743 100644 --- a/archive/desktop/C23_WMDE_Desktop_DE_15/banner_var.ts +++ b/archive/desktop/C23_WMDE_Desktop_DE_15/banner_var.ts @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup import { createFormItems } from './form_items'; import { createFormActions } from '@src/createFormActions'; -import { createFallbackDonationLink } from '@src/createFallbackDonationLink'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; const localeFactory = new LocaleFactoryDe(); const translator = new Translator( messages ); @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, { bannerProps: { useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), - donationLink: createFallbackDonationLink( page.getTracking(), impressionCount ) + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) }, resizeHandler: new WindowResizeHandler(), banner: Banner, diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/banner_ctrl.ts b/archive/mobile/C23_WMDE_Mobile_DE_10/banner_ctrl.ts new file mode 100644 index 000000000..d7abdd824 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/banner_ctrl.ts @@ -0,0 +1,68 @@ +import { createVueApp } from '@src/createVueApp'; + +import './styles/styles.scss'; + +import BannerConductor from '@src/components/BannerConductor/BannerConductor.vue'; +import Banner from './components/BannerCtrl.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 { WindowPageScroller } from '@src/utils/PageScroller/WindowPageScroller'; +import { LegacyTrackerWPORG } from '@src/tracking/LegacyTrackerWPORG'; +import eventMappings from './event_map'; + +// Locale-specific imports +import messages from './messages'; +import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; + +// Channel specific form setup +import { createFormItems } from './form_items'; +import { createFormActions } from '@src/createFormActions'; + +const localeFactory = new LocaleFactoryDe(); +const translator = new Translator( messages ); +const mediaWiki = new WindowMediaWiki(); +const page = new PageWPORG( mediaWiki, ( new SkinFactory( mediaWiki ) ).getSkin(), new WindowSizeIssueChecker() ); +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(), + pageScroller: new WindowPageScroller(), + remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'mobile' ) ) + }, + resizeHandler: new WindowResizeHandler(), + banner: Banner, + impressionCount +} ); + +app.use( TranslationPlugin, translator ); +app.use( DynamicTextPlugin, { + campaignParameters: page.getCampaignParameters(), + date: new 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 ) ); +app.provide( 'tracker', tracker ); + +app.mount( page.getBannerContainer() ); diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/banner_var.ts b/archive/mobile/C23_WMDE_Mobile_DE_10/banner_var.ts new file mode 100644 index 000000000..462f8b66d --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/banner_var.ts @@ -0,0 +1,68 @@ +import { createVueApp } from '@src/createVueApp'; + +import './styles/styles.scss'; + +import BannerConductor from '@src/components/BannerConductor/BannerConductor.vue'; +import Banner from './components/BannerVar.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 { WindowPageScroller } from '@src/utils/PageScroller/WindowPageScroller'; +import { LegacyTrackerWPORG } from '@src/tracking/LegacyTrackerWPORG'; +import eventMappings from './event_map'; + +// Locale-specific imports +import messages from './messages_var'; +import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; + +// Channel specific form setup +import { createFormItems } from './form_items'; +import { createFormActions } from '@src/createFormActions'; + +const localeFactory = new LocaleFactoryDe(); +const translator = new Translator( messages ); +const mediaWiki = new WindowMediaWiki(); +const page = new PageWPORG( mediaWiki, ( new SkinFactory( mediaWiki ) ).getSkin(), new WindowSizeIssueChecker() ); +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(), + pageScroller: new WindowPageScroller(), + remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'mobile' ) ) + }, + resizeHandler: new WindowResizeHandler(), + banner: Banner, + impressionCount +} ); + +app.use( TranslationPlugin, translator ); +app.use( DynamicTextPlugin, { + campaignParameters: page.getCampaignParameters(), + date: new 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 ) ); +app.provide( 'tracker', tracker ); + +app.mount( page.getBannerContainer() ); diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/components/BannerCtrl.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/components/BannerCtrl.vue new file mode 100644 index 000000000..00b3f5797 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/components/BannerCtrl.vue @@ -0,0 +1,194 @@ + + + diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/components/BannerVar.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/components/BannerVar.vue new file mode 100644 index 000000000..3a7298934 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/components/BannerVar.vue @@ -0,0 +1,194 @@ + + + diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/components/FullPageBanner.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/components/FullPageBanner.vue new file mode 100644 index 000000000..89eb818a4 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/components/FullPageBanner.vue @@ -0,0 +1,40 @@ + + + diff --git a/banners/mobile/components/FullPageBannerVar.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/components/FullPageBannerVar.vue similarity index 100% rename from banners/mobile/components/FullPageBannerVar.vue rename to archive/mobile/C23_WMDE_Mobile_DE_10/components/FullPageBannerVar.vue diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/components/MiniBanner.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/components/MiniBanner.vue new file mode 100644 index 000000000..851c00022 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/components/MiniBanner.vue @@ -0,0 +1,38 @@ + + + diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/components/MiniBannerVar.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/components/MiniBannerVar.vue new file mode 100644 index 000000000..691ef9a8d --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/components/MiniBannerVar.vue @@ -0,0 +1,38 @@ + + + diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerSlides.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerSlides.vue new file mode 100644 index 000000000..ba9b83169 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerSlides.vue @@ -0,0 +1,60 @@ + + + diff --git a/banners/mobile/content/BannerSlidesVar.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerSlidesVar.vue similarity index 100% rename from banners/mobile/content/BannerSlidesVar.vue rename to archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerSlidesVar.vue diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerText.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerText.vue new file mode 100644 index 000000000..dbf9d1b80 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerText.vue @@ -0,0 +1,31 @@ + + + diff --git a/banners/mobile/content/BannerTextVar.vue b/archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerTextVar.vue similarity index 100% rename from banners/mobile/content/BannerTextVar.vue rename to archive/mobile/C23_WMDE_Mobile_DE_10/content/BannerTextVar.vue diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/event_map.ts b/archive/mobile/C23_WMDE_Mobile_DE_10/event_map.ts new file mode 100644 index 000000000..bbfe83649 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/event_map.ts @@ -0,0 +1,29 @@ +import { TrackingEventConverterFactory } from '@src/tracking/LegacyTrackerWPORG'; +import { WMDELegacyBannerEvent } from '@src/tracking/WPORG/WMDELegacyBannerEvent'; +import { MobileMiniBannerExpandedEvent } from '@src/tracking/events/MobileMiniBannerExpandedEvent'; +import { FormStepShownEvent } from '@src/tracking/events/FormStepShownEvent'; +import { mapFormStepShownEvent } from '@src/tracking/LegacyEventTracking/mapFormStepShownEvent'; +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 { BannerSubmitEvent } from '@src/tracking/events/BannerSubmitEvent'; +import { WMDESizeIssueEvent } from '@src/tracking/WPORG/WMDEBannerSizeIssue'; +import { createViewportInfo } from '@src/tracking/LegacyEventTracking/createViewportInfo'; + +export default new Map( [ + [ CloseEvent.EVENT_NAME, mapCloseEvent ], + [ MobileMiniBannerExpandedEvent.EVENT_NAME, + ( e: MobileMiniBannerExpandedEvent ): WMDELegacyBannerEvent => new WMDELegacyBannerEvent( e.eventName + ( e.userChoice !== '' ? `-${e.userChoice}` : '' ), 1 ) ], + [ FormStepShownEvent.EVENT_NAME, mapFormStepShownEvent ], + [ NotShownEvent.EVENT_NAME, mapNotShownEvent ], + + [ BannerSubmitEvent.EVENT_NAME, ( e: BannerSubmitEvent ): WMDESizeIssueEvent => { + switch ( e.feature ) { + case 'UpgradeToYearlyForm': + return new WMDESizeIssueEvent( `submit-${e.userChoice}`, createViewportInfo(), 1 ); + default: + return new WMDESizeIssueEvent( `submit`, createViewportInfo(), 1 ); + } + } ] +] ); diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/form_items.ts b/archive/mobile/C23_WMDE_Mobile_DE_10/form_items.ts new file mode 100644 index 000000000..53c204d06 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/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.YEARLY + ) + .setAmounts( 10, 15, 25, 50, 100 ) + .setPaymentMethods( + PaymentMethods.PAYPAL, + PaymentMethods.DIRECT_DEBIT, + PaymentMethods.BANK_TRANSFER, + PaymentMethods.CREDIT_CARD, + PaymentMethods.SOFORT + ).getItems(); +} diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/messages.ts b/archive/mobile/C23_WMDE_Mobile_DE_10/messages.ts new file mode 100644 index 000000000..cf8be364c --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/messages.ts @@ -0,0 +1,31 @@ +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 SoftCloseDe from '@src/components/SoftClose/messages/SoftClose.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'; + +const messages: TranslationMessages = { + ...CustomAmountFormDe, + ...DynamicCampaignTextDe, + ...UpgradeToYearlyDe, + ...SoftCloseDe, + ...AddressFormDe, + ...FooterDe, + ...MainDonationFormDe, + + // custom messages here + 'address-type-notice-full': 'Nur so können wir Ihnen eine Spendenquittung per Post zusenden. Außerdem erhalten ' + + 'Sie eine Bestätigung per E-Mail.', + 'address-type-notice-none': 'Sie verzichten sowohl auf eine Spendenquittung als auch auf eine Bestätigung ' + + 'per E-Mail. Sie erhalten von uns keine Information, wenn Wikipedia wieder Hilfe braucht.', + 'soft-close-prompt': 'Wikipedia später unterstützen?', + 'use-of-funds-link': 'Was Ihre Spende bewirkt', + 'payment-bank-transfer': 'Überweisung', + 'payment-sofort': 'Klarna', + 'soft-close-button-already-donated': 'Habe schon gespendet' +}; + +export default messages; diff --git a/banners/mobile/messages_var.ts b/archive/mobile/C23_WMDE_Mobile_DE_10/messages_var.ts similarity index 100% rename from banners/mobile/messages_var.ts rename to archive/mobile/C23_WMDE_Mobile_DE_10/messages_var.ts diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/styles/Banner.scss b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/Banner.scss new file mode 100644 index 000000000..faf723a8b --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/Banner.scss @@ -0,0 +1,56 @@ +@use 'src/themes/Mikings/variables/globals'; +@use 'src/themes/Mikings/variables/fonts'; +@use 'src/themes/Mikings/variables/colors'; + +@keyframes hide-mini { + 0% { + opacity: 1; + } + 99% { + opacity: 0; + } + 100% { + display: none; + } +} + +.wmde-banner { + + &-full { + visibility: hidden; + opacity: 0; + transform: scale( 1.1 ); + transition: opacity 500ms globals.$banner-easing, transform 500ms globals.$banner-easing; + } + + &-wrapper { + font-size: 16px; + font-family: fonts.$ui; + box-shadow: 0 3px 0.6em rgba( 60 60 60 / 40% ); + background-color: colors.$white; + + &--full-page { + .wmde-banner-mini { + animation: hide-mini 500ms; + } + .wmde-banner-full { + visibility: visible; + opacity: 1; + transform: scale( 1 ); + } + } + + &--soft-closing { + .wmde-banner-mini { + display: none; + } + } + } + + &--closed, + &--not-shown { + .wmde-banner-wrapper { + display: none; + } + } +} diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/styles/C23_WMDE_Mobile_DE_09.scss b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/C23_WMDE_Mobile_DE_09.scss new file mode 100644 index 000000000..d0400f287 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/C23_WMDE_Mobile_DE_09.scss @@ -0,0 +1,13 @@ +@use '@src/themes/Mikings/variables/colors'; +@use '@src/themes/Mikings/variables/breakpoints'; + +.wmde-banner-soft-close-button-already-donated { + background: colors.$white; + border: 1px solid colors.$secondary; + color: colors.$secondary; + min-width: 190px; + + @include breakpoints.phone-xs-up { + min-width: 190px; + } +} diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/styles/FullPageBanner.scss b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/FullPageBanner.scss new file mode 100644 index 000000000..22ef61757 --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/FullPageBanner.scss @@ -0,0 +1,99 @@ +@use '@src/themes/Mikings/variables/colors'; +@use '@src/themes/Mikings/variables/globals'; +@use '@src/themes/Mikings/variables/_breakpoints.scss'; + +.wmde-banner { + &-full { + border: 2px solid colors.$primary; + background: colors.$white; + position: fixed; + top: 0; + z-index: 1000; + height: 100vh; + width: 100vw; + + &-content { + overflow-y: auto; + height: 100%; + width: 100%; + } + + p { + padding-bottom: 16px; + } + + &-close { + position: absolute; + top: 16px; + right: 16px; + height: 35px; + width: 35px; + padding: 5px; + background: colors.$white; + z-index: 99; + border-radius: 50%; + + &:hover { + cursor: pointer; + } + + .close-button { + text-decoration: underline; + } + } + + &-info { + padding: 16px; + } + + &-call-to-action { + position: relative; + color: colors.$white; + background: colors.$primary; + font-weight: bold; + height: 31px; + line-height: 31px; + text-align: center; + + &-optional-text { + display: none; + + @include breakpoints.tablet-portrait-up { + display: inline; + } + } + + &::after { + content: ''; + position: absolute; + bottom: -4px; + left: 50%; + margin-left: -4px; + width: 0; + height: 0; + border-style: solid; + border-width: 4px 4px 0; + border-color: colors.$primary transparent transparent transparent; + } + } + + .banner-text-title { + margin-right: 30px; + } + + &-small-print { + text-align: center; + font-size: 12px; + margin-bottom: 16px; + + a { + color: colors.$gray; + + &:hover, + &:focus { + text-decoration: underline; + } + } + } + } +} diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/styles/MiniBanner.scss b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/MiniBanner.scss new file mode 100644 index 000000000..28c483f6e --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/MiniBanner.scss @@ -0,0 +1,157 @@ +@use '@src/themes/Mikings/variables/colors'; +@use '@src/themes/Mikings/variables/globals'; +@use 'sass:color'; + +$height: 288px !default; + +.wmde-banner { + &-mini { + display: flex; + flex-direction: column; + min-height: $height; + padding: 16px 0; + position: relative; + border: 2px solid colors.$primary; + background: colors.$white; + + &-close { + position: absolute; + height: 36px; + width: 36px; + top: 11px; + right: 16px; + text-align: center; + background: colors.$white; + padding: 10px; + z-index: 2; + + &-button { + margin-top: auto; + float: right; + height: 16px; + line-height: 16px; + width: 16px; + background: colors.$white; + z-index: 2; + + svg { + height: 16px; + width: 16px; + } + + &:hover { + cursor: pointer; + } + } + } + + &-headline { + height: 25px; + text-align: center; + margin: 0 16px 16px; + + &-background { + position: relative; + text-align: left; + + @media ( min-width: 400px ) { + text-align: center; + } + + /* single line above container */ + &::before { + content: ''; + display: block; + background: colors.$primary; + width: 100%; + height: 1px; + position: absolute; + top: 50%; + z-index: 1; + } + } + + &-content { + position: relative; + display: inline-block; + font-weight: bold; + font-size: 14px; + line-height: 25px; + color: colors.$black; + background: colors.$white; + padding: 0 5px; + z-index: 2; + white-space: nowrap; + + @media ( min-width: 330px ) { + font-size: 16px; + } + + @media ( min-width: 360px ) { + font-size: 18px; + } + } + } + + &-slideshow { + display: flex; + flex-direction: column; + flex: 1 1 auto; + } + + &-button-group { + display: flex; + justify-content: center; + } + + &-button, + &-button-preselect { + width: 50%; + height: 40px; + border-radius: 20px; + font-weight: bold; + color: colors.$white; + margin: 0 16px; + font-size: 14px; + white-space: nowrap; + + @media ( min-width: 370px ) { + font-size: 16px; + } + } + + &-button { + background: colors.$secondary; + + &:hover, + &:focus { + background: colors.$secondary-hover; + } + } + + &-button-preselect { + background: colors.$green; + + &:hover, + &:focus { + background: color.adjust( colors.$green, $lightness: -5% ); + } + } + + .smallprint-mini { + text-align: center; + font-size: 11px; + margin-top: 12px; + margin-bottom: -5px; + + a { + color: colors.$gray; + + &:hover, + &:focus { + text-decoration: underline; + } + } + } + } +} diff --git a/archive/mobile/C23_WMDE_Mobile_DE_10/styles/styles.scss b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/styles.scss new file mode 100644 index 000000000..e18d10e5f --- /dev/null +++ b/archive/mobile/C23_WMDE_Mobile_DE_10/styles/styles.scss @@ -0,0 +1,19 @@ +@use 'src/components/BannerConductor/banner-transition'; +@use 'src/themes/UseOfFunds/UseOfFunds'; +@use 'src/themes/Mikings/defaults'; +@use './Banner'; +@use './MiniBanner' with ( + $height: 288px +); +@use './FullPageBanner'; +@use 'src/themes/Mikings/Footer/Footer'; +@use 'src/themes/Mikings/Footer/SelectionInput'; +@use 'src/themes/Mikings/DonationForm/MultiStepDonation'; +@use 'src/themes/Mikings/DonationForm/Forms/UpgradeToYearlyButtonForm'; +@use 'src/themes/Mikings/DonationForm/SubComponents/SelectGroup'; +@use 'src/themes/Mikings/DonationForm/SubComponents/SelectCustomAmount'; +@use 'src/themes/Mikings/DonationForm/SubComponents/SmsBox'; +@use 'src/themes/Mikings/Slider/Slider'; +@use 'src/themes/Mikings/SoftClose/SoftClose'; +@use 'src/themes/Mikings/ProgressBar/ProgressBar'; +@use './C23_WMDE_Mobile_DE_09'; diff --git a/banners/desktop/banner_ctrl.ts b/banners/desktop/banner_ctrl.ts index e23b384a0..d39b85b96 100644 --- a/banners/desktop/banner_ctrl.ts +++ b/banners/desktop/banner_ctrl.ts @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup import { createFormItems } from './form_items'; import { createFormActions } from '@src/createFormActions'; -import { createFallbackDonationLink } from '@src/createFallbackDonationLink'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; const localeFactory = new LocaleFactoryDe(); const translator = new Translator( messages ); @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, { bannerProps: { useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), - donationLink: createFallbackDonationLink( page.getTracking(), impressionCount ) + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) }, resizeHandler: new WindowResizeHandler(), banner: Banner, diff --git a/banners/desktop/banner_var.ts b/banners/desktop/banner_var.ts index d22c4c932..3d5165a1e 100644 --- a/banners/desktop/banner_var.ts +++ b/banners/desktop/banner_var.ts @@ -25,10 +25,10 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup import { createFormItems } from './form_items'; import { createFormActions } from '@src/createFormActions'; -import { createFallbackDonationLink } from '@src/createFallbackDonationLink'; import { LinearDailyDonorAverage } from '@src/utils/DynamicContent/LinearDailyDonorAverage'; import { IntegerDe } from '@src/utils/DynamicContent/formatters/IntegerDe'; import { visitorsVsDailyDonorsSentence } from './visitorsVsDailyDonorsSentence'; +import { createFallbackDonationURL } from '@src/createFallbackDonationURL'; const date = new Date(); const localeFactory = new LocaleFactoryDe(); @@ -50,7 +50,7 @@ const app = createVueApp( BannerConductor, { bannerProps: { useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ), - donationLink: createFallbackDonationLink( page.getTracking(), impressionCount ) + donationLink: createFallbackDonationURL( page.getTracking(), impressionCount ) }, resizeHandler: new WindowResizeHandler(), banner: Banner, diff --git a/banners/mobile/banner_var.ts b/banners/mobile/banner_var.ts index 462f8b66d..f4762149e 100644 --- a/banners/mobile/banner_var.ts +++ b/banners/mobile/banner_var.ts @@ -19,12 +19,13 @@ import { LegacyTrackerWPORG } from '@src/tracking/LegacyTrackerWPORG'; import eventMappings from './event_map'; // Locale-specific imports -import messages from './messages_var'; +import messages from './messages'; import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup import { createFormItems } from './form_items'; import { createFormActions } from '@src/createFormActions'; +import { createDonationURL } from '@src/createDonationURL'; const localeFactory = new LocaleFactoryDe(); const translator = new Translator( messages ); @@ -43,7 +44,8 @@ const app = createVueApp( BannerConductor, { bannerProps: { useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(), pageScroller: new WindowPageScroller(), - remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'mobile' ) ) + remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'mobile' ) ), + donationURL: createDonationURL( page.getTracking(), impressionCount, { amount: '1000' } ) }, resizeHandler: new WindowResizeHandler(), banner: Banner, diff --git a/banners/mobile/components/BannerCtrl.vue b/banners/mobile/components/BannerCtrl.vue index 00b3f5797..2969751ed 100644 --- a/banners/mobile/components/BannerCtrl.vue +++ b/banners/mobile/components/BannerCtrl.vue @@ -9,7 +9,7 @@ @@ -21,7 +21,7 @@ @close="() => onClose( 'FullPageBanner', CloseChoices.Hide )" >