mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-30 22:47:41 +08:00
feat: page layout
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<MenuComponent :visible="menuVisible" />
|
<MenuComponent :visible="menuVisible" />
|
||||||
<div class="content" :class="{ 'with-menu': menuVisible }">
|
<div class="content">
|
||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,16 +26,13 @@ export default {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.content {
|
.content {
|
||||||
transition: margin-left 0.3s ease;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-container {
|
.main-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
max-width: var(--page-max-width);
|
max-width: var(--page-max-width);
|
||||||
margin-left: auto;
|
margin: 0 auto;
|
||||||
margin-right: auto;
|
|
||||||
background-color: var(--normal-background-color);
|
background-color: var(--normal-background-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,13 +24,22 @@ export default {
|
|||||||
.menu {
|
.menu {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
background-color: var(--menu-background-color);
|
background-color: var(--menu-background-color);
|
||||||
overflow-y: auto;
|
|
||||||
height: calc(100vh - var(--header-height));
|
height: calc(100vh - var(--header-height));
|
||||||
}
|
}
|
||||||
.slide-enter-active, .slide-leave-active {
|
.slide-enter-active, .slide-leave-active {
|
||||||
transition: transform 0.3s ease;
|
transition:
|
||||||
|
transform 0.3s ease,
|
||||||
|
opacity 0.3s ease,
|
||||||
|
width 0.3s ease;
|
||||||
}
|
}
|
||||||
.slide-enter-from, .slide-leave-to {
|
.slide-enter-from, .slide-leave-to {
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
.slide-enter-to, .slide-leave-from {
|
||||||
|
transform: translateX(0);
|
||||||
|
opacity: 1;
|
||||||
|
width: 200px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home-page">
|
<div class="home-page">
|
||||||
<h1>Home Page</h1>
|
hello?
|
||||||
<p>Welcome to OpenIsle</p>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -15,5 +14,6 @@ export default {
|
|||||||
.home-page {
|
.home-page {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: black;
|
color: black;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user