[Monitor | Trunk]: Add smooth scroll

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@60945 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2021-04-21 12:52:40 +00:00
parent 57a616037c
commit f98e66b01e
3 changed files with 88 additions and 88 deletions

View File

@ -11,6 +11,7 @@ import {properties} from "../environments/environment";
import {BehaviorSubject, Subscriber} from "rxjs";
import {StakeholderService} from "./openaireLibrary/monitor/services/stakeholder.service";
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
@Component({
selector: 'app-root',
@ -61,7 +62,7 @@ export class AppComponent {
private subscriptions: any[] = [];
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
private router: Router, private stakeholderService: StakeholderService,
private router: Router, private stakeholderService: StakeholderService, private smoothScroll: SmoothScroll,
private userManagementService: UserManagementService) {
this.subscriptions.push(router.events.forEach((event) => {
if (event instanceof NavigationStart) {
@ -103,6 +104,7 @@ export class AppComponent {
});
this.userManagementService.clearSubscriptions();
this.stakeholderService.clearSubscriptions();
this.smoothScroll.clearSubscriptions();
}
public buildMenu() {

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
<head>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -40,18 +40,17 @@
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body class="" style="">
</head>
<body>
<div class="uk-offcanvas-content uk-height-viewport">
<app-root></app-root>
</div>
</body>
<script type="text/javascript">
function loadAltmetrics(e, t, n) {
var d = "createElement", c = "getElementsByTagName", m = "setAttribute", n = document.getElementById(e);
return n && n.parentNode && n.parentNode.removeChild(n), n = document[d + "NS"] && document.documentElement.namespaceURI, n = n ? document[d + "NS"](n, "script") : document[d]("script"), n[m]("id", e), n[m]("src", t), (document[c]("head")[0] || document[c]("body")[0]).appendChild(n), n = new Image, void n[m]("src", "https://d1uo4w7k31k5mn.cloudfront.net/donut/0.png")
};
}
</script>
</body>
<script src="https://unpkg.com/smoothscroll-polyfill@0.4.3/dist/smoothscroll.min.js"></script>
</html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr" vocab="http://schema.org/">
<head>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -40,18 +40,17 @@
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body class="" style="">
</head>
<body>
<div class="uk-offcanvas-content uk-height-viewport">
<app-root></app-root>
</div>
</body>
<script type="text/javascript">
function loadAltmetrics(e, t, n) {
var d = "createElement", c = "getElementsByTagName", m = "setAttribute", n = document.getElementById(e);
return n && n.parentNode && n.parentNode.removeChild(n), n = document[d + "NS"] && document.documentElement.namespaceURI, n = n ? document[d + "NS"](n, "script") : document[d]("script"), n[m]("id", e), n[m]("src", t), (document[c]("head")[0] || document[c]("body")[0]).appendChild(n), n = new Image, void n[m]("src", "https://d1uo4w7k31k5mn.cloudfront.net/donut/0.png")
};
}
</script>
</body>
<script src="https://unpkg.com/smoothscroll-polyfill@0.4.3/dist/smoothscroll.min.js"></script>
</html>