fix: 高亮显示活动

This commit is contained in:
Zhicheng WANG 2018-11-13 08:51:28 +08:00
parent 17b120ab45
commit f31ef52623
3 changed files with 9 additions and 2 deletions

View File

@ -26,7 +26,8 @@
}, },
{ {
"url": "https://ng-china.org/", "url": "https://ng-china.org/",
"title": "**** 2018 ngChina @ 杭州!****" "title": "**** 2018 ngChina @ 杭州!****",
"highlight": true
} }
], ],
"TopBarNarrow": [ "TopBarNarrow": [

View File

@ -3,9 +3,14 @@ import { NavigationNode } from 'app/navigation/navigation.service';
@Component({ @Component({
selector: 'aio-top-menu', selector: 'aio-top-menu',
styles: [`
.nav-link.highlight {
color: yellow;
}
`],
template: ` template: `
<ul role="navigation"> <ul role="navigation">
<li *ngFor="let node of nodes"><a class="nav-link" [href]="node.url" [title]="node.title">{{ node.title }}</a></li> <li *ngFor="let node of nodes"><a class="nav-link" [class.highlight]="node.highlight" [href]="node.url" [title]="node.title">{{ node.title }}</a></li>
</ul>` </ul>`
}) })
export class TopMenuComponent { export class TopMenuComponent {

View File

@ -8,6 +8,7 @@ export interface NavigationNode {
tooltip?: string; tooltip?: string;
hidden?: boolean; hidden?: boolean;
divider?: boolean; divider?: boolean;
highlight?: boolean;
children?: NavigationNode[]; children?: NavigationNode[];
} }