mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
Support svg and png logo image types
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -2,7 +2,9 @@
|
||||
import { LOGO_IMAGE, SITE } from "src/config";
|
||||
import Hr from "./Hr.astro";
|
||||
import LinkButton from "./LinkButton.astro";
|
||||
import logo from "/assets/logo.svg";
|
||||
|
||||
import logoPNG from "/assets/logo.png";
|
||||
import logoSVG from "/assets/logo.svg";
|
||||
|
||||
export interface Props {
|
||||
activeNav?: "posts" | "tags" | "about" | "search";
|
||||
@@ -19,7 +21,7 @@ const { activeNav } = Astro.props;
|
||||
{
|
||||
LOGO_IMAGE.enable ? (
|
||||
<img
|
||||
src={logo}
|
||||
src={LOGO_IMAGE.svg ? logoSVG : logoPNG}
|
||||
alt="AstroPaper Logo"
|
||||
width={LOGO_IMAGE.width}
|
||||
height={LOGO_IMAGE.height}
|
||||
|
||||
+2
-1
@@ -10,7 +10,8 @@ export const SITE = {
|
||||
};
|
||||
|
||||
export const LOGO_IMAGE = {
|
||||
enable: false,
|
||||
enable: true,
|
||||
svg: false,
|
||||
width: 216,
|
||||
height: 46,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user