Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Commit 90841ae

Browse files
author
Felix Gladisch
committed
feat: bootstrap 4 alpha 6
1 parent b7e00e2 commit 90841ae

File tree

9 files changed

+23
-43
lines changed

9 files changed

+23
-43
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-webpack-seed",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"scripts": {
55
"start": "webpack-dev-server --inline --progress --port 3000",
66
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
@@ -31,7 +31,7 @@
3131
"@angular/platform-browser-dynamic": "2.4.7",
3232
"@angular/router": "3.4.7",
3333
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.20",
34-
"bootstrap": "4.0.0-alpha.5",
34+
"bootstrap": "4.0.0-alpha.6",
3535
"core-js": "2.4.1",
3636
"ie-shim": "0.1.0",
3737
"ng2-translate": "5.0.0",

src/app/app.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.container {
2-
padding-top: 65px;
2+
padding-top: 15px;
33
}

src/app/app.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import { APP_BASE_HREF } from '@angular/common';
55
import { RouterModule } from '@angular/router';
66
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
77

8+
import { NavigationComponent } from './navigation';
9+
810
// Load the implementations that should be tested
911
import { AppComponent } from './app.component';
10-
import { NavigationComponent } from './navigation';
1112

1213
class MockTranslateService {
1314
getBrowserLang(): string { return 'en'; }

src/app/app.module.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { NgModule } from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
3-
import { RouterModule } from '@angular/router';
43
import { HttpModule } from '@angular/http';
54
import { FormsModule } from '@angular/forms';
65
import { TranslateModule } from 'ng2-translate/ng2-translate';
76
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
8-
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
97

108
import { AppComponent } from './app.component';
119
import { routing } from './app.routing';
@@ -22,12 +20,12 @@ import { NavigationComponent } from './navigation';
2220
AboutComponent
2321
],
2422
imports: [
25-
routing,
23+
BrowserModule,
2624
HttpModule,
2725
FormsModule,
28-
BrowserModule,
2926
NgbModule.forRoot(),
30-
TranslateModule.forRoot()
27+
TranslateModule.forRoot(),
28+
routing
3129
]
3230
})
3331
export class AppModule { }

src/app/navigation/navigation.component.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
<nav class="navbar navbar-dark bg-inverse navbar-fixed-top">
1+
<nav class="navbar navbar-inverse bg-inverse navbar-fixed-top navbar-toggleable-sm">
22

3-
<button class="navbar-toggler hidden-md-up float-xs-right" type="button" (click)="isCollapsed = !isCollapsed"></button>
3+
<button class="navbar-toggler navbar-toggler-right" type="button" (click)="isCollapsed = !isCollapsed">
4+
<span class="navbar-toggler-icon"></span>
5+
</button>
46

57
<a class="navbar-brand" [routerLink]="['/']">
68
<img alt="Logo" src="../../assets/images/logo.png">
79
</a>
810

9-
<div class="navbar-toggleable-sm" [ngbCollapse]="isCollapsed">
11+
<div class="collapse navbar-collapse" [ngbCollapse]="isCollapsed">
1012

11-
<ul class="nav navbar-nav">
13+
<ul class="navbar-nav mr-auto">
1214

1315
<li class="nav-item" [routerLinkActive]="['active']">
1416
<a class="nav-link" [routerLink]="['/home']">{{ 'HOME' | translate }}</a>
@@ -20,12 +22,12 @@
2022

2123
</ul>
2224

23-
<ul class="nav navbar-nav float-md-right">
25+
<ul class="navbar-nav">
2426

2527
<li ngbDropdown class="nav-item dropdown">
2628

2729
<a ngbDropdownToggle id="languageDropdown" class="nav-link dropdown-toggle">
28-
<span class="hidden-md-down">{{ 'LANGUAGE' | translate }}</span>
30+
<span>{{ 'LANGUAGE' | translate }}</span>
2931
<span class="caret"></span>
3032
</a>
3133
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="languageDropdown">
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
.navbar-brand {
22
img {
3-
height: 20px;
3+
height: 30px;
44
}
55
}
6-
7-
.navbar-brand {
8-
width: 60px;
9-
height: 35px;
10-
}
11-
12-
.navbar-brand img {
13-
margin: auto;
14-
display: block;
15-
height: 100%;
16-
background-repeat: no-repeat;
17-
background-size: auto 100%;
18-
background-position: center;
19-
}

src/app/navigation/navigation.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
44
import { CommonModule, APP_BASE_HREF } from '@angular/common';
55

66
// Load the implementations that should be tested
7-
import { NavigationComponent } from './';
7+
import { NavigationComponent } from './navigation.component';
88
import { RouterModule } from '@angular/router';
99

1010
class MockTranslateService {

src/assets/styles/main.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,3 @@
33

44
// Partials
55
@import 'partials/custom';
6-
7-
// Temporary Bootstrap 4 fix
8-
.navbar {
9-
@include media-breakpoint-down(sm) {
10-
.navbar-brand {
11-
display: block;
12-
float: none;
13-
height: 40px;
14-
}
15-
}
16-
}

src/vendor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
// Vendors
22

3+
34
// Angular 2
45
import '@angular/platform-browser-dynamic';
56
import '@angular/platform-browser';
67
import '@angular/core';
78
import '@angular/http';
89
import '@angular/router';
10+
import '@angular/forms';
911

1012

1113
// RxJS 5
1214
import 'rxjs/Rx';
1315

1416

15-
// For vendors for example jQuery, Lodash, angular2-jwt import them here
17+
// Import additional vendors here
18+
import 'ng2-translate';
19+
import '@ng-bootstrap/ng-bootstrap';

0 commit comments

Comments
 (0)