mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-26 03:27:30 +00:00
Add AureliaSpa template (#398)
This commit is contained in:
committed by
SteveSandersonMS
parent
867e60d7fd
commit
e60ea04f86
@@ -0,0 +1,6 @@
|
||||
@media (max-width: 767px) {
|
||||
/* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */
|
||||
.body-content {
|
||||
padding-top: 50px;
|
||||
}
|
||||
}
|
||||
14
templates/AureliaSpa/ClientApp/app/components/app/app.html
Normal file
14
templates/AureliaSpa/ClientApp/app/components/app/app.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<require from="../navmenu/navmenu.html"></require>
|
||||
<require from="./app.css"></require>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<navmenu router.bind="router"></navmenu>
|
||||
</div>
|
||||
<div class="col-sm-9 body-content">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
34
templates/AureliaSpa/ClientApp/app/components/app/app.ts
Normal file
34
templates/AureliaSpa/ClientApp/app/components/app/app.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Aurelia } from 'aurelia-framework';
|
||||
import { Router, RouterConfiguration } from 'aurelia-router';
|
||||
|
||||
export class App {
|
||||
router: Router;
|
||||
|
||||
configureRouter(config: RouterConfiguration, router: Router) {
|
||||
config.title = 'Aurelia';
|
||||
config.map([{
|
||||
route: [ '', 'home' ],
|
||||
name: 'home',
|
||||
settings: { icon: 'home' },
|
||||
moduleId: '../home/home',
|
||||
nav: true,
|
||||
title: 'Home'
|
||||
}, {
|
||||
route: 'counter',
|
||||
name: 'counter',
|
||||
settings: { icon: 'education' },
|
||||
moduleId: '../counter/counter',
|
||||
nav: true,
|
||||
title: 'Counter'
|
||||
}, {
|
||||
route: 'fetch-data',
|
||||
name: 'fetchdata',
|
||||
settings: { icon: 'th-list' },
|
||||
moduleId: '../fetchdata/fetchdata',
|
||||
nav: true,
|
||||
title: 'Fetch data'
|
||||
}]);
|
||||
|
||||
this.router = router;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user