Installed Bootstrap and jQuery, broke the sidenav
This commit is contained in:
parent
73cc6d7784
commit
c00836defd
@ -28,9 +28,13 @@
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
"src/styles.scss",
|
||||
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
|
||||
],
|
||||
"scripts": []
|
||||
"scripts": [
|
||||
"./node_modules/jquery/dist/jquery.min.js",
|
||||
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
|
10
package-lock.json
generated
10
package-lock.json
generated
@ -1554,6 +1554,11 @@
|
||||
"multicast-dns-service-types": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"bootstrap": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz",
|
||||
"integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag=="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
@ -5306,6 +5311,11 @@
|
||||
"integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=",
|
||||
"dev": true
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
|
||||
"integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw=="
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
|
@ -22,6 +22,8 @@
|
||||
"@fortawesome/angular-fontawesome": "^0.5.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.24",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.11.1",
|
||||
"bootstrap": "^4.3.1",
|
||||
"jquery": "^3.4.1",
|
||||
"rxjs": "~6.4.0",
|
||||
"tslib": "^1.9.0",
|
||||
"zone.js": "~0.9.1"
|
||||
|
@ -1 +1,19 @@
|
||||
<p>nav works!</p>
|
||||
<div [ngClass]="this.navToggled ? 'd-flex toggled' : 'd-flex'" id="wrapper">
|
||||
<div class="bg-light border-right" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading">Cassettea</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a href="#" class="list-group-item list-group-item-action bg-light">Explore</a>
|
||||
<a href="#" class="list-group-item list-group-item-action bg-light">Songs</a>
|
||||
<a href="#" class="list-group-item list-group-item-action bg-light">Albums</a>
|
||||
<a href="#" class="list-group-item list-group-item-action bg-light">Artists</a>
|
||||
<a href="#" class="list-group-item list-group-item-action bg-light">Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" (click)="toggleNav();"><span class="navbar-toggler-icon"></span></button>
|
||||
</div>
|
||||
<script>
|
||||
$("#menu-toggle").click(function(e) {
|
||||
e.preventDefault();
|
||||
$("#wrapper").toggleClass("toggled");
|
||||
});
|
||||
</script>
|
@ -0,0 +1,36 @@
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#sidebar-wrapper {
|
||||
min-height: 100vh;
|
||||
margin-left: -15rem;
|
||||
-webkit-transition: margin .25s ease-out;
|
||||
-moz-transition: margin .25s ease-out;
|
||||
-o-transition: margin .25s ease-out;
|
||||
transition: margin .25s ease-out;
|
||||
}
|
||||
|
||||
#sidebar-wrapper .sidebar-heading {
|
||||
padding: 0.875rem 1.25rem;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
#sidebar-wrapper .list-group {
|
||||
width: 15rem;
|
||||
}
|
||||
|
||||
#wrapper.toggled #sidebar-wrapper {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#sidebar-wrapper {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#wrapper.toggled #sidebar-wrapper {
|
||||
margin-left: -15rem;
|
||||
}
|
||||
}
|
||||
|
@ -6,10 +6,17 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./nav.component.scss']
|
||||
})
|
||||
export class NavComponent implements OnInit {
|
||||
navToggled;
|
||||
|
||||
constructor() { }
|
||||
constructor() {
|
||||
this.navToggled = false;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
toggleNav() {
|
||||
this.navToggled = (this.navToggled) ? false : true;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user