From 7c0d2e0e80ddea443b847a4065b4b2eb90abadce Mon Sep 17 00:00:00 2001 From: AjXUdir Date: Wed, 29 May 2024 12:56:50 +0200 Subject: [PATCH] DIT-124: Added tags to cards - Updated: Card item to include filter options from course settings as tags. - Updated: Card container to support dynamic height scalling instead of a hardcoded value, since tags could lead to unpredictable height values --- src/vue/components/Card.vue | 33 ++++++++++++++++++++++++- src/vue/components/CardHighlighted.vue | 32 +++++++++++++++++++++++- src/vue/components/CardList.vue | 12 ++++++--- src/vue/components/NotLoggedInIntro.vue | 8 ++---- 4 files changed, 73 insertions(+), 12 deletions(-) diff --git a/src/vue/components/Card.vue b/src/vue/components/Card.vue index bf508da6..9bf32d77 100644 --- a/src/vue/components/Card.vue +++ b/src/vue/components/Card.vue @@ -18,6 +18,13 @@

+ + +

+ + +
@@ -36,6 +43,7 @@ export default { theme: String, courseIllustration: String, label: String, + filters: Array }, data() { return { @@ -52,7 +60,6 @@ export default { .card-highlighted-box { position: relative; width: 24rem; - min-height: 24rem; display: flex; flex-direction: column; justify-content: space-evenly; @@ -121,6 +128,29 @@ export default { justify-content: flex-start; } + .card-highlighted-content-tags { + display: flex; + flex-direction: row; + justify-content: flex-start; + flex-wrap: wrap; + list-style-type: none; + padding: 0px; + margin: 0px; + margin-top: 10px; + } + + .card-highlighted-content-tags li { + background: #eaeaf5; + padding: 4px 15px; + margin: 0px; + margin-right: 8px; + margin-bottom: 8px; + border-radius: 20px; + font-size: 14px; + font-weight: 400; + line-height: 21px; + } + .card-highlighted-content-button-container { margin-top: 1.5rem; margin-bottom: 1rem; diff --git a/src/vue/components/CardList.vue b/src/vue/components/CardList.vue index 8193a3b4..c2877a38 100644 --- a/src/vue/components/CardList.vue +++ b/src/vue/components/CardList.vue @@ -1,11 +1,12 @@