blob: 49de654f4a77a527551823c3d049b6f32bcca2ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<template>
<div>
<a class="link-preview-card" :href="card.url" target="_blank" rel="noopener">
<div class="image">
<div :style="{ backgroundImage: 'url(' + card.image + ')' }"></div>
</div>
<div class="content">
<strong>{{ card.title }}</strong>
<p>{{ card.description }}</p>
<span class="host">{{ card.provider_name }}</span>
</div>
</a>
</div>
</template>
<script src="./link-preview.js"></script>
<style lang="scss">
@import '../../_variables.scss';
.link-preview-card {
display: flex !important;
flex-direction: row;
cursor: pointer;
margin: 0.5em 0.7em 0.6em 0.0em;
.image {
flex: 0 0 100px;
position: relative;
}
.image > div {
display: block;
margin: 0;
width: 100%;
height: 100%;
object-fit: cover;
background-size: cover;
background-position: center center;
}
.content {
padding: 1em;
flex: 1;
.host {
font-size: 90%;
}
}
color: $fallback--text;
border-style: solid;
border-width: 1px;
border-radius: $fallback--attachmentRadius;
border-radius: var(--attachmentRadius, $fallback--attachmentRadius);
border-color: $fallback--border;
border-color: var(--border, $fallback--border);
}
</style>
|