Przeglądaj źródła

Mobilize home page

Lee Morgan 6 lat temu
rodzic
commit
3225f10e1e

+ 1 - 0
views/dashboardPage/dashboard.ejs

@@ -2,6 +2,7 @@
 <html>
     <head>
         <meta charset="UTF-8">
+        <meta content="width=device-width, initial-scale=1" name="viewport" />
         <title>The Subline</title>
         <link rel="icon" type="img/png" href="/shared/images/logo.png">
         <link rel="stylesheet" href="/shared/shared.css">

+ 1 - 1
views/dashboardPage/home.js

@@ -129,7 +129,7 @@ window.homeStrandObj = {
             }
 
             let thisCanvas = document.querySelector("#popularCanvas");
-            thisCanvas.width = thisCanvas.parentElement.clientWidth;
+            thisCanvas.width = thisCanvas.parentElement.clientWidth * 0.9;
             thisCanvas.height = thisCanvas.parentElement.clientHeight * 0.75;
 
             let popularGraph = new HorizontalBarGraph(document.querySelector("#popularCanvas"));

+ 39 - 1
views/dashboardPage/sidebars/sidebars.css

@@ -613,4 +613,42 @@ New Transaction
         width: 100%;
         height: 90%;
         overflow-y: auto;
-    }
+    }
+
+@media (max-width: 600px){
+    body{
+        flex-direction: column;
+    }
+
+    .contentBlock{
+        padding: 0;
+    }
+
+    /*
+    Home
+    */
+    .card{
+        margin: 5px;
+    }
+
+    #inventoryCheckCard{
+        display: none;
+    }
+
+    #popularIngredientsCard{
+        padding-bottom: 10px;
+    }
+
+    .flexRow{
+        flex-direction: column;
+        margin: 0;
+    }
+
+    .menu{
+        display: none;
+    }
+
+    .sidebar{
+        width: 100vw;
+    }
+}