2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00
Files
vue-select/docs/.vuepress/components/Sponsors.vue
T
2020-03-15 12:02:01 -07:00

57 lines
1.1 KiB
Vue

<template>
<ul>
<li v-for="{ createdAt, login, avatarUrl } in sponsors">
<img :src="avatarUrl + '&s=150'" :alt="`@${login}'s avatar`" />
<p>
<a :href="`https://github.com/${login}`">@{{ login }}</a> <br />
Sponsor since {{ createdAt }}
</p>
</li>
</ul>
</template>
<script>
import { SPONSORS } from "@dynamic/constants";
import { format } from "date-fns";
export default {
data: () => ({
sponsors: SPONSORS.map(({ createdAt, sponsor }) => ({
createdAt: format(new Date(createdAt), "LLL yyyy"),
...sponsor
}))
})
};
</script>
<style scoped>
ul {
list-style: none;
padding: 0;
max-width: 100%;
margin-top: 2rem;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
img {
width: 75px;
height: 75px;
margin-right: 1rem;
border-radius: 100%;
}
li {
display: inline-flex;
align-items: center;
margin-bottom: 2rem;
/*max-width: 220px;*/
}
a {
display: inline-block;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>