From 750daa74e61a644d937ce9f7584d07354434ef26 Mon Sep 17 00:00:00 2001 From: Korbs Date: Tue, 24 Dec 2024 05:12:45 -0500 Subject: [PATCH] Add Header componet, optimize mobile support --- index.ts | 3 +- package.json | 2 +- src/Header.astro | 172 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 src/Header.astro diff --git a/index.ts b/index.ts index f002f21..e4aed42 100644 --- a/index.ts +++ b/index.ts @@ -5,7 +5,8 @@ import Hero from "./src/blocks/Hero.astro" // Components import Banner from "./src/Banner.astro" import BlogPost from "./src/BlogPost.astro"; +import Header from "./src/Header.astro"; import Image from "./src/Image.astro"; // Export -export {Banner, BlogPost, CallToAction, Image, Hero} \ No newline at end of file +export {Banner, BlogPost, CallToAction, Image, Header, Hero} \ No newline at end of file diff --git a/package.json b/package.json index da2cf64..e76c8c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sudovanilla/pandora", - "version": "1.7.4", + "version": "1.7.5", "author": "SudoVanilla", "displayName": "Pandora", "description": "Astro component library built for SudoVanilla related websites and projects.", diff --git a/src/Header.astro b/src/Header.astro new file mode 100644 index 0000000..b012ac3 --- /dev/null +++ b/src/Header.astro @@ -0,0 +1,172 @@ +--- +// Properties +const { + Title, + Logo, + MobilePosition = "Top" +} = Astro.props + +// Components +import Image from './Image.astro' +--- + +
+
+ {Logo ? + + : + null + } + {Title ? + {Title} + : + null + } + +
+
+ +
+
+ +
+
+ +
+
+ {Logo ? + + : + null + } + {Title ? + {Title} + : + null + } + +
+
+
+ Menu +
+ +
+ +
+
+
+
+ +{ + ()=> { + if (MobilePosition === "Top") { + return + } else if (MobilePosition === "Bottom") { + return + } + } +} + + \ No newline at end of file