2021-04-10 05:40:50 +02:00
|
|
|
<template>
|
2021-12-03 14:09:40 +01:00
|
|
|
<div class="dkgtipfy" :class="{ wallpaper }">
|
|
|
|
<XSidebar v-if="!isMobile" class="sidebar"/>
|
2021-04-10 05:40:50 +02:00
|
|
|
|
2022-07-03 07:40:02 +02:00
|
|
|
<MkStickyContainer class="contents">
|
|
|
|
<template #header><XStatusBars :class="$style.statusbars"/></template>
|
2022-08-16 03:43:17 +02:00
|
|
|
<main id="maincontent" style="min-width: 0;" :style="{ background: pageMetadata?.value?.bg }" @contextmenu.stop="onContextmenu">
|
2022-07-03 07:40:02 +02:00
|
|
|
<div :class="$style.content">
|
2022-06-20 10:38:49 +02:00
|
|
|
<RouterView/>
|
2021-04-10 05:40:50 +02:00
|
|
|
</div>
|
2022-07-03 07:40:02 +02:00
|
|
|
<div :class="$style.spacer"></div>
|
2021-04-10 05:40:50 +02:00
|
|
|
</main>
|
2022-07-03 07:40:02 +02:00
|
|
|
</MkStickyContainer>
|
2021-04-10 05:40:50 +02:00
|
|
|
|
2021-12-03 14:09:40 +01:00
|
|
|
<div v-if="isDesktop" ref="widgetsEl" class="widgets">
|
2021-04-10 05:40:50 +02:00
|
|
|
<XWidgets @mounted="attachSticky"/>
|
|
|
|
</div>
|
|
|
|
|
2022-07-07 10:29:30 +02:00
|
|
|
<button v-if="!isDesktop && !isMobile" class="widgetButton _button" @click="widgetsShowing = true"><i class="fas fa-layer-group"></i></button>
|
2021-12-03 14:09:40 +01:00
|
|
|
|
|
|
|
<div v-if="isMobile" class="buttons">
|
|
|
|
<button class="button nav _button" @click="drawerMenuShowing = true"><i class="fas fa-bars"></i><span v-if="menuIndicated" class="indicator"><i class="fas fa-circle"></i></span></button>
|
2022-06-20 10:38:49 +02:00
|
|
|
<button class="button home _button" @click="mainRouter.currentRoute.value.name === 'index' ? top() : mainRouter.push('/')"><i class="fas fa-home"></i></button>
|
|
|
|
<button class="button notifications _button" @click="mainRouter.push('/my/notifications')"><i class="fas fa-bell"></i><span v-if="$i?.hasUnreadNotification" class="indicator"><i class="fas fa-circle"></i></span></button>
|
2021-04-20 16:22:59 +02:00
|
|
|
<button class="button widget _button" @click="widgetsShowing = true"><i class="fas fa-layer-group"></i></button>
|
2021-04-10 05:40:50 +02:00
|
|
|
</div>
|
|
|
|
|
2022-08-19 23:50:58 +02:00
|
|
|
<button v-if="isMobile && mainRouter.currentRoute.value.name === 'index'" ref="postButton" class="postButton button post _button" @click="os.post()"><i class="fas fa-pencil-alt"></i></button>
|
2022-08-19 01:48:22 +02:00
|
|
|
|
2022-01-25 15:18:21 +01:00
|
|
|
<transition :name="$store.state.animation ? 'menuDrawer-back' : ''">
|
2022-06-20 10:38:49 +02:00
|
|
|
<div
|
|
|
|
v-if="drawerMenuShowing"
|
2021-12-03 14:09:40 +01:00
|
|
|
class="menuDrawer-back _modalBg"
|
|
|
|
@click="drawerMenuShowing = false"
|
|
|
|
@touchstart.passive="drawerMenuShowing = false"
|
|
|
|
></div>
|
|
|
|
</transition>
|
|
|
|
|
2022-01-25 15:18:21 +01:00
|
|
|
<transition :name="$store.state.animation ? 'menuDrawer' : ''">
|
2021-12-03 14:09:40 +01:00
|
|
|
<XDrawerMenu v-if="drawerMenuShowing" class="menuDrawer"/>
|
|
|
|
</transition>
|
2021-04-10 05:40:50 +02:00
|
|
|
|
2022-01-25 15:18:21 +01:00
|
|
|
<transition :name="$store.state.animation ? 'widgetsDrawer-back' : ''">
|
2022-06-20 10:38:49 +02:00
|
|
|
<div
|
|
|
|
v-if="widgetsShowing"
|
2021-12-03 14:09:40 +01:00
|
|
|
class="widgetsDrawer-back _modalBg"
|
2021-04-10 05:40:50 +02:00
|
|
|
@click="widgetsShowing = false"
|
|
|
|
@touchstart.passive="widgetsShowing = false"
|
|
|
|
></div>
|
|
|
|
</transition>
|
|
|
|
|
2022-01-25 15:18:21 +01:00
|
|
|
<transition :name="$store.state.animation ? 'widgetsDrawer' : ''">
|
2021-12-03 14:09:40 +01:00
|
|
|
<XWidgets v-if="widgetsShowing" class="widgetsDrawer"/>
|
2021-04-10 05:40:50 +02:00
|
|
|
</transition>
|
|
|
|
|
|
|
|
<XCommon/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-02-01 15:48:19 +01:00
|
|
|
<script lang="ts" setup>
|
2022-06-20 10:38:49 +02:00
|
|
|
import { defineAsyncComponent, provide, onMounted, computed, ref, watch, ComputedRef } from 'vue';
|
|
|
|
import XCommon from './_common_/common.vue';
|
2021-11-11 18:02:25 +01:00
|
|
|
import { instanceName } from '@/config';
|
|
|
|
import { StickySidebar } from '@/scripts/sticky-sidebar';
|
2022-07-14 10:42:12 +02:00
|
|
|
import XDrawerMenu from '@/ui/_common_/navbar-for-mobile.vue';
|
2021-11-11 18:02:25 +01:00
|
|
|
import * as os from '@/os';
|
2021-12-03 14:09:40 +01:00
|
|
|
import { defaultStore } from '@/store';
|
2022-07-14 10:42:12 +02:00
|
|
|
import { navbarItemDef } from '@/navbar';
|
2021-12-03 14:09:40 +01:00
|
|
|
import { i18n } from '@/i18n';
|
2022-02-01 15:48:19 +01:00
|
|
|
import { $i } from '@/account';
|
2022-06-20 10:38:49 +02:00
|
|
|
import { Router } from '@/nirax';
|
|
|
|
import { mainRouter } from '@/router';
|
|
|
|
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
2022-07-24 11:44:50 +02:00
|
|
|
import { deviceKind } from '@/scripts/device-kind';
|
2022-08-16 03:43:17 +02:00
|
|
|
|
2022-02-01 15:48:19 +01:00
|
|
|
const XWidgets = defineAsyncComponent(() => import('./universal.widgets.vue'));
|
2022-07-14 10:42:12 +02:00
|
|
|
const XSidebar = defineAsyncComponent(() => import('@/ui/_common_/navbar.vue'));
|
2022-07-03 07:40:02 +02:00
|
|
|
const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue'));
|
2021-04-10 05:40:50 +02:00
|
|
|
|
|
|
|
const DESKTOP_THRESHOLD = 1100;
|
2021-12-03 14:09:40 +01:00
|
|
|
const MOBILE_THRESHOLD = 500;
|
2021-04-10 05:40:50 +02:00
|
|
|
|
2022-07-24 11:44:50 +02:00
|
|
|
// デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない
|
2022-02-01 15:48:19 +01:00
|
|
|
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
2022-07-24 11:44:50 +02:00
|
|
|
const isMobile = ref(deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD);
|
2022-02-01 15:48:19 +01:00
|
|
|
window.addEventListener('resize', () => {
|
2022-07-24 11:44:50 +02:00
|
|
|
isMobile.value = deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD;
|
2022-02-01 15:48:19 +01:00
|
|
|
});
|
|
|
|
|
2022-06-20 10:38:49 +02:00
|
|
|
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
2022-02-01 15:48:19 +01:00
|
|
|
const widgetsEl = $ref<HTMLElement>();
|
2022-08-19 23:50:58 +02:00
|
|
|
const postButton = $ref<HTMLElement>();
|
2022-06-20 10:38:49 +02:00
|
|
|
const widgetsShowing = $ref(false);
|
|
|
|
|
|
|
|
provide('router', mainRouter);
|
|
|
|
provideMetadataReceiver((info) => {
|
|
|
|
console.log(info);
|
|
|
|
pageMetadata = info;
|
|
|
|
if (pageMetadata.value) {
|
|
|
|
document.title = `${pageMetadata.value.title} | ${instanceName}`;
|
|
|
|
}
|
|
|
|
});
|
2022-02-01 15:48:19 +01:00
|
|
|
|
|
|
|
const menuIndicated = computed(() => {
|
2022-07-14 10:42:12 +02:00
|
|
|
for (const def in navbarItemDef) {
|
2022-02-01 15:48:19 +01:00
|
|
|
if (def === 'notifications') continue; // 通知は下にボタンとして表示されてるから
|
2022-07-14 10:42:12 +02:00
|
|
|
if (navbarItemDef[def].indicated) return true;
|
2022-02-01 15:48:19 +01:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
const drawerMenuShowing = ref(false);
|
|
|
|
|
2022-06-20 10:38:49 +02:00
|
|
|
mainRouter.on('change', () => {
|
2022-02-01 15:48:19 +01:00
|
|
|
drawerMenuShowing.value = false;
|
|
|
|
});
|
|
|
|
|
|
|
|
document.documentElement.style.overflowY = 'scroll';
|
|
|
|
|
|
|
|
if (defaultStore.state.widgets.length === 0) {
|
|
|
|
defaultStore.set('widgets', [{
|
|
|
|
name: 'calendar',
|
2022-06-20 10:38:49 +02:00
|
|
|
id: 'a', place: 'right', data: {},
|
2022-02-01 15:48:19 +01:00
|
|
|
}, {
|
|
|
|
name: 'notifications',
|
2022-06-20 10:38:49 +02:00
|
|
|
id: 'b', place: 'right', data: {},
|
2022-02-01 15:48:19 +01:00
|
|
|
}, {
|
|
|
|
name: 'trends',
|
2022-06-20 10:38:49 +02:00
|
|
|
id: 'c', place: 'right', data: {},
|
2022-02-01 15:48:19 +01:00
|
|
|
}]);
|
|
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
if (!isDesktop.value) {
|
2021-12-03 14:09:40 +01:00
|
|
|
window.addEventListener('resize', () => {
|
2022-02-01 15:48:19 +01:00
|
|
|
if (window.innerWidth >= DESKTOP_THRESHOLD) isDesktop.value = true;
|
2022-08-19 23:25:08 +02:00
|
|
|
let scrollPos = 0;
|
|
|
|
|
|
|
|
function checkPosition() {
|
|
|
|
let windowY = window.scrollY;
|
2022-08-19 23:50:58 +02:00
|
|
|
postButton.style.transform = `scale(${windowY < scrollPos ? '1' : '0'})`;
|
|
|
|
// if (windowY < scrollPos) {
|
|
|
|
// postButton.style.transform = 'scale(1)';
|
|
|
|
// } else {
|
|
|
|
// postButton.style.transform = 'scale(0)';
|
|
|
|
// }
|
2022-08-19 23:25:08 +02:00
|
|
|
scrollPos = windowY;
|
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener('scroll', checkPosition);
|
2022-02-01 15:48:19 +01:00
|
|
|
}, { passive: true });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2022-08-19 02:23:32 +02:00
|
|
|
const onContextmenu = (ev: MouseEvent) => {
|
2022-02-01 15:48:19 +01:00
|
|
|
const isLink = (el: HTMLElement) => {
|
|
|
|
if (el.tagName === 'A') return true;
|
|
|
|
if (el.parentElement) {
|
|
|
|
return isLink(el.parentElement);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
if (isLink(ev.target)) return;
|
|
|
|
if (['INPUT', 'TEXTAREA', 'IMG', 'VIDEO', 'CANVAS'].includes(ev.target.tagName) || ev.target.attributes['contenteditable']) return;
|
|
|
|
if (window.getSelection()?.toString() !== '') return;
|
2022-06-20 10:38:49 +02:00
|
|
|
const path = mainRouter.getCurrentPath();
|
2022-02-01 15:48:19 +01:00
|
|
|
os.contextMenu([{
|
|
|
|
type: 'label',
|
|
|
|
text: path,
|
|
|
|
}, {
|
|
|
|
icon: 'fas fa-window-maximize',
|
|
|
|
text: i18n.ts.openInWindow,
|
|
|
|
action: () => {
|
|
|
|
os.pageWindow(path);
|
2022-06-20 10:38:49 +02:00
|
|
|
},
|
2022-02-01 15:48:19 +01:00
|
|
|
}], ev);
|
|
|
|
};
|
|
|
|
|
2022-08-19 02:23:32 +02:00
|
|
|
const attachSticky = (el: any) => {
|
2022-02-01 15:48:19 +01:00
|
|
|
const sticky = new StickySidebar(widgetsEl);
|
|
|
|
window.addEventListener('scroll', () => {
|
|
|
|
sticky.calc(window.scrollY);
|
|
|
|
}, { passive: true });
|
|
|
|
};
|
|
|
|
|
|
|
|
function top() {
|
|
|
|
window.scroll({ top: 0, behavior: 'smooth' });
|
|
|
|
}
|
2021-04-10 05:40:50 +02:00
|
|
|
|
2022-02-01 15:48:19 +01:00
|
|
|
const wallpaper = localStorage.getItem('wallpaper') != null;
|
2022-08-16 03:43:17 +02:00
|
|
|
|
2022-08-19 02:23:32 +02:00
|
|
|
|
2021-04-10 05:40:50 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-12-03 14:09:40 +01:00
|
|
|
.widgetsDrawer-enter-active,
|
|
|
|
.widgetsDrawer-leave-active {
|
2021-04-10 05:40:50 +02:00
|
|
|
opacity: 1;
|
|
|
|
transform: translateX(0);
|
|
|
|
transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
|
}
|
2021-12-03 14:09:40 +01:00
|
|
|
.widgetsDrawer-enter-from,
|
|
|
|
.widgetsDrawer-leave-active {
|
2021-04-10 05:40:50 +02:00
|
|
|
opacity: 0;
|
|
|
|
transform: translateX(240px);
|
|
|
|
}
|
|
|
|
|
2021-12-03 14:09:40 +01:00
|
|
|
.widgetsDrawer-back-enter-active,
|
|
|
|
.widgetsDrawer-back-leave-active {
|
2021-04-10 05:40:50 +02:00
|
|
|
opacity: 1;
|
|
|
|
transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
|
}
|
2021-12-03 14:09:40 +01:00
|
|
|
.widgetsDrawer-back-enter-from,
|
|
|
|
.widgetsDrawer-back-leave-active {
|
2021-04-10 05:40:50 +02:00
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2021-12-03 14:09:40 +01:00
|
|
|
.menuDrawer-enter-active,
|
|
|
|
.menuDrawer-leave-active {
|
|
|
|
opacity: 1;
|
|
|
|
transform: translateX(0);
|
|
|
|
transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
|
}
|
|
|
|
.menuDrawer-enter-from,
|
|
|
|
.menuDrawer-leave-active {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateX(-240px);
|
|
|
|
}
|
|
|
|
|
|
|
|
.menuDrawer-back-enter-active,
|
|
|
|
.menuDrawer-back-leave-active {
|
|
|
|
opacity: 1;
|
|
|
|
transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
|
}
|
|
|
|
.menuDrawer-back-enter-from,
|
|
|
|
.menuDrawer-back-leave-active {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dkgtipfy {
|
2021-04-10 05:40:50 +02:00
|
|
|
$ui-font-size: 1em; // TODO: どこかに集約したい
|
|
|
|
$widgets-hide-threshold: 1090px;
|
|
|
|
|
|
|
|
// ほんとは単に 100vh と書きたいところだが... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
|
|
|
|
min-height: calc(var(--vh, 1vh) * 100);
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
&.wallpaper {
|
|
|
|
background: var(--wallpaperOverlay);
|
2021-08-11 15:34:45 +02:00
|
|
|
//backdrop-filter: var(--blur, blur(4px));
|
2021-04-10 05:40:50 +02:00
|
|
|
}
|
|
|
|
|
2021-08-16 08:21:58 +02:00
|
|
|
> .sidebar {
|
2021-11-30 15:08:34 +01:00
|
|
|
border-right: solid 0.5px var(--divider);
|
2021-08-16 08:21:58 +02:00
|
|
|
}
|
|
|
|
|
2021-04-10 05:40:50 +02:00
|
|
|
> .contents {
|
|
|
|
width: 100%;
|
|
|
|
min-width: 0;
|
2022-07-02 07:00:37 +02:00
|
|
|
background: var(--bg);
|
2021-04-10 05:40:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
> .widgets {
|
|
|
|
padding: 0 var(--margin);
|
2021-09-20 21:09:28 +02:00
|
|
|
border-left: solid 0.5px var(--divider);
|
|
|
|
background: var(--bg);
|
2021-04-10 05:40:50 +02:00
|
|
|
|
|
|
|
@media (max-width: $widgets-hide-threshold) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-03 14:09:40 +01:00
|
|
|
> .widgetsDrawer-back {
|
|
|
|
z-index: 1001;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .widgetsDrawer {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
z-index: 1001;
|
|
|
|
// ほんとは単に 100vh と書きたいところだが... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
|
|
|
|
height: calc(var(--vh, 1vh) * 100);
|
|
|
|
padding: var(--margin);
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: auto;
|
2021-12-03 14:22:08 +01:00
|
|
|
overscroll-behavior: contain;
|
2021-12-03 14:09:40 +01:00
|
|
|
background: var(--bg);
|
2021-04-10 05:40:50 +02:00
|
|
|
}
|
|
|
|
|
2022-08-19 02:10:07 +02:00
|
|
|
> .postButton, .widgetButton {
|
2022-08-19 01:48:22 +02:00
|
|
|
bottom: 6rem;
|
|
|
|
right: 1.5rem;
|
|
|
|
height: 4.5rem;
|
|
|
|
width: 4.5rem;
|
2022-08-19 02:05:30 +02:00
|
|
|
background-position: center;
|
2022-08-19 01:48:22 +02:00
|
|
|
background: var(--panelHighlight);
|
2022-08-19 02:05:30 +02:00
|
|
|
color: var(--fg);
|
2022-08-19 01:48:22 +02:00
|
|
|
position: fixed !important;
|
|
|
|
z-index: 1000;
|
|
|
|
font-size: 16px;
|
|
|
|
border-radius: 10px;
|
|
|
|
box-shadow: var(--shadow) 0px 0px 25px;
|
2022-08-19 02:05:30 +02:00
|
|
|
transition: background 0.6s;
|
2022-08-19 02:23:32 +02:00
|
|
|
transition: transform 0.3s;
|
|
|
|
|
|
|
|
> .isHidden {
|
|
|
|
transform: scale(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
> .isVisible {
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
2022-08-19 02:05:30 +02:00
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: var(--accentedBg);
|
|
|
|
background-size: 100%;
|
|
|
|
transition: background 0.1s;
|
|
|
|
}
|
2022-08-19 01:48:22 +02:00
|
|
|
}
|
|
|
|
|
2021-04-10 05:40:50 +02:00
|
|
|
> .buttons {
|
|
|
|
position: fixed;
|
|
|
|
z-index: 1000;
|
|
|
|
bottom: 0;
|
2021-12-03 14:09:40 +01:00
|
|
|
left: 0;
|
2022-08-16 03:43:17 +02:00
|
|
|
padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 12px) 12px;
|
2021-04-10 05:40:50 +02:00
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
2022-08-16 03:43:17 +02:00
|
|
|
background-color: var(--bg);
|
2021-04-10 05:40:50 +02:00
|
|
|
|
|
|
|
> .button {
|
|
|
|
position: relative;
|
|
|
|
flex: 1;
|
|
|
|
padding: 0;
|
|
|
|
margin: auto;
|
|
|
|
height: 64px;
|
|
|
|
border-radius: 8px;
|
|
|
|
background: var(--panel);
|
2022-08-16 09:00:36 +02:00
|
|
|
background-position: center;
|
|
|
|
transition: background 0.6s;
|
2021-04-10 05:40:50 +02:00
|
|
|
color: var(--fg);
|
|
|
|
|
2022-08-16 09:00:36 +02:00
|
|
|
&:active {
|
|
|
|
background-color: var(--accentedBg);
|
|
|
|
background-size: 100%;
|
2022-08-16 09:08:37 +02:00
|
|
|
transition: background 0.1s;
|
2022-08-16 09:00:36 +02:00
|
|
|
}
|
|
|
|
|
2021-04-10 05:40:50 +02:00
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 400px) {
|
|
|
|
height: 60px;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
}
|
2021-04-20 16:22:59 +02:00
|
|
|
> .indicator {
|
2021-04-10 05:40:50 +02:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
color: var(--indicator);
|
|
|
|
font-size: 16px;
|
|
|
|
animation: blink 1s infinite;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
> * {
|
2022-08-16 03:43:17 +02:00
|
|
|
font-size: 16px;
|
2021-04-10 05:40:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
cursor: default;
|
|
|
|
|
|
|
|
> * {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-03 14:09:40 +01:00
|
|
|
> .menuDrawer-back {
|
2021-04-10 05:40:50 +02:00
|
|
|
z-index: 1001;
|
|
|
|
}
|
|
|
|
|
2021-12-03 14:09:40 +01:00
|
|
|
> .menuDrawer {
|
2021-04-10 05:40:50 +02:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
2021-12-03 14:09:40 +01:00
|
|
|
left: 0;
|
2021-04-10 05:40:50 +02:00
|
|
|
z-index: 1001;
|
|
|
|
// ほんとは単に 100vh と書きたいところだが... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
|
|
|
|
height: calc(var(--vh, 1vh) * 100);
|
2021-12-03 14:09:40 +01:00
|
|
|
width: 240px;
|
2021-04-10 05:40:50 +02:00
|
|
|
box-sizing: border-box;
|
2022-07-15 15:09:05 +02:00
|
|
|
contain: strict;
|
2021-04-10 05:40:50 +02:00
|
|
|
overflow: auto;
|
2021-12-03 14:22:08 +01:00
|
|
|
overscroll-behavior: contain;
|
2022-07-15 15:09:05 +02:00
|
|
|
background: var(--navBg);
|
2021-04-10 05:40:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2022-07-03 07:40:02 +02:00
|
|
|
<style lang="scss" module>
|
|
|
|
.statusbars {
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.spacer {
|
|
|
|
$widgets-hide-threshold: 1090px;
|
|
|
|
|
|
|
|
height: calc(env(safe-area-inset-bottom, 0px) + 96px);
|
|
|
|
|
|
|
|
@media (min-width: ($widgets-hide-threshold + 1px)) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2021-04-10 05:40:50 +02:00
|
|
|
</style>
|