-
Notifications
You must be signed in to change notification settings - Fork 2
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
9 changed files
with
71 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
import Menu from "./Menu.astro"; | ||
import Menu from "./menu/Menu.astro"; | ||
--- | ||
|
||
<header class="container mt-12"> | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
--- | ||
interface Props { | ||
includeHome?: boolean; | ||
} | ||
const { includeHome = true } = Astro.props; | ||
interface MenuItem { | ||
name: string; | ||
icon: string; | ||
url: string; | ||
} | ||
import yml from "./config.yml"; | ||
--- | ||
|
||
<ul> | ||
{ | ||
includeHome && ( | ||
<li> | ||
<a class="link" href="/"> | ||
<i class="ri-newspaper-line" /> | ||
主页 | ||
</a> | ||
</li> | ||
) | ||
} | ||
{ | ||
yml.menu.map((item: MenuItem) => ( | ||
<li> | ||
<a class="link" href={item.url}> | ||
<i class={item.icon} /> | ||
{item.name} | ||
</a> | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
|
||
<style lang="scss"> | ||
ul { | ||
@apply inline-block; | ||
|
||
li { | ||
@apply inline-block ml-2; | ||
&:first-child { | ||
@apply ml-0; | ||
} | ||
} | ||
} | ||
</style> |
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,13 @@ | ||
menu: | ||
- name: 博客 | ||
icon: ri-newspaper-line | ||
url: https://blog.skywt.cn/ | ||
- name: 实验室 | ||
icon: ri-server-line | ||
url: https://lab.skywt.cn/ | ||
- name: 友人 | ||
icon: ri-contacts-line | ||
url: https://blog.skywt.cn/friends | ||
- name: 关于 | ||
icon: ri-cup-line | ||
url: https://blog.skywt.cn/about |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 +1,6 @@ | ||
/// <reference types="astro/client" /> | ||
|
||
declare module "*.yml" { | ||
const value: any; | ||
export default value; | ||
} |
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