Skip to content

Commit

Permalink
Pull profile picture from Directus
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfy committed Oct 30, 2024
1 parent 98ce25c commit f22cc4d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/+layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { readItems } from '@directus/sdk';
export async function load({ fetch }) {
const directus = getDirectusInstance(fetch);
return {
config: await directus.request(readItems('config', { fields: ["banner_enabled", "banner_content", "sshkey"] }))
config: await directus.request(readItems('config', { fields: ["banner_enabled", "banner_content", "sshkey", "links_profile_picture"] }))
}
}
2 changes: 1 addition & 1 deletion src/routes/links/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="bg-black text-white p-8 pt-20 flex flex-col">
<!-- svelte-ignore a11y-img-redundant-alt -->
<img src="/profile.jpg" class="h-32 w-32 rounded-full m-auto" alt="Account profile photo" />
<img src="//cms.alexwang.net/assets/{data.config.links_profile_picture}?format=webp&width=200" class="h-32 w-32 rounded-full m-auto" alt="Account profile photo" />
<h1 class="font-display text-2xl sm:text-3xl mt-4 m-auto">@alex.wang.64</h1>
</div>

Expand Down
Binary file removed static/profile.jpg
Binary file not shown.

0 comments on commit f22cc4d

Please sign in to comment.