search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

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

revert: remove date filter UI (broken, needs investigation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz 75e30a55 e10929fa

+3 -84
+3 -84
site/index.html
··· 408 408 color: #d4956a; 409 409 } 410 410 411 - .date-filter { 412 - margin-bottom: 1rem; 413 - } 414 - 415 - .date-filter-label { 416 - font-size: 11px; 417 - color: #444; 418 - margin-bottom: 0.5rem; 419 - } 420 - 421 - .date-filter-list { 422 - display: flex; 423 - gap: 0.5rem; 424 - } 425 - 426 - .date-option { 427 - font-size: 11px; 428 - padding: 3px 8px; 429 - background: #151515; 430 - border: 1px solid #252525; 431 - border-radius: 3px; 432 - cursor: pointer; 433 - color: #777; 434 - } 435 - 436 - .date-option:hover { 437 - background: #1a1a1a; 438 - border-color: #333; 439 - color: #aaa; 440 - } 441 - 442 - .date-option.active { 443 - background: rgba(59, 130, 246, 0.2); 444 - border-color: #60a5fa; 445 - color: #60a5fa; 446 - } 447 411 448 412 .active-filter { 449 413 display: flex; ··· 539 503 } 540 504 541 505 /* ensure minimum 44px touch targets */ 542 - .tag, .platform-option, .mode-option, .date-option, .suggestion, input.tag-input { 506 + .tag, .platform-option, .mode-option, .suggestion, input.tag-input { 543 507 min-height: 44px; 544 508 display: inline-flex; 545 509 align-items: center; ··· 598 562 } 599 563 600 564 /* tags wrap better on mobile */ 601 - .tags-list, .platform-filter-list, .date-filter-list { 565 + .tags-list, .platform-filter-list { 602 566 gap: 0.5rem; 603 567 } 604 568 ··· 617 581 618 582 /* ensure touch targets on tablets too */ 619 583 @media (hover: none) and (pointer: coarse) { 620 - .tag, .platform-option, .mode-option, .date-option, .suggestion, .related-item, input.tag-input { 584 + .tag, .platform-option, .mode-option, .suggestion, .related-item, input.tag-input { 621 585 min-height: 44px; 622 586 display: inline-flex; 623 587 align-items: center; ··· 643 607 <div id="tags" class="tags"></div> 644 608 645 609 <div id="platform-filter" class="platform-filter"></div> 646 - 647 - <div id="date-filter" class="date-filter"></div> 648 610 649 611 <div id="results" class="results"> 650 612 <div class="empty-state"> ··· 669 631 const activeFilterDiv = document.getElementById('active-filter'); 670 632 const suggestionsDiv = document.getElementById('suggestions'); 671 633 const platformFilterDiv = document.getElementById('platform-filter'); 672 - const dateFilterDiv = document.getElementById('date-filter'); 673 634 const modeToggleDiv = document.getElementById('mode-toggle'); 674 635 let currentTag = null; 675 636 let currentPlatform = null; 676 - let currentSince = null; 677 637 let currentMode = 'keyword'; 678 638 let allTags = []; 679 639 let popularSearches = []; ··· 706 666 if (tag) searchUrl += `&tag=${encodeURIComponent(tag)}`; 707 667 if (platform) searchUrl += `&platform=${encodeURIComponent(platform)}`; 708 668 if (currentMode !== 'keyword') searchUrl += `&mode=${currentMode}`; 709 - const sinceDate = getSinceDate(); 710 - if (sinceDate) searchUrl += `&since=${encodeURIComponent(sinceDate)}`; 711 669 712 670 try { 713 671 const res = await fetch(searchUrl); ··· 1002 960 if (q) params.set('q', q); 1003 961 if (currentTag) params.set('tag', currentTag); 1004 962 if (currentPlatform) params.set('platform', currentPlatform); 1005 - if (currentSince) params.set('since', currentSince); 1006 963 if (currentMode !== 'keyword') params.set('mode', currentMode); 1007 964 const url = params.toString() ? `?${params}` : '/'; 1008 965 history.pushState(null, '', url); ··· 1073 1030 platformFilterDiv.innerHTML = `<div class="platform-filter-label">filter by platform:</div><div class="platform-filter-list">${html}</div>`; 1074 1031 } 1075 1032 1076 - function renderDateFilter() { 1077 - const options = [ 1078 - { id: null, label: 'any' }, 1079 - { id: 'week', label: 'week' }, 1080 - { id: 'month', label: 'month' }, 1081 - { id: 'year', label: 'year' }, 1082 - ]; 1083 - const html = options.map(o => { 1084 - const active = currentSince === o.id; 1085 - return `<span class="date-option${active ? ' active' : ''}" onclick="setDateFilter(${o.id ? `'${o.id}'` : 'null'})">${o.label}</span>`; 1086 - }).join(''); 1087 - dateFilterDiv.innerHTML = `<div class="date-filter-label">date:</div><div class="date-filter-list">${html}</div>`; 1088 - } 1089 - 1090 - function setDateFilter(period) { 1091 - currentSince = currentSince === period ? null : period; 1092 - renderDateFilter(); 1093 - if (queryInput.value.trim() || currentTag || currentPlatform) { 1094 - doSearch(); 1095 - } 1096 - } 1097 - 1098 - function getSinceDate() { 1099 - if (!currentSince) return null; 1100 - const now = new Date(); 1101 - switch (currentSince) { 1102 - case 'week': now.setDate(now.getDate() - 7); break; 1103 - case 'month': now.setMonth(now.getMonth() - 1); break; 1104 - case 'year': now.setFullYear(now.getFullYear() - 1); break; 1105 - } 1106 - return now.toISOString(); 1107 - } 1108 - 1109 1033 function renderModeToggle() { 1110 1034 const modes = [ 1111 1035 { id: 'keyword', label: 'keyword' }, ··· 1243 1167 queryInput.value = params.get('q') || ''; 1244 1168 currentTag = params.get('tag') || null; 1245 1169 currentPlatform = params.get('platform') || null; 1246 - currentSince = params.get('since') || null; 1247 1170 currentMode = params.get('mode') || 'keyword'; 1248 1171 renderActiveFilter(); 1249 1172 renderTags(); 1250 1173 renderPlatformFilter(); 1251 - renderDateFilter(); 1252 1174 renderModeToggle(); 1253 1175 tagsDiv.style.display = currentMode === 'keyword' ? '' : 'none'; 1254 1176 if (queryInput.value || currentTag || currentPlatform) search(queryInput.value, currentTag, currentPlatform); ··· 1259 1181 const initialQuery = initialParams.get('q'); 1260 1182 const initialTag = initialParams.get('tag'); 1261 1183 const initialPlatform = initialParams.get('platform'); 1262 - const initialSince = initialParams.get('since'); 1263 1184 const initialMode = initialParams.get('mode'); 1264 1185 if (initialQuery) queryInput.value = initialQuery; 1265 1186 if (initialTag) currentTag = initialTag; 1266 1187 if (initialPlatform) currentPlatform = initialPlatform; 1267 - if (initialSince) currentSince = initialSince; 1268 1188 if (initialMode) currentMode = initialMode; 1269 1189 renderActiveFilter(); 1270 1190 renderPlatformFilter(); 1271 - renderDateFilter(); 1272 1191 renderModeToggle(); 1273 1192 tagsDiv.style.display = currentMode === 'keyword' ? '' : 'none'; 1274 1193