2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2021-04-10 03:40:50 +00:00
|
|
|
<template>
|
2023-05-30 06:18:08 +00:00
|
|
|
<div :class="$style.root">
|
2023-01-10 01:30:38 +00:00
|
|
|
<XSidebar v-if="!isMobile" :class="$style.sidebar"/>
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-05-31 09:03:43 +00:00
|
|
|
<MkStickyContainer ref="contents" :class="$style.contents" style="container-type: inline-size;" @contextmenu.stop="onContextmenu">
|
2022-07-03 05:40:02 +00:00
|
|
|
<template #header><XStatusBars :class="$style.statusbars"/></template>
|
2023-05-31 09:03:43 +00:00
|
|
|
<RouterView/>
|
|
|
|
<div :class="$style.spacer"></div>
|
2022-07-03 05:40:02 +00:00
|
|
|
</MkStickyContainer>
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-05-30 06:18:08 +00:00
|
|
|
<div v-if="isDesktop" :class="$style.widgets">
|
2023-05-30 06:23:21 +00:00
|
|
|
<XWidgets/>
|
2021-04-10 03:40:50 +00:00
|
|
|
</div>
|
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
<button v-if="!isDesktop && !isMobile" :class="$style.widgetButton" class="_button" @click="widgetsShowing = true"><i class="ti ti-apps"></i></button>
|
2021-12-03 13:09:40 +00:00
|
|
|
|
2023-03-02 09:40:43 +00:00
|
|
|
<div v-if="isMobile" ref="navFooter" :class="$style.nav">
|
2023-01-10 01:30:38 +00:00
|
|
|
<button :class="$style.navButton" class="_button" @click="drawerMenuShowing = true"><i :class="$style.navButtonIcon" class="ti ti-menu-2"></i><span v-if="menuIndicated" :class="$style.navButtonIndicator"><i class="_indicatorCircle"></i></span></button>
|
|
|
|
<button :class="$style.navButton" class="_button" @click="mainRouter.currentRoute.value.name === 'index' ? top() : mainRouter.push('/')"><i :class="$style.navButtonIcon" class="ti ti-home"></i></button>
|
|
|
|
<button :class="$style.navButton" class="_button" @click="mainRouter.push('/my/notifications')"><i :class="$style.navButtonIcon" class="ti ti-bell"></i><span v-if="$i?.hasUnreadNotification" :class="$style.navButtonIndicator"><i class="_indicatorCircle"></i></span></button>
|
|
|
|
<button :class="$style.navButton" class="_button" @click="widgetsShowing = true"><i :class="$style.navButtonIcon" class="ti ti-apps"></i></button>
|
2023-01-10 10:53:33 +00:00
|
|
|
<button :class="$style.postButton" class="_button" @click="os.post()"><i :class="$style.navButtonIcon" class="ti ti-pencil"></i></button>
|
2021-04-10 03:40:50 +00:00
|
|
|
</div>
|
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
<Transition
|
2023-05-19 11:52:15 +00:00
|
|
|
:enterActiveClass="defaultStore.state.animation ? $style.transition_menuDrawerBg_enterActive : ''"
|
|
|
|
:leaveActiveClass="defaultStore.state.animation ? $style.transition_menuDrawerBg_leaveActive : ''"
|
|
|
|
:enterFromClass="defaultStore.state.animation ? $style.transition_menuDrawerBg_enterFrom : ''"
|
|
|
|
:leaveToClass="defaultStore.state.animation ? $style.transition_menuDrawerBg_leaveTo : ''"
|
2023-01-10 02:15:29 +00:00
|
|
|
>
|
2022-06-20 08:38:49 +00:00
|
|
|
<div
|
|
|
|
v-if="drawerMenuShowing"
|
2023-01-10 01:30:38 +00:00
|
|
|
:class="$style.menuDrawerBg"
|
|
|
|
class="_modalBg"
|
2021-12-03 13:09:40 +00:00
|
|
|
@click="drawerMenuShowing = false"
|
|
|
|
@touchstart.passive="drawerMenuShowing = false"
|
|
|
|
></div>
|
2022-12-30 04:37:14 +00:00
|
|
|
</Transition>
|
2021-12-03 13:09:40 +00:00
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
<Transition
|
2023-05-19 11:52:15 +00:00
|
|
|
:enterActiveClass="defaultStore.state.animation ? $style.transition_menuDrawer_enterActive : ''"
|
|
|
|
:leaveActiveClass="defaultStore.state.animation ? $style.transition_menuDrawer_leaveActive : ''"
|
|
|
|
:enterFromClass="defaultStore.state.animation ? $style.transition_menuDrawer_enterFrom : ''"
|
|
|
|
:leaveToClass="defaultStore.state.animation ? $style.transition_menuDrawer_leaveTo : ''"
|
2023-01-10 02:15:29 +00:00
|
|
|
>
|
2023-01-10 11:17:08 +00:00
|
|
|
<div v-if="drawerMenuShowing" :class="$style.menuDrawer">
|
|
|
|
<XDrawerMenu/>
|
|
|
|
</div>
|
2022-12-30 04:37:14 +00:00
|
|
|
</Transition>
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
<Transition
|
2023-05-19 11:52:15 +00:00
|
|
|
:enterActiveClass="defaultStore.state.animation ? $style.transition_widgetsDrawerBg_enterActive : ''"
|
|
|
|
:leaveActiveClass="defaultStore.state.animation ? $style.transition_widgetsDrawerBg_leaveActive : ''"
|
|
|
|
:enterFromClass="defaultStore.state.animation ? $style.transition_widgetsDrawerBg_enterFrom : ''"
|
|
|
|
:leaveToClass="defaultStore.state.animation ? $style.transition_widgetsDrawerBg_leaveTo : ''"
|
2023-01-10 02:15:29 +00:00
|
|
|
>
|
2022-06-20 08:38:49 +00:00
|
|
|
<div
|
|
|
|
v-if="widgetsShowing"
|
2023-01-10 01:30:38 +00:00
|
|
|
:class="$style.widgetsDrawerBg"
|
|
|
|
class="_modalBg"
|
2021-04-10 03:40:50 +00:00
|
|
|
@click="widgetsShowing = false"
|
|
|
|
@touchstart.passive="widgetsShowing = false"
|
|
|
|
></div>
|
2022-12-30 04:37:14 +00:00
|
|
|
</Transition>
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
<Transition
|
2023-05-19 11:52:15 +00:00
|
|
|
:enterActiveClass="defaultStore.state.animation ? $style.transition_widgetsDrawer_enterActive : ''"
|
|
|
|
:leaveActiveClass="defaultStore.state.animation ? $style.transition_widgetsDrawer_leaveActive : ''"
|
|
|
|
:enterFromClass="defaultStore.state.animation ? $style.transition_widgetsDrawer_enterFrom : ''"
|
|
|
|
:leaveToClass="defaultStore.state.animation ? $style.transition_widgetsDrawer_leaveTo : ''"
|
2023-01-10 02:15:29 +00:00
|
|
|
>
|
|
|
|
<div v-if="widgetsShowing" :class="$style.widgetsDrawer">
|
2023-01-10 11:21:39 +00:00
|
|
|
<button class="_button" :class="$style.widgetsCloseButton" @click="widgetsShowing = false"><i class="ti ti-x"></i></button>
|
2023-01-10 02:15:29 +00:00
|
|
|
<XWidgets/>
|
|
|
|
</div>
|
2022-12-30 04:37:14 +00:00
|
|
|
</Transition>
|
2021-04-10 03:40:50 +00:00
|
|
|
|
|
|
|
<XCommon/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-02-01 14:48:19 +00:00
|
|
|
<script lang="ts" setup>
|
2023-05-31 09:03:43 +00:00
|
|
|
import { defineAsyncComponent, provide, onMounted, computed, ref, ComputedRef, watch, shallowRef, Ref } from 'vue';
|
2022-06-20 08:38:49 +00:00
|
|
|
import XCommon from './_common_/common.vue';
|
2023-05-31 09:03:43 +00:00
|
|
|
import type MkStickyContainer from '@/components/global/MkStickyContainer.vue';
|
2021-11-11 17:02:25 +00:00
|
|
|
import { instanceName } from '@/config';
|
2022-07-14 08:42:12 +00:00
|
|
|
import XDrawerMenu from '@/ui/_common_/navbar-for-mobile.vue';
|
2021-11-11 17:02:25 +00:00
|
|
|
import * as os from '@/os';
|
2021-12-03 13:09:40 +00:00
|
|
|
import { defaultStore } from '@/store';
|
2022-07-14 08:42:12 +00:00
|
|
|
import { navbarItemDef } from '@/navbar';
|
2021-12-03 13:09:40 +00:00
|
|
|
import { i18n } from '@/i18n';
|
2022-02-01 14:48:19 +00:00
|
|
|
import { $i } from '@/account';
|
2022-06-20 08:38:49 +00:00
|
|
|
import { mainRouter } from '@/router';
|
2023-02-16 14:09:41 +00:00
|
|
|
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
2022-07-24 09:44:50 +00:00
|
|
|
import { deviceKind } from '@/scripts/device-kind';
|
2023-01-07 01:13:02 +00:00
|
|
|
import { miLocalStorage } from '@/local-storage';
|
2023-03-02 09:40:43 +00:00
|
|
|
import { CURRENT_STICKY_BOTTOM } from '@/const';
|
2023-07-08 06:30:36 +00:00
|
|
|
import { useScrollPositionManager } from '@/nirax';
|
2023-05-31 09:03:43 +00:00
|
|
|
|
2022-02-01 14:48:19 +00:00
|
|
|
const XWidgets = defineAsyncComponent(() => import('./universal.widgets.vue'));
|
2022-07-14 08:42:12 +00:00
|
|
|
const XSidebar = defineAsyncComponent(() => import('@/ui/_common_/navbar.vue'));
|
2022-07-03 05:40:02 +00:00
|
|
|
const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue'));
|
2021-04-10 03:40:50 +00:00
|
|
|
|
|
|
|
const DESKTOP_THRESHOLD = 1100;
|
2021-12-03 13:09:40 +00:00
|
|
|
const MOBILE_THRESHOLD = 500;
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2022-07-24 09:44:50 +00:00
|
|
|
// デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない
|
2022-02-01 14:48:19 +00:00
|
|
|
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
2022-07-24 09:44:50 +00:00
|
|
|
const isMobile = ref(deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD);
|
2022-02-01 14:48:19 +00:00
|
|
|
window.addEventListener('resize', () => {
|
2022-07-24 09:44:50 +00:00
|
|
|
isMobile.value = deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD;
|
2022-02-01 14:48:19 +00:00
|
|
|
});
|
|
|
|
|
2022-06-20 08:38:49 +00:00
|
|
|
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
|
|
|
const widgetsShowing = $ref(false);
|
2023-03-02 09:40:43 +00:00
|
|
|
const navFooter = $shallowRef<HTMLElement>();
|
2023-05-31 09:03:43 +00:00
|
|
|
const contents = shallowRef<InstanceType<typeof MkStickyContainer>>();
|
2022-06-20 08:38:49 +00:00
|
|
|
|
|
|
|
provide('router', mainRouter);
|
|
|
|
provideMetadataReceiver((info) => {
|
|
|
|
pageMetadata = info;
|
|
|
|
if (pageMetadata.value) {
|
|
|
|
document.title = `${pageMetadata.value.title} | ${instanceName}`;
|
|
|
|
}
|
|
|
|
});
|
2022-02-01 14:48:19 +00:00
|
|
|
|
|
|
|
const menuIndicated = computed(() => {
|
2022-07-14 08:42:12 +00:00
|
|
|
for (const def in navbarItemDef) {
|
2022-02-01 14:48:19 +00:00
|
|
|
if (def === 'notifications') continue; // 通知は下にボタンとして表示されてるから
|
2022-07-14 08:42:12 +00:00
|
|
|
if (navbarItemDef[def].indicated) return true;
|
2022-02-01 14:48:19 +00:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
const drawerMenuShowing = ref(false);
|
|
|
|
|
2022-06-20 08:38:49 +00:00
|
|
|
mainRouter.on('change', () => {
|
2022-02-01 14:48:19 +00:00
|
|
|
drawerMenuShowing.value = false;
|
|
|
|
});
|
|
|
|
|
2023-01-27 04:52:51 +00:00
|
|
|
if (window.innerWidth > 1024) {
|
2023-02-09 08:36:16 +00:00
|
|
|
const tempUI = miLocalStorage.getItem('ui_temp');
|
2023-01-27 04:52:51 +00:00
|
|
|
if (tempUI) {
|
2023-02-09 08:36:16 +00:00
|
|
|
miLocalStorage.setItem('ui', tempUI);
|
|
|
|
miLocalStorage.removeItem('ui_temp');
|
2023-01-27 04:52:51 +00:00
|
|
|
location.reload();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-02 07:43:56 +00:00
|
|
|
defaultStore.loaded.then(() => {
|
2023-01-02 07:02:42 +00:00
|
|
|
if (defaultStore.state.widgets.length === 0) {
|
|
|
|
defaultStore.set('widgets', [{
|
|
|
|
name: 'calendar',
|
|
|
|
id: 'a', place: 'right', data: {},
|
|
|
|
}, {
|
|
|
|
name: 'notifications',
|
|
|
|
id: 'b', place: 'right', data: {},
|
|
|
|
}, {
|
|
|
|
name: 'trends',
|
|
|
|
id: 'c', place: 'right', data: {},
|
|
|
|
}]);
|
|
|
|
}
|
|
|
|
});
|
2022-02-01 14:48:19 +00:00
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
if (!isDesktop.value) {
|
2021-12-03 13:09:40 +00:00
|
|
|
window.addEventListener('resize', () => {
|
2022-02-01 14:48:19 +00:00
|
|
|
if (window.innerWidth >= DESKTOP_THRESHOLD) isDesktop.value = true;
|
|
|
|
}, { passive: true });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
const onContextmenu = (ev) => {
|
|
|
|
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 08:38:49 +00:00
|
|
|
const path = mainRouter.getCurrentPath();
|
2022-02-01 14:48:19 +00:00
|
|
|
os.contextMenu([{
|
|
|
|
type: 'label',
|
|
|
|
text: path,
|
|
|
|
}, {
|
2022-12-19 10:01:30 +00:00
|
|
|
icon: 'ti ti-window-maximize',
|
2022-02-01 14:48:19 +00:00
|
|
|
text: i18n.ts.openInWindow,
|
|
|
|
action: () => {
|
|
|
|
os.pageWindow(path);
|
2022-06-20 08:38:49 +00:00
|
|
|
},
|
2022-02-01 14:48:19 +00:00
|
|
|
}], ev);
|
|
|
|
};
|
|
|
|
|
|
|
|
function top() {
|
2023-05-31 09:03:43 +00:00
|
|
|
contents.value.rootEl.scrollTo({
|
|
|
|
top: 0,
|
|
|
|
behavior: 'smooth',
|
|
|
|
});
|
2022-02-01 14:48:19 +00:00
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-03-02 09:40:43 +00:00
|
|
|
let navFooterHeight = $ref(0);
|
|
|
|
provide<Ref<number>>(CURRENT_STICKY_BOTTOM, $$(navFooterHeight));
|
|
|
|
|
|
|
|
watch($$(navFooter), () => {
|
|
|
|
if (navFooter) {
|
|
|
|
navFooterHeight = navFooter.offsetHeight;
|
|
|
|
document.body.style.setProperty('--stickyBottom', `${navFooterHeight}px`);
|
2023-07-25 10:49:52 +00:00
|
|
|
document.body.style.setProperty('--minBottomSpacing', 'var(--minBottomSpacingMobile)');
|
2023-03-02 09:40:43 +00:00
|
|
|
} else {
|
|
|
|
navFooterHeight = 0;
|
|
|
|
document.body.style.setProperty('--stickyBottom', '0px');
|
2023-07-25 10:49:52 +00:00
|
|
|
document.body.style.setProperty('--minBottomSpacing', '0px');
|
2023-03-02 09:40:43 +00:00
|
|
|
}
|
|
|
|
}, {
|
|
|
|
immediate: true,
|
|
|
|
});
|
2023-07-08 06:30:36 +00:00
|
|
|
|
|
|
|
useScrollPositionManager(() => contents.value.rootEl, mainRouter);
|
2021-04-10 03:40:50 +00:00
|
|
|
</script>
|
|
|
|
|
2023-06-09 03:51:16 +00:00
|
|
|
<style>
|
|
|
|
html,
|
|
|
|
body {
|
2023-06-09 03:55:27 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
overflow: clip;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
overscroll-behavior: none;
|
2023-06-09 03:51:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#misskey_app {
|
2023-06-09 03:55:27 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
overflow: clip;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2023-06-09 03:51:16 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
<style lang="scss" module>
|
|
|
|
$ui-font-size: 1em; // TODO: どこかに集約したい
|
|
|
|
$widgets-hide-threshold: 1090px;
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
.transition_menuDrawerBg_enterActive,
|
|
|
|
.transition_menuDrawerBg_leaveActive {
|
2021-04-10 03:40:50 +00:00
|
|
|
opacity: 1;
|
|
|
|
transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
|
}
|
2023-01-10 02:15:29 +00:00
|
|
|
.transition_menuDrawerBg_enterFrom,
|
|
|
|
.transition_menuDrawerBg_leaveTo {
|
2021-04-10 03:40:50 +00:00
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
.transition_menuDrawer_enterActive,
|
|
|
|
.transition_menuDrawer_leaveActive {
|
2021-12-03 13:09:40 +00: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);
|
|
|
|
}
|
2023-01-10 02:15:29 +00:00
|
|
|
.transition_menuDrawer_enterFrom,
|
|
|
|
.transition_menuDrawer_leaveTo {
|
2021-12-03 13:09:40 +00:00
|
|
|
opacity: 0;
|
|
|
|
transform: translateX(-240px);
|
|
|
|
}
|
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
.transition_widgetsDrawerBg_enterActive,
|
|
|
|
.transition_widgetsDrawerBg_leaveActive {
|
2021-12-03 13:09:40 +00:00
|
|
|
opacity: 1;
|
|
|
|
transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
|
}
|
2023-01-10 02:15:29 +00:00
|
|
|
.transition_widgetsDrawerBg_enterFrom,
|
|
|
|
.transition_widgetsDrawerBg_leaveTo {
|
2021-12-03 13:09:40 +00:00
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2023-01-10 02:15:29 +00:00
|
|
|
.transition_widgetsDrawer_enterActive,
|
|
|
|
.transition_widgetsDrawer_leaveActive {
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
.transition_widgetsDrawer_enterFrom,
|
|
|
|
.transition_widgetsDrawer_leaveTo {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateX(240px);
|
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.root {
|
2023-05-30 06:18:08 +00:00
|
|
|
height: 100dvh;
|
|
|
|
overflow: clip;
|
2023-06-01 04:50:13 +00:00
|
|
|
contain: strict;
|
2021-04-10 03:40:50 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
2023-01-10 01:30:38 +00:00
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.sidebar {
|
|
|
|
border-right: solid 0.5px var(--divider);
|
|
|
|
}
|
2021-08-16 06:21:58 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.contents {
|
2023-05-30 06:18:08 +00:00
|
|
|
flex: 1;
|
|
|
|
height: 100%;
|
2023-01-10 01:30:38 +00:00
|
|
|
min-width: 0;
|
2023-05-30 06:18:08 +00:00
|
|
|
overflow: auto;
|
|
|
|
overflow-y: scroll;
|
2023-05-31 03:24:00 +00:00
|
|
|
overscroll-behavior: contain;
|
2023-01-10 01:30:38 +00:00
|
|
|
background: var(--bg);
|
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.widgets {
|
2023-05-30 06:18:08 +00:00
|
|
|
width: 350px;
|
|
|
|
height: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: auto;
|
|
|
|
padding: var(--margin) var(--margin) calc(var(--margin) + env(safe-area-inset-bottom, 0px));
|
2023-01-10 01:30:38 +00:00
|
|
|
border-left: solid 0.5px var(--divider);
|
|
|
|
background: var(--bg);
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
@media (max-width: $widgets-hide-threshold) {
|
|
|
|
display: none;
|
2021-04-10 03:40:50 +00:00
|
|
|
}
|
2023-01-10 01:30:38 +00:00
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.widgetButton {
|
|
|
|
display: block;
|
|
|
|
position: fixed;
|
|
|
|
z-index: 1000;
|
|
|
|
bottom: 32px;
|
|
|
|
right: 32px;
|
|
|
|
width: 64px;
|
|
|
|
height: 64px;
|
|
|
|
border-radius: 100%;
|
|
|
|
box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);
|
|
|
|
font-size: 22px;
|
|
|
|
background: var(--panel);
|
|
|
|
}
|
2021-12-03 13:09:40 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.widgetsDrawerBg {
|
|
|
|
z-index: 1001;
|
|
|
|
}
|
|
|
|
|
|
|
|
.widgetsDrawer {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
z-index: 1001;
|
2023-05-31 23:54:37 +00:00
|
|
|
width: 310px;
|
2023-01-10 01:30:38 +00:00
|
|
|
height: 100dvh;
|
2023-04-10 17:11:44 +00:00
|
|
|
padding: var(--margin) var(--margin) calc(var(--margin) + env(safe-area-inset-bottom, 0px)) !important;
|
2023-01-10 01:30:38 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: auto;
|
|
|
|
overscroll-behavior: contain;
|
|
|
|
background: var(--bg);
|
|
|
|
}
|
2021-12-03 13:09:40 +00:00
|
|
|
|
2023-01-10 11:21:39 +00:00
|
|
|
.widgetsCloseButton {
|
|
|
|
padding: 8px;
|
|
|
|
display: block;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: 370px) {
|
|
|
|
.widgetsCloseButton {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.nav {
|
|
|
|
position: fixed;
|
|
|
|
z-index: 1000;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
padding: 12px 12px max(12px, env(safe-area-inset-bottom, 0px)) 12px;
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
|
|
grid-gap: 8px;
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
2023-03-02 09:40:43 +00:00
|
|
|
-webkit-backdrop-filter: var(--blur, blur(24px));
|
|
|
|
backdrop-filter: var(--blur, blur(24px));
|
2023-01-10 01:30:38 +00:00
|
|
|
background-color: var(--header);
|
|
|
|
border-top: solid 0.5px var(--divider);
|
|
|
|
}
|
|
|
|
|
|
|
|
.navButton {
|
|
|
|
position: relative;
|
|
|
|
padding: 0;
|
|
|
|
aspect-ratio: 1;
|
|
|
|
width: 100%;
|
|
|
|
max-width: 60px;
|
|
|
|
margin: auto;
|
|
|
|
border-radius: 100%;
|
|
|
|
background: var(--panel);
|
|
|
|
color: var(--fg);
|
|
|
|
|
|
|
|
&:hover {
|
2023-01-10 10:52:44 +00:00
|
|
|
background: var(--panelHighlight);
|
2021-04-10 03:40:50 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 10:52:44 +00:00
|
|
|
&:active {
|
|
|
|
background: var(--X2);
|
2021-04-10 03:40:50 +00:00
|
|
|
}
|
2023-01-10 07:26:51 +00:00
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 07:26:51 +00:00
|
|
|
.postButton {
|
2023-01-10 10:53:33 +00:00
|
|
|
composes: navButton;
|
2023-01-10 07:26:51 +00:00
|
|
|
background: linear-gradient(90deg, var(--buttonGradateA), var(--buttonGradateB));
|
|
|
|
color: var(--fgOnAccent);
|
2023-01-10 10:52:44 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background: linear-gradient(90deg, var(--X8), var(--X8));
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background: linear-gradient(90deg, var(--X8), var(--X8));
|
|
|
|
}
|
2023-01-10 01:30:38 +00:00
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
|
2023-01-10 01:30:38 +00:00
|
|
|
.navButtonIcon {
|
|
|
|
font-size: 18px;
|
2023-01-13 04:24:38 +00:00
|
|
|
vertical-align: middle;
|
2023-01-10 01:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.navButtonIndicator {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
color: var(--indicator);
|
|
|
|
font-size: 16px;
|
|
|
|
animation: blink 1s infinite;
|
|
|
|
}
|
|
|
|
|
|
|
|
.menuDrawerBg {
|
|
|
|
z-index: 1001;
|
|
|
|
}
|
|
|
|
|
|
|
|
.menuDrawer {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 1001;
|
|
|
|
height: 100dvh;
|
|
|
|
width: 240px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
contain: strict;
|
|
|
|
overflow: auto;
|
|
|
|
overscroll-behavior: contain;
|
|
|
|
background: var(--navBg);
|
2021-04-10 03:40:50 +00:00
|
|
|
}
|
|
|
|
|
2022-07-03 05:40:02 +00:00
|
|
|
.statusbars {
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.spacer {
|
2023-01-10 04:50:34 +00:00
|
|
|
height: calc(var(--minBottomSpacing));
|
2022-07-03 05:40:02 +00:00
|
|
|
}
|
2021-04-10 03:40:50 +00:00
|
|
|
</style>
|