Skip to content

Commit

Permalink
DIT-223: Cardsizes
Browse files Browse the repository at this point in the history
- Fixed sizes of cards to be equal in size according to largest on row
  • Loading branch information
EnvyPhD committed Jun 27, 2024
1 parent b07227c commit d733246
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/vue/components/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@
<div class="card-content-container">
<header class="card-box-title">
<h2><slot name="title"></slot></h2>
</header>
<section class="card-content-description">
<p :class="{ description_text: true }">
<slot name="description"></slot>
<slot name="moduleList"></slot>
</p>

<ul class="card-content-tags">
<template v-for="filterItem in filters" :key="filterItem.filter_id">
<li>{{ filterItem.filter.filter_name }}</li>
</template>
</ul>

</header>
<section class="card-content-description">
<div class="card-content-enrolled">
<img
v-if="hasGoToCourse"
Expand Down Expand Up @@ -187,7 +186,6 @@ export default {
}
.card-content-enrolled {
margin-top: 1rem;
display: flex;
flex-direction: row;
align-items: center;
Expand Down
3 changes: 1 addition & 2 deletions src/vue/components/CardHighlighted.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ export default {
.card-highlighted-content-button-container {
margin-top: 1.5rem;
margin-bottom: 1rem;
display: inline-grid;
grid-template-columns: auto auto;
display: flex;
gap: 0.5rem;
}
Expand Down
7 changes: 6 additions & 1 deletion src/vue/components/CardList.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<template>
<div class="card-container">
<div class="card-instance" v-for="course in courses" :key="course.id">
<div class="card-instance card-container-wrapper" v-for="course in courses" :key="course.id">
<Card class="card-item"
:theme="course.course_settings ? course.course_settings.course_category.category.color_code : 'theme_0'"
:courseIllustration="course.course_settings ? course.course_settings.image.path : ''"
Expand Down Expand Up @@ -203,6 +203,11 @@ export default {
gap: 32px 24px;
margin-bottom: 40px;
.card-container-wrapper {
position:relative;
align-self: stretch;
}
@media (max-width: 1025px) {
width: 64rem;
}
Expand Down

0 comments on commit d733246

Please sign in to comment.