docs/.vitepress/theme/components/extrepo/SiteGrid.vue

a92c62778d79ea32c814bfce5540e823c2ad6de1
wotaku/docs/.vitepress/theme/components/extrepo/SiteGrid.vue

37 lines · 807 bytes

 1<script setup lang="ts">
 2import SiteCell from './SiteCell.vue'
 3import type { RepoSite } from './types'
 4
 5defineProps<{
 6  sites: (RepoSite & { repoName?: string })[]
 7  emptyText: string
 8}>()
 9</script>
10
11<template>
12  <div class="ext-site-grid">
13    <div v-if="sites.length === 0" class="ext-site-empty">
14      {{ emptyText }}
15    </div>
16    <SiteCell v-for="site in sites" :key="`${site.repoName ?? ''}-${site.name}-${site.lang}`" :site="site" />
17  </div>
18</template>
19
20<style scoped>
21.ext-site-grid {
22  display: grid;
23  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
24  gap: 6px;
25  padding: 10px;
26  max-height: 340px;
27  overflow-y: auto;
28  background-color: var(--vp-c-bg);
29}
30
31.ext-site-empty {
32  grid-column: 1 / -1;
33  color: var(--vp-c-text-2);
34  font-size: 13px;
35  padding: 8px 4px;
36}
37</style>
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form