Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 90 additions & 2 deletions public/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,34 @@ html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}

.screen {
margin: auto;
text-align: center;
width: 350px;
height: 600px;
border: 5px solid black;
padding: 10px;
justify-content: center;
align-items: flex-end;
}
.nav{
float: right;
color: gray;
}
.data{
text-align: right;
}
.graph{
height: 25px;
margin: auto;
}
.welcome{
padding: 10px;
height:35px;
}
.name{
height: 50px;
}
body {
margin: 0;
}
Expand Down Expand Up @@ -96,7 +123,68 @@ samp {
font-family: monospace, serif;
font-size: 1em;
}
.dropbtn {
background-color: white;
color: black;
padding: 10px;
font-size: 16px;
border: none;
outline: none;
}
.dropmenu{
background-color: white;
color: black;
padding: 10px;
font-size: 30px;
border: none;
outline: none;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
float: left;
}
.data {
position: relative;
display: inline-block;
float: left;
left: 2px;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;

}
.graph-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;

}
/* Links inside the dropdown */
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}




/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {color: blue;}
.data:hover .dropmenu {color: blue;}
s
pre {
white-space: pre-wrap;
}
Expand Down Expand Up @@ -7115,4 +7203,4 @@ td.visible-print {
td.hidden-print {
display: none !important;
}
}
}
6 changes: 6 additions & 0 deletions public/js/bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function openMenu() {
document.getElementById("sidebar").classList.toggle("show");
}
function graph() {
document.getElementById("options").classList.toggle("show");
}
2 changes: 1 addition & 1 deletion public/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* limitations under the License.
* ======================================================================== */


+function ($) { "use strict";

// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
Expand Down
13 changes: 10 additions & 3 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
* GET home page.
*/

exports.view = function(req, res){
res.render('index');
};
function openNav() {
document.getElementById("mySidebar").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
}

/* Set the width of the sidebar to 0 and the left margin of the page content to 0 */
function closeNav() {
document.getElementById("mySidebar").style.width = "0";
document.getElementById("main").style.marginLeft = "0";
}
46 changes: 44 additions & 2 deletions views/index.handlebars
Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
<html>
<head>
<title>Test Page</title>
<title>Wellness Tracker</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="/css/bootstrap.css" rel="stylesheet">
<script src="/js/bar.js"></script>
</head>

<body>
Begin here (or replace this with any static code already written).
<div id="main" class="screen">
<div class="dropdown">
<button onClick="openMenu()" class="dropbtn">&#9776;</button>
<div id="sidebar" class="dropdown-content">
<a class="selected" href="#">Home</a>
<a href="#">Record</a>
<a href="#">Forum</a>
<a href="#">Profile</a>
<a href="#">Help</a>
</div>
</div>
<h3 class="welcome"> Welcome,</h3>
<h3 class="name">John</h3>
<p>Check out your stats for the day!:</p>
<div class="data">
<button onClick="graph()" class="dropmenu">&#x22EE;</button>
<div id="options" class="graph-content">
<label for="graph">Graph Type</label>
<select name="graph" id="graph">
<option value="sleep">Sleep</option>
</select>
<label for="graph">Graph Type</label>
<select name="X-axis" id="graph">
<option value="day">day</option>
</select>
<label for="graph">Graph Type</label>
<select name="Y-axis" id="graph">
<option value="mood">mood</option>
</select>
</div>
</div>
<div class="graph">
<p>SLEEP</p>
<img src="img_graph" alt="Record some data" width="300" height="200">
</div>
</div>
</body>
</html>