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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
| <template>
| <view class="card-container">
| <image class="card-bg" :src="image" mode="aspectFill" />
|
| <view class="card-content">
| <text class="card-title">{{ title }}</text>
| <text class="card-subtitle">{{ subtitle }}</text>
|
| <view class="card-footer">
| <u-icon name="clock" size="20" color="#fff" />
| <text class="card-footer-text">{{ readTime }}</text>
| </view>
| </view>
| </view>
| </template>
|
| <script>
| export default {
| name: "SceneMuseumCard",
| props: {
| image: {
| type: String,
| required: true
| },
| title: {
| type: String,
| required: true
| },
| subtitle: {
| type: String,
| default: ""
| },
| readTime: {
| type: String,
| default: ""
| }
| }
| }
| </script>
|
| <style scoped>
| .card-container {
| position: relative;
| width: 100%;
| height: 400rpx;
| border-radius: 20rpx;
| overflow: hidden;
| margin-bottom: 20rpx;
| }
|
| .card-bg {
| width: 100%;
| height: 100%;
| border-radius: 20rpx;
| }
|
| .card-content {
| position: absolute;
| bottom: 20rpx;
| left: 20rpx;
| right: 20rpx;
| color: #fff;
| }
|
| .card-title {
| font-size: 30rpx;
| font-weight: bold;
| margin-bottom: 10rpx;
| display: block;
| }
|
| .card-subtitle {
| font-size: 24rpx;
| opacity: 0.85;
| display: block;
| margin-bottom: 20rpx;
| }
|
| .card-footer {
| display: flex;
| align-items: center;
| }
|
| .card-footer-text {
| font-size: 22rpx;
| margin-left: 8rpx;
| opacity: 0.9;
| }
| </style>
|
|