/
index.html
117 lines (110 loc) · 6.48 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>
<head>
<title>Index Racer</title>
<meta name="viewport" content="width=device-width" />
<meta charset="utf-8">
<meta name="description" content="IndexRacer: SCCA Solo RTP PAX Calculator Compare your time against competitors' RTP PAX times." />
<meta name="keywords" content="SCCA,Solo,Solo2,Autocross,AutoX,RTP,PAX,Idx,Index,Calculator,Calc,Compare,Times" />
<meta name="robots" content="index, follow" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="racestyle.css">
<!-- <script src="controllers/index-data.js"> -->
</head>
<body ng-app = "racerApp" ng-controller = "SoloCtrl" class="container-fluid">
<div class="header row"><img src="static/name.jpg" id="logo">
</div>
<section class="row">
<main class="main col-xs-10 col-xs-offset-1 col-sm-6 col-sm-offset-3">
<section class="row">
<article class="col-md-12 center" ng-click="clearVals()">
<h1>RTP Calculator</h1>
<h3 ng-cloak>{{ sourceText }}</h3>
<button class="{{ solo }}" ng-click="setCategories('solo')">SCCA Solo</button>
<button class="{{ prosolo }}" ng-click="setCategories('prosolo')">SCCA ProSolo</button>
<button class="{{ aas }}" ng-click="setCategories('aas')">AAS Solo</button>
</article>
</section>
<form id="cat">
<section class="row">
<article id="userinputs" class="col-xs-12 col-sm-6 col-md-5 col-md-offset-1">
<h2>Your SCCA Class Category:</h2>
<select ng-model="selectedCat" ng-options="cat for (cat, class) in categories" ng-change="clearSubVals(); setCatCookie()">
<option value="" class="placeholder"> Your Category </option>
</select>
<h2>Your SCCA Class:</h2>
<select ng-model='selectedClass' ng-options="class for (class, index) in selectedCat" ng-change="setClassCookie()">
<option value="" class="placeholder"> Your Class </option>
</select>
<p class="anchor" id="cl_num" class="note">Index number: <span ng-cloak>{{selectedClass}}</span></p>
<h2>Enter your time:<span class="note"><br />(if you've run)</span></h2>
<input ng-disabled='!selectedClass' ng-model="myTime" type="text" id="time" name="Run Time" default="your race time">
<br>
<button type="button" ng-click="clearVals()">Clear</button>
<button type="button" ng-click="changeViewComp()" ng-show="!viewComp" class="hidden-md hidden-lg">Compare to Another Racer</button>
</article>
<article id="compinputs" class="col-xs-12 col-sm-6 col-md-5" ng-show="viewComp" ng-cloak>
<h2>Competitor's Class Category:</h2>
<select ng-model="selectedCompCat" ng-options="cat for (cat, class) in categories">
<option value="" class="placeholder" disabled selected> Category </option>
</select>
<h2>Competitor's SCCA Class:</h2>
<select ng-model='selectedCompClass' ng-options="class for (class, index) in selectedCompCat">
<option value="" class="placeholder" disabled selected> Class </option>
</select>
<p id="comp_num" class="note">Index number: {{selectedCompClass}}</p>
<h2>Competitor's time:<span class="note"><br />(if he/she has run)</span></h2>
<input ng-disabled='!selectedCompClass' ng-model="compTime" type="text" id="comp_time" name="Run Time:" disabled="true">
<br>
<button type="button" ng-click="clearCompVals()">Clear</button>
<button type="button" ng-click="changeViewComp()">Hide Comparison</button>
</article>
</section>
<section class="row">
<article class="col-xs-12" class="center">
<button type="button" ng-click="changeViewComp()" ng-show="!viewComp" class="hidden-xs hidden-sm">Compare to Another Racer</button><br>
</article>
</section>
</form>
<section class="row">
<article ng-show="(myTime && selectedCompClass) || (compTime && selectedClass)" id="results" ng-cloak class="col-xs-12">
<h2 class="result">Results</h2>
<p id="resultComment">{{results}}</p>
</article>
</section>
</main>
</section>
<section class="row" ng-show="myTime">
<main class="main2 col-xs-8 col-xs-offset-2 col-sm-4 col-sm-offset-4">
<h2>Your Time Equivalents</h2>
<div class="row">
<div class="col-xs-12 col-md-6" ng-repeat="(cat, cls) in categories">
<p><h2 class="cozy">{{ cat }}</h2>
<div id="index_table" ng-repeat="(class, index) in cls">{{ class }}: {{ (myTime * selectedClass)/index | number:3}}
</div>
</p>
</div>
</div>
</main>
</section>
<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0/angular-cookies.js"></script>
<script src = "data.js"></script>
<script src ="controllers/MainController.js"></script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-59521615-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>