fix: note width. TODO: sync NOTE_WIDTH js constant to css variable --note-width
This commit is contained in:
@@ -1 +1 @@
|
|||||||
export const NOTE_WIDTH = 620
|
export const NOTE_WIDTH = 480
|
||||||
|
|||||||
@@ -28,11 +28,12 @@ export const useNoteOverlay = (
|
|||||||
const { stackedNotes } = useRouteQueryStackedNotes()
|
const { stackedNotes } = useRouteQueryStackedNotes()
|
||||||
const noteElement = document.querySelector(
|
const noteElement = document.querySelector(
|
||||||
`.${className}`,
|
`.${className}`,
|
||||||
) as HTMLElement | null
|
) satisfies HTMLElement | null
|
||||||
|
|
||||||
if (!noteElement) {
|
if (!noteElement) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
noteHeight.value = noteElement.clientHeight
|
noteHeight.value = noteElement.clientHeight
|
||||||
|
|
||||||
if (isMobile.value) {
|
if (isMobile.value) {
|
||||||
@@ -42,7 +43,7 @@ export const useNoteOverlay = (
|
|||||||
|
|
||||||
const stackedNoteContainers = document.querySelectorAll(
|
const stackedNoteContainers = document.querySelectorAll(
|
||||||
".stacked-note",
|
".stacked-note",
|
||||||
) as NodeListOf<HTMLElement>
|
) satisfies NodeListOf<HTMLElement>
|
||||||
|
|
||||||
stackedNoteContainers.forEach((stackedNote, ind) => {
|
stackedNoteContainers.forEach((stackedNote, ind) => {
|
||||||
stackedNote.style.right = `calc(-${NOTE_WIDTH}px + ${
|
stackedNote.style.right = `calc(-${NOTE_WIDTH}px + ${
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ const getAlias = (did: string) =>
|
|||||||
<template>
|
<template>
|
||||||
<main class="public-note-list-view">
|
<main class="public-note-list-view">
|
||||||
<h1>Remanso notes</h1>
|
<h1>Remanso notes</h1>
|
||||||
|
<back-button class="back-button" />
|
||||||
<div v-if="isLoading"></div>
|
<div v-if="isLoading"></div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<ul
|
<ul
|
||||||
@@ -76,7 +77,6 @@ const getAlias = (did: string) =>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<BackButton class="back-button" />
|
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user