Skip to content

Commit 634e6c2

Browse files
marcoambrosininickvergessen
authored andcommitted
Improve deck card design
Signed-off-by: Marco Ambrosini <[email protected]>
1 parent 96f7529 commit 634e6c2

File tree

1 file changed

+61
-3
lines changed
  • src/components/MessagesList/MessagesGroup/Message/MessagePart

1 file changed

+61
-3
lines changed

src/components/MessagesList/MessagesGroup/Message/MessagePart/DeckCard.vue

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,21 @@
2121

2222
<template>
2323
<a
24-
v-tooltip.bottom="deckLocation"
25-
class="external"
24+
class="deck-card"
2625
:href="link"
26+
:aria-label="deckCardAriaLabel"
2727
target="_blank">
28-
<strong>{{ name }}</strong>
28+
<div class="deck-card__lineone">
29+
<div class="icon-deck" />
30+
<div class="title">
31+
{{ name }}
32+
</div>
33+
</div>
34+
<div class="deck-card__linetwo">
35+
<div>
36+
{{ deckLocation }}
37+
</div>
38+
</div>
2939
</a>
3040
</template>
3141

@@ -73,6 +83,54 @@ export default {
7383
board: this.boardname,
7484
})
7585
},
86+
deckCardAriaLabel() {
87+
return t('spreed', 'Deck Card')
88+
},
7689
},
7790
}
7891
</script>
92+
93+
<style lang="scss" scoped>
94+
.deck-card {
95+
display: flex;
96+
transition: box-shadow 0.1s ease-in-out;
97+
box-shadow: 0 0 2px 0 var(--color-box-shadow);
98+
border-radius: var(--border-radius-large);
99+
font-size: 100%;
100+
background-color: var(--color-main-background);
101+
margin: 12px 0;
102+
max-width: 300px;
103+
padding: 8px 16px;
104+
flex-direction: column;
105+
white-space: nowrap;
106+
&:hover,
107+
&:focus{
108+
box-shadow: 0 0 5px 0 var(--color-box-shadow);
109+
}
110+
&__lineone {
111+
height: 30px;
112+
display: flex;
113+
justify-content: flex-start;
114+
align-items: center;
115+
overflow: hidden;
116+
white-space: nowrap;
117+
text-overflow: ellipsis;
118+
119+
.title {
120+
margin-left: 8px;
121+
}
122+
}
123+
&__linetwo {
124+
height: 30px;
125+
color: var(--color-text-lighter);
126+
overflow: hidden;
127+
white-space: nowrap;
128+
text-overflow: ellipsis;
129+
}
130+
}
131+
132+
.icon-deck {
133+
opacity: .8;
134+
}
135+
136+
</style>

0 commit comments

Comments
 (0)