Skip to content

Commit 09a85e1

Browse files
Ismaestroiramos
authored and
iramos
committed
feat(style): added bootstrap and font awesome
1 parent 0942cc6 commit 09a85e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+335
-639
lines changed

angular-cli.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,25 @@
1818
"prefix": "toh",
1919
"mobile": false,
2020
"styles": [
21+
"../node_modules/bootstrap/dist/css/bootstrap.css",
22+
"../node_modules/font-awesome/css/font-awesome.css",
2123
"assets/css/styles.css"
2224
],
23-
"scripts": [],
25+
"scripts": [
26+
"../node_modules/jquery/dist/jquery.js",
27+
"../node_modules/tether/dist/js/tether.js",
28+
"../node_modules/bootstrap/dist/js/bootstrap.js"
29+
],
2430
"environments": {
2531
"source": "environments/environment.ts",
2632
"dev": "environments/environment.ts",
2733
"prod": "environments/environment.prod.ts"
2834
}
2935
}
3036
],
31-
"addons": [],
37+
"addons": [
38+
"../node_modules/font-awesome/fonts/*.+(otf|eot|svg|ttf|woff|woff2)"
39+
],
3240
"packages": [],
3341
"e2e": {
3442
"protractor": {

e2e/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ describe('angular-hero-cli App', function () {
99

1010
it('Title', () => {
1111
page.navigateTo();
12-
expect(page.getParagraphText()).toEqual('Tour of Heroes');
12+
expect(page.getParagraphText()).toEqual('Top Heroes');
1313
});
1414
});

e2e/app.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export class AngularTOHPage {
66
}
77

88
getParagraphText() {
9-
return element(by.css('toh-app > h1')).getText();
9+
return element(by.css('toh-hero-top h3')).getText();
1010
}
1111
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"@angular/platform-browser": "^2.3.1",
2323
"@angular/platform-browser-dynamic": "^2.3.1",
2424
"@angular/router": "^3.3.1",
25+
"bootstrap": "^4.0.0-alpha.6",
2526
"core-js": "^2.4.1",
27+
"font-awesome": "^4.7.0",
2628
"json-server": "^0.9.4",
2729
"rxjs": "^5.0.1",
2830
"ts-helpers": "^1.1.1",

protractor.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports.config = {
1313
'browserName': 'chrome'
1414
},
1515
directConnect: true,
16-
baseUrl: 'http://localhost:3002/',
16+
baseUrl: 'http://localhost:4200/',
1717
framework: 'jasmine',
1818
jasmineNodeOpts: {
1919
showColors: true,

server/db.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
"power": "Weather Changer",
1919
"alterEgo": "bombi"
2020
},
21-
{
22-
"id": 14,
23-
"name": "Celeritas",
24-
"power": "Super Hot",
25-
"alterEgo": "cele"
26-
},
2721
{
2822
"id": 15,
2923
"name": "Magneta",
@@ -47,12 +41,6 @@
4741
"name": "Magma",
4842
"power": "Super Flexible",
4943
"alterEgo": "cold"
50-
},
51-
{
52-
"id": 20,
53-
"name": "Tornado",
54-
"power": "Really Smart",
55-
"alterEgo": "torny"
5644
}
5745
]
5846
}

src/app/app.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
<h1>{{title}}</h1>
2-
<toh-nav></toh-nav>
1+
<toh-nav [title]="'Tour of heroes'"></toh-nav>
32
<router-outlet></router-outlet>

src/app/app.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import {IAppConfig} from './config/iapp.config';
55

66
@Component({
77
selector: 'toh-app',
8-
templateUrl: './app.component.html',
9-
styleUrls: [],
8+
templateUrl: './app.component.html'
109
})
1110

1211
export class AppComponent {

src/app/core/core.module.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/app/core/core.module.js.map

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/core/logger.service.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/app/core/logger.service.js.map

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/core/logger.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import {Injectable} from '@angular/core';
22

33
@Injectable()
44
export class LoggerService {
5-
log(msg: string) {
5+
static log(msg: string) {
66
console.log(msg);
77
}
88

9-
error(msg: string, obj?: any) {
9+
static error(msg: string, obj?: any) {
1010
console.error(msg, obj);
1111
}
1212
}

src/app/core/module-import-guard.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/app/core/module-import-guard.js.map

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/core/nav/nav.component.css

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/app/core/nav/nav.component.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<header>
2-
<nav>
3-
<a *ngFor="let item of menuItems" routerLink="{{item.link}}" routerLinkActive="active">{{item.name}}</a>
4-
</nav>
5-
<toh-hero-search></toh-hero-search>
2+
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
3+
<a class="navbar-brand" href="/">{{title}}</a>
4+
<div class="collapse navbar-collapse" id="navbarNav">
5+
<ul class="navbar-nav">
6+
<li class="nav-item active" routerLinkActive="active"
7+
*ngFor="let item of menuItems" routerLink="{{item.link}}">
8+
<a class="nav-link">{{item.name}}</a>
9+
</li>
10+
</ul>
11+
</div>
12+
<toh-hero-search></toh-hero-search>
13+
</nav>
614
</header>

src/app/core/nav/nav.component.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/app/core/nav/nav.component.js.map

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/core/nav/nav.component.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
header {
2+
display: flex;
3+
margin-bottom: 3em;
4+
5+
nav {
6+
width: 100%;
7+
float: left;
8+
9+
a {
10+
padding: 15px 20px;
11+
text-decoration: none;
12+
margin: 0 1em 0 0;
13+
display: inline-block;
14+
background-color: #eee;
15+
border-radius: 4px;
16+
cursor: pointer;
17+
}
18+
19+
a:visited, a:link {
20+
color: #607D8B;
21+
}
22+
23+
a:hover {
24+
color: #039be5;
25+
background-color: #CFD8DC;
26+
}
27+
28+
a.active {
29+
color: #039be5;
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)