From 4104477533097c34dd0e97129e29a4a08e5083c2 Mon Sep 17 00:00:00 2001 From: webfussel Date: Thu, 12 Jun 2025 14:11:52 +0200 Subject: [PATCH] add: article view View for blog articles --- app/assets/css/blog/article.css | 20 ++++++++++++++++++ app/assets/css/blog/excerpt.css | 4 ++++ app/assets/css/blog/overview.css | 1 + app/components/Blog/Card.vue | 36 +++++++++++++++++--------------- app/components/Blog/Excerpt.vue | 9 ++++++++ app/pages/blog/[slug].vue | 24 +++++++++++++++++++++ app/pages/blog/index.vue | 21 +++++++++++++------ content.config.ts | 8 +++++++ content/blog/0000.start.md | 11 +++++----- content/blog/0001.entry1.md | 2 +- content/blog/0002.entry2.md | 2 +- content/blog/0003.entry3.md | 2 +- content/blog/0004.entry4.md | 2 +- nuxt.config.ts | 2 ++ server/routes/blog/rss.xml.ts | 10 ++++++++- 15 files changed, 121 insertions(+), 33 deletions(-) create mode 100644 app/assets/css/blog/article.css create mode 100644 app/assets/css/blog/excerpt.css create mode 100644 app/components/Blog/Excerpt.vue diff --git a/app/assets/css/blog/article.css b/app/assets/css/blog/article.css new file mode 100644 index 0000000..c58326e --- /dev/null +++ b/app/assets/css/blog/article.css @@ -0,0 +1,20 @@ +.BlogArticle { + display: flex; + flex-direction: column; + gap: 2rem; + + & .image { + width: 100%; + height: 450px; + border-radius: 1rem; + overflow: hidden; + background: #000; + + & img { + width: 100%; + height: 100%; + opacity: .8; + object-fit: cover; + } + } +} \ No newline at end of file diff --git a/app/assets/css/blog/excerpt.css b/app/assets/css/blog/excerpt.css new file mode 100644 index 0000000..38ecff1 --- /dev/null +++ b/app/assets/css/blog/excerpt.css @@ -0,0 +1,4 @@ +.Excerpt { + font-size: 1.5rem; + font-style: italic; +} \ No newline at end of file diff --git a/app/assets/css/blog/overview.css b/app/assets/css/blog/overview.css index 6556419..8bdda6b 100644 --- a/app/assets/css/blog/overview.css +++ b/app/assets/css/blog/overview.css @@ -1,6 +1,7 @@ .BlogOverview { & .category-list { display: flex; + justify-content: center; flex-wrap: wrap; gap: 1rem; list-style: none; diff --git a/app/components/Blog/Card.vue b/app/components/Blog/Card.vue index a0a8be5..8f1546d 100644 --- a/app/components/Blog/Card.vue +++ b/app/components/Blog/Card.vue @@ -1,22 +1,23 @@