-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
import type { Resource } from 'animegarden'; | ||
export interface Props { | ||
resources: Resource[]; | ||
} | ||
const { resources } = Astro.props; | ||
--- | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>标题</th> | ||
</tr> | ||
</thead> | ||
<tbody | ||
>{ | ||
resources.map((r) => ( | ||
<tr> | ||
<td>{r.title}</td> | ||
</tr> | ||
)) | ||
}</tbody | ||
> | ||
<tfoot></tfoot> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const WORKER_BASE = `animegarden.yjl9903.workers.dev`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
--- | ||
import type { Resource } from 'animegarden'; | ||
import Layout from '../layouts/Layout.astro'; | ||
import ResourceTable from '../components/ResourceTable.astro'; | ||
import { WORKER_BASE } from '../constant'; | ||
const resources = await fetch(new URL('/resources', 'https://' + WORKER_BASE)) | ||
.then((r) => r.json()) | ||
.then((r: any) => r.resources as Resource[]); | ||
--- | ||
|
||
<Layout title="Anime Garden"> | ||
<div>Anime Garden</div> | ||
<div class="mt-8vh"> | ||
<h1 class="text-4xl font-quicksand font-bold text-center select-none">🌸 Anime Garden</h1> | ||
</div> | ||
|
||
<div class="mt-8vh"> | ||
<ResourceTable resources={resources} /> | ||
</div> | ||
</Layout> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.