From 748f52241f6679ca3466600cd0919921cb3a08c0 Mon Sep 17 00:00:00 2001 From: klemek Date: Sun, 26 Apr 2026 18:38:49 +0200 Subject: [PATCH] feat: navbar --- README.md | 2 +- package.json | 2 +- src/components/NavBar.vue | 12 ++++++++++++ src/components/PageFooter.vue | 9 ++------- src/lib/meta.ts | 2 ++ src/views/ArticleView.vue | 8 ++++++-- src/views/HomeView.vue | 5 +++-- src/views/NotFoundView.vue | 1 + vite.config.ts | 2 ++ 9 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 src/components/NavBar.vue diff --git a/README.md b/README.md index f43cc3e..8e0a8ea 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ bun run build - [x] build with github actions - [x] config in sub repo - [x] copyright -- [ ] nav bar on top +- [x] nav bar on top - [ ] date updated - [ ] archive page - [ ] about page diff --git a/package.json b/package.json index 6bc1e02..1f5f401 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "md-blog", - "version": "1.4.0", + "version": "1.5.0", "private": true, "type": "module", "repository": "https://github.com/klemek/md-blog", diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue new file mode 100644 index 0000000..cbe23a0 --- /dev/null +++ b/src/components/NavBar.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/components/PageFooter.vue b/src/components/PageFooter.vue index a276cf2..6be791f 100644 --- a/src/components/PageFooter.vue +++ b/src/components/PageFooter.vue @@ -1,16 +1,11 @@ diff --git a/src/lib/meta.ts b/src/lib/meta.ts index f66fa9f..b45f1d7 100644 --- a/src/lib/meta.ts +++ b/src/lib/meta.ts @@ -6,4 +6,6 @@ export const REPOSITORY = packageJson.repository export const TITLE = import.meta.env.VITE_APP_TITLE export const SIGNATURE = import.meta.env.VITE_APP_SIGNATURE export const COPYRIGHT = import.meta.env.VITE_APP_COPYRIGHT +export const RSS_LINK = import.meta.env.VITE_APP_RSS_LINK +export const BACK_LINK = import.meta.env.VITE_APP_BACK_LINK export const BASE_URL = import.meta.env.BASE_URL diff --git a/src/views/ArticleView.vue b/src/views/ArticleView.vue index c3a18d3..9e802a0 100644 --- a/src/views/ArticleView.vue +++ b/src/views/ArticleView.vue @@ -5,9 +5,10 @@ import { loadArticle } from '@lib/articles' import { useRoute, onBeforeRouteUpdate, type RouteLocation } from 'vue-router' import NotFoundView from './NotFoundView.vue' import { simpleDateFormat } from '@lib/dates' -import { SIGNATURE, TITLE } from '@lib/meta' +import { BACK_LINK, SIGNATURE, TITLE } from '@lib/meta' import PageFooter from '@components/PageFooter.vue' import { stripHTML } from '@/lib/strings' +import NavBar from '@/components/NavBar.vue' const article = ref
(null) const loading = ref(true) @@ -34,6 +35,7 @@ onBeforeRouteUpdate(loadPage) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index f92beac..5357672 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -6,6 +6,7 @@ import { simpleDateFormat } from '@lib/dates' import { TITLE } from '@lib/meta' import PageFooter from '@components/PageFooter.vue' import { stripHTML } from '@/lib/strings' +import NavBar from '@/components/NavBar.vue' const articles = ref([]) @@ -17,8 +18,8 @@ onBeforeMount(async () => {