Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add films component #116

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ce5e684
chore: add films component
MishaZhem Aug 8, 2024
c814f96
chore: add carousel
MishaZhem Aug 8, 2024
709ad7c
chore: list films
MishaZhem Aug 8, 2024
f9237c8
chore: add click
MishaZhem Aug 8, 2024
4494f23
chore: open window
MishaZhem Aug 9, 2024
329179b
chore: add service
MishaZhem Aug 9, 2024
6c680de
fix: fix cspell
MishaZhem Aug 9, 2024
6e56835
chore: add description for movies
MishaZhem Aug 9, 2024
6d657df
chore: add background image
MishaZhem Aug 9, 2024
f836ade
Merge branch 'main' into movie
MishaZhem Aug 9, 2024
2cabad4
chore: add different padding
MishaZhem Aug 9, 2024
204ece3
chore: fix border
MishaZhem Aug 9, 2024
bdc0fbc
chore: add player
MishaZhem Aug 9, 2024
cbba6c9
chore: add video for player
MishaZhem Aug 9, 2024
a807341
chore: add title
MishaZhem Aug 9, 2024
1af3381
chore: change routing
MishaZhem Aug 12, 2024
950ad86
chore: add expand
MishaZhem Aug 12, 2024
4f16c6d
chore: change for mobile
MishaZhem Aug 12, 2024
86984b9
chore: change for mobile
MishaZhem Aug 12, 2024
a2ba9df
chore: change player for mobiles
MishaZhem Aug 12, 2024
b74195b
chore: change style
MishaZhem Aug 12, 2024
4e11ddf
chore: remove style
MishaZhem Aug 12, 2024
e9bc788
chore: add breakpoints
MishaZhem Aug 13, 2024
90d3afc
Merge branch 'main' into movie
MishaZhem Aug 15, 2024
63a60b0
Merge branch 'main' into movie
MishaZhem Aug 19, 2024
c4bdb0c
fix: fix build
MishaZhem Aug 19, 2024
f40557b
chore: add rating
MishaZhem Aug 19, 2024
1e29704
Merge branch 'main' into movie
MishaZhem Aug 23, 2024
7cf8b88
chore: add second row
MishaZhem Aug 23, 2024
7e24850
chore: add new images
MishaZhem Aug 27, 2024
bfd0531
chore: add tui-scrollbar
MishaZhem Aug 27, 2024
3026229
chore: add headings for cards
MishaZhem Aug 27, 2024
fbe8667
chore: remove extra code
MishaZhem Aug 27, 2024
0bbf5bc
chore: change cspell config
MishaZhem Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
"forecastday",
"mintemp",
"maxtemp",
"Create",
"Unstake",
"Unstaking",
"Tiko",
"Create",
"NFTTABLE",
"Unstake",
"Unstaking"
]
Expand Down
Binary file added apps/taiga-lumbermill/public/example.mp4
Binary file not shown.
Binary file added apps/taiga-lumbermill/public/movies/1.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 apps/taiga-lumbermill/public/movies/2.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 apps/taiga-lumbermill/public/movies/3.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 apps/taiga-lumbermill/public/movies/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions apps/taiga-lumbermill/src/components/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,32 @@ export const appRoutes: Route[] = [
),
data: {title: 'Crypto'},
},
{
path: 'films',
loadComponent: async () =>
import('../../dashboards/films/films.component').then(
(mod) => mod.FilmComponent,
),
data: {title: 'Films'},
children: [
{
path: '',
loadComponent: async () =>
import(
'../../dashboards/films/components/list-films/list-films.component'
).then((mod) => mod.ListFilmsComponent),
data: {title: 'Films'},
},
{
path: ':id',
loadComponent: async () =>
import(
'../../dashboards/films/components/film-view/film-view.component'
).then((mod) => mod.default),
data: {title: 'Films'},
},
],
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@
</button>
</footer>
</aside>
<main tuiNavigationMain>
<main
tuiNavigationMain
class="main"
>
<router-outlet [style.display]="'none'" />
</main>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.aside-bar {
height: calc(100vh - 3rem);
}

.main {
max-width: 100%;
}
Original file line number Diff line number Diff line change
@@ -1,60 +1,64 @@
<div class="info">
<h3 class="row-title tui-space_top-0 tui-space_bottom-0">Top NFTs</h3>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
<tui-scrollbar>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
</tui-scrollbar>
</div>
<div class="info">
<h3 class="row-title tui-space_top-0 tui-space_bottom-0">Recent bought NFTs</h3>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
<tui-scrollbar>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
</tui-scrollbar>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

.info {
display: flex;
overflow: hidden;
flex-direction: column;
gap: 0.5rem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Output,
} from '@angular/core';
import {TuiAmountPipe} from '@taiga-ui/addon-commerce';
import {TuiAppearance, TuiSurface, TuiTitle} from '@taiga-ui/core';
import {TuiAppearance, TuiScrollbar, TuiSurface, TuiTitle} from '@taiga-ui/core';
import {TuiAvatar} from '@taiga-ui/kit';
import {TuiCardLarge, TuiHeader} from '@taiga-ui/layout';

Expand All @@ -24,6 +24,7 @@ import {NftService} from '../nft.service';
TuiAvatar,
TuiCardLarge,
TuiHeader,
TuiScrollbar,
TuiSurface,
TuiTitle,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export const INITIAL_DATA: DashboardsData[] = [
link: '/dashboards/crypto',
description: 'Crypto token dashboard',
},
{
title: 'Films Dashboard',
link: '/dashboards/films',
description: 'Streaming service for films and TV series',
},
];

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div
tuiAppearance="whiteblock"
tuiCardLarge="normal"
class="card"
>
@let item = filmsService[id];
<div class="player">
<div class="blackout"></div>
<video
#video
controls
tuiMedia
class="video"
[(currentTime)]="currentTime"
[(paused)]="paused"
[(volume)]="volume"
>
<source
src="./example.mp4"
type="video/mp4"
/>
</video>
<header
tuiHeader="l"
class="title"
>
<h2 tuiTitle>
{{ item.title }}
</h2>
</header>
<button
appearance="icon"
iconStart="@tui.circle-x"
tuiIconButton
class="close"
[routerLink]="'/dashboards/films/'"
></button>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.video {
display: block;
width: 100%;
}

