design: better list

This commit is contained in:
Julien Calixte
2026-02-13 23:54:56 +01:00
parent 1baa9794ba
commit 7ab4d64dea
2 changed files with 29 additions and 14 deletions

View File

@@ -31,17 +31,15 @@ const getAlias = (did: string) => aka.value.get(did) ?? ""
<ul class="list rounded-box shadow-sm"> <ul class="list rounded-box shadow-sm">
<li v-for="note in state.notes" class="list-row"> <li v-for="note in state.notes" class="list-row">
<div class="list-col"> <div class="list-col">
<div> <router-link
<router-link :to="{
:to="{ name: 'PublicNoteView',
name: 'PublicNoteView', params: { did: note.did, rkey: note.rkey },
params: { did: note.did, rkey: note.rkey }, }"
}" class="btn btn-link"
class="btn btn-link" >{{ note.title }}</router-link
>{{ note.title }}</router-link >
> <div class="text-xs opacity-80 alias">
</div>
<div class="text-xs uppercase font-semibold opacity-60">
<span v-if="getAlias(note.did)"> <span v-if="getAlias(note.did)">
{{ getAlias(note.did) }} {{ getAlias(note.did) }}
</span> </span>
@@ -87,10 +85,28 @@ const getAlias = (did: string) => aka.value.get(did) ?? ""
margin-top: 1rem; margin-top: 1rem;
} }
a { a.back-button {
display: flex; display: flex;
gap: 0.5rem; gap: 0.5rem;
align-items: center; align-items: center;
} }
li {
display: flex;
.list-col {
display: flex;
flex-direction: column;
flex: 1;
}
a {
text-align: left;
}
.alias {
text-align: right;
}
}
} }
</style> </style>

View File

@@ -70,6 +70,7 @@ const content = computed(() =>
>{{ title }}</a >{{ title }}</a
> >
</div> </div>
<span class="badge badge-accent">{{ alias }}</span>
<article v-html="content"></article> <article v-html="content"></article>
</div> </div>
</div> </div>
@@ -118,12 +119,10 @@ const content = computed(() =>
} }
.note { .note {
position: sticky;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: auto; overflow-y: auto;
height: 100vh; height: 100vh;
position: sticky;
.title { .title {
text-align: left; text-align: left;