Skip to content

Commit

Permalink
fix: fix filmstrip appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherPHolder committed Apr 1, 2024
1 parent 7a9af75 commit 24c2aa6
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
import { Component, input } from '@angular/core';
import { NgScrollbarModule } from 'ngx-scrollbar';
import { NgFor } from '@angular/common';

@Component({
selector: 'lib-viewer-file-strip',
template: `
@for (item of filmStrip(); track item) {
<img class='film-strip-frame' [src]='item.data' height='100px' alt=''>
}
<ng-scrollbar>
<div class="film-strip-container">
@for (item of filmStrip(); track item) {
<img class='film-strip-frame' [src]='item.data' height='100px' alt=''>
}
</div>
</ng-scrollbar>
`,
imports: [NgScrollbarModule, NgFor],
standalone: true,
styles: [`
:host {
ng-scrollbar {
--scrollbar-track-color: rgb(0 0 0 / 5%);
/* TODO - extract token correctly */
--scrollbar-thumb-color: var(--mat-slider-ripple-color);
--scrollbar-thickness: 12;
--scrollbar-offset: 6;
--scrollbar-border-radius: 8px;
border-radius: 3px;
}
.film-strip-container {
display: flex;
overflow: auto;
-ms-overflow-style: none; /* Internet Explorer 10+ */
scrollbar-width: none; /* Firefox */
::-webkit-scrollbar {
display: none; /* Safari and Chrome */
}
padding: 4px;
padding: 8px 4px;
}
.film-strip-frame {
Expand All @@ -29,7 +40,6 @@ import { Component, input } from '@angular/core';
&:not(:first-child):not(:last-child) {
margin: 0 8px;
/*padding: 16px;*/
}
&:hover {
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"aws-sdk": "^2.1218.0",
"axios": "1.6.0",
"lighthouse": "^11.2.0",
"ngx-scrollbar": "^14.0.0-beta.0",
"npx": "^3.0.0",
"puppeteer": "^21.5.0",
"rxjs": "~7.5.0",
Expand Down

0 comments on commit 24c2aa6

Please sign in to comment.