fix: note width. TODO: sync NOTE_WIDTH js constant to css variable --note-width

This commit is contained in:
Julien Calixte
2026-02-15 08:40:58 +01:00
parent 8c0e5d5ebd
commit b03626bb1a
3 changed files with 5 additions and 4 deletions

View File

@@ -1 +1 @@
export const NOTE_WIDTH = 620
export const NOTE_WIDTH = 480

View File

@@ -28,11 +28,12 @@ export const useNoteOverlay = (
const { stackedNotes } = useRouteQueryStackedNotes()
const noteElement = document.querySelector(
`.${className}`,
) as HTMLElement | null
) satisfies HTMLElement | null
if (!noteElement) {
return
}
noteHeight.value = noteElement.clientHeight
if (isMobile.value) {
@@ -42,7 +43,7 @@ export const useNoteOverlay = (
const stackedNoteContainers = document.querySelectorAll(
".stacked-note",
) as NodeListOf<HTMLElement>
) satisfies NodeListOf<HTMLElement>
stackedNoteContainers.forEach((stackedNote, ind) => {
stackedNote.style.right = `calc(-${NOTE_WIDTH}px + ${

View File

@@ -44,6 +44,7 @@ const getAlias = (did: string) =>
<template>
<main class="public-note-list-view">
<h1>Remanso notes</h1>
<back-button class="back-button" />
<div v-if="isLoading"></div>
<div v-else>
<ul
@@ -76,7 +77,6 @@ const getAlias = (did: string) =>
</li>
</ul>
</div>
<BackButton class="back-button" />
</main>
</template>