mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
add feed indication
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="#">Live Feed</a>
|
<a class="navbar-brand" href="#"><span id="horn" class="glyphicon glyphicon-bullhorn"></span> Live Game Feed</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse navbar-collapse" id="myNavbar">
|
<div class="collapse navbar-collapse" id="myNavbar">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
|
|||||||
@@ -7,8 +7,12 @@ export class HighlightDirective {
|
|||||||
constructor(private el: ElementRef, private renderer: Renderer) {
|
constructor(private el: ElementRef, private renderer: Renderer) {
|
||||||
let self = this;
|
let self = this;
|
||||||
self.renderer.setElementClass(this.el.nativeElement, 'feed-highlight', true);
|
self.renderer.setElementClass(this.el.nativeElement, 'feed-highlight', true);
|
||||||
|
let horn = document.getElementById('horn');
|
||||||
|
horn.className += ' orange';
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
self.renderer.setElementClass(self.el.nativeElement, 'feed-highlight-light', true);
|
self.renderer.setElementClass(self.el.nativeElement, 'feed-highlight-light', true);
|
||||||
|
|
||||||
|
document.getElementById("horn").className = document.getElementById("horn").className.replace(/(?:^|\s)orange(?!\S)/g, '')
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,3 +80,7 @@ footer {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.orange {
|
||||||
|
color: #ff5525;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user