Skip to content

Commit

Permalink
updating not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
sagely1 committed Jan 22, 2025
1 parent 5cd10f9 commit 4a67488
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 74 deletions.
31 changes: 2 additions & 29 deletions libs/agora/not-found/src/lib/not-found.component.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
<div class="page-not-found">
<div class="page-not-found-inner">
<h1 class="page-not-found-heading">We're sorry!</h1>
<h1 class="page-not-found-message">Page not found.</h1>
</div>
<h1 class="page-not-found-heading">We're sorry!</h1>
<h1 class="page-not-found-message">Page not found.</h1>
</div>
<!-- <div *ngIf="dataversion$ | async as dataVersion">
<h3>Data Release Info</h3>
<ul>
<li>Data File: {{ dataVersion.data_file }}</li>
<li>Data Version: {{ dataVersion.data_version }}</li>
<li>Team Images Id: {{ dataVersion.team_images_id }}</li>
</ul>
</div> -->
<!-- <div *ngIf="wiki$ | async as wiki">
<h4>Wiki page fetched with local HTTP request</h4>
{{ wiki | json }}
</div>
<div *ngIf="wikiAlternative$ | async as wikiAlternative">
<h4>Wiki page fetched with Synapse API Client for Angular</h4>
{{ wikiAlternative | json }}
</div> -->
<!-- <div class="btn-group">
<a mat-raised-button class="home-btn" href="/home">Home</a>
<a
mat-raised-button
color="basic"
href="https://github.com/Sage-Bionetworks/sage-monorepo/issues/new/choose"
>Contact Us</a
>
</div> -->
3 changes: 2 additions & 1 deletion libs/agora/not-found/src/lib/not-found.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

.page-not-found {
min-height: calc(100vh - var(--header-height) - var(--footer-height) + 1px);
background-image: url('/agora-assets/images/page-not-found.svg');
background-image: url('/agora-assets/images/hero-background.svg');
background-size: cover !important;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;

h1 {
text-align: center;
Expand Down
47 changes: 3 additions & 44 deletions libs/agora/not-found/src/lib/not-found.component.ts
Original file line number Diff line number Diff line change
@@ -1,50 +1,9 @@
import { CommonModule } from '@angular/common';
import { Component, OnInit, Renderer2 } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { RouterModule } from '@angular/router';
import { MatCardModule } from '@angular/material/card';
import { ConfigService } from '@sagebionetworks/agora/config';
import { SeoService } from '@sagebionetworks/shared/util';
import { DataversionService, Dataversion } from '@sagebionetworks/agora/api-client-angular';
import { getSeoData } from './seo-data';
import { Observable } from 'rxjs';
// import { SynapseApiService } from '@sagebionetworks/agora/services';
// import { SynapseWiki } from '@sagebionetworks/agora/models';
// import { OrgSagebionetworksRepoModelWikiWikiPage } from '@sagebionetworks/synapse/api-client-angular';
import { Component } from '@angular/core';

@Component({
selector: 'agora-not-found',
imports: [CommonModule, RouterModule, MatCardModule, MatButtonModule],
imports: [],
templateUrl: './not-found.component.html',
styleUrls: ['./not-found.component.scss'],
})
export class NotFoundComponent implements OnInit {
public appVersion: string;
public apiDocsUrl: string;

dataversion$!: Observable<Dataversion>;
// wiki$!: Observable<SynapseWiki>;
// wikiAlternative$!: Observable<OrgSagebionetworksRepoModelWikiWikiPage>;

constructor(
private readonly configService: ConfigService,
private dataversionService: DataversionService,
private seoService: SeoService,
private renderer2: Renderer2,
// private synapseApiService: SynapseApiService,
) {
this.appVersion = this.configService.config.appVersion;
this.apiDocsUrl = this.configService.config.apiDocsUrl;

this.seoService.setData(getSeoData(), this.renderer2);
}

ngOnInit(): void {
this.dataversion$ = this.dataversionService.getDataversion();

// const ownerId = 'syn25913473';
// const wikiId = '612058';
// this.wiki$ = this.synapseApiService.getWiki(ownerId, wikiId);
// this.wikiAlternative$ = this.synapseApiService.getWikiAlternative(ownerId, wikiId);
}
}
export class NotFoundComponent {}

0 comments on commit 4a67488

Please sign in to comment.