-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
117 lines (108 loc) · 3.95 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
/* Remove the navbar's default margin-bottom and rounded borders */
.navbar {
margin-bottom: 0;
border-radius: 0;
}
/* Set height of the grid so .sidenav can be 100% (adjust as needed) */
.row.content {
height: 450px
}
/* Set gray background color and 100% height */
.sidenav {
padding-top: 20px;
background-color: #f1f1f1;
height: 100%;
}
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: white;
padding: 15px;
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {
height: auto;
}
}
</style>
</head>
<body onload="setVisibility()">
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">CI Web Demo Application</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
</div>
</nav>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-2 sidenav">
</div>
<div class="col-sm-8 text-left">
<h1>Welcome</h1>
<div class="panel panel-info">
<div class="panel-heading">Information</div>
<div class="panel-body">
<h4>You entered</h4>
<div id="numberOfChucksDivs">
<%= numberOfChucks %>
</div>
</div>
</div>
<form method="POST" action="/submit">
<div class="form-group">
<label for=" ">how many chucks could a woodchuck?</label>
<input type="number" name="numberOfChucks" class="form-control" id="varificationCodeInput" aria-describedby="varficationCodeHelp" placeholder="Enter number">
<small id="varficationCodeHelp" class="form-text text-muted">Enter a number</small>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<div class="col-sm-2 sidenav">
</div>
</div>
</div>
<footer class="container-fluid text-center">
</footer>
</body>
<script> -
function setVisibility() {
var numberOfChucks = "<%= numberOfChucks %>";
if (!isInteger(numberOfChucks)) {
document.getElementById("numberOfChucksDivs").innerHTML = "";
}
}
function isInteger(value) {
if(parseInt(value,10).toString()===value) {
return true
}
return false;
}
</script>
</html>