docs: use sticky instead of fixed menu
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app">
|
<div class="app">
|
||||||
<div class="app__navigation">
|
<banner-message
|
||||||
<banner-message
|
to="https://www.tiptap.dev/"
|
||||||
to="https://www.tiptap.dev/"
|
v-if="$route.name === 'home'"
|
||||||
v-if="$route.name === 'home'"
|
color="black"
|
||||||
color="black"
|
>
|
||||||
>
|
You’re browsing the documentation for v2.x. Click here for v1.x documentation →
|
||||||
You’re browsing the documentation for v2.x. Click here for v1.x documentation →
|
</banner-message>
|
||||||
</banner-message>
|
|
||||||
|
|
||||||
|
<div class="app__navigation">
|
||||||
<div class="app__top-bar">
|
<div class="app__top-bar">
|
||||||
<g-link class="app__logo" to="/">
|
<g-link class="app__logo" to="/">
|
||||||
<img src="~@/assets/images/logo.svg">
|
<img src="~@/assets/images/logo.svg">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ $menuBreakPoint: 800px;
|
|||||||
|
|
||||||
.app {
|
.app {
|
||||||
&__navigation {
|
&__navigation {
|
||||||
position: fixed;
|
position: sticky;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@@ -43,6 +43,10 @@ $menuBreakPoint: 800px;
|
|||||||
&__menu {
|
&__menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
> .vue-portal-target {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__menu-item {
|
&__menu-item {
|
||||||
@@ -139,15 +143,14 @@ $menuBreakPoint: 800px;
|
|||||||
width: 20rem;
|
width: 20rem;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: $navHeight;
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
padding-top: $navHeight + 2rem;
|
padding-top: 2rem;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
overscroll-behavior: contain;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +165,6 @@ $menuBreakPoint: 800px;
|
|||||||
&__main {
|
&__main {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding-top: $navHeight;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user