|
29 | 29 | let countryName = $derived( |
30 | 30 | countrySummary.find((d) => d.iso3 === $filters.selectedCountry)?.country_name ?? $filters.selectedCountry, |
31 | 31 | ); |
| 32 | + let selectedDepartmentList = $derived([...$filters.selectedDepartments].sort()); |
32 | 33 | </script> |
33 | 34 |
|
34 | 35 | <section class="scene-explorer" aria-labelledby="scene-4-title"> |
|
41 | 42 | <div class="filter-bar" aria-label="Explorer filters"> |
42 | 43 | <DecadeSlider {timeline} ariaLabel="Filter medium explorer by decade range" /> |
43 | 44 | <div class="filter-group"> |
44 | | - <p>Departments</p> |
| 45 | + <p>Curatorial departments</p> |
45 | 46 | <div class="chip-row"> |
46 | 47 | {#each departments as department} |
47 | 48 | <button |
|
73 | 74 | <button type="button" class="reset" onclick={resetFilters}>Reset filters</button> |
74 | 75 | </div> |
75 | 76 | </div> |
| 77 | + {#if selectedDepartmentList.length} |
| 78 | + <p class="filter-note"> |
| 79 | + <strong>Department filter:</strong> |
| 80 | + {selectedDepartmentList.join(', ')}. The cards below still show the actual medium classifications found inside |
| 81 | + that department, so a Painting & Sculpture selection can contain a small number of photographs, drawings, or |
| 82 | + prints. |
| 83 | + </p> |
| 84 | + {/if} |
76 | 85 | <Legend mode="categorical" items={genderLegend} caption="Unknown gender is retained as its own bucket." /> |
77 | 86 | <MediumExplorer {data} /> |
78 | 87 | </div> |
|
132 | 141 | text-transform: uppercase; |
133 | 142 | } |
134 | 143 |
|
| 144 | + .filter-note { |
| 145 | + margin: calc(-1 * var(--space-1)) 0 var(--space-2); |
| 146 | + padding: var(--space-1) var(--space-2); |
| 147 | + color: var(--fg-on-light-mute); |
| 148 | + background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-paper)); |
| 149 | + border-left: 3px solid var(--accent-primary); |
| 150 | + font-family: var(--font-body); |
| 151 | + font-size: var(--type-small-size); |
| 152 | + line-height: var(--type-small-line); |
| 153 | + } |
| 154 | +
|
| 155 | + .filter-note strong { |
| 156 | + color: var(--fg-on-light-strong); |
| 157 | + font-family: var(--font-ui); |
| 158 | + } |
| 159 | +
|
135 | 160 | button { |
136 | 161 | border: 1px solid var(--rule-on-light); |
137 | 162 | padding: 0.375rem 0.5rem; |
|
0 commit comments