-
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.
Merge pull request #21 from grammerjam/trending-section
Trending section
- Loading branch information
Showing
129 changed files
with
357 additions
and
36 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.2 KB
base-client/public/assets/thumbnails/asia-in-24-days/regular/medium.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.7 KB
base-client/public/assets/thumbnails/asia-in-24-days/regular/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.1 KB
base-client/public/assets/thumbnails/autosport-the-series/regular/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.6 KB
base-client/public/assets/thumbnails/autosport-the-series/regular/medium.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.2 KB
base-client/public/assets/thumbnails/autosport-the-series/regular/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+33 KB
base-client/public/assets/thumbnails/community-of-ours/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+20.9 KB
base-client/public/assets/thumbnails/community-of-ours/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+13.8 KB
base-client/public/assets/thumbnails/community-of-ours/regular/small.jpg
Oops, something went wrong.
Binary file added
BIN
+19.8 KB
base-client/public/assets/thumbnails/dark-side-of-the-moon/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+12.7 KB
base-client/public/assets/thumbnails/dark-side-of-the-moon/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+7.82 KB
base-client/public/assets/thumbnails/dark-side-of-the-moon/regular/small.jpg
Oops, something went wrong.
Binary file added
BIN
+41.7 KB
base-client/public/assets/thumbnails/dark-side-of-the-moon/trending/large.jpg
Oops, something went wrong.
Binary file added
BIN
+13.8 KB
base-client/public/assets/thumbnails/dark-side-of-the-moon/trending/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+19.8 KB
base-client/public/assets/thumbnails/during-the-hunt/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+14 KB
base-client/public/assets/thumbnails/during-the-hunt/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+9.18 KB
base-client/public/assets/thumbnails/during-the-hunt/regular/small.jpg
Oops, something went wrong.
Binary file added
BIN
+32.5 KB
base-client/public/assets/thumbnails/earths-untouched/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+22.2 KB
base-client/public/assets/thumbnails/earths-untouched/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+13.5 KB
base-client/public/assets/thumbnails/earths-untouched/regular/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+23.3 KB
base-client/public/assets/thumbnails/mission-saturn/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
base-client/public/assets/thumbnails/mission-saturn/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+10.6 KB
base-client/public/assets/thumbnails/mission-saturn/regular/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+9.58 KB
base-client/public/assets/thumbnails/no-land-beyond/regular/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+18.4 KB
base-client/public/assets/thumbnails/off-the-track/regular/medium.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+16.5 KB
base-client/public/assets/thumbnails/production-line/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+11.5 KB
base-client/public/assets/thumbnails/production-line/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+8.07 KB
base-client/public/assets/thumbnails/production-line/regular/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+20.2 KB
base-client/public/assets/thumbnails/same-answer-2/regular/medium.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+20.2 KB
base-client/public/assets/thumbnails/the-great-lands/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+12.5 KB
base-client/public/assets/thumbnails/the-great-lands/regular/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+26.3 KB
base-client/public/assets/thumbnails/the-tasty-tour/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+18.2 KB
base-client/public/assets/thumbnails/the-tasty-tour/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+12.5 KB
base-client/public/assets/thumbnails/the-tasty-tour/regular/small.jpg
Oops, something went wrong.
Binary file added
BIN
+16.6 KB
base-client/public/assets/thumbnails/undiscovered-cities/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+11.9 KB
base-client/public/assets/thumbnails/undiscovered-cities/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+8.41 KB
base-client/public/assets/thumbnails/undiscovered-cities/regular/small.jpg
Oops, something went wrong.
Binary file added
BIN
+30.7 KB
base-client/public/assets/thumbnails/undiscovered-cities/trending/large.jpg
Oops, something went wrong.
Binary file added
BIN
+12.5 KB
base-client/public/assets/thumbnails/undiscovered-cities/trending/small.jpg
Oops, something went wrong.
Binary file added
BIN
+18 KB
base-client/public/assets/thumbnails/unresolved-cases/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+11.3 KB
base-client/public/assets/thumbnails/unresolved-cases/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+7.62 KB
base-client/public/assets/thumbnails/unresolved-cases/regular/small.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+9.22 KB
base-client/public/assets/thumbnails/whispering-hill/regular/large.jpg
Oops, something went wrong.
Binary file added
BIN
+5.88 KB
base-client/public/assets/thumbnails/whispering-hill/regular/medium.jpg
Oops, something went wrong.
Binary file added
BIN
+4.08 KB
base-client/public/assets/thumbnails/whispering-hill/regular/small.jpg
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
base-client/src/app/components/bookmark/bookmark.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,7 @@ | ||
<div class="bookmark-icon-container"> | ||
<div class="bookmark-icon-background"> | ||
</div> | ||
<img class="bookmark-icon" | ||
[src]="isBookmarked ? './assets/icon-bookmark-full.svg' : './assets/icon-bookmark-empty.svg'" | ||
alt="bookmark icon"> | ||
</div> |
33 changes: 33 additions & 0 deletions
33
base-client/src/app/components/bookmark/bookmark.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,33 @@ | ||
@import "../styles/variables"; | ||
|
||
.bookmark-icon-container { | ||
width: 32px; | ||
height: 32px; | ||
right: 8px; | ||
top: 8px; | ||
position: absolute; | ||
|
||
@media (min-width: $breakpoint-tablet) { | ||
right: 12px; | ||
top: 12px; | ||
} | ||
} | ||
|
||
.bookmark-icon-background { | ||
width: 32px; | ||
height: 32px; | ||
left: 0px; | ||
top: 0px; | ||
position: absolute; | ||
opacity: 0.50; | ||
background: #10141E; | ||
border-radius: 9999px; | ||
} | ||
|
||
.bookmark-icon { | ||
width: 11.67px; | ||
height: 14px; | ||
left: 10px; | ||
top: 9px; | ||
position: absolute; | ||
} |
23 changes: 23 additions & 0 deletions
23
base-client/src/app/components/bookmark/bookmark.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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { BookmarkComponent } from './bookmark.component'; | ||
|
||
describe('BookmarkComponent', () => { | ||
let component: BookmarkComponent; | ||
let fixture: ComponentFixture<BookmarkComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [BookmarkComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(BookmarkComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
base-client/src/app/components/bookmark/bookmark.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, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-bookmark', | ||
standalone: true, | ||
imports: [], | ||
templateUrl: './bookmark.component.html', | ||
styleUrl: './bookmark.component.scss' | ||
}) | ||
export class BookmarkComponent { | ||
@Input() isBookmarked: boolean = false | ||
} |
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
1 change: 1 addition & 0 deletions
1
base-client/src/app/components/regular-section/regular-section.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 @@ | ||
<p>regular-section works!</p> |
Empty file.
23 changes: 23 additions & 0 deletions
23
base-client/src/app/components/regular-section/regular-section.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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { RegularSectionComponent } from './regular-section.component'; | ||
|
||
describe('RegularSectionComponent', () => { | ||
let component: RegularSectionComponent; | ||
let fixture: ComponentFixture<RegularSectionComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [RegularSectionComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(RegularSectionComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
base-client/src/app/components/regular-section/regular-section.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'; | ||
|
||
@Component({ | ||
selector: 'app-regular-section', | ||
standalone: true, | ||
imports: [], | ||
templateUrl: './regular-section.component.html', | ||
styleUrl: './regular-section.component.scss' | ||
}) | ||
export class RegularSectionComponent { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
base-client/src/app/components/trending-card/trending-card.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 @@ | ||
<article class="trending-card"> | ||
<img class="trending-thumbnail" [src]="selectionData.thumbnail.trending?.small" [srcset]="" | ||
[alt]="selectionData.title"> | ||
<app-bookmark [isBookmarked]="selectionData.isBookmarked" /> | ||
<div class="trending-card-data-container"> | ||
<div class="trending-card-data"> | ||
{{selectionData.year}} | ||
<span>•</span> | ||
<img class="category-icon" | ||
[src]="selectionData.category === 'Movie' ? './assets/icon-category-movie.svg' : './assets/icon-category-tv.svg'" | ||
[alt]="selectionData.category"> | ||
{{selectionData.category}} | ||
<span>•</span> | ||
{{selectionData.rating}} | ||
</div> | ||
<h3>{{selectionData.title}}</h3> | ||
</div> | ||
</article> |
67 changes: 67 additions & 0 deletions
67
base-client/src/app/components/trending-card/trending-card.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,67 @@ | ||
@import "../styles/variables"; | ||
|
||
.trending-card { | ||
width: 240px; | ||
height: 140px; | ||
position: relative; | ||
@media (min-width: $breakpoint-tablet) { | ||
width: 470px; | ||
height: 230px; | ||
} | ||
} | ||
|
||
.trending-thumbnail { | ||
width: 240px; | ||
height: 140px; | ||
position: absolute; | ||
left: 0px; | ||
top: 0px; | ||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); | ||
border-radius: 8px; | ||
@media (min-width: $breakpoint-tablet) { | ||
width: 470px; | ||
height: 230px; | ||
} | ||
} | ||
|
||
.trending-card-data-container { | ||
width: 240px; | ||
height: 70px; | ||
left: 0px; | ||
top: 70px; | ||
position: absolute; | ||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%); | ||
border-bottom-left-radius: 8px; | ||
border-bottom-right-radius: 8px; | ||
padding: 16px; | ||
@media (min-width: $breakpoint-tablet) { | ||
width: 470px; | ||
height: 90px; | ||
top: 140px; | ||
} | ||
} | ||
|
||
.trending-card-data { | ||
flex-direction: row; | ||
gap: 8px; | ||
display: flex; | ||
font-size: 12px; | ||
@media (min-width: $breakpoint-tablet) { | ||
font-size: 15px; | ||
} | ||
} | ||
|
||
.category-icon { | ||
width: 12px; | ||
height: 12px; | ||
margin-top: 2px; | ||
} | ||
|
||
h3 { | ||
font-size: 15px; | ||
font-weight: 500; | ||
margin-top: 4px; | ||
@media (min-width: $breakpoint-tablet) { | ||
font-size: 24px; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
base-client/src/app/components/trending-card/trending-card.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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TrendingCardComponent } from './trending-card.component'; | ||
|
||
describe('TrendingCardComponent', () => { | ||
let component: TrendingCardComponent; | ||
let fixture: ComponentFixture<TrendingCardComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [TrendingCardComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(TrendingCardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
14 changes: 14 additions & 0 deletions
14
base-client/src/app/components/trending-card/trending-card.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,14 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { SelectionData } from '../../interfaces/selection-data'; | ||
import { BookmarkComponent } from "../bookmark/bookmark.component"; | ||
|
||
@Component({ | ||
selector: 'app-trending-card', | ||
standalone: true, | ||
imports: [BookmarkComponent], | ||
templateUrl: './trending-card.component.html', | ||
styleUrl: './trending-card.component.scss' | ||
}) | ||
export class TrendingCardComponent { | ||
@Input() selectionData: SelectionData = { id: '', title: '', thumbnail: { trending: { small: '', large: '' }, regular: { small: '', medium: '', large: '' } }, category: '', rating: '', isBookmarked: false, isTrending: false, year: 0 } | ||
} |
8 changes: 8 additions & 0 deletions
8
base-client/src/app/components/trending-section/trending-section.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,8 @@ | ||
<div class="trending-section"> | ||
<h2>Trending</h2> | ||
<div class="selection-container"> | ||
@for(selectionData of trendingDataList; track selectionData.id) { | ||
<app-trending-card [selectionData]="selectionData"></app-trending-card> | ||
} | ||
</div> | ||
</div> |
28 changes: 28 additions & 0 deletions
28
base-client/src/app/components/trending-section/trending-section.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,28 @@ | ||
@import "../styles/variables"; | ||
|
||
.trending-section { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
margin-left: 16px; | ||
width: screen; | ||
overflow: scroll; | ||
margin-bottom: 24px; | ||
} | ||
|
||
h2 { | ||
font-size: 20px; | ||
@media (min-width: $breakpoint-tablet) { | ||
font-size: 32px; | ||
} | ||
} | ||
|
||
.selection-container { | ||
margin-top: 16px; | ||
display: flex; | ||
flex-direction: row; | ||
gap: 16px; | ||
@media (min-width: $breakpoint-tablet) { | ||
gap: 40px; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
base-client/src/app/components/trending-section/trending-section.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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TrendingSectionComponent } from './trending-section.component'; | ||
|
||
describe('TrendingSectionComponent', () => { | ||
let component: TrendingSectionComponent; | ||
let fixture: ComponentFixture<TrendingSectionComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [TrendingSectionComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(TrendingSectionComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
43 changes: 43 additions & 0 deletions
43
base-client/src/app/components/trending-section/trending-section.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,43 @@ | ||
import { Component } from '@angular/core'; | ||
import { SelectionsService } from '../../lib/selections.service'; | ||
import { SelectionData } from '../../interfaces/selection-data'; | ||
import { Subscription } from 'rxjs'; | ||
import { TrendingCardComponent } from '../trending-card/trending-card.component'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-trending-section', | ||
standalone: true, | ||
imports: [TrendingCardComponent], | ||
templateUrl: './trending-section.component.html', | ||
styleUrl: './trending-section.component.scss' | ||
}) | ||
export class TrendingSectionComponent { | ||
trendingDataList: SelectionData[] = [] | ||
trendingSubscription?: Subscription | ||
constructor(private selectionsService: SelectionsService) { } | ||
trendingObservor = { | ||
next: (data: SelectionData[]) => { | ||
this.trendingDataList = data | ||
console.log('next block', data) | ||
}, | ||
error: (error: any) => { | ||
console.log(error) | ||
}, | ||
complete: () => { | ||
console.log('stream completed') | ||
} | ||
} | ||
|
||
ngOnInit(): void { | ||
this.selectionsService.fetchTrendingSelections().subscribe(data => { | ||
this.trendingDataList = data; | ||
}) | ||
} | ||
|
||
ngOnDestroy(): void { | ||
if (this.trendingSubscription) { | ||
this.trendingSubscription.unsubscribe() | ||
} | ||
} | ||
} |
Oops, something went wrong.