contributors.vue 907 B

1234567891011121314151617181920212223242526272829303132
  1. <script setup lang="ts">
  2. import { computed } from 'vue'
  3. import _contributors from '@kankan/metadata/dist/contributors.json'
  4. import VpLink from '../common/vp-link.vue'
  5. const props = defineProps<{ id: string }>()
  6. const contributors = computed(() => _contributors[props.id]?.filter(c => c.login !== 'renovate[bot]'))
  7. </script>
  8. <template>
  9. <div class="mb-4">
  10. <div class="flex flex-wrap gap-4 pt-2">
  11. <div v-for="c of contributors" :key="c.hash">
  12. <vp-link :href="`https://github.com/${c.login}`" class="flex gap-2 items-center link" no-icon>
  13. <img :src="c.avatar" class="w-8 h-8 rounded-full" />
  14. {{ c.name }}
  15. </vp-link>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <style lang="scss" scoped>
  21. .link {
  22. color: var(--text-color-light);
  23. &:hover {
  24. color: var(--brand-color);
  25. }
  26. }
  27. </style>