.blackout {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-shadow: inset 0 10rem 7rem -5rem var(--tui-background-accent-opposite);
}

.player {
position: relative;
margin: 0;
}

.close {
position: absolute;
top: 1rem;
right: 1rem;
color: var(--tui-background-base-alt);

@media (max-width: 700px) {
top: 0.4rem;
right: 0.4rem;
}

@media (max-width: 420px) {
top: 0.1rem;
right: 0.1rem;
}
}

.title[tuiHeader][data-size='l'] {
position: absolute;
top: 1rem;
right: 50%;
left: 50%;
width: max-content;
transform: translateX(-50%);
color: var(--tui-background-base-alt);

@media (max-width: 700px) {
& h2 {
font-size: 1.3rem;
}
}

@media (max-width: 420px) {
& h2 {
font-size: 1rem;
}
}
}

.card[tuiCardLarge] {
margin-top: 1.25rem;
padding: 1.25rem;
background-color: var(--tui-background-base-alt);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import {ChangeDetectionStrategy, Component, inject} from '@angular/core';
import {toSignal} from '@angular/core/rxjs-interop';
import {FormsModule} from '@angular/forms';
import {ActivatedRoute, RouterLink} from '@angular/router';
import {TuiMedia} from '@taiga-ui/cdk';
import {TuiAppearance, TuiButton, TuiIcon, TuiTitle} from '@taiga-ui/core';
import {TuiCardLarge, TuiHeader} from '@taiga-ui/layout';

import {FilmsService} from '../../films.service';

@Component({
standalone: true,
selector: 'lmb-film-view',
imports: [
FormsModule,
RouterLink,
TuiAppearance,
TuiButton,
TuiCardLarge,
TuiHeader,
TuiIcon,
TuiMedia,
TuiTitle,
],
templateUrl: './film-view.component.html',
styleUrls: ['./film-view.component.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export default class FilmViewComponent {
private readonly activatedRoute = inject(ActivatedRoute);
protected id = toSignal(this.activatedRoute.params)()?.['id'];
protected filmsService = inject(FilmsService).filmsData;
protected currentTime = 0;
protected paused = true;
protected volume = 1;
}
Loading
Loading