Support svg and png logo image types

This commit is contained in:
Sat Naing
2022-09-23 12:24:54 +06:30
parent 11acd422e7
commit 3dd1ac8a9f
3 changed files with 6 additions and 3 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+4 -2
View File
@@ -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
View File
@@ -10,7 +10,8 @@ export const SITE = {
};
export const LOGO_IMAGE = {
enable: false,
enable: true,
svg: false,
width: 216,
height: 46,
};