-
Notifications
You must be signed in to change notification settings - Fork 96
/
index.html
100 lines (86 loc) · 3.36 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
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Question Room</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!-- Custom styles for this template -->
<link href="node_modules/todomvc-common/cover.css" rel="stylesheet">
</head>
<body ng-controller="controller">
<div class="site-wrapper">
<div class="site-wrapper-inner">
<div class="cover-container">
<div class="masthead clearfix">
<div class="inner">
<h3 class="masthead-brand">Question Room</h3>
<nav>
<ul class="nav masthead-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Features</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</div>
</div>
<div class="inner cover">
<h1 class="cover-heading">Ask More Questions!</h1>
<p class="lead">This totally anonymous and real-time updating question moderated system permits students to ask more questions in a typical class setting.
Simply join a question room using a simple name (such as comp3111).</p>
<p class="lead" class="col-md-2 col-md-offset-5">
<form name="form" ng-submit="join()" class="navbar-form navbar-left" role="search">
<input type="text" name = "input" class="form-control large"
ng-model="example.text"
ng-pattern="example.word" required
ng-trim="false"
autofocus
aria-describedby="sizing-addon1"
placeholder="Room name">
<a href="#" class="btn btn-lg btn-default"
ng-hide="form.input.$error.required || form.input.$error.pattern"
ng-click="join()"
>Join</a>
</form>
</p>
<div class="alert alert-warning" role="alert" ng-show="form.input.$error.required">
Room name is required!</div>
<div class="alert alert-warning" role="alert" ng-show="form.input.$error.pattern">
Room name must be a single English word!
</div>
</div>
<div class="mastfoot">
<div class="inner">
<p>Cover template for <a href="http://getbootstrap.com">Bootstrap</a>, by <a href="https://twitter.com/mdo">@mdo</a>.</p>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/lib/jquery.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<!-- 1.4.2 -->
<script src="js/lib/angular.min.js"></script>
<script>
angular.module('app', [])
.controller('controller', ['$scope', '$location', '$window', function($scope, $location, $window) {
$scope.example = {
text: '',
word: /^\s*\w*\s*$/
};
$scope.join = function () {
$window.location.href = 'question.html#/' + $scope.example.text;
}
}]);
</script>
</body>
</html>