diff --git a/angular.json b/angular.json index e28a5e5..62b88ef 100644 --- a/angular.json +++ b/angular.json @@ -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": { diff --git a/package-lock.json b/package-lock.json index 72f62e3..2c2116b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1594,6 +1594,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", @@ -5346,6 +5351,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", diff --git a/package.json b/package.json index 4aca523..0e1ad07 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,8 @@ "@fortawesome/free-solid-svg-icons": "^5.11.1", "@types/axios": "^0.14.0", "axios": "^0.19.0", + "bootstrap": "^4.3.1", + "jquery": "^3.4.1", "rxjs": "~6.4.0", "tslib": "^1.9.0", "zone.js": "~0.9.1" diff --git a/src/app/components/nav/nav.component.html b/src/app/components/nav/nav.component.html index f23d834..303804b 100644 --- a/src/app/components/nav/nav.component.html +++ b/src/app/components/nav/nav.component.html @@ -1 +1,19 @@ -
nav works!
+ + \ No newline at end of file diff --git a/src/app/components/nav/nav.component.scss b/src/app/components/nav/nav.component.scss index e69de29..e1e14b6 100644 --- a/src/app/components/nav/nav.component.scss +++ b/src/app/components/nav/nav.component.scss @@ -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; + } + } + \ No newline at end of file diff --git a/src/app/components/nav/nav.component.ts b/src/app/components/nav/nav.component.ts index 2cc48b6..ff9baa6 100644 --- a/src/app/components/nav/nav.component.ts +++ b/src/app/components/nav/nav.component.ts @@ -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; + } + }