-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
111 lines (111 loc) · 6.34 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
<!DOCTYPE html>
<html>
<head>
<title>ngMadLibs</title>
<script text="text/javascript" src="https://code.angularjs.org/1.3.0-beta.13/angular.min.js"></script>
<script type="text/javascript" src="https://code.angularjs.org/1.3.0-beta.13/angular-animate.min.js"></script>
<script type="text/javascript" src="./scripts/myApp.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="./scripts/floating-labels.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./css/main.css">
<link rel="stylesheet" href="./css/floating-labels.css">
<meta charset="UTF-8">
</head>
<body ng-app="myApp" ng-controller="madLibsCtrl">
<br><br>
<div class="row">
<div class="col-md-2 col-md-offset-2 border row-height-min text-center">
<img src="./img/mad-lib-happy-face.png" class="smiley smileImage">
</div>
<div class="col-md-6 text-center border row-height-min text-center automate">
<img src="./img/ng-mad-libs-logo.png" class="logo">
<p class="superBig">Automate This!</p>
</div>
</div>
<div class="row my-show-hide-animation" ng-hide="showResult">
<div class="col-md-8 col-md-offset-2 border override">
<div class="row expanded">
<span>Provide the following data:</span>
</div>
<form name="myForm" ng-submit="submitted=true; submit()" class="row smallerFontSize" novalidate>
<div class="row text-center">
Select a gender:
<label for="male">Male</label>
<input type="radio" name="gender" ng-model="data.gender" value="male"/>
<label for="female">Female</label>
<input type="radio" name="gender" ng-model="data.gender" value="female"><br>
</div>
<div class="col-md-4 text-center">
<p class="form-group floating-label-form-group">
<label class="text-left" for="personName">Person's name</label>
<input class="form-control" type="text" name="personName" ng-model="data.personName" placeholder="Person's name" autofocus required>
<span ng-if="submitted && myForm.personName.$error.required" class="missing">A name is required.</span>
</p>
<p class="form-group floating-label-form-group">
<label class="text-left" for="job">Job title</label>
<input class="form-control" type="text" name="job" ng-model="data.jobTitle" placeholder="Job title" required>
<span ng-if="submitted && myForm.job.$error.required" class="missing">A job is required.</span>
</p>
<p class="form-group floating-label-form-group">
<label class="text-left" for="tast1">Tedious task</label>
<input class="form-control" type="text" name="task1" ng-model="data.tediousTask" placeholder="Tedious task" required>
<span ng-if="submitted && myForm.task1.$error.required" class="missing">A task is required.</span>
</p>
</div>
<div class="col-md-4 text-center">
<p class="form-group floating-label-form-group">
<label class="text-left" for="task2">Dirty task</label>
<input class="form-control" type="text" name="task2" ng-model="data.dirtyTask" placeholder="Dirty task" required>
<span ng-if="submitted && myForm.task2.$error.required" class="missing">A task is required.</span>
</p>
<p class="form-group floating-label-form-group">
<label class="text-left" for="celebrity">Celebrity</label>
<input class="form-control" type="text" name="celebrity" ng-model="data.celebrity" placeholder="Celebrity" required>
<span ng-if="submitted && myForm.celebrity.$error.required" class="missing">A celebrity is required.</span>
</p>
<p class="form-group floating-label-form-group">
<label class="text-left" for="skill">Useless skill</label>
<input class="form-control" type="text" name="skill" ng-model="data.uselessSkill" placeholder="Useless skill" required>
<span ng-if="submitted && myForm.skill.$error.required" class="missing">A skill is required.</span>
</p>
</div>
<div class="col-md-4 text-center">
<p class="form-group floating-label-form-group">
<label class="text-left" for="ObnoxCeleb">Obnoxious celebrity</label>
<input class="form-control" type="text" name="ObnoxCeleb" ng-model="data.obnoxiousCeleb" placeholder="Obnoxious celebrity" required>
<span ng-if="submitted && myForm.ObnoxCeleb.$error.required" class="missing">A name is required.</span>
</p>
<p class="form-group floating-label-form-group">
<label class="text-left" for="number">Huge number</label>
<input class="form-control" type="number" name="number" ng-model="data.hugeNumber" placeholder="Huge number" required>
<span ng-if="submitted && myForm.number.$error.required" class="missing">A number is required.</span>
</p>
<p class="form-group floating-label-form-group">
<label class="text-left" for="adjective">Adjective</label>
<input class="form-control" type="text" name="adjective" ng-model="data.adjective" placeholder="Adjective" required>
<span ng-if="submitted && myForm.adjective.$error.required" class="missing">A entry is required.</span>
</p>
</div>
<hr>
<input id="submitButton" type="submit" value="Submit" class="pull-right">
</form>
</div>
</div>
<div class="row my-show-hide-animation" ng-show="showResult">
<div class="col-md-8 col-md-offset-2 border override" id="madLibsText">
<p>{{data.personName}} was {{data.aAn}} {{data.jobTitle}} who loved technology. Although {{data.heShe}} loved parts of {{data.hisHer}} job, {{data.heShe}} absolutely hated {{data.tediousTask}} and {{data.dirtyTask}}. So, {{data.personName}} met with {{data.hisHer}} life mentor {{data.celebrity}} who told {{data.himHer}} to learn how to {{data.uselessSkill}} with Thinkful. Thinkful didn't offer a course to {{data.uselessSkill}}, so {{data.heShe}} studied programming instead.
</p>
<p>What a great decision! With {{data.hisHer}} new skills, {{data.personName}} built a {{data.adjective}} robot named {{data.obnoxiousCeleb}} that not only loved {{data.dirtyTask}} but did it {{data.hugeNumber}}% faster.
</p>
</div>
<div class="col-md-8 col-md-offset-2 text-center">
<br>
<input id="modifyEntries" class="smallerFontSize" type="button" value="Modify Entries" ng-click="return()">
</div>
</div>
</body>
<footer>
<br><br>ngMadLibs App version: {{version}}<br>
</footer>
</html>