Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewUI: make card heights consistent #121

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions zimui/src/components/TopicCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defineProps({
There are {{ data.count_more }} more items in this section.
</p>
</div>
<p class="card-text">
<p class="card-text badge-wrapper">
<span class="badge rounded-pill badge-primary">
<FontAwesomeIcon icon="fa-regular fa-folder-open" />
&nbsp;MORE
Expand Down Expand Up @@ -54,7 +54,7 @@ defineProps({
{{ data.description }}
</span>
</div>
<p class="card-text">
<p class="card-text badge-wrapper">
<span class="badge rounded-pill badge-primary">
<FontAwesomeIcon icon="fa-regular fa-folder-open" />
&nbsp;EXPLORE
Expand Down Expand Up @@ -85,7 +85,7 @@ defineProps({
{{ data.description }}
</span>
</div>
<p class="card-text">
<p class="card-text badge-wrapper">
<span class="badge rounded-pill badge-primary">
<FontAwesomeIcon icon="fa-regular fa-file-lines" />
&nbsp;OPEN
Expand All @@ -101,12 +101,19 @@ defineProps({
background-color: #091415;
border-radius: 1rem;
color: white;
height: 100%;
overflow: hidden;
benoit74 marked this conversation as resolved.
Show resolved Hide resolved
top: 50%;
transform: translateY(-50%);
}

.card-body{
benoit74 marked this conversation as resolved.
Show resolved Hide resolved
padding: 15px 15px 30px 15px;
}

.card-img-top {
border-radius: 1rem 1rem 0 0;
width: 100%;
benoit74 marked this conversation as resolved.
Show resolved Hide resolved
}

.badge {
Expand All @@ -119,12 +126,19 @@ defineProps({
border-style: solid;
}

.badge-wrapper {
position: absolute;
bottom: 15px;
left: 10px;
}

.more .card-content {
height: calc(6rem - 2px);
}

.with-description .card-content {
height: calc(9rem - 2px);
flex: 1 1 auto;
}

.card-content {
Expand All @@ -149,4 +163,10 @@ defineProps({
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}

.text-decoration-none{
display: flex;
flex-direction: column;
height: 100%;
}
</style>
5 changes: 3 additions & 2 deletions zimui/src/components/TopicHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,16 @@ const goToPreviousPage = () => {
<div
v-for="(content, contentIndex) in getNonTopicSections(topic.sections)"
:key="contentIndex"
class="col-sm-6 col-md-6 col-lg-3 pt-3 pb-3"
benoit74 marked this conversation as resolved.
Show resolved Hide resolved
class="col-sm-6 col-md-6 col-lg-3 mt-5 "
>
<TopicCard
:data="transformTopicSectionOrSubSectionToCardData(content)"
class="w-100"
benoit74 marked this conversation as resolved.
Show resolved Hide resolved
/>
</div>
</div>
<div class="row">
<footer class="pt-2 pb-3">
<footer class="mt-2 mb-1">
benoit74 marked this conversation as resolved.
Show resolved Hide resolved
<a href="./files/about">About this content</a>
</footer>
</div>
Expand Down
Loading