Use locale strings for Sidebar content

This commit is contained in:
Jorge Vargas 2025-02-16 00:46:37 -06:00
parent 2dbc27d4f7
commit eb483b3323
4 changed files with 14 additions and 6 deletions

View file

@ -33,5 +33,9 @@
"newPasswordRetype": "Re-type new password", "newPasswordRetype": "Re-type new password",
"savePassword": "Save Password", "savePassword": "Save Password",
"passwordResetSuccesful": "Password reset succesfully", "passwordResetSuccesful": "Password reset succesfully",
"displayName": "Display name" "displayName": "Display name",
"lastAddedSidebar": "Last Added",
"getLucky": "Get Lucky",
"randomPull": "Random Pull",
"highlightAlbum": "Highlight Soundtrack"
} }

View file

@ -1,5 +1,6 @@
--- ---
import { Image } from 'astro:assets' import { Image } from 'astro:assets'
import * as m from '../paraglide/messages.js'
import discord from 'img/socials/discord.png' import discord from 'img/socials/discord.png'
import kofi from 'img/socials/ko-fi-donate-button.png' import kofi from 'img/socials/ko-fi-donate-button.png'
@ -14,9 +15,9 @@ const listClass =
--- ---
<div class='w-3/12 max-w-[300px] bg-dark flex flex-col'> <div class='w-3/12 max-w-[300px] bg-dark flex flex-col'>
<a href='#' class={listClass}>Last Added</a> <a href='#' class={listClass}>{m.lastAddedSidebar()}</a>
<a href='#' class={listClass}>Get Lucky</a> <a href='#' class={listClass}>{m.getLucky()}</a>
<a href='#' class={listClass}>Random Pull</a> <a href='#' class={listClass}>{m.randomPull()}</a>
<div class='px-6 flex flex-col gap-y-3'> <div class='px-6 flex flex-col gap-y-3'>
<SidebarSection class='flex flex-col gap-y-3'> <SidebarSection class='flex flex-col gap-y-3'>
<div class='flex gap-x-2 justify-center'> <div class='flex gap-x-2 justify-center'>

View file

@ -1,5 +1,6 @@
--- ---
import prismaClient from 'utils/prisma-client' import prismaClient from 'utils/prisma-client'
import * as m from 'paraglide/messages.js'
import AlbumBox from 'components/AlbumBox.astro' import AlbumBox from 'components/AlbumBox.astro'
import SidebarSection from '../SidebarSection.astro' import SidebarSection from '../SidebarSection.astro'
@ -20,7 +21,7 @@ const album = highlightConfig?.value
{ {
album ? ( album ? (
<SidebarSection> <SidebarSection>
<div class='uppercase text-center text-2xl/6 font-semibold'>Highlight Soundtrack</div> <div class='uppercase text-center text-2xl/6 font-semibold'>{m.highlightAlbum()}</div>
<AlbumBox href={`/album/${album.id}`} title={album.title ?? 'Unknown Title'} image={`/album/${album.id}.png`} /> <AlbumBox href={`/album/${album.id}`} title={album.title ?? 'Unknown Title'} image={`/album/${album.id}.png`} />
</SidebarSection> </SidebarSection>
) : null ) : null

View file

@ -1,9 +1,11 @@
--- ---
import * as m from 'paraglide/messages.js'
import AlbumBox from 'components/AlbumBox.astro' import AlbumBox from 'components/AlbumBox.astro'
import SidebarSection from '../SidebarSection.astro' import SidebarSection from '../SidebarSection.astro'
--- ---
<SidebarSection> <SidebarSection>
<div class='uppercase text-center text-2xl/6 font-semibold'>Highlight Soundtrack</div> <div class='uppercase text-center text-2xl/6 font-semibold'>{m.highlightAlbum()}</div>
<AlbumBox loading /> <AlbumBox loading />
</SidebarSection> </SidebarSection>