Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/generate-og.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const fontBold = await fetch(
).then((res) => res.arrayBuffer())

const repoRoot = path.join(process.cwd())
const logoDark = fs.readFileSync(path.join(repoRoot, 'src/assets/logo-dark.png')).toString('base64')
const logoDark = fs.readFileSync(path.join(repoRoot, 'public/logo-dark.png')).toString('base64')

const DEFAULT_COLORS = { bg: '#18181b', text: '#e5e7eb' }

Expand Down
Binary file removed src/assets/logo-dark.png
Binary file not shown.
Binary file removed src/assets/logo-light.png
Binary file not shown.
8 changes: 2 additions & 6 deletions src/components/Sidebar.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
import { Image } from 'astro:assets'
import categoriesTr from '../data/tr/categories.json'
import tagsTr from '../data/tr/tags.json'
import categoriesEn from '../data/en/categories.json'
Expand Down Expand Up @@ -36,18 +35,15 @@ function isActive(path: string): boolean {

const topCategories = [...categories].sort((a, b) => b.articleCount - a.articleCount).slice(0, 5)
const topTags = [...tags].sort((a, b) => b.articleCount - a.articleCount).slice(0, 8)

import logoDark from '../assets/logo-dark.png'
import logoLight from '../assets/logo-light.png'
---

<aside
class="w-64 shrink-0 border-r border-border dark:border-border-dark bg-background dark:bg-background-dark hidden lg:flex flex-col h-screen sticky top-0"
>
<div class="p-6 border-b border-border dark:border-border-dark">
<a href={lang === 'en' ? '/en/' : '/'} class="flex items-center gap-2">
<Image src={logoLight} height={32} alt="4byte logo" class="block dark:hidden" />
<Image src={logoDark} height={32} alt="4byte logo" class="hidden dark:block" />
<img src="/logo-light.png" height={32} alt="4byte logo" class="block dark:hidden h-8" />
<img src="/logo-dark.png" height={32} alt="4byte logo" class="hidden dark:block h-8" />
</a>
</div>

Expand Down
8 changes: 8 additions & 0 deletions uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,12 @@ export default defineConfig({
exclude: ['node_modules', 'dist', '.git'],
},
},
safelist: [
'i-lucide-sun',
'i-lucide-moon',
'bg-secondary',
'text-secondary-foreground',
'bg-secondary-dark',
'text-secondary-dark-foreground',
],
})
Loading