Skip to content

Commit 83699ca

Browse files
committed
add meta tag
1 parent 2a63bcb commit 83699ca

6 files changed

Lines changed: 23 additions & 9 deletions

File tree

src/components/RepoCard.astro

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ const formattedUpdatedAt = updatedAtDate && !Number.isNaN(updatedAtDate.valueOf(
2929
<a href={`/module/${module.moduleId}`} class="group relative flex flex-col rounded-2xl border border-gray-200 dark:border-slate-800 bg-white dark:bg-slate-900/50 p-6 hover:border-blue-500/50 hover:bg-gray-50 dark:hover:bg-slate-900 hover:shadow-2xl hover:shadow-blue-500/10 transition-all duration-300">
3030
<div class="flex items-start justify-between mb-2 gap-4">
3131
<div class="flex-1 min-w-0">
32-
<h3 class="text-xl font-bold text-gray-900 dark:text-slate-100 truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">
33-
{displayName}
34-
</h3>
32+
<div class="flex items-center gap-2 mb-1">
33+
<h3 class="text-xl font-bold text-gray-900 dark:text-slate-100 truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">
34+
{displayName}
35+
</h3>
36+
{module.metamodule && (
37+
<span class="px-2 py-0.5 rounded-md text-xs font-bold bg-gradient-to-r from-purple-500 to-pink-500 text-white border border-purple-400 dark:border-pink-400 shadow-sm flex-shrink-0">
38+
META
39+
</span>
40+
)}
41+
</div>
3542
<div class="text-sm text-gray-500 dark:text-slate-400 mt-1 space-y-0.5">
3643
{displayAuthors.length > 0 && (
3744
<div class="flex items-center gap-1 flex-wrap">

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
import Layout from '../layouts/Layout.astro';
33
import RepoCard from '../components/RepoCard.astro';
4-
import modules from '../../.cache/modules.json';
4+
import modules from '../../.data-cache/modules.json';
55
66
// Modules are already sorted by latest release time in fetch-data.ts
77
const sortedRepos = modules;

src/pages/module/[name].astro

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Layout from '../../layouts/Layout.astro';
3-
import modules from '../../../.cache/modules.json';
3+
import modules from '../../../.data-cache/modules.json';
44
55
export function getStaticPaths() {
66
return modules.map((m: any) => ({
@@ -31,7 +31,14 @@ const readmeHTML = module.readmeHTML || '';
3131
<span>/</span>
3232
<span class="text-gray-900 dark:text-slate-200 truncate">{module.moduleId}</span>
3333
</div>
34-
<h1 class="text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-4 tracking-tight">{displayName}</h1>
34+
<div class="flex items-center gap-3 mb-4">
35+
<h1 class="text-3xl md:text-4xl font-bold text-gray-900 dark:text-white tracking-tight">{displayName}</h1>
36+
{module.metamodule && (
37+
<span class="px-3 py-1 rounded-lg text-sm font-bold bg-gradient-to-r from-purple-500 to-pink-500 text-white border border-purple-400 dark:border-pink-400 shadow-lg flex-shrink-0">
38+
META
39+
</span>
40+
)}
41+
</div>
3542
<p class="text-lg text-gray-600 dark:text-slate-400 max-w-3xl leading-relaxed">{description}</p>
3643
</div>
3744

src/pages/module/[name].json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { APIRoute } from "astro";
2-
import modules from "../../../.cache/modules.json";
2+
import modules from "../../../.data-cache/modules.json";
33

44
export const GET: APIRoute = ({ params }) => {
55
const module = modules.find((m: any) => m.moduleId === params.name);

src/pages/modules.json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { APIRoute } from "astro";
2-
import modules from "../../.cache/modules.json";
2+
import modules from "../../.data-cache/modules.json";
33

44
export const GET: APIRoute = () => {
55
return new Response(

src/pages/search-index.json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { APIRoute } from "astro";
2-
import modules from "../../.cache/modules.json";
2+
import modules from "../../.data-cache/modules.json";
33

44
export const GET: APIRoute = () => {
55
const searchIndex = modules.map((m: any) => ({

0 commit comments

Comments
 (0)