tweak ui
This commit is contained in:
parent
b3779875d0
commit
27c056cbbf
38 changed files with 753 additions and 625 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="mk-app" :class="{ wallpaper, isMobile }" :style="`--headerHeight:` + headerHeight + 'px'">
|
||||
<XHeaderMenu v-if="showMenuOnTop"/>
|
||||
<div class="mk-app" :class="{ wallpaper, isMobile }" :style="`--globalHeaderHeight:${globalHeaderHeight}px`">
|
||||
<XHeaderMenu v-if="showMenuOnTop" v-get-size="(w, h) => globalHeaderHeight = h"/>
|
||||
|
||||
<div class="columns" :class="{ fullView, withGlobalHeader: showMenuOnTop }">
|
||||
<template v-if="!isMobile">
|
||||
|
|
@ -13,9 +13,6 @@
|
|||
</template>
|
||||
|
||||
<main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }">
|
||||
<header class="header" @click="onHeaderClick">
|
||||
<XHeader :info="pageInfo" v-get-size="(w, h) => headerHeight = h" :thin="true"/>
|
||||
</header>
|
||||
<div class="content" :class="{ _flat_: !fullView }">
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
|
||||
|
|
@ -67,7 +64,6 @@ import { StickySidebar } from '@client/scripts/sticky-sidebar';
|
|||
import XSidebar from './default.sidebar.vue';
|
||||
import XDrawerSidebar from '@client/ui/_common_/sidebar.vue';
|
||||
import XCommon from './_common_/common.vue';
|
||||
import XHeader from './_common_/header.vue';
|
||||
import * as os from '@client/os';
|
||||
import { menuDef } from '@client/menu';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
|
@ -80,7 +76,6 @@ export default defineComponent({
|
|||
XCommon,
|
||||
XSidebar,
|
||||
XDrawerSidebar,
|
||||
XHeader,
|
||||
XHeaderMenu: defineAsyncComponent(() => import('./default.header.vue')),
|
||||
XWidgets: defineAsyncComponent(() => import('./default.widgets.vue')),
|
||||
},
|
||||
|
|
@ -88,8 +83,8 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
pageInfo: null,
|
||||
headerHeight: 0,
|
||||
menuDef: menuDef,
|
||||
globalHeaderHeight: 0,
|
||||
isMobile: window.innerWidth <= MOBILE_THRESHOLD,
|
||||
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
||||
widgetsShowing: false,
|
||||
|
|
@ -194,10 +189,6 @@ export default defineComponent({
|
|||
if (window._scroll) window._scroll();
|
||||
},
|
||||
|
||||
onHeaderClick() {
|
||||
window.scroll({ top: 0, behavior: 'smooth' });
|
||||
},
|
||||
|
||||
onContextmenu(e) {
|
||||
const isLink = (el: HTMLElement) => {
|
||||
if (el.tagName === 'A') return true;
|
||||
|
|
@ -282,10 +273,6 @@ export default defineComponent({
|
|||
border: none;
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
|
||||
> .header {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -325,29 +312,6 @@ export default defineComponent({
|
|||
border-radius: 0;
|
||||
overflow: clip;
|
||||
--margin: 12px;
|
||||
|
||||
> .header {
|
||||
position: sticky;
|
||||
z-index: 1000;
|
||||
top: var(--globalHeaderHeight, 0px);
|
||||
-webkit-backdrop-filter: var(--blur, blur(32px));
|
||||
backdrop-filter: var(--blur, blur(32px));
|
||||
background-color: var(--header);
|
||||
border-bottom: solid 0.5px var(--divider);
|
||||
}
|
||||
|
||||
> .content {
|
||||
--stickyTop: calc(var(--globalHeaderHeight, 0px) + var(--headerHeight));
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
padding-top: var(--headerHeight);
|
||||
|
||||
> .header {
|
||||
position: fixed;
|
||||
width: calc(100% - #{$nav-icon-only-width});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .widgets {
|
||||
|
|
@ -369,12 +333,11 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
&.withGlobalHeader {
|
||||
--globalHeaderHeight: 60px; // TODO: 60pxと決め打ちしているのを直す
|
||||
|
||||
> .main {
|
||||
margin-top: 0;
|
||||
border: solid 1px var(--divider);
|
||||
border-radius: var(--radius);
|
||||
--stickyTop: var(--globalHeaderHeight);
|
||||
}
|
||||
|
||||
> .widgets {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue