Search: Elasticsearch-style highlighted match snippets (results + typeahead)
- SearchHighlight.Snippet: extracts a ±70-char window around the first matching term and marks it (with ellipses) — the ES "highlight" fragment. - Result cards (shift/job/talent) now show that snippet from the matched description/tags when a query is present, so you SEE where the term hit (e.g. «…دارای مدرک <mark>mmt</mark>…») instead of just the role. - Typeahead suggestions gain a highlighted "sub" line (talent→tags, shift→city·specialty, job→facility·city) so matches show in the dropdown too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -294,7 +294,12 @@ mark { background: #fff3bf; color: inherit; padding: 0 2px; border-radius: 3px;
|
||||
.nav-search-results a:hover { background: var(--primary-soft); }
|
||||
.nav-search-results .ns-type { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--primary-dark);
|
||||
background: var(--primary-soft); border-radius: 6px; padding: 2px 7px; }
|
||||
.nav-search-results .ns-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.nav-search-results .ns-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
|
||||
.nav-search-results .ns-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.nav-search-results .ns-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
/* ES-style matched snippet shown under a search-result card */
|
||||
.search-snippet { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 4px 0 2px;
|
||||
background: var(--bg); border-inline-start: 3px solid var(--primary-soft); padding: 5px 9px; border-radius: 6px; }
|
||||
.nav-search-results .ns-all { font-weight: 700; color: var(--primary-dark); justify-content: center; }
|
||||
/* Big search box on the /Search page head */
|
||||
.search-hero { display: flex; gap: 8px; max-width: 640px; margin: 6px 0 4px; }
|
||||
|
||||
Reference in New Issue
Block a user