|
29 | 29 | </template> |
30 | 30 | </PunkSearchBar> |
31 | 31 |
|
| 32 | + <Card |
| 33 | + v-for="match in collectionMatches" |
| 34 | + :key="`${match.collection.slug}/${match.institution?.slug ?? ''}`" |
| 35 | + class="collection-card" |
| 36 | + > |
| 37 | + <span |
| 38 | + class="collection-arrow" |
| 39 | + aria-hidden="true" |
| 40 | + >↗</span |
| 41 | + > |
| 42 | + <span class="collection-title">{{ |
| 43 | + match.institution?.title ?? match.collection.title |
| 44 | + }}</span> |
| 45 | + <span class="collection-subtitle">{{ |
| 46 | + match.collection.description |
| 47 | + }}</span> |
| 48 | + <CardLink |
| 49 | + :to="match.institution?.source ?? match.collection.source" |
| 50 | + :title="match.institution?.title ?? match.collection.title" |
| 51 | + target="_blank" |
| 52 | + rel="noopener noreferrer" |
| 53 | + /> |
| 54 | + </Card> |
| 55 | + |
32 | 56 | <LazyPunkGrid |
33 | 57 | :ids="ids" |
34 | 58 | :size="size" |
@@ -56,6 +80,7 @@ const { |
56 | 80 | ownerHandle, |
57 | 81 | ids, |
58 | 82 | counts, |
| 83 | + collectionMatches, |
59 | 84 | showWrappedStateColors, |
60 | 85 | onEnter, |
61 | 86 | clearSearch, |
@@ -107,4 +132,41 @@ const { |
107 | 132 | .for-sale-toggle :deep(.form-checkbox-indicator .icon) { |
108 | 133 | font-size: 12px; |
109 | 134 | } |
| 135 | +
|
| 136 | +/* Clickable explainer card, matching the detail-page collection cards: |
| 137 | + CardLink covers the whole card (and drives the built-in hover); the arrow |
| 138 | + floats top-right, aligned with the card's --spacer padding. */ |
| 139 | +.collection-card { |
| 140 | + gap: var(--size-1); |
| 141 | + font-size: var(--font-sm); |
| 142 | +} |
| 143 | +
|
| 144 | +.collection-arrow { |
| 145 | + position: absolute; |
| 146 | + inline-size: auto; |
| 147 | + inset-block-start: var(--spacer); |
| 148 | + inset-inline-end: var(--spacer); |
| 149 | + color: var(--text-dim); |
| 150 | + transition: color var(--speed); |
| 151 | +} |
| 152 | +
|
| 153 | +.collection-title { |
| 154 | + /* leave room for the floating arrow */ |
| 155 | + padding-inline-end: var(--size-5); |
| 156 | +} |
| 157 | +
|
| 158 | +.collection-subtitle { |
| 159 | + color: var(--text-dim); |
| 160 | + font-size: var(--font-xs); |
| 161 | + transition: color var(--speed); |
| 162 | +} |
| 163 | +
|
| 164 | +/* On hover the muted arrow and description brighten to full-contrast text |
| 165 | + (white in dark mode) instead of staying greyed against the highlight. */ |
| 166 | +.collection-card:has(> .card-link:hover) .collection-arrow, |
| 167 | +.collection-card:has(> .card-link:focus-visible) .collection-arrow, |
| 168 | +.collection-card:has(> .card-link:hover) .collection-subtitle, |
| 169 | +.collection-card:has(> .card-link:focus-visible) .collection-subtitle { |
| 170 | + color: var(--text); |
| 171 | +} |
110 | 172 | </style> |
0 commit comments