| 1 | <script setup lang="ts"> |
| 2 | import type { AddonInfo } from '../../addons' |
| 3 | |
| 4 | defineProps<{ |
| 5 | addon: AddonInfo |
| 6 | }>() |
| 7 | </script> |
| 8 | |
| 9 | <template> |
| 10 | <a :href="addon.link || addon.repo" class="block flex flex-col !decoration-none !text-unset !cursor-unset !hover:bg-gray-400/10 p-2 rounded-lg transition-all"> |
| 11 | <div class="flex flex-wrap"> |
| 12 | <a :href="addon.link || addon.repo" class="font-bold text-lg !text-$vp-c-text-1 !decoration-none"> |
| 13 | {{ addon.name }} |
| 14 | </a> |
| 15 | <div class="flex-grow" /> |
| 16 | <div class="mb-1 select-none op-80"> |
| 17 | <span v-for="tag in addon.tags" :key="tag" class="text-xs mx-.5 px-1.5 py-.5 rounded-lg bg-gray-400/40"> |
| 18 | {{ tag }} |
| 19 | </span> |
| 20 | </div> |
| 21 | </div> |
| 22 | <div |
| 23 | class="flex-grow text-current text-xs opacity-90" |
| 24 | :title="addon.description" |
| 25 | > |
| 26 | {{ addon.description }} |
| 27 | </div> |
| 28 | <div class="mt-2 flex"> |
| 29 | <a |
| 30 | v-if="addon.author?.link" |
| 31 | :href="addon.author.link" |
| 32 | class="text-current text-sm opacity-60 hover:opacity-100" |
| 33 | target="_blank" |
| 34 | >{{ addon.author.name }}</a> |
| 35 | <div v-else-if="addon.author?.name" class="text-current text-sm opacity-60 hover:opacity-100"> |
| 36 | {{ addon.author.name }} |
| 37 | </div> |
| 38 | <div class="flex-auto" /> |
| 39 | <a |
| 40 | v-if="addon.id" |
| 41 | :href="`https://npmjs.com/package/${addon.id}`" |
| 42 | class="ml-2 text-current opacity-40 text-sm hover:opacity-100" |
| 43 | target="_blank" |
| 44 | > |
| 45 | <simple-icons-npm /> |
| 46 | </a> |
| 47 | <a |
| 48 | v-if="addon.repo" |
| 49 | :href="addon.repo" |
| 50 | class="ml-2 text-current opacity-40 text-sm hover:opacity-100" |
| 51 | target="_blank" |
| 52 | > |
| 53 | <simple-icons-github /> |
| 54 | </a> |
| 55 | </div> |
| 56 | </a> |
| 57 | </template> |
| 58 |