Skip to content

Commit e2c54b9

Browse files
committed
improve all partner listing
1 parent 1cd64a8 commit e2c54b9

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

src/partners/components/PartnerLanding.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ onMounted(() => {
2929

3030
<div class="featured">
3131
<h2>Featured Partners</h2>
32-
<PartnerList :filter="(p) => p.platinum" />
32+
<PartnerList :filter="(p) => p.platinum" showLinkToAll />
3333
<a class="browse-all" href="./all.html">Browse All Partners</a>
3434
</div>
3535

src/partners/components/PartnerList.vue

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { computed, onMounted } from 'vue'
44
import PartnerCard from './PartnerCard.vue'
55
import { Partner } from './type'
66
7-
const { filter } = defineProps<{
7+
const { filter, showLinkToAll } = defineProps<{
88
filter?: (p: Partner) => boolean | undefined
9+
showLinkToAll?: boolean
910
}>()
1011
1112
let mounted = $ref(false)
@@ -49,6 +50,9 @@ function shuffle(array: Array<any>) {
4950
<ClientOnly>
5051
<PartnerCard v-for="p in filtered" :key="p.name" :data="p" />
5152
</ClientOnly>
53+
<a class="browse-all" href="./all.html" v-if="showLinkToAll && filtered.length % 2">
54+
Browse and Search<br>All Partners
55+
</a>
5256
</div>
5357
</template>
5458

@@ -58,4 +62,27 @@ function shuffle(array: Array<any>) {
5862
flex-wrap: wrap;
5963
justify-content: space-between;
6064
}
65+
66+
.browse-all {
67+
color: var(--vt-c-text-2);
68+
transition: color .5s ease;
69+
font-size: 1.2em;
70+
text-align: center;
71+
padding-top: 240px;
72+
display: block;
73+
border-radius: 4px;
74+
border: 1px solid var(--vt-c-divider-light);
75+
width: 48.5%;
76+
margin-bottom: 36px;
77+
}
78+
79+
.browse-all:hover {
80+
color: var(--vt-c-text-1);
81+
}
82+
83+
@media (max-width: 768px) {
84+
.browse-all {
85+
display: none;
86+
}
87+
}
6188
</style>

0 commit comments

Comments
 (0)