The Trans Directory
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: fmt

+17 -12
+16 -11
quartz/components/scripts/search.inline.ts
··· 76 76 }) 77 77 .join(" ") 78 78 79 - return `${startIndex === 0 ? "" : "..."}${slice}${endIndex === tokenizedText.length - 1 ? "" : "..." 80 - }` 79 + return `${startIndex === 0 ? "" : "..."}${slice}${ 80 + endIndex === tokenizedText.length - 1 ? "" : "..." 81 + }` 81 82 } 82 83 83 84 function highlightHTML(searchTerm: string, innerHTML: string) { ··· 276 277 return [] 277 278 } 278 279 279 - return tags.map(tag => { 280 - if (tag.toLowerCase().includes(term.toLowerCase())) { 281 - return `<li><p class="match-tag">#${tag}</p></li>` 282 - } else { 283 - return `<li><p>#${tag}</p></li>` 284 - } 285 - }).slice(0, numTagResults) 280 + return tags 281 + .map((tag) => { 282 + if (tag.toLowerCase().includes(term.toLowerCase())) { 283 + return `<li><p class="match-tag">#${tag}</p></li>` 284 + } else { 285 + return `<li><p>#${tag}</p></li>` 286 + } 287 + }) 288 + .slice(0, numTagResults) 286 289 } 287 290 288 291 function resolveUrl(slug: FullSlug): URL { ··· 299 302 300 303 async function onMouseEnter(ev: MouseEvent) { 301 304 if (!ev.target) return 302 - currentHover?.classList.remove('focus') 305 + currentHover?.classList.remove("focus") 303 306 currentHover?.blur() 304 307 const target = ev.target as HTMLInputElement 305 308 await displayPreview(target) ··· 392 395 preview.replaceChildren(previewInner) 393 396 394 397 // scroll to longest 395 - const highlights = [...preview.querySelectorAll(".highlight")].sort((a, b) => b.innerHTML.length - a.innerHTML.length) 398 + const highlights = [...preview.querySelectorAll(".highlight")].sort( 399 + (a, b) => b.innerHTML.length - a.innerHTML.length, 400 + ) 396 401 highlights[0]?.scrollIntoView() 397 402 } 398 403
+1 -1
quartz/components/styles/search.scss
··· 204 204 line-height: 1.4rem; 205 205 font-weight: bold; 206 206 color: var(--secondary); 207 - 207 + 208 208 &.match-tag { 209 209 color: var(--tertiary); 210 210 }