From 8aca3a9d68ca38eb29fe22bce3b61c0b9651c6bd Mon Sep 17 00:00:00 2001
From: Nick Visutsithiwong <2823112+nickvisut@users.noreply.github.com>
Date: Wed, 31 Jan 2024 17:15:46 -0800
Subject: [PATCH 1/5] add footer nav WIP
---
packages/astro/src/components/FooterNav.astro | 112 ++++++++++++++++++
packages/astro/src/layouts/BaseLayout.astro | 12 +-
2 files changed, 119 insertions(+), 5 deletions(-)
create mode 100644 packages/astro/src/components/FooterNav.astro
diff --git a/packages/astro/src/components/FooterNav.astro b/packages/astro/src/components/FooterNav.astro
new file mode 100644
index 0000000..0607057
--- /dev/null
+++ b/packages/astro/src/components/FooterNav.astro
@@ -0,0 +1,112 @@
+---
+const routes = [
+ [
+ "Resources",
+ [
+ [
+ "https://docs.google.com/forms/d/e/1FAIpQLScHe7aWQ-2n3lSTU1WfcK8rhBZp8pkDGH9EcJdbQb5lqMbbzA/viewform",
+ "propose a talk",
+ ],
+ [
+ "https://docs.google.com/forms/d/e/1FAIpQLSexe5qvmJ6LTiU1HcR-XAzlrgPLBudVBPK_ouHeBkFz2JVUHw/viewform",
+ "pitch a project",
+ ],
+ ],
+ ],
+ [
+ "About",
+ [
+ ["about", "about"],
+ ["about", "meet the core team"],
+ ["about", "code of conduct"],
+ ["mailto:hello@sfcivictech.org", "contact"],
+ ],
+ ],
+ [
+ "Elsewhere",
+ [
+ ["https://twitter.com/sfbrigade", "twitter"],
+ ["https://www.facebook.com/codeforsanfrancisco", "facebook"],
+ ["https://www.linkedin.com/company/18115347/", "linkedin"],
+ ["https://github.com/sfbrigade/", "github"],
+ ["http://c4sf.me/slack", "slack"],
+ ["https://www.meetup.com/sfcivictech/", "meetup"],
+ ],
+ ],
+];
+// because of annoying differences between dev and build modes, due to this
+// behavior (https://github.com/withastro/astro/issues/5630), always remove
+// any trailing slash so currentPage can match the pages above
+const fullPath = Astro.url.pathname.replace(/\/$/, "");
+const currentPage = fullPath.slice(fullPath.lastIndexOf("/") + 1);
+---
+
+
+
+
diff --git a/packages/astro/src/layouts/BaseLayout.astro b/packages/astro/src/layouts/BaseLayout.astro
index 5bbddfc..19215ec 100644
--- a/packages/astro/src/layouts/BaseLayout.astro
+++ b/packages/astro/src/layouts/BaseLayout.astro
@@ -1,17 +1,19 @@
---
import Page from "@/layouts/Page.astro";
import HeaderNav from "../components/HeaderNav.astro";
+import FooterNav from "../components/FooterNav.astro";
interface Props {
- title: string;
+ title: string;
}
const { title } = Astro.props;
---
-
-
-
-
+
+
+
+
+
From 1e4b571c51d597dfa795dceeec8bf813d5ca0e1e Mon Sep 17 00:00:00 2001
From: Nick Visutsithiwong <2823112+nickvisut@users.noreply.github.com>
Date: Wed, 31 Jan 2024 17:48:56 -0800
Subject: [PATCH 2/5] tweak footer styles
---
packages/astro/src/components/FooterNav.astro | 33 +++++++------------
packages/astro/src/layouts/BaseLayout.astro | 4 ++-
2 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/packages/astro/src/components/FooterNav.astro b/packages/astro/src/components/FooterNav.astro
index 0607057..2d07cd7 100644
--- a/packages/astro/src/components/FooterNav.astro
+++ b/packages/astro/src/components/FooterNav.astro
@@ -41,22 +41,12 @@ const fullPath = Astro.url.pathname.replace(/\/$/, "");
const currentPage = fullPath.slice(fullPath.lastIndexOf("/") + 1);
---
-