Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
feat(#3206): UICard content sticked to the bottom, EventsCar descript…
Browse files Browse the repository at this point in the history
…ion to the top

Signed-off-by: Pablo Aragón <[email protected]>
  • Loading branch information
paaragon authored and y4izus committed Jan 15, 2024
1 parent 9b98e32 commit eef79b9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
8 changes: 6 additions & 2 deletions components/Events/EventsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
:alt-text="altText"
>
<div v-if="description" class="events-card__description">
<p v-if="!tooLongDescription">
{{ description }}
</p>
<p v-if="tooLongDescription && !showMore">
{{ description.substring(0, MAX_DESCRIPTION_LENGTH_CH).trim() }}...
<span
Expand Down Expand Up @@ -101,16 +104,17 @@ function toggleDescriptionLength() {

<style lang="scss" scoped>
@use "~/assets/scss/carbon.scss";
@use "~/assets/scss/helpers/index.scss" as qiskit;
.events-card {
&__description {
margin-bottom: carbon.$spacing-06;
max-height: 240ch;
height: 100%;
&__toggle {
text-decoration: underline;
cursor: pointer;
color: var(--cds-link-primary, #{carbon.$purple-80});
color: qiskit.$link-color-tertiary;
}
}
Expand Down
11 changes: 11 additions & 0 deletions components/Ui/UiCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ function hasTags(tags: string[]) {
&__body {
overflow-wrap: break-word;
height: 100%;
display: flex;
justify-content: flex-end;
flex-direction: column;
}
&__content {
Expand All @@ -178,6 +182,13 @@ function hasTags(tags: string[]) {
justify-content: space-between;
}
&__description {
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
&__ctas {
display: flex;
justify-content: flex-start;
Expand Down
2 changes: 1 addition & 1 deletion hooks/mock/content/events/upcoming-community-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"startDateAndTime": null,
"endDate": "",
"to": "https://imperturbable-hyphenation.info/",
"abstract": "Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem."
"abstract": "Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur minima aperiam dicta amet rem. Accusamus eos amet animi saepe quidem fugit veritatis ex eveniet. Consectetur saepe assumenda. Esse id unde quibusdam consequuntur"
},
{
"types": ["Open Source"],
Expand Down

0 comments on commit eef79b9

Please sign in to comment.