show child descriptions

This commit is contained in:
Yisroel Baum 2026-05-26 21:15:51 +03:00
parent 90328d98c7
commit 7c65c3b8c6
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 23 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import { defineStore } from 'pinia'
export interface Element {
id: number
title: string
description: string
}
interface ElementResponse {

View file

@ -65,7 +65,15 @@ watch(
class="element-page__child-link"
data-cy="child-element-link"
>
<span class="element-page__child-title">
{{ childElement.title }}
</span>
<span
v-if="childElement.description !== ''"
class="element-page__child-description"
>
{{ childElement.description }}
</span>
</RouterLink>
</li>
</ul>
@ -131,6 +139,19 @@ watch(
transform 180ms ease;
}
.element-page__child-title {
display: block;
}
.element-page__child-description {
display: block;
margin-top: 0.4rem;
color: var(--color-text-muted);
font-family: var(--font-sans);
font-size: 0.95rem;
line-height: 1.45;
}
.element-page__child-link:hover,
.element-page__child-link:focus-visible {
border-color: #d4ad5f;