💄 (stacked note) titles are now sticky

This commit is contained in:
Julien Calixte
2021-03-14 23:20:41 +01:00
parent 28c810a7db
commit 2aff45ada5
3 changed files with 10 additions and 7 deletions

View File

@@ -60,25 +60,28 @@ export default defineComponent({
$border-color: rgba(18, 19, 58, 0.2);
.stacked-note {
padding: 1rem 3rem;
padding: 1rem 1.5rem;
transition: cubic-bezier(0.39, 0.575, 0.565, 1) 0.3s;
&.overlay {
box-shadow: -3px 0 0.4em $border-color;
}
section {
padding: 0 1rem;
}
}
.title-stacked-note {
position: absolute;
position: sticky;
transform-origin: 0 0;
transform: rotate(90deg);
top: 1rem;
left: 1.5rem;
direction: rtl;
top: 0;
a {
color: #363636;
display: block;
}
}

View File

@@ -3,7 +3,7 @@ import { computed, onMounted } from '@vue/runtime-core'
import { useOverlay } from '@/hooks/useOverlay.hook'
import { NOTE_WIDTH } from '@/constants/note-width'
const BOOKMARK_WIDTH = 2
const BOOKMARK_WIDTH = 1.5
export const useNoteOverlay = (className: string, index: number) => {
const { x } = useOverlay()

View File

@@ -79,7 +79,7 @@ export default defineComponent({
.readme {
position: sticky;
left: 0;
padding: 0 2rem 1rem;
padding: 0 1.5rem 1rem;
}
.note {