Skip to content

Commit

Permalink
fix: ⚡ Optimize rendering a little
Browse files Browse the repository at this point in the history
  • Loading branch information
CPlusPatch committed Apr 29, 2024
1 parent 55ca97e commit ccd2307
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/social-elements/instance/Presentation.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div class="flex flex-col p-10 gap-4">
<div class="flex flex-col p-10 gap-4 h-full">
<div
class="aspect-video shrink-0 w-full rounded ring-white/5 bg-dark-800 shadow overflow-hidden ring-1 hover:ring-2 duration-100">
<img class="object-cover w-full h-full duration-150 hover:scale-[102%] ease-in-out" v-if="instance?.banner"
alt="Instance banner" :src="instance.banner" />
</div>

<div class="prose prose-invert prose-sm">
<h2 class="text-center mb-10">{{ instance?.title }}</h2>
<h1 class="text-center mb-10 mt-5">{{ instance?.title }}</h1>
<div v-html="description?.content"></div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions components/social-elements/notes/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div v-if="small" class="flex flex-row">
<Skeleton :enabled="!note" shape="rect" class="!h-6 w-6">
<NuxtLink :href="accountUrl">
<img class="h-6 w-6 rounded ring-1 ring-white/5" :src="note?.account.avatar"
<img class="h-6 w-6 rounded ring-1 ring-white/5 shrink-0" :src="note?.account.avatar"
:alt="`${note?.account.acct}'s avatar`" />
</NuxtLink>
</Skeleton>
Expand Down Expand Up @@ -46,7 +46,7 @@
<span class="text-gray-400 text-sm line-clamp-1 break-all w-full">
<Skeleton :enabled="!note" :min-width="130" :max-width="250" shape="rect">
@{{
note?.account.acct
note?.account.acct
}}
</Skeleton>
</span>
Expand Down
2 changes: 1 addition & 1 deletion components/social-elements/notes/note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
<SocialElementsNotesHeader :note="note" :small="small" />
<div v-if="!collapsed">
<NuxtLink :href="url" class="mt-6 block relative">
<NuxtLink :href="url" class="mt-6 block relative" aria-label="Link to note">
<Skeleton :enabled="!props.note || !loaded" :min-width="50" :max-width="100" width-unit="%" shape="rect"
type="content">
<div v-if="content"
Expand Down

0 comments on commit ccd2307

Please sign in to comment.