-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGridTwo.vue
87 lines (85 loc) · 1.47 KB
/
GridTwo.vue
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
<template>
<div class="works-wrapper">
<router-link
v-for="work in works"
:key="work.uri"
class="single-work"
:to="'/' + work.uri"
:class="[work.size, work.ratio > 1 ? 'landscape' : 'portrait']"
>
<figure>
<img :src="work.thumbnail" />
</figure>
</router-link>
</div>
</template>
<script setup>
const props = defineProps({
works: Array,
});
</script>
<style scoped lang="scss">
.works-wrapper {
display: flex;
flex-wrap: wrap;
.single-work {
&.small {
&.landscape {
img {
height: 9rem;
width: auto;
}
}
&.portrait {
img {
width: 9rem;
height: auto;
}
}
}
&.medium {
&.landscape {
img {
width: 25rem;
height: auto;
}
}
&.portrait {
img {
height: 25rem;
width: auto;
}
}
}
&.large {
&.landscape {
img {
width: 40rem;
height: auto;
}
}
&.portrait {
img {
height: 40rem;
width: auto;
}
}
}
figure {
width: 100%;
height: 100%;
margin: 0;
padding: 1rem;
display: flex;
align-items: center;
justify-content: center;
img {
width: 100%;
height: 100%;
object-fit: contain;
//box-shadow: 0px 3px 6px #00000029;
}
}
}
}
</style>