Added tooltips to the menu buttons.

This commit is contained in:
Joachim Nielandt 2018-01-02 20:50:38 +01:00
parent 5ed471c1d2
commit 63fcb42b8d
3 changed files with 19 additions and 6 deletions

View File

@ -14,9 +14,9 @@
<!-- <button type="button" class="btn btn-secondary">Left</button> --> <!-- <button type="button" class="btn btn-secondary">Left</button> -->
<!-- <button type="button" class="btn btn-secondary">Middle</button> --> <!-- <button type="button" class="btn btn-secondary">Middle</button> -->
<!-- <button type="button" class="btn btn-secondary">Right</button> --> <!-- <button type="button" class="btn btn-secondary">Right</button> -->
<a routerLink="/home"><i class="text-secondary fa fa-home fa-fw fa-2x" aria-hidden="true"></i></a> <a routerLink="/home"><i data-toggle="tooltip" title="Home" class="text-secondary fa fa-home fa-fw fa-2x" aria-hidden="true"></i></a>
<a routerLink="/posts"><i class="text-secondary fa fa-sticky-note fa-fw fa-2x" aria-hidden="true"></i></a> <a routerLink="/posts"><i data-toggle="tooltip" title="Posts" class="text-secondary fa fa-sticky-note fa-fw fa-2x" aria-hidden="true"></i></a>
<a routerLink="/cv"><i class="text-secondary fa fa-id-badge fa-fw fa-2x" aria-hidden="true"></i></a> <a routerLink="/cv"><i data-toggle="tooltip" title="Curriculum Vitae" class="text-secondary fa fa-id-badge fa-fw fa-2x" aria-hidden="true"></i></a>
</div> </div>
</div> </div>
<!--row--> <!--row-->

View File

@ -1,10 +1,22 @@
import { Component } from '@angular/core'; import { Component, OnInit, AfterViewChecked } from '@angular/core';
declare var $: any;
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.css'] styleUrls: ['./app.component.css']
}) })
export class AppComponent { export class AppComponent implements OnInit, AfterViewChecked {
title = 'app';
title = 'Joachim Homepage';
ngAfterViewChecked(): void {
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
}
ngOnInit() {
}
} }

View File

@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>