mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Add dynamic logo image and logo text
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
import { SITE } from "src/config";
|
import { LOGO_IMAGE, SITE } from "src/config";
|
||||||
import Hr from "./Hr.astro";
|
import Hr from "./Hr.astro";
|
||||||
import LinkButton from "./LinkButton.astro";
|
import LinkButton from "./LinkButton.astro";
|
||||||
|
import logo from "/assets/logo.svg";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
activeNav?: "posts" | "tags" | "about" | "search";
|
activeNav?: "posts" | "tags" | "about" | "search";
|
||||||
@@ -14,7 +15,20 @@ const { activeNav } = Astro.props;
|
|||||||
<a id="skip-to-content" href="#main-content">Skip to content</a>
|
<a id="skip-to-content" href="#main-content">Skip to content</a>
|
||||||
<div class="nav-container">
|
<div class="nav-container">
|
||||||
<div class="top-nav-wrap">
|
<div class="top-nav-wrap">
|
||||||
<a href="/" class="logo">{SITE.title}</a>
|
<a href="/" class="logo">
|
||||||
|
{
|
||||||
|
LOGO_IMAGE.enable ? (
|
||||||
|
<img
|
||||||
|
src={logo}
|
||||||
|
alt="AstroPaper Logo"
|
||||||
|
width={LOGO_IMAGE.width}
|
||||||
|
height={LOGO_IMAGE.height}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
SITE.title
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</a>
|
||||||
<button class="hamburger-menu" aria-label="menu">
|
<button class="hamburger-menu" aria-label="menu">
|
||||||
<div class="icon-container flex">
|
<div class="icon-container flex">
|
||||||
<div id="first-line"></div>
|
<div id="first-line"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user