-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be69441
commit 8a8ad2e
Showing
15 changed files
with
261 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/app/components/events/event-filter-modal/event-filter-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class="modal-header"> | ||
<h2>filter</h2> | ||
<button type="button" class="close-button" aria-label="Close" (click)="activeModal.dismiss('Cross click')"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="39" height="39" viewBox="0 0 39 39" fill="none"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M30.399 8.60095C31.0337 9.23555 31.0337 10.2644 30.399 10.899L10.899 30.399C10.2644 31.0337 9.23555 31.0337 8.60095 30.399C7.96635 29.7644 7.96635 28.7356 8.60095 28.101L28.101 8.60095C28.7356 7.96635 29.7644 7.96635 30.399 8.60095Z" | ||
fill="#1C2B33"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M8.60095 8.60095C9.23555 7.96635 10.2644 7.96635 10.899 8.60095L30.399 28.101C31.0337 28.7356 31.0337 29.7644 30.399 30.399C29.7644 31.0337 28.7356 31.0337 28.101 30.399L8.60095 10.899C7.96635 10.2644 7.96635 9.23555 8.60095 8.60095Z" | ||
fill="#1C2B33"/> | ||
</svg> | ||
</button> | ||
</div> | ||
|
||
<div class="filter"> | ||
<app-event-filter (hideFilterIfNeeded)="activeModal.dismiss('filter applied')"></app-event-filter> | ||
</div> | ||
|
27 changes: 27 additions & 0 deletions
27
src/app/components/events/event-filter-modal/event-filter-modal.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
:host { | ||
max-height: 100vh; | ||
overflow-y: scroll; | ||
padding: 1rem; | ||
} | ||
|
||
.modal-header { | ||
border-bottom: none; | ||
padding-left: 0; | ||
padding-bottom: 0; | ||
padding-right: 0; | ||
|
||
h2 { | ||
font-size: 1.25rem; | ||
} | ||
|
||
.close-button { | ||
background-color: unset; | ||
border: none; | ||
margin-top: -6px; | ||
margin-bottom: 6px; | ||
} | ||
} | ||
|
||
.filter { | ||
overflow-y: scroll; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/app/components/events/event-filter-modal/event-filter-modal.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { EventFilterModalComponent } from './event-filter-modal.component'; | ||
|
||
describe('EventFilterModalComponent', () => { | ||
let component: EventFilterModalComponent; | ||
let fixture: ComponentFixture<EventFilterModalComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [EventFilterModalComponent] | ||
}); | ||
fixture = TestBed.createComponent(EventFilterModalComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
src/app/components/events/event-filter-modal/event-filter-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Component } from '@angular/core'; | ||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; | ||
|
||
@Component({ | ||
selector: 'app-event-filter-modal', | ||
templateUrl: './event-filter-modal.component.html', | ||
styleUrls: ['./event-filter-modal.component.scss'] | ||
}) | ||
export class EventFilterModalComponent { | ||
constructor(public activeModal: NgbActiveModal) { | ||
} | ||
} |
59 changes: 30 additions & 29 deletions
59
src/app/components/events/event-filter/event-filter.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
<div class="modal-header"> | ||
<button type="button" class="btn-close" aria-label="Close" (click)="activeModal.dismiss('Cross click')"></button> | ||
</div> | ||
<div class="filter"> | ||
<input class="search-term" type="text" [(ngModel)]="searchTerm" (ngModelChange)="searchTermUpdated()" | ||
placeholder="tschertgar"> | ||
|
||
<hr> | ||
|
||
<h2>data d’entschatta</h2> | ||
<ngb-datepicker [(ngModel)]="selectedStartDate" (dateSelect)="dateSelected($event)"></ngb-datepicker> | ||
|
||
<div class="container"> | ||
<div class="row p-1"> | ||
<div class="col-4"> | ||
<h2>regiun</h2> | ||
<div class="tags"> | ||
<ng-container *ngFor="let region of regions"> | ||
<hr> | ||
|
||
<h2>regiun</h2> | ||
<div class="tags"> | ||
<ng-container *ngFor="let region of regions"> | ||
<span class="tag-element" [class.active]="selectedRegionIds.includes(region.id)" | ||
(click)="toggleRegion(region.id)">{{ region.name }}</span><br> | ||
</ng-container> | ||
</div> | ||
</div> | ||
<div class="col-4"> | ||
<h2>gener</h2> | ||
<div class="tags"> | ||
<ng-container *ngFor="let genre of genres"> | ||
</ng-container> | ||
</div> | ||
|
||
<hr> | ||
|
||
<h2>gener</h2> | ||
<div class="tags"> | ||
<ng-container *ngFor="let genre of genres"> | ||
<span class="tag-element" [class.active]="selectedGenreIds.includes(genre.id)" | ||
(click)="toggleGenre(genre.id)">{{ genre.name }}</span><br> | ||
</ng-container> | ||
</div> | ||
</div> | ||
<div class="col-4"> | ||
<h2>data d’entschatta</h2> | ||
<ngb-datepicker [(ngModel)]="selectedStartDate" (dateSelect)="dateSelected($event)"></ngb-datepicker> | ||
<h2 class="mt-3">tschertga</h2> | ||
<input class="search-term" type="text" [(ngModel)]="searchTerm" (ngModelChange)="searchTermUpdated()"> | ||
</div> | ||
</ng-container> | ||
</div> | ||
</div> | ||
<div class="modal-footer d-flex justify-content-center"> | ||
<button type="button" class="clndr" (click)="resetFilters();activeModal.close('Close click')">stizzar il filter | ||
|
||
<hr> | ||
|
||
<button type="button" class="clndr accent" (click)="resetFilters()"> | ||
stizzar il filter | ||
</button> | ||
<button type="button" class="clndr accent" (click)="close()"> | ||
abunar quest filter | ||
</button> | ||
<button type="button" class="clndr" (click)="activeModal.close('Close click')">abunar quest filter</button> | ||
</div> |
29 changes: 26 additions & 3 deletions
29
src/app/components/events/event-filter/event-filter.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
.modal-header { | ||
border-bottom: none; | ||
.filter { | ||
//overflow-y: scroll; | ||
} | ||
|
||
h2 { | ||
font-size: 1.25rem; | ||
} | ||
|
||
.search-term { | ||
width: 100%; | ||
} | ||
|
||
.tags { | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.tag-element { | ||
display: inline-block; | ||
margin-bottom: 6px; | ||
margin-left: 0; | ||
cursor: pointer; | ||
} | ||
|
||
hr { | ||
border: 0; | ||
margin-top: 1rem; | ||
margin-bottom: 1rem; | ||
width: 100%; | ||
height: 1px; | ||
background: #BBBFC2; | ||
opacity: unset; | ||
} | ||
|
||
button { | ||
width: 100%; | ||
margin-bottom: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="name"> | ||
<a href="/">CHALENDER.CH</a> | ||
<a href="/">chalender.ch</a> | ||
</div> | ||
|
||
<div class="short-menu"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { DatepickerTranslatorService } from './datepicker-translator.service'; | ||
|
||
describe('DatepickerTranslatorService', () => { | ||
let service: DatepickerTranslatorService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(DatepickerTranslatorService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { NgbDatepickerI18n, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'; | ||
import { TranslateService } from '@ngx-translate/core'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class DatepickerTranslatorService extends NgbDatepickerI18n { | ||
|
||
private v = { | ||
weekdays: ['gl', 'ma', 'me', 'gie', 've', 'so', 'du'], | ||
months: ['scha', 'fev', 'mar', 'avr', 'matg', 'zercl', 'fen', 'uost', 'sett', 'oct', 'nov', 'dec'], | ||
weekLabel: 'emna' | ||
}; | ||
|
||
constructor(private translateService: TranslateService) { | ||
super(); | ||
} | ||
|
||
getWeekdayLabel(weekday: number): string { | ||
return this.v.weekdays[weekday - 1]; | ||
} | ||
|
||
override getWeekLabel(): string { | ||
return this.v.weekLabel; | ||
} | ||
|
||
getMonthShortName(month: number): string { | ||
return this.v.months[month - 1]; | ||
} | ||
|
||
getMonthFullName(month: number): string { | ||
return this.getMonthShortName(month); | ||
} | ||
|
||
getDayAriaLabel(date: NgbDateStruct): string { | ||
return `${date.day}-${date.month}-${date.year}`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
@import "styles/normalize"; | ||
@import "styles/fonts"; | ||
@import "styles/menu"; | ||
@import "styles/filter"; | ||
|
||
|
||
:root { | ||
|
Oops, something went wrong.