blob: 762a0d703567425abd08f303a6cc94f0703fd6ec [file] [log] [blame]
Yoshie Muranaka8d129102019-12-19 09:51:55 -08001<template>
Yoshie Muranaka74f86872020-02-10 12:28:37 -08002 <main id="main-content" class="page-container">
Yoshie Muranaka8d129102019-12-19 09:51:55 -08003 <slot />
4 </main>
5</template>
6
7<script>
Dixsie Wolmersdc6b3cd2021-05-20 19:01:42 -05008import JumpLinkMixin from '@/components/Mixins/JumpLinkMixin';
Yoshie Muranaka8d129102019-12-19 09:51:55 -08009export default {
Derick Montague602e98a2020-10-21 16:20:00 -050010 name: 'PageContainer',
Dixsie Wolmersdc6b3cd2021-05-20 19:01:42 -050011 mixins: [JumpLinkMixin],
Derick Montague80267972021-02-16 09:47:03 -060012 created() {
jason westoverd36ac8a2025-11-03 20:58:59 -060013 // Use global event bus instead of removed $root.$on
14 const eventBus = require('@/eventBus').default;
15 eventBus.$on('skip-navigation', () => {
Derick Montague80267972021-02-16 09:47:03 -060016 this.setFocus(this.$el);
17 });
18 },
jason westoverd36ac8a2025-11-03 20:58:59 -060019 beforeUnmount() {
20 require('@/eventBus').default.$off(
21 'skip-navigation',
22 this.handleSkipNavigation,
23 );
24 },
Yoshie Muranaka8d129102019-12-19 09:51:55 -080025};
26</script>
Yoshie Muranaka8d129102019-12-19 09:51:55 -080027<style lang="scss" scoped>
28main {
Yoshie Muranaka74f86872020-02-10 12:28:37 -080029 width: 100%;
30 height: 100%;
Yoshie Muranaka8d129102019-12-19 09:51:55 -080031 padding-top: $spacer * 1.5;
32 padding-bottom: $spacer * 3;
jason westoverd36ac8a2025-11-03 20:58:59 -060033 padding-inline-start: $spacer;
34 padding-inline-end: $spacer;
Derick Montague80267972021-02-16 09:47:03 -060035
36 &:focus-visible {
37 box-shadow: inset 0 0 0 2px theme-color('primary');
38 outline: none;
39 }
40
Yoshie Muranaka74f86872020-02-10 12:28:37 -080041 @include media-breakpoint-up($responsive-layout-bp) {
jason westoverd36ac8a2025-11-03 20:58:59 -060042 padding-inline-start: $spacer * 2;
Yoshie Muranaka74f86872020-02-10 12:28:37 -080043 }
Yoshie Muranaka8d129102019-12-19 09:51:55 -080044}
45</style>