Skip to content

Commit

Permalink
Merge pull request #237 from akhuoa/feature/context-card-text
Browse files Browse the repository at this point in the history
Update context card text style
  • Loading branch information
alan-wu authored Aug 13, 2024
2 parents fd34f92 + 74c856b commit 83fb2d5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/ContentBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export default {

:deep(.context-card-popover.el-popover.el-popper) {
max-width: calc(100vw - 100px);
padding-right: 0px;
padding: 0px;
width: unset!important;
background: #fff!important;
}
Expand Down
37 changes: 29 additions & 8 deletions src/components/ContextCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
<img :src="banner" class="context-image">
</div>
<div class="card-right scrollbar">
<div style="margin-right: 8px;">
<div>
<div class="title">{{contextData.heading}}</div>
<div v-html="parseMarkdown(contextData.description)"/>
<br/>

<!-- <br/> -->
</div>
</div>
<div class="card-bottom">
<div>
<!-- Show sampeles and views seperately if they do not match -->
<template v-if="!samplesUnderViews">
<div v-if="contextData.views && contextData.views.length > 0" class="subtitle">Scaffold Views</div>
Expand Down Expand Up @@ -364,28 +367,38 @@ export default {
display: flex;
justify-content: center;
align-items: center;
// text-align: initial; // default is justify
word-break: initial;
}
.context-card{
background-color: white;
max-height: 10 50px;
font-size: 14px;
position: relative;
display: flex;
flex-wrap: wrap;
gap: 10px;
width: 100%;
max-height: 258px;
overflow-y: auto;
scrollbar-width: thin;
box-sizing: border-box;
&:not(.context-card-container) {
padding: 10px;
}
}
.context-card-view{
cursor: pointer;
margin-bottom: 8px;
display: flex;
gap: 8px;
}
.view-image {
width: 34px;
height: 34px;
flex: 1;
height: auto;
}
.view-descriptions {
Expand Down Expand Up @@ -418,8 +431,15 @@ export default {
.card-right {
flex: 1.5;
word-break: normal !important;
overflow-y: scroll;
scrollbar-width: thin;
:deep(p:last-child) {
margin-bottom: 0;
}
}
.card-bottom {
flex: 0 0 100%;
max-width: 100%;
}
.cursor-pointer {
Expand All @@ -442,6 +462,7 @@ export default {
.subtitle{
font-weight: bold;
margin-bottom: 8px;
}
.scrollbar::-webkit-scrollbar-track {
Expand Down
7 changes: 2 additions & 5 deletions src/components/FlatmapContextCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,16 @@ export default {
.flatmap-context-card{
background-color: white;
max-height: 10 50px;
font-size: 12px;
position: relative;
display: flex;
width: 100%;
max-height: 258px;
padding: 10px;
}
.card-right {
flex: 1.3;
padding-left: 6px;
// overflow-y: scroll;
scrollbar-width: thin;
flex: 1;
}
.cursor-pointer {
Expand Down

0 comments on commit 83fb2d5

Please sign in to comment.