fix(explore): rework metadata box allignment

The box with username, and last edit is now always 12 rem wide and looks more even that way

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares
2026-04-29 20:31:00 +02:00
committed by Erik Michelson
parent 8729fb207b
commit 98db62f196
2 changed files with 13 additions and 2 deletions
@@ -0,0 +1,10 @@
/*
* SPDX-FileCopyrightText: 2026 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
.metadata-box {
width: 12rem;
margin-inline-end: 1rem;
}
@@ -21,6 +21,7 @@ import type { NoteExploreEntryInterface } from '@hedgedoc/commons'
import { useTranslatedText } from '../../../../hooks/common/use-translated-text'
import { Trans, useTranslation } from 'react-i18next'
import { PinNoteMenuEntry } from './pin-note-menu-entry'
import styles from './note-entry.module.css'
interface NoteListEntryProps extends NoteExploreEntryInterface {
isPinned: boolean
@@ -94,10 +95,10 @@ export const NoteListEntry: React.FC<NoteListEntryProps> = ({
{tags.length > 0 && <br />}
<NoteTags tags={tags} />
</div>
<div className={'me-4'}>
<div className={styles['metadata-box']}>
<UserAvatarForUsername username={owner} />
<br />
<small className={'text-muted float-end'}>
<small className={'text-muted'}>
<Trans i18nKey={relativeTime.key} values={{ timeAgo: relativeTime.value }} />
</small>
</div>