diff --git a/webapp/src/app/modules/news/news.component.html b/webapp/src/app/modules/news/news.component.html
index 7db1c785..0c7d74d7 100644
--- a/webapp/src/app/modules/news/news.component.html
+++ b/webapp/src/app/modules/news/news.component.html
@@ -28,28 +28,14 @@
-
-
-
+
diff --git a/webapp/src/app/modules/news/news.component.scss b/webapp/src/app/modules/news/news.component.scss
index 94f2534b..0e90d177 100644
--- a/webapp/src/app/modules/news/news.component.scss
+++ b/webapp/src/app/modules/news/news.component.scss
@@ -57,54 +57,7 @@
}
.year-field {
- display: flex;
- flex-direction: column;
- justify-content: center;
- min-width: 220px;
- padding: 0 6px;
- margin-top: -20px;
-}
-
-.year-field__head {
- display: flex;
- align-items: baseline;
- justify-content: space-between;
- gap: 10px;
- font-size: 12px;
- margin-bottom: 20px;
-}
-
-.year-field__label {
- color: var(--sg-text-muted);
- font-weight: 600;
-}
-
-.year-field__range {
- color: var(--sg-text);
- font-weight: 600;
- white-space: nowrap;
-}
-
-.year-field mat-slider {
- width: 100%;
- margin: 0;
-}
-
-.reset-filter-btn {
- min-width: 132px;
- height: 42px;
- padding: 0 14px;
- border: 1px solid var(--sg-border);
- border-radius: var(--sg-radius-sm);
- color: var(--sg-text);
- background: var(--sg-surface);
-
- mat-icon {
- margin-right: 6px;
- width: 20px;
- height: 20px;
- font-size: 20px;
- }
+ min-width: 280px;
}
@media (max-width: 600px) {
diff --git a/webapp/src/app/modules/news/news.component.ts b/webapp/src/app/modules/news/news.component.ts
index f1072f5d..9d916390 100644
--- a/webapp/src/app/modules/news/news.component.ts
+++ b/webapp/src/app/modules/news/news.component.ts
@@ -13,9 +13,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { debounceTime, merge } from 'rxjs';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select';
-import { MatSliderModule } from '@angular/material/slider';
-import { MatButtonModule } from '@angular/material/button';
-import { MatIconModule } from '@angular/material/icon';
import { WorksService } from '../../api';
import {
@@ -28,6 +25,7 @@ import {
NEWS_MIN_YEAR,
} from '../../shared/ui/news-card/news-card.component';
import { SelectorOption } from '../../shared/ui/query-param-selector/query-param-selector.component';
+import { YearRangeSliderComponent } from '../../shared/ui/year-range-slider/year-range-slider.component';
interface NewsArticle extends NewsArticleBase {
author?: string | null;
@@ -49,11 +47,9 @@ type SortOrder = 'desc' | 'asc';
ReactiveFormsModule,
MatFormFieldModule,
MatSelectModule,
- MatSliderModule,
- MatButtonModule,
- MatIconModule,
CardSearchComponent,
NewsCardComponent,
+ YearRangeSliderComponent,
],
templateUrl: './news.component.html',
styleUrl: './news.component.scss',
@@ -138,12 +134,6 @@ export class NewsComponent implements OnInit {
.subscribe(() => this.applyFilters());
}
- resetFilters(): void {
- this.relevanceFilter.setValue([]);
- this.yearFrom.setValue(this.minYear);
- this.yearTo.setValue(this.maxYear);
- }
-
private applyFilters(): void {
const relevance =
this.relevanceFilter.value.length > 0