diff options
author | prashantsinalkar | 2019-04-22 12:35:05 +0530 |
---|---|---|
committer | prashantsinalkar | 2019-04-22 12:35:05 +0530 |
commit | 4ba4ccc3fddb242251d5442c78aba14f43835035 (patch) | |
tree | 143fb83eb49ec1001e5be0ca87302858f6bca6fe /js/sb-admin-2.js | |
parent | 4dc90c39ae1a07db5f6f567fae84513c69ca1ac1 (diff) | |
download | osdag_workshop_2019-4ba4ccc3fddb242251d5442c78aba14f43835035.tar.gz osdag_workshop_2019-4ba4ccc3fddb242251d5442c78aba14f43835035.tar.bz2 osdag_workshop_2019-4ba4ccc3fddb242251d5442c78aba14f43835035.zip |
created index page
Diffstat (limited to 'js/sb-admin-2.js')
-rwxr-xr-x | js/sb-admin-2.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/sb-admin-2.js b/js/sb-admin-2.js new file mode 100755 index 0000000..fdba49e --- /dev/null +++ b/js/sb-admin-2.js @@ -0,0 +1,28 @@ +$(function() {
+
+ $('#side-menu').metisMenu();
+
+});
+
+//Loads the correct sidebar on window load,
+//collapses the sidebar on window resize.
+// Sets the min-height of #page-wrapper to window size
+$(function() {
+ $(window).bind("load resize", function() {
+ topOffset = 50;
+ width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
+ if (width < 768) {
+ $('div.navbar-collapse').addClass('collapse')
+ topOffset = 100; // 2-row-menu
+ } else {
+ $('div.navbar-collapse').removeClass('collapse')
+ }
+
+ height = (this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height;
+ height = height - topOffset;
+ if (height < 1) height = 1;
+ if (height > topOffset) {
+ $("#page-wrapper").css("min-height", (height) + "px");
+ }
+ })
+})
|