Refactor scrolling and enhance UI accessibility.

Replaced inline JavaScript for scrolling and copy functionality with Angular methods. Introduced `ScrollService` for smooth scroll-to-top functionality and added associated styles. Removed unused `isHomePage` method and cleaned up components for better maintainability.
This commit is contained in:
2025-04-05 21:50:54 +02:00
parent c628f1e05b
commit dee84cc1a9
7 changed files with 87 additions and 10 deletions
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { ScrollService } from './scroll.service';
describe('ScrollService', () => {
let service: ScrollService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ScrollService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+14
View File
@@ -0,0 +1,14 @@
import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class ScrollService {
scrollToTop(): void {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}
}