diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.html b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.html new file mode 100644 index 0000000000000000000000000000000000000000..b20dfdbe0bb641fd0a40c4663239fd589b237eb5 --- /dev/null +++ b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.html @@ -0,0 +1,19 @@ +<nshmp-lib-ng-template #template [navigationList]="navigationList" [title]=""> + <!-- Dashboard --> + <nshmp-lib-ng-dashboard [sections]="sections"> + <nshmp-lib-ng-dashboard-title> + USGS Earthquake Hazard Toolbox: + <br /> + Hazard Applications + </nshmp-lib-ng-dashboard-title> + <nshmp-lib-ng-dashboard-description /> + </nshmp-lib-ng-dashboard> + + <!-- About page --> + <nshmp-lib-ng-about-page> + <nshmp-lib-ng-about-content + [showSavingSettingPanel]="false" + [showUsingApplicationPanel]="false" + /> + </nshmp-lib-ng-about-page> +</nshmp-lib-ng-template> diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.scss b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.spec.ts b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..39ededed7b469685dcc87dbcb73bcfb224d4c9b7 --- /dev/null +++ b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.spec.ts @@ -0,0 +1,22 @@ +import {ComponentFixture, TestBed} from '@angular/core/testing'; + +import {AppComponent} from './app.component'; + +describe('AppComponent', () => { + let component: AppComponent; + let fixture: ComponentFixture<AppComponent>; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [AppComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(AppComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.ts b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..858a8e2a9dbbe094b0dd52df8d44088edfb95b55 --- /dev/null +++ b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.ts @@ -0,0 +1,46 @@ +import {Component} from '@angular/core'; +import { + NshmpLibNgAboutContentComponent, + NshmpLibNgAboutPageComponent, +} from '@ghsc/nshmp-lib-ng/about'; +import { + ApplicationSections, + NshmpLibNgDashboardComponent, + NshmpLibNgDashboardDescriptionComponent, + NshmpLibNgDashboardTitleComponent, + NshmpLibNgTemplateComponent, +} from '@ghsc/nshmp-lib-ng/nshmp'; +import { + hazardApps, + navigation, +} from 'projects/nshmp-apps/src/shared/utils/navigation.utils'; + +@Component({ + imports: [ + NshmpLibNgTemplateComponent, + NshmpLibNgAboutPageComponent, + NshmpLibNgDashboardComponent, + NshmpLibNgDashboardTitleComponent, + NshmpLibNgDashboardDescriptionComponent, + NshmpLibNgAboutContentComponent, + ], + selector: 'app-app', + standalone: true, + styleUrl: './app.component.scss', + templateUrl: './app.component.html', +}) +export class AppComponent { + /** Navigation list for menu */ + navigationList = navigation(); + + sections: ApplicationSections[] = [ + { + gridClass: 'grid-col-12', + sections: [ + { + applications: hazardApps().map(navigation => ({navigation})), + }, + ], + }, + ]; +}