Skip to content

Commit b4c7d30

Browse files
committed
Additional images, minor quality of life enhancements
1 parent 6cb011b commit b4c7d30

8 files changed

Lines changed: 29 additions & 1 deletion

File tree

src/app/app.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ const appRoutes: Routes = [
3636
HeaderComponent,
3737
LightboxFooterComponent
3838
],
39-
bootstrap: [AppComponent], imports: [RouterModule.forRoot(appRoutes),
39+
bootstrap: [AppComponent], imports: [RouterModule.forRoot(appRoutes, {
40+
scrollPositionRestoration: "enabled",
41+
anchorScrolling: "enabled"
42+
}),
4043
BrowserModule,
4144
BrowserAnimationsModule,
4245
MaterialModule,

src/app/components/photo-grid/photo-grid.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ <h2 class="gallery-title">
2525
[routerLink]="['/lightbox', photo.id]"
2626
[photoAlt]="photo.photoAlt"
2727
[photoSrc]="photo.photoSrc"
28+
[photoTitle]="photo.photoTitle"
2829
[loading]="index < 3 ? 'eager' : 'lazy'"
2930
[fetchPriority]="index < 3 ? 'high' : 'auto'"
3031
(imageLoaded)="onPhotoLoaded()"

src/app/components/photo-grid/photo-grid.component.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface PhotoItem {
1212
id: number;
1313
photoSrc: string;
1414
photoAlt: string;
15+
photoTitle?: string;
1516
}
1617

1718
@Component({
@@ -80,11 +81,25 @@ export class PhotoGridComponent implements OnInit, AfterViewInit, OnDestroy {
8081
photoSrc: "assets/images/photography/6078433077.JPG",
8182
photoAlt: "Trinity College, Dublin, Ireland",
8283
},
84+
{
85+
id: 4034431755,
86+
photoSrc: "assets/images/photography/4034431755.JPG",
87+
photoAlt:
88+
"401 Deep Eddy Ave, Austin, TX 78703",
89+
photoTitle: "Deep Eddy Municipal Pool",
90+
},
8391
{
8492
id: 9797,
8593
photoSrc: "assets/images/photography/9797.JPG",
8694
photoAlt: "Playa Guajataca, Isabela, Puerto Rico",
8795
},
96+
{
97+
id: 5898005341,
98+
photoSrc: "assets/images/photography/5898005341.JPG",
99+
photoAlt:
100+
"No. 25號, Lane 49, Chifeng St, Datong District, Taipei City, Taiwan 10353",
101+
photoTitle: "Datong District",
102+
},
88103
{
89104
id: 70710021,
90105
photoSrc: "assets/images/photography/70710021.JPG",
@@ -95,6 +110,13 @@ export class PhotoGridComponent implements OnInit, AfterViewInit, OnDestroy {
95110
photoSrc: "assets/images/photography/70750028.JPG",
96111
photoAlt: "Arashiyama Yusaitei in Kyoto, Japan",
97112
},
113+
{
114+
id: 96460166,
115+
photoSrc: "assets/images/photography/96460166.JPG",
116+
photoAlt:
117+
"Joanne & Iris",
118+
photoTitle: "Emma Long Metropolitan Park",
119+
},
98120
{
99121
id: 295350033,
100122
photoSrc: "assets/images/photography/295350033.JPG",

src/app/components/photo/photo.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<img
33
[src]="photoSrc"
44
[alt]="photoAlt"
5+
[attr.title]="photoTitle || null"
56
[loading]="loading"
67
[attr.fetchpriority]="fetchPriority"
78
(load)="onImageLoad()"

src/app/components/photo/photo.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export class PhotoComponent implements OnInit {
1010

1111
@Input() photoSrc: string;
1212
@Input() photoAlt: string;
13+
@Input() photoTitle?: string;
1314
@Input() loading: "eager" | "lazy" = "lazy";
1415
@Input() fetchPriority: "high" | "auto" = "auto";
1516
@Output() imageLoaded = new EventEmitter<void>();
1.01 MB
Loading
1.13 MB
Loading
1.85 MB
Loading

0 commit comments

Comments
 (0)