+ Vielleicht kommen wir gerade ungelegen, aber dennoch: Klicken Sie jetzt bitte nicht weg! Am heutigen + {{ currentDayName }}, den {{ currentDate }}, bitten wir Sie, die Unabhängigkeit von Wikipedia zu unterstützen. +
+
+ {{campaignDaySentence}}
+
+ Die durchschnittliche Spende beträgt {{ averageDonation }}, doch bereits 5 € 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! +
++ Hat Wikipedia Ihnen Wissen im Wert einer Tasse Kaffee geschenkt? +
++ Dann entscheiden Sie sich, etwas zurückzugeben. Danke! +
+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', + 'upgrade-to-yearly-header': 'Bitte spenden Sie {{amount}} jährlich!' +}; + +export default messages; diff --git a/banners/desktop/C24_WMDE_Desktop_DE_21/styles/Banner.scss b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/Banner.scss new file mode 100644 index 000000000..1e7d13842 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_21/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_21/styles/FallbackBanner.scss b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/FallbackBanner.scss new file mode 100644 index 000000000..3fd60d8a5 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_21/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; + 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 8px 0; + margin: -5px 0 8px; + color: var( --fallback-message-color ); + background-color: var( --fallback-message-background ); + border: 4px solid var( --fallback-message-border ); + border-radius: 4px; + + 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_21/styles/MainBanner.scss b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/MainBanner.scss new file mode 100644 index 000000000..b1e59c844 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/MainBanner.scss @@ -0,0 +1,59 @@ +$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; + + border: 5px solid var( --message-border ); + border-radius: 9px; + margin-bottom: 10px; + } + + &-column-left { + display: flex; + flex-direction: column; + justify-content: center; + flex: 1 1 auto; + overflow-y: hidden; + margin-right: 30px; + padding: 0 0 10px; + background: var( --message-background ); + } + + &-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_21/styles/MinimisedBanner.scss b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/MinimisedBanner.scss new file mode 100644 index 000000000..9de4c2a22 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/MinimisedBanner.scss @@ -0,0 +1,102 @@ +@use '../../../../src/themes/Treedip/variables/globals'; +@use '../../../../src/themes/Treedip/variables/fonts'; + +.wmde-banner { + &-minimised { + --chevron-color: var( --minimised-control-fill ); + + padding: 12px 24px 0; + + &-content { + display: flex; + + &-message { + display: flex; + flex: 1 1 auto; + flex-direction: column; + justify-content: center; + padding: 11px 15px 11px 34px; + font-size: 14px; + + border: 5px solid var( --message-border ); + border-radius: 9px; + + svg { + float: left; + margin: 10px 0 0 -22px; + } + } + + &-button { + flex: 0 0 auto; + display: flex; + flex-direction: column; + justify-content: end; + padding-left: 30px; + } + } + + &-title { + font-family: fonts.$content; + font-size: 18px; + font-weight: bold; + } + + &-submit-button { + width: 300px; + background: var( --minimised-button-background ); + color: var( --minimised-button-color ); + font-weight: bold; + line-height: 36px; + border: 0; + border-radius: 18px; + padding: 0 10px; + transition: background-color 500ms globals.$banner-easing; + cursor: pointer; + + &:hover, + &:focus { + background: var( --minimised-button-background-hover ); + } + } + + &-button-group { + position: absolute; + z-index: 2; + top: 12px; + right: 24px; + height: 30px; + width: 300px; + display: flex; + justify-content: space-between; + + .wmde-banner-close { + position: static; + } + } + + &-minimise, + &-maximise { + background: none; + border: 2px solid var( --minimised-control-border ); + border-radius: 15px; + cursor: pointer; + color: var( --minimised-control-color ); + padding-right: 8px; + margin-right: 8px; + font-size: 14px; + font-weight: bold; + + svg { + width: 20px; + } + } + + &-minimise { + svg { + transform: rotate( 180deg ); + margin-left: 3px; + } + } + } +} diff --git a/banners/desktop/C24_WMDE_Desktop_DE_21/styles/styles.scss b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/styles.scss new file mode 100644 index 000000000..b69168a4c --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/styles.scss @@ -0,0 +1,58 @@ +// 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, + $double-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/Treedip/defaults'; +@use 'src/themes/Treedip/ButtonClose/ButtonClose'; +@use 'src/themes/Treedip/ProgressBar/DoubleProgressBar'; +@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' with ( + $slider-main-headline-font-size: 25px, + $message-header-padding-bottom: 8px, + $message-header-small-up-padding-bottom: 8px +); +@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' with ( + $fallback-large-footer-right-before-border-color: white +); +@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_21/styles/styles_var.scss b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/styles_var.scss new file mode 100644 index 000000000..814e67a55 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_21/styles/styles_var.scss @@ -0,0 +1,60 @@ +// 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, + $double-progress-bar: true, + $soft-close: true, + $minimised-banner: 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 'MinimisedBanner'; +@use 'src/themes/Treedip/defaults'; +@use 'src/themes/Treedip/ButtonClose/ButtonClose'; +@use 'src/themes/Treedip/ProgressBar/DoubleProgressBar'; +@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' with ( + $slider-main-headline-font-size: 25px, + $message-header-padding-bottom: 8px, + $message-header-small-up-padding-bottom: 8px +); +@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' with ( + $fallback-large-footer-right-before-border-color: white +); +@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_21/useScrollMinimiser.ts b/banners/desktop/C24_WMDE_Desktop_DE_21/useScrollMinimiser.ts new file mode 100644 index 000000000..d25f66108 --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_21/useScrollMinimiser.ts @@ -0,0 +1,21 @@ +import { onMounted, onUnmounted, Ref, watch } from 'vue'; + +export function useScrollMinimiser( switchThreshold: number, hasMinimised: Ref