mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +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 { 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";
|
|
||||||
|
import logoPNG from "/assets/logo.png";
|
||||||
|
import logoSVG from "/assets/logo.svg";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
activeNav?: "posts" | "tags" | "about" | "search";
|
activeNav?: "posts" | "tags" | "about" | "search";
|
||||||
@@ -19,7 +21,7 @@ const { activeNav } = Astro.props;
|
|||||||
{
|
{
|
||||||
LOGO_IMAGE.enable ? (
|
LOGO_IMAGE.enable ? (
|
||||||
<img
|
<img
|
||||||
src={logo}
|
src={LOGO_IMAGE.svg ? logoSVG : logoPNG}
|
||||||
alt="AstroPaper Logo"
|
alt="AstroPaper Logo"
|
||||||
width={LOGO_IMAGE.width}
|
width={LOGO_IMAGE.width}
|
||||||
height={LOGO_IMAGE.height}
|
height={LOGO_IMAGE.height}
|
||||||
|
|||||||
+2
-1
@@ -10,7 +10,8 @@ export const SITE = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const LOGO_IMAGE = {
|
export const LOGO_IMAGE = {
|
||||||
enable: false,
|
enable: true,
|
||||||
|
svg: false,
|
||||||
width: 216,
|
width: 216,
|
||||||
height: 46,
|
height: 46,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user