diff --git a/src/components/ui/GitHubCard.astro b/src/components/ui/GitHubCard.astro
index 98b7f29..18d451b 100644
--- a/src/components/ui/GitHubCard.astro
+++ b/src/components/ui/GitHubCard.astro
@@ -100,7 +100,7 @@
if (!response.ok) {
if (el.desc) {
- el.desc.textContent = '⚠ Loading failed'
+ el.desc.textContent = '--'
}
return
}
@@ -113,7 +113,7 @@
} catch (error) {
console.error(`Failed to fetch ${repo}:`, error)
if (el.desc) {
- el.desc.textContent = '⚠ Loading failed'
+ el.desc.textContent = '--'
}
}
}
diff --git a/src/components/ui/LinkCard.astro b/src/components/ui/LinkCard.astro
index d60c5e6..27edbd9 100644
--- a/src/components/ui/LinkCard.astro
+++ b/src/components/ui/LinkCard.astro
@@ -207,6 +207,7 @@
text-decoration: none;
color: inherit;
background: var(--astro-code-background);
+ min-height: 3.5rem;
margin: 1.25rem 0 1.75rem 0;
transition: background 0.2s ease-out;
}
diff --git a/src/components/ui/NeoDBCard.astro b/src/components/ui/NeoDBCard.astro
new file mode 100644
index 0000000..69024df
--- /dev/null
+++ b/src/components/ui/NeoDBCard.astro
@@ -0,0 +1,379 @@
+
+
+
diff --git a/src/content/posts/embedded-content.md b/src/content/posts/embedded-content.md
index 5b2621a..a1599cb 100644
--- a/src/content/posts/embedded-content.md
+++ b/src/content/posts/embedded-content.md
@@ -6,17 +6,19 @@ pubDate: '2025-06-06'
Use these directives to embed media:
```
-::link{url="https://xxxxx"}
+::link{url="https://xxxxx.xxx"}
-::spotify{url="https://open.spotify.com/type/xxxxxx"}
+::spotify{url="https://open.spotify.com/type/xxxxx"}
-::youtube{url="https://www.youtube.com/watch?v=xxxxxx"}
+::youtube{url="https://www.youtube.com/watch?v=xxxxx"}
-::bilibili{url="https://www.bilibili.com/video/xxxxxx"}
+::bilibili{url="https://www.bilibili.com/video/xxxxx"}
::github{repo="username/repo"}
-::x{url="https://x.com/username/status/xxxxxx"}
+::x{url="https://x.com/username/status/xxxxx"}
+
+::neodb{url="https://neodb.social/category/xxxxx"}
```
```
@@ -59,3 +61,13 @@ then you don't need to set adapter before building.
## X Post
::x{url="https://x.com/DAVID_LYNCH/status/1174367510893752321"}
+
+## NeoDB (CN Only)
+
+::neodb{url="https://neodb.social/album/5nD3R8gmnVlsoOBdyO8PA3"}
+
+::neodb{url="https://neodb.social/movie/1bhogjXkNnlWWM0bf6aj8P"}
+
+::neodb{url="https://neodb.social/book/4BqQ5mhfKMHPND3L6hf0Qh"}
+
+::neodb{url="https://neodb.social/game/1hl18l0qD5UN93k8ZkCZ7Q"}
diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro
index 0f86575..7d1f4c5 100644
--- a/src/layouts/PostLayout.astro
+++ b/src/layouts/PostLayout.astro
@@ -8,10 +8,11 @@ import Footer from '@/components/layout/Footer.astro'
import BackButton from '@/components/ui/BackButton.astro'
import TableOfContents from '@/components/ui/TableOfContents.astro'
import GradientMask from '@/components/ui/GradientMask.astro'
+import ImageOptimizer from '@/components/ui/ImageOptimizer.astro'
import ImageViewer from '@/components/ui/ImageViewer.astro'
import GitHubCard from '@/components/ui/GitHubCard.astro'
import LinkCard from '@/components/ui/LinkCard.astro'
-import ImageOptimizer from '@/components/ui/ImageOptimizer.astro'
+import NeoDBCard from '@/components/ui/NeoDBCard.astro'
import XPOST from '@/components/ui/XPOST.astro'
import CopyCode from '@/components/ui/CopyCode.astro'
import BaseLayout from '@/layouts/BaseLayout.astro'
@@ -58,11 +59,12 @@ const ogImage = `/open-graph/${postSlug}.png`
Loading...
+--
` + }, + + // NeoDB Card + neodb: (node) => { + const url = node.attributes?.url ?? '' + if (!url) { + return false + } + + const neodbUrlPattern = + /neodb\.social\/(movie|book|music|album|game|tv\/season|tv|podcast)\/([\w-]+)/ + const match = url.match(neodbUrlPattern) + const category = match ? match[1] : 'other' + + const isSquare = category === 'music' || category === 'album' || category === 'podcast' + const skeletonClass = isSquare ? 'music' : 'other' + + return `