fix: 高亮显示活动
This commit is contained in:
parent
17b120ab45
commit
f31ef52623
@ -26,7 +26,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://ng-china.org/",
|
"url": "https://ng-china.org/",
|
||||||
"title": "**** 2018 ngChina @ 杭州!****"
|
"title": "**** 2018 ngChina @ 杭州!****",
|
||||||
|
"highlight": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"TopBarNarrow": [
|
"TopBarNarrow": [
|
||||||
|
@ -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 {
|
||||||
|
@ -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[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user