feat [1/2]: add topics & feeds listing
This commit is contained in:
1 parent
1a948281a8
commit
5ed8346027
22 files changed
+426
-124
No files matched your search
@@ -18,7 +18,7 @@
|
||||
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
{#if customIcon}{@render customIcon()}{:else}
|
||||
<Avatar url={icon} width={32} />
|
||||
<Avatar url={icon} width={32} alt={name} circle={false} />
|
||||
{/if}
|
||||
<div class="flex flex-col">
|
||||
<span class="font-semibold text-base">{name}</span>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
interface Props {
|
||||
label: string
|
||||
content: string
|
||||
content: string | number
|
||||
formatted?: boolean
|
||||
labelClass?: string
|
||||
contentClass?: string
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte'
|
||||
import Avatar from '../Avatar.svelte'
|
||||
|
||||
interface Props {
|
||||
href?: string
|
||||
icon?: string
|
||||
title: string
|
||||
detail?: string
|
||||
children?: Snippet
|
||||
}
|
||||
|
||||
let { href, icon, title, detail, children }: Props = $props()
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<Avatar url={icon} alt={title} width={detail ? 32 : 24} circle={false} />
|
||||
<a class="flex-1 flex flex-col group" {href}>
|
||||
<h3
|
||||
class="font-medium text-base overflow-hidden text-ellipsis leading-5 group-hover:underline"
|
||||
>
|
||||
{title}
|
||||
</h3>
|
||||
<p class="text-sm text-slate-600 dark:text-zinc-400">
|
||||
{detail}
|
||||
</p>
|
||||
</a>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
@@ -70,23 +70,21 @@
|
||||
&:hover {
|
||||
background-color: var(--color-slate-25);
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.xs) {
|
||||
padding-block: calc(var(--spacing) * 3);
|
||||
padding-inline: calc(var(--spacing) * 3.5);
|
||||
}
|
||||
ul > :global(li:not(.xs) > *) {
|
||||
padding-block: calc(var(--spacing) * 3);
|
||||
padding-inline: calc(var(--spacing) * 3.5);
|
||||
|
||||
@media screen and (min-width: 40rem) {
|
||||
&:not(.xs) {
|
||||
padding-block: calc(var(--spacing) * 3);
|
||||
padding-inline: calc(var(--spacing) * 4);
|
||||
}
|
||||
padding-block: calc(var(--spacing) * 3);
|
||||
padding-inline: calc(var(--spacing) * 4);
|
||||
}
|
||||
}
|
||||
|
||||
.xs {
|
||||
padding-block: calc(var(--spacing) * 0.5);
|
||||
padding-block: calc(var(--spacing) * 1);
|
||||
}
|
||||
ul > :global(li.xs > *) {
|
||||
padding-block: calc(var(--spacing) * 0.5);
|
||||
padding-block: calc(var(--spacing) * 1);
|
||||
}
|
||||
|
||||
ul > :global(li).selected {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { navigating } from '$app/state'
|
||||
import { navigating, page } from '$app/state'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { Button, TextInput } from 'mono-svelte'
|
||||
import { MagnifyingGlass } from 'svelte-hero-icons'
|
||||
@@ -29,7 +29,7 @@
|
||||
class="shrink-0 h-full aspect-square shadow-md"
|
||||
title="Search"
|
||||
rounding="pill"
|
||||
loading={navigating.to?.route.id == '/search'}
|
||||
loading={navigating.to?.route.id == page.url.pathname}
|
||||
icon={MagnifyingGlass}
|
||||
></Button>
|
||||
</div>
|
||||
Reference in new issue
Block a user