Compare commits

..

No commits in common. "e75fe75a5fdd01dadb5daf0502e9f22c64ee541e" and "a7fd44e3a31b8b0de8de58eb3beea173d8bda5a8" have entirely different histories.

4 changed files with 5 additions and 16 deletions

View File

@ -44,10 +44,6 @@ const routes: Routes = [
];
export const navigationLinks: NavigationLink[] = [
{
text: "Home",
address: "/"
},
{
text: "WarpPI",
address: "/page/WarpPI"
@ -87,7 +83,7 @@ export function fwlinkMatcher(url: UrlSegment[]): UrlMatchResult {
}
@NgModule({
imports: [RouterModule.forRoot(routes, {scrollPositionRestoration: "enabled"})],
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }

View File

@ -7,14 +7,14 @@
[href]="link.address"
[target]="link.newtab === undefined || link.newtab === true ? '_blank' : '_self'"
rel="noopener"
[class.forcefocus] = "currentDocument?.id == link.address"
[class.forcefocus] = "(currentDocument.onDocumentChange() | async)?.id == link.address"
><span>{{link.text}}</span></a>
<a
*ngIf="link.external !== true"
[routerLink]="link.address"
[target]="link.newtab === true ? '_blank' : '_self'"
rel="noopener"
[class.force-focus] = "'/page/' + currentDocument?.id == link.address || (currentDocument?.id == 'index' && link.address == '/')"
[class.force-focus] = "'/page/' + (currentDocument.onDocumentChange() | async)?.id == link.address"
><span>{{link.text}}</span></a>
</li>
</ul>

View File

@ -4,8 +4,6 @@ import { ActivatedRoute, UrlSegment } from "@angular/router";
import { map } from "rxjs/operators";
import { CurrentDocumentService } from "src/app/services/current-document.service";
import { navigationLinks } from "src/app/app-routing.module";
import { DocumentData } from "src/app/symbols/DocumentData";
import { Observable } from "rxjs";
@Component({
selector: "app-navbar",
@ -20,13 +18,8 @@ export class NavbarComponent implements OnInit, AfterViewInit {
overflowMax = false;
@ViewChild("navlogo") navLogo: ElementRef<HTMLElement>;
@ViewChild("navbuttons") navButtons: ElementRef<HTMLElement>;
currentDocument: DocumentData;
constructor(private elRef: ElementRef<HTMLElement>, currentDocument: CurrentDocumentService) {
currentDocument.onDocumentChange().subscribe(docData => {
this.currentDocument = docData;
});
}
constructor(private elRef: ElementRef<HTMLElement>, public currentDocument: CurrentDocumentService) { }
ngOnInit() {
}

View File

@ -51,5 +51,5 @@ Enjoy
## Videos
<div style="margin: auto; text-align: center;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/4rcnu8j1Xqk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen style="max-width: 100%;"></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/4rcnu8j1Xqk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>