From a81b05f8e1051a3cf3170c803ab2c961a935a719 Mon Sep 17 00:00:00 2001 From: Gabriel Cozma Date: Thu, 29 Aug 2024 14:31:25 +0300 Subject: [PATCH] cleanup: move the details of the article to the bottom of the article's card --- CHANGELOG.md | 2 ++ custom/ArticleList.scss | 24 ++++++++++---- custom/ArticleListExample.txt | 48 ++++++++++++++------------- docs/.vitepress/theme/ArticleList.vue | 48 ++++++++++++++------------- 4 files changed, 69 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c73b4a8..30a4cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Migrate every `px` to `rem` for better scaling (I did that once already, but they appeared again) +- Move the details of the article to the bottom of the article's card + --- ### Development diff --git a/custom/ArticleList.scss b/custom/ArticleList.scss index ad01aed..64b74fa 100644 --- a/custom/ArticleList.scss +++ b/custom/ArticleList.scss @@ -14,7 +14,10 @@ grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } - .post { + article { + display: flex; + flex-direction: column; + gap: 10px; transition: transform 0.3s ease; border-radius: 8px; background-color: var(--color-background-second); @@ -128,12 +131,19 @@ text-decoration: none; } - .date { - font-feature-settings: "zero", "tnum", "cv03", "cv02"; - margin: 5px 0; - color: var(--color-text-secondary); - font-weight: 600; - font-size: 0.9rem; + .post-details { + display: flex; + justify-content: space-between; + border-top: 1px solid var(--color-border); + padding-top: 10px; + + .date { + font-feature-settings: "zero", "tnum", "cv03", "cv02"; + margin: 5px 0; + color: var(--color-text-secondary); + font-weight: 600; + font-size: 0.9rem; + } } } } diff --git a/custom/ArticleListExample.txt b/custom/ArticleListExample.txt index 18b050a..c137b33 100644 --- a/custom/ArticleListExample.txt +++ b/custom/ArticleListExample.txt @@ -28,30 +28,32 @@ >{{ post.title }} -

- {{ post.date }} - - - · - {{ post.author.length > 1 ? "Authors:" : "Author:" }} - - -

{{ post.description }}

-
- {{ - post.tags - }} - {{ tag }} +
+

+ {{ post.date }} + + + · + {{ post.author.length > 1 ? "Authors:" : "Author:" }} + + +

+
+ {{ + post.tags + }} + {{ tag }} +
diff --git a/docs/.vitepress/theme/ArticleList.vue b/docs/.vitepress/theme/ArticleList.vue index 18b050a..c137b33 100644 --- a/docs/.vitepress/theme/ArticleList.vue +++ b/docs/.vitepress/theme/ArticleList.vue @@ -28,30 +28,32 @@ >{{ post.title }} -

- {{ post.date }} - - - · - {{ post.author.length > 1 ? "Authors:" : "Author:" }} - - -

{{ post.description }}

-
- {{ - post.tags - }} - {{ tag }} +
+

+ {{ post.date }} + + + · + {{ post.author.length > 1 ? "Authors:" : "Author:" }} + + +

+
+ {{ + post.tags + }} + {{ tag }} +