Updated site to use momentum for contacting, registration, gallery and calendar, as well as some other updates to the site content
All checks were successful
Build Website / Build NPM Project (push) Successful in 1m42s
Build Website / Tag Version (push) Successful in 1m2s
Build Website / Build Container (push) Successful in 2m50s

This commit is contained in:
2026-06-05 19:19:27 -04:00
parent 3e4efc2fd2
commit 16ddd1c8a3
32 changed files with 753 additions and 311 deletions

View File

@@ -1,8 +1,8 @@
import {AfterViewInit, Component, EventEmitter, Input, OnDestroy, Output} from '@angular/core';
import {ActivatedRoute, NavigationEnd, NavigationStart, Router} from '@angular/router';
import {ActivatedRoute, NavigationStart, Router} from '@angular/router';
import {combineLatest, filter, Subscription} from 'rxjs';
import {NAVIGATION} from '../../misc/navigation';
import {BreakpointService} from '../../services/breakpoint.service';
import {NAVIGATION, NavigationItem} from '../../misc/navigation';
import {MomentumService} from '../../services/momentum.service';
@Component({
selector: 'xxx-navbar',
@@ -21,7 +21,7 @@ export class NavbarComponent implements AfterViewInit, OnDestroy {
@Output() hamburgerClick = new EventEmitter<void>();
constructor(private route: ActivatedRoute, private router: Router, public breakpoint: BreakpointService) { }
constructor(private route: ActivatedRoute, private router: Router, public momentum: MomentumService) { }
ngAfterViewInit() {
this.sub = combineLatest([this.router.events.pipe(filter((e: any) => e.navigationTrigger != 'popstate' || e instanceof NavigationStart)), this.route.fragment]).subscribe(([url, frag]) => {
@@ -34,6 +34,15 @@ export class NavbarComponent implements AfterViewInit, OnDestroy {
if(this.sub) this.sub.unsubscribe();
}
openItem(item: NavigationItem) {
// Full url
if(item.url.startsWith('http'))
location.href = item.url;
// Relative
else
this.router.navigate([item.url], {fragment: item.fragment});
}
scroll(id: string) {
const el = document.getElementById(id);
if(el) el.scrollIntoView({behavior: 'smooth'});