From 9ea8892c906ea8ee9a7644f9f126a1c2377e1c98 Mon Sep 17 00:00:00 2001
From: Leonardo Bishop <me@leonardobishop.com>
Date: Wed, 13 Mar 2024 23:35:13 +0000
Subject: Add git sha1 to footer

---
 components/footer/SiteFooter.vue | 46 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 components/footer/SiteFooter.vue

(limited to 'components/footer/SiteFooter.vue')

diff --git a/components/footer/SiteFooter.vue b/components/footer/SiteFooter.vue
new file mode 100644
index 0000000..4204fab
--- /dev/null
+++ b/components/footer/SiteFooter.vue
@@ -0,0 +1,46 @@
+<script setup land="ts">
+const config = useAppConfig();
+const runtimeConfig = useRuntimeConfig();
+</script>
+
+<template>
+  <footer id="footer">
+    <p id="copyright-license">
+
+    </p>
+    <p id="git-commit-hash">
+      <font-awesome-icon :icon="['fas', 'code-branch']" />
+      <NuxtLink to="https://github.com/LMBishop/quests-web-editor/">quests-web-editor</NuxtLink>
+      <span>@</span>
+      <NuxtLink :to="`https://github.com/LMBishop/quests-web-editor/commit/${runtimeConfig.public.gitCommitHash}`">
+        {{ runtimeConfig.public.gitCommitHashShort }}
+      </NuxtLink>
+      <span>
+        ({{ runtimeConfig.public.gitBranch }})
+      </span>
+    </p>
+  </footer>
+</template>
+
+<style lang="scss" scoped>
+#footer {
+  max-height: 40px;
+  padding: 0.5rem;
+  border-top: 1px solid var(--color-border-soft);
+  display: flex;
+  width: 100%;
+  justify-content: space-between;
+}
+
+#git-commit-hash {
+  display: flex;
+  color: var(--color-text-mute);
+  align-items: center;
+  gap: 0.3rem;
+  align-self: flex-end;
+
+  a {
+    text-decoration: none;
+  }
+}
+</style>
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

