Unser Spendenziel: {{ goalDonationSum }} Millionen €
+Hi,
++ vielleicht kommen wir gerade ungelegen, aber dennoch: Klicken Sie jetzt bitte nicht weg! Am + heutigen {{ currentDayName }}, den {{ liveDateAndTime.currentDate }}, um {{ liveDateAndTime.currentTime }} bitten wir Sie, + die Unabhängigkeit von Wikipedia zu unterstützen. +
+
+ {{ campaignDaySentence }}
+
+ Die durchschnittliche Spende beträgt {{ averageDonation }}, doch bereits 10 € helfen uns weiter. Hat Wikipedia + Ihnen in diesem Jahr Wissen im Wert einer Tasse Kaffee geschenkt? +
++ Dann entscheiden Sie sich, eine der seltenen Ausnahmen zu sein, und geben Sie etwas zurück. + Vielen Dank! +
+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.', + 'soft-close-prompt': 'Wikipedia später unterstützen?', + 'soft-close-button-already-donated': 'Habe schon gespendet', + 'amount-total': '' +}; + +export default messages; diff --git a/banners/mobile/C24_WMDE_Mobile_DE_14/styles/Banner.scss b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/Banner.scss new file mode 100644 index 000000000..5ff1ecbab --- /dev/null +++ b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/Banner.scss @@ -0,0 +1,56 @@ +@use 'src/themes/Modo/variables/globals'; +@use 'src/themes/Modo/variables/fonts'; + +@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: var( --main-background ); + color: var( --main-color ); + + &--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/banners/mobile/C24_WMDE_Mobile_DE_14/styles/FullPageBanner.scss b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/FullPageBanner.scss new file mode 100644 index 000000000..74e0d4eb9 --- /dev/null +++ b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/FullPageBanner.scss @@ -0,0 +1,116 @@ +@use '@src/themes/Modo/variables/globals'; +@use '@src/themes/Modo/variables/breakpoints'; + +.wmde-banner { + &-full { + background: var( --full-background ); + position: fixed; + top: 0; + z-index: 1000; + height: 100vh; + height: -webkit-fill-available; + width: 100vw; + + &-content { + overflow-y: auto; + height: 100%; + width: 100%; + padding: 12px; + } + + p { + padding-bottom: 16px; + } + + &-close { + position: absolute; + top: 0; + right: 0; + height: 36px; + width: 36px; + padding: 5px 3px 5px 7px; + background: transparent; + z-index: 99; + border: none; + + svg { + height: 15px; + width: 15px; + background: var( --full-close-background ); + border-radius: 16px; + box-sizing: content-box; + border: solid 5px var( --full-close-background ); + } + + &:hover { + cursor: pointer; + } + } + + &-info { + padding: 12px; + background: var( --full-info-background ); + border-radius: 16px; + color: var( --info-color ); + } + + &-content-below-info { + background: var( --full-content-below-info-background ); + border-radius: 16px; + } + + &-call-to-action { + position: relative; + color: var( --full-cta-color ); + background: var( --full-cta-background ); + font-weight: bold; + font-size: 14px; + height: 25px; + line-height: 25px; + text-align: center; + border-radius: 16px; + margin-bottom: 10px; + margin-top: 10px; + + &-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: 5px 4px 0; + border-color: var( --full-cta-background ) transparent transparent transparent; + } + } + + .banner-text-title { + margin-right: 30px; + } + + &-small-print { + text-align: center; + font-size: 12px; + margin-bottom: 16px; + + a { + color: var( --full-smallprint-color ); + + &:hover, + &:focus { + text-decoration: underline; + } + } + } + } +} diff --git a/banners/mobile/C24_WMDE_Mobile_DE_14/styles/MiniBanner.scss b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/MiniBanner.scss new file mode 100644 index 000000000..3b6fb5289 --- /dev/null +++ b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/MiniBanner.scss @@ -0,0 +1,178 @@ +@use '@src/themes/Modo/variables/globals'; +@use '@src/themes/Modo/variables/breakpoints'; + +$height: 336px !default; +$height-l-up: 288px !default; + +.wmde-banner { + &-mini { + display: flex; + flex-direction: column; + min-height: $height; + padding: 6px; + position: relative; + background: var( --mini-background ); + color: var( --info-color ); + + @include breakpoints.phone-l-up { + min-height: $height-l-up; + padding: 12px; + } + + &-info { + background: var( --mini-info-background ); + border-radius: 16px; + margin-bottom: 6px; + display: flex; + flex-direction: column; + flex: 1 1 auto; + + @include breakpoints.phone-l-up { + margin-bottom: 12px; + } + } + + &-close { + top: -3px; + right: -3px; + position: absolute; + height: 36px; + width: 36px; + padding: 5px 3px 5px 7px; + background: transparent; + z-index: 99; + border: none; + + svg { + height: 15px; + width: 15px; + background: var( --mini-close-background ); + border-radius: 16px; + box-sizing: content-box; + border: solid 5px var( --mini-close-background ); + } + + &:hover { + cursor: pointer; + } + } + + &-headline { + height: 25px; + text-align: center; + margin: 16px 16px 12px; + + &-background { + position: relative; + text-align: left; + + @media ( min-width: 400px ) { + text-align: center; + } + + /* single line above container */ + &::before { + content: ''; + display: block; + background: var( --mini-headline-line ); + 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; + background: var( --mini-headline-background ); + 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; + margin: 0 -6px; + + @include breakpoints.phone-l-up { + margin: 0 -12px; + } + } + + &-button, + &-button-preselect { + width: 50%; + height: 40px; + border: none; + border-radius: 20px; + font-weight: bold; + color: var( --mini-button-color ); + font-size: 14px; + white-space: nowrap; + margin: 0 6px; + + @include breakpoints.phone-l-up { + margin: 0 12px; + } + + @media ( min-width: 370px ) { + font-size: 16px; + } + } + + &-button { + background: var( --mini-button-background ); + + &:hover, + &:focus { + background: var( --mini-button-background-hover ); + } + } + + &-button-preselect { + background: var( --mini-button-alt-background ); + + &:hover, + &:focus { + background: var( --mini-button-alt-background-hover ); + } + } + + .smallprint-mini { + text-align: center; + font-size: 11px; + margin-top: 12px; + margin-bottom: -5px; + + a { + color: var( --mini-smallprint-color ); + + &:hover, + &:focus { + text-decoration: underline; + } + } + } + } +} diff --git a/banners/mobile/C24_WMDE_Mobile_DE_14/styles/MiniBanner_var.scss b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/MiniBanner_var.scss new file mode 100644 index 000000000..186d0ed56 --- /dev/null +++ b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/MiniBanner_var.scss @@ -0,0 +1,199 @@ +@use '@src/themes/Modo/variables/globals'; +@use '@src/themes/Modo/variables/breakpoints'; + +$height: 336px !default; +$height-l-up: 288px !default; + +.wmde-banner { + &-mini { + display: flex; + flex-direction: column; + min-height: $height; + padding: 6px; + position: relative; + background: var( --mini-background ); + color: var( --info-color ); + + @include breakpoints.phone-l-up { + min-height: $height-l-up; + padding: 12px; + } + + &-uof-link { + background: none; + border: none; + color: var( --info-color ); + font-size: 11px; + cursor: pointer; + + position: absolute; + bottom: 8px; + left: 8px; + + --info-icon-background: var( --info-color ); + --info-icon-color: var( --mini-info-background ); + svg { + width: 10px; + height: 10px; + top: -5px; + } + } + + &-info { + background: var( --mini-info-background ); + border-radius: 16px; + margin-bottom: 6px; + display: flex; + flex-direction: column; + flex: 1 1 auto; + position: relative; + + @include breakpoints.phone-l-up { + margin-bottom: 12px; + } + } + + &-close { + top: -9px; + right: -9px; + position: absolute; + height: 36px; + width: 36px; + padding: 5px 3px 5px 7px; + background: transparent; + z-index: 99; + border: none; + + svg { + height: 15px; + width: 15px; + background: var( --mini-close-background ); + border-radius: 16px; + box-sizing: content-box; + border: solid 5px var( --mini-close-background ); + } + + &:hover { + cursor: pointer; + } + } + + &-headline { + height: 25px; + text-align: center; + margin: 16px 16px 12px; + + &-background { + position: relative; + text-align: left; + + @media ( min-width: 400px ) { + text-align: center; + } + + /* single line above container */ + &::before { + content: ''; + display: block; + background: var( --mini-headline-line ); + 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; + background: var( --mini-headline-background ); + 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; + margin: 0 -6px; + + @include breakpoints.phone-l-up { + margin: 0 -12px; + } + } + + &-button, + &-button-preselect { + width: 50%; + height: 40px; + border: none; + border-radius: 20px; + font-weight: bold; + color: var( --mini-button-color ); + font-size: 14px; + white-space: nowrap; + margin: 0 6px; + + @include breakpoints.phone-l-up { + margin: 0 12px; + } + + @media ( min-width: 370px ) { + font-size: 16px; + } + } + + &-button { + background: var( --mini-button-background ); + + &:hover, + &:focus { + background: var( --mini-button-background-hover ); + } + } + + &-button-preselect { + background: var( --mini-button-alt-background ); + + &:hover, + &:focus { + background: var( --mini-button-alt-background-hover ); + } + } + + .smallprint-mini { + text-align: center; + font-size: 11px; + margin-top: 12px; + margin-bottom: -5px; + + a { + color: var( --mini-smallprint-color ); + + &:hover, + &:focus { + text-decoration: underline; + } + } + } + } +} diff --git a/banners/mobile/C24_WMDE_Mobile_DE_14/styles/styles.scss b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/styles.scss new file mode 100644 index 000000000..d95d7f01f --- /dev/null +++ b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/styles.scss @@ -0,0 +1,28 @@ +@use 'src/themes/Modo/swatches/skin_default' with ( + $upgrade-to-yearly-button-form: true, + $double-progress-bar: true, + $soft-close: true, + $thank-you-box: true +); +@use 'src/components/BannerConductor/banner-transition'; +@use 'src/components/UseOfFunds2024/styles/swatches/skin_default' as uof-default; +@use 'src/components/UseOfFunds2024/styles/styles'; +@use 'src/themes/Modo/defaults'; +@use 'Banner'; +@use 'MiniBanner' with ( + $height: 336px, + $height-l-up: 306px +); +@use 'FullPageBanner'; +@use 'src/themes/Modo/Footer/Footer'; +@use 'src/themes/Modo/ThankYouBox/ThankYouBox'; +@use 'src/themes/Modo/Footer/SelectionInput'; +@use 'src/themes/Modo/DonationForm/MultiStepDonation'; +@use 'src/themes/Modo/DonationForm/Forms/UpgradeToYearlyButtonForm'; +@use 'src/themes/Modo/DonationForm/SubComponents/SelectGroup'; +@use 'src/themes/Modo/DonationForm/SubComponents/SelectCustomAmount'; +@use 'src/themes/Modo/DonationForm/SubComponents/SmsBox'; +@use 'src/themes/Modo/Slider/Slider'; +@use 'src/themes/Modo/SoftClose/SoftClose'; +@use 'src/themes/Modo/ProgressBar/DoubleProgressBar'; +@use 'src/themes/Modo/Message/Message'; diff --git a/banners/mobile/C24_WMDE_Mobile_DE_14/styles/styles_var.scss b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/styles_var.scss new file mode 100644 index 000000000..7fd6dbd29 --- /dev/null +++ b/banners/mobile/C24_WMDE_Mobile_DE_14/styles/styles_var.scss @@ -0,0 +1,28 @@ +@use 'src/themes/Modo/swatches/skin_default' with ( + $upgrade-to-yearly-button-form: true, + $double-progress-bar: true, + $soft-close: true, + $thank-you-box: true +); +@use 'src/components/BannerConductor/banner-transition'; +@use 'src/components/UseOfFunds2024/styles/swatches/skin_default' as uof-default; +@use 'src/components/UseOfFunds2024/styles/styles'; +@use 'src/themes/Modo/defaults'; +@use 'Banner'; +@use 'MiniBanner_var' with ( + $height: 336px, + $height-l-up: 306px +); +@use 'FullPageBanner'; +@use 'src/themes/Modo/Footer/Footer'; +@use 'src/themes/Modo/ThankYouBox/ThankYouBox'; +@use 'src/themes/Modo/Footer/SelectionInput'; +@use 'src/themes/Modo/DonationForm/MultiStepDonation'; +@use 'src/themes/Modo/DonationForm/Forms/UpgradeToYearlyButtonForm'; +@use 'src/themes/Modo/DonationForm/SubComponents/SelectGroup'; +@use 'src/themes/Modo/DonationForm/SubComponents/SelectCustomAmount'; +@use 'src/themes/Modo/DonationForm/SubComponents/SmsBox'; +@use 'src/themes/Modo/Slider/Slider'; +@use 'src/themes/Modo/SoftClose/SoftClose'; +@use 'src/themes/Modo/ProgressBar/DoubleProgressBar'; +@use 'src/themes/Modo/Message/Message'; diff --git a/campaign_info.toml b/campaign_info.toml index 33fa0f1ac..3c26efc06 100644 --- a/campaign_info.toml +++ b/campaign_info.toml @@ -35,26 +35,26 @@ resolution = ["800x600", "1024x768", "1280x960", "1600x1200", "1920x1200", "2560 [mobile] name = "Mobile" icon = "mobile" -campaign = "C24_WMDE_Mobile_DE_13" -description = " based on VAR of C24_WMDE_Mobile_DE_12, VAR has auto collapse" -campaign_tracking = "mob-de-13-ba-241217" +campaign = "C24_WMDE_Mobile_DE_14" +description = " based on CTRL of C24_WMDE_Mobile_DE_13, VAR has link to UOF popup in the mininbanner" +campaign_tracking = "mob-de-14-ba-241223" preview_link = "/mobile/wiki/Wikipedia:Hauptseite?devbanner={{banner}}&banner=B22_WMDE_local_prototype&useskin=minerva" preview_link_darkmode = "/mobile/wiki/Wikipedia:Hauptseite?devbanner={{banner}}&banner=B22_WMDE_local_prototype&useskin=minerva&minervanightmode=1" preview_link_offline = "" preview_url = 'https://de.m.wikipedia.org/wiki/Wikipedia:Hauptseite?banner={{banner}}&useskin=minerva&devMode' wrapper_template = "wikipedia_org" -use_of_funds_source = "MediaWiki:WMDE_Fundraising/UseOfFunds_2024_DE" +use_of_funds_source = "MediaWiki:WMDE_Fundraising/UseOfFunds_2025_DE" # Banners of the campaign, key after "banners" can be anything [mobile.banners.ctrl] -filename = "./banners/mobile/C24_WMDE_Mobile_DE_13/banner_ctrl.ts" -pagename = "B24_WMDE_Mobile_DE_13_ctrl" -tracking = "org-mob13-241217-ctrl" +filename = "./banners/mobile/C24_WMDE_Mobile_DE_14/banner_ctrl.ts" +pagename = "B24_WMDE_Mobile_DE_14_ctrl" +tracking = "org-mob14-241223-ctrl" [mobile.banners.var] -filename = "./banners/mobile/C24_WMDE_Mobile_DE_13/banner_var.ts" -pagename = "B24_WMDE_Mobile_DE_13_var" -tracking = "org-mob13-241217-var" +filename = "./banners/mobile/C24_WMDE_Mobile_DE_14/banner_var.ts" +pagename = "B24_WMDE_Mobile_DE_14_var" +tracking = "org-mob14-241223-var" [mobile.test_matrix] device = [ 'samsung_s10', 'iphone_xs_max', 'iphone_5s', 'iphone_se', "iphone_8", "iphone_12_mini", "iphone_7_plus", "iphone_11_pro_max"] diff --git a/test/banners/mobile/C24_WMDE_Mobile_DE_14/components/BannerCtrl.spec.ts b/test/banners/mobile/C24_WMDE_Mobile_DE_14/components/BannerCtrl.spec.ts new file mode 100644 index 000000000..16877d605 --- /dev/null +++ b/test/banners/mobile/C24_WMDE_Mobile_DE_14/components/BannerCtrl.spec.ts @@ -0,0 +1,192 @@ +import { afterEach, beforeEach, describe, Mock, test, vi } from 'vitest'; +import { mount, VueWrapper } from '@vue/test-utils'; +import Banner from '@banners/mobile/C24_WMDE_Mobile_DE_14/components/BannerCtrl.vue'; +import { BannerStates } from '@src/components/BannerConductor/StateMachine/BannerStates'; +import { PageScroller } from '@src/utils/PageScroller/PageScroller'; +import { useOfFundsContent } from '@test/banners/useOfFundsContent2024'; +import { newDynamicContent } from '@test/banners/dynamicCampaignContent'; +import { CurrencyDe } from '@src/utils/DynamicContent/formatters/CurrencyDe'; +import { formItems } from '@test/banners/formItems'; +import { softCloseFeatures } from '@test/features/SoftCloseMobile'; +import { useOfFundsFeatures, useOfFundsScrollFeatures } from '@test/features/UseOfFunds2024'; +import { miniBannerFeatures } from '@test/features/MiniBanner'; +import { donationFormFeatures } from '@test/features/forms/MainDonation_UpgradeToYearlyButton_changesAmountOptions'; +import { useFormModel } from '@src/components/composables/useFormModel'; +import { resetFormModel } from '@test/resetFormModel'; +import { DynamicContent } from '@src/utils/DynamicContent/DynamicContent'; +import { fullPageBannerFeatures } from '@test/features/FullPageBanner'; +import { formActionSwitchFeatures } from '@test/features/form_action_switch/MainDonation_UpgradeToYearlyButton'; +import { Tracker } from '@src/tracking/Tracker'; +import { bannerContentAnimatedTextFeatures, bannerContentDateAndTimeFeatures } from '@test/features/BannerContent'; +import { softCloseSubmitTrackingFeatures } from '@test/features/SoftCloseSubmitTracking'; +import { Timer } from '@src/utils/Timer'; +import { TimerStub } from '@test/fixtures/TimerStub'; + +let pageScroller: PageScroller; +let tracker: Tracker; +const formModel = useFormModel(); +const translator = ( key: string ): string => key; +describe( 'BannerCtrl.vue', () => { + let showCallback: Mock; + let closeCallback: Mock; + + let wrapper: VueWrapper