add top guilds
This commit is contained in:
parent
a13c7cbc22
commit
55455c1693
6 changed files with 82 additions and 34 deletions
10
src/lib/HomeMenu.svelte
Normal file
10
src/lib/HomeMenu.svelte
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<script lang="ts">
|
||||
import { RiHome2Line } from 'svelte-remixicon';
|
||||
|
||||
</script>
|
||||
|
||||
<ul class="column">
|
||||
<li>
|
||||
<a href="/"><RiHome2Line /> Home</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { browser } from "$app/environment";
|
||||
import { getMe } from "$lib/globals.svelte";
|
||||
import AsideCard from "./AsideCard.svelte";
|
||||
import { RiCake2Line, RiCakeLine, RiInfoCardLine, RiShieldStarLine } from 'svelte-remixicon';
|
||||
import { RiCake2Line, RiCakeLine, RiFlowerLine, RiInfoCardLine, RiShieldStarLine } from 'svelte-remixicon';
|
||||
import { DateTime } from 'luxon';
|
||||
import type { UserEntry } from "./backend";
|
||||
|
||||
|
|
@ -24,6 +24,9 @@ let { badges = [] } = user;
|
|||
{#if user.joined_at}
|
||||
<li><RiCakeLine /> Cake day: {DateTime.fromISO(user.joined_at).toFormat('d LLL yyyy')}</li>
|
||||
{/if}
|
||||
{#if user.id === getMe()?.id && user.karma}
|
||||
<li><RiFlowerLine /> {user.karma} karma</li>
|
||||
{/if}
|
||||
{#if badges.indexOf('administrator') >= 0}
|
||||
<li><RiShieldStarLine /> Administrator</li>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ export type GuildEntry = {
|
|||
name: string,
|
||||
display_name?: string,
|
||||
description?: string,
|
||||
created_at?: string
|
||||
created_at?: string,
|
||||
subscriber_count?: number,
|
||||
post_count?: number
|
||||
};
|
||||
|
||||
export type PostEntry = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue