From a29fff3bfd67ba9479690a14af5e314784cc2cd8 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Tue, 2 Apr 2024 21:33:51 +0200 Subject: [PATCH] add sha to footer --- Dockerfile | 3 ++- components/Footer.vue | 9 +++++++-- components/LayoutWrapper.vue | 7 ++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32a5fedf..6b5d707b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,10 +67,11 @@ ARG BASE_URL=/ ARG MEILI_HOST=http://localhost:7700 ARG MEILI_API_KEY ARG HOST_URL +ARG SHORT_SHA ENV NODE_OPTIONS=--max_old_space_size=12288 ENV NUXT_APP_BASE_URL=${BASE_URL} - +ENV NUXT_PUBLIC_SHORT_SHA=${SHORT_SHA} # nuxt module ENV NUXT_PUBLIC_MEILISEARCH_CLIENT_HOST_URL=${MEILI_HOST} ENV NUXT_PUBLIC_MEILISEARCH_CLIENT_SEARCH_API_KEY=${MEILI_API_KEY} diff --git a/components/Footer.vue b/components/Footer.vue index 0834b221..bdc77eee 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -1,8 +1,13 @@ +<script setup lang="ts"> +const runtimeConfig = useRuntimeConfig(); + +</script> <template> <v-footer app text-center d-flex flex-column> + test <div class="px-4 text-center w-100"> - <span><a href="https://mdmlab.fr/" target="_blank"><v-img src="/cropped-logoblue-288x129.png" inline :width="70" - :aspect-ratio="288 / 129"></v-img></a></span> + <span> {{ runtimeConfig.public.shortSha }} + </span> </div> </v-footer> </template> \ No newline at end of file diff --git a/components/LayoutWrapper.vue b/components/LayoutWrapper.vue index 60f8f7a6..706f61d3 100644 --- a/components/LayoutWrapper.vue +++ b/components/LayoutWrapper.vue @@ -21,7 +21,6 @@ const props = withDefaults(defineProps<Props>(), { density: undefined }); const drawer = ref(true); - const { page } = useContent(); const scrollThreshold = ref(200) const density = ref<'compact' | 'prominent'>("prominent") @@ -54,7 +53,8 @@ function onScroll() { <v-container v-scroll="onScroll" :fluid="fluid"> <v-row justify="center"> <v-col cols="auto" class="pa-0"> - <v-card flat color="transparent" :min-width="mobile ? undefined : 900" :max-width="fluid ? undefined : 1280"> + <v-card flat color="transparent" :min-width="mobile ? undefined : 900" + :max-width="fluid ? undefined : 1280"> <v-card-text class="pa-0"> <slot /> </v-card-text> @@ -64,7 +64,8 @@ function onScroll() { </v-col> </v-row> </v-container> - <!-- <Footer></Footer> --> + <Footer> + </Footer> <!-- <div class="i-ph-anchor-simple-thin d-none" /> <div class="i-tabler:database d-none" /> <div class="i-mdi:book-education-outline d-none" /> -- GitLab