-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare CTRL for C24_WMDE_Desktop_DE_11
Based on CTRL of test 10 Banners are hidden under 800px Ticket: https://phabricator.wikimedia.org/T379246
- Loading branch information
Showing
12 changed files
with
53 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 0 additions & 163 deletions
163
banners/desktop/C24_WMDE_Desktop_DE_11/components/BannerVar.vue
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
111 changes: 0 additions & 111 deletions
111
banners/desktop/C24_WMDE_Desktop_DE_11/styles/MinimisedBanner.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { EmitFn, onMounted, onUnmounted } from 'vue'; | ||
import { CloseEvent } from '@src/tracking/events/CloseEvent'; | ||
import { CloseChoices } from '@src/domain/CloseChoices'; | ||
|
||
export function useBannerHider( hideUnder: number, emit: EmitFn<'bannerClosed'[]> ): void { | ||
const onResize = (): void => { | ||
if ( window.innerWidth < hideUnder ) { | ||
emit( 'bannerClosed', new CloseEvent( 'MainBanner', CloseChoices.WindowSizeBelowMin ) ); | ||
} | ||
}; | ||
|
||
onMounted( () => { | ||
window.addEventListener( 'resize', onResize ); | ||
} ); | ||
|
||
onUnmounted( () => { | ||
window.removeEventListener( 'resize', onResize ); | ||
} ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.