From 6a0198f6c613a9a347051a423d682c55891f89b3 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Tue, 17 Sep 2024 16:06:42 -0500 Subject: [PATCH] feat: Externalize picture and front cover paths --- src/content/metadata.json | 2 +- src/routes/+page.svelte | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/content/metadata.json b/src/content/metadata.json index 6110d98..c330d5a 100644 --- a/src/content/metadata.json +++ b/src/content/metadata.json @@ -3,7 +3,7 @@ "blogName": "Cirno's Blog", "frontDescription": "This is a very long description.", "frontCover": "/favicon.svg", - "avatar": "/favicon.svg", + "picture": "/favicon.svg", "links": { "github": "https://github.com", "email": "cirno@gensokyo.jp", diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 791c97b..bc0e454 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -16,8 +16,6 @@ const { name, Content } = data; import metadata from '$content/metadata.json'; - const pathFrontCover = metadata.frontCover; - const pathAvatar = metadata.avatar; const iconMap: Map = { "bitbucket": "fa-brands fa-bitbucket", "discord": "fa-brands fa-discord", @@ -39,7 +37,7 @@
@@ -80,8 +78,7 @@
- - {metadata.name} + {metadata.name}
@@ -152,14 +149,17 @@ line-height: 0; display: inline-block; margin: 5px; - border: 4px solid rgba(100,100,100,0.4); - border-radius: 50%; margin-right: auto; + border: 4px solid theme('colors.eucalyptus.500'); + border-radius: 50%; + aspect-ratio: 1; + width: 20vh; @apply ml-auto mr-0; } #avatar-img { - width: 20vh; - height: 20vh; + min-height: 100%; + min-width: 100%; + object-fit: cover; border-radius: 50%; } #bio-core {