-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
233 lines (232 loc) · 8.46 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!DOCTYPE html>
<html>
<head>
<title>Aggie Football</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.3/moment.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.3/moment-with-locales.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.3/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.3/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-moment/1.2.0/angular-moment.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-moment/1.2.0/angular-moment.min.js"></script>
<link href="stylesheets/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="navbar.css">
<script>
$(function () {
$("#headernav").load("header.html");
});
var app = angular.module('newsApp', ['angularMoment']);
var headers = {headers: {
'Ocp-Apim-Subscription-Key': '35e47806445342269f0ee3bcb11787fa',
}
};
app.controller('newsCtrl', function($scope, $http) {
$http.get("https://newsapi.org/v2/top-headlines?sources=espn&apiKey=d008b41723e147abbbec6d6d6bd07f9d")
.then(function mySuccess(response) {
$scope.newsapi = response.data.articles;
}, function myError(response) {
$scope.newsapi = response.statusText;
});
$http.get("https://api.fantasydata.net/v3/cfb/stats/json/LeagueHierarchy", headers)
.then(function mySuccess(response) {
$scope.secapi = response.data[17].Teams;
}, function myError(response) {
alert("ERROR");
});
$http.get("https://api.fantasydata.net/v3/cfb/stats/json/Players/TXAM", headers)
.then(function mySuccess(response) {
$scope.teamapi = response.data;
$scope.status = status;
}, function myError(response) {
alert("ERROR");
});
});
function status(stat) {
if(stat == "ACT") {
return "Active";
} else {
return "Not Active";
}
}
</script>
<style>
body {
margin:0;
font-family: arial, sans-serif;
}
.calendarnotif {
margin-top: 50px;
margin-left: 20px;
font-size: 12px;
padding: 10px 10px 10px 10px;
background-color: #E6E6E6;
box-shadow: 4px 4px 3px 1px #DBDBDB;
}
.standings {
width: 30%
margin-top: 50px;
margin-left: 20px;
font-size: 12px;
padding: 10px 10px 10px 10px;
background-color: #E6E6E6;
box-shadow: 4px 4px 3px 1px #DBDBDB;
}
.teamstats {
width: 60%
margin-top: 50px;
margin-left: 20px;
font-size: 12px;
padding: 10px 10px 10px 10px;
background-color: #E6E6E6;
box-shadow: 4px 4px 3px 1px #DBDBDB;
}
tr, td {
border: 1px solid #E6E6E6;
}
td {
box-shadow: 7px 7px 5px 5px #E6E6E6;
padding: 0px 20px 20px 20px;
overflow: auto;
}
td a {
display:block;
width:100%;
color: #660000;
}
.newstable {
margin-top: 10px;
border-spacing: 20px;
border-collapse: separate;
padding: 20px 20px 20px 20px;
}
.newstitle {
float: top;
padding: 20px;
border-bottom: 1px solid #E6E6E6;
font-family: 'Adobe Devanagari';
font-size: 20px;
}
.newsauthor {
float: bottom;
padding: 20px;
border-bottom: 1px solid #E6E6E6;
font-family: 'Adobe Devanagari';
font-size: 16px;
}
.newsphoto {
margin-top: -50px;
margin-bottom: -50px;
width: 100%;
float: left;
}
.newsdes {
margin-top: -50px;
margin-bottom: -50px;
float: left;
color: #808080;
text-align: justify;
font-family: 'Abadi MT Condensed Light';
font-size: 14px;
display: inline-block;
}
p.date {
text-transform: uppercase;
}
.container-fluid {
padding: 0px;
}
.row {
padding: 0px;
}
.col {
padding: 0px;
}
.banner {
margin: 0px;
position: absolute;
width: 100%;
}
.parallax {
background-image: url("images/aggiefootball.jpg");
height: 300px;
background-attachment: fixed;
background-position: top;
background-repeat: no-repeat;
background-size: cover;
}
</style>
</head>
<body>
<div id="headernav"></div>
<div ng-app="newsApp" ng-controller="newsCtrl">
<div class="container-fluid">
<div class="row">
<div class="col-sm-4">
<div class="calendarnotif">
<p><b>!</b> Next game: Texas A&M vs. Wake Forest</p>
</div>
<p></p>
<div class="standings">
<h4><u>Standings</u></h4>
<table>
<tr ng-repeat="team in secapi">
<td>
<div class="col-sm-7">
<p><b><span>{{ team.School }}</b></span>
</div>
<div class="col-sm-5">
<span>{{ team.Wins }} - {{ team.Losses }}</span></p>
</div>
</td>
</tr>
</table>
</div>
<p></p>
<div class="standings">
<h4><u>A&M Aggies Stats</u></h4>
<table>
<tr ng-repeat="player in teamapi | limitTo:15 | limitTo:-15">
<td>
<div class="col-sm-5">
<p><b><span>{{ player.Jersey }} - {{ player.PositionCategory }}</b></span>
</div>
<div class="col-sm-7">
<span>{{ player.FirstName }} {{ player.LastName }}</span></p>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="col-sm-6">
<table class="newstable">
<tr ng-repeat="article in newsapi">
<td>
<div class="newstitle">
<a href="{{ article.url }}">“ {{ article.title }} „</a>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<div class="photocon">
<img src="{{ article.urlToImage }}" alt="Image not Found" class="newsphoto" />
</div>
</div>
<div class="col-sm-6">
<div class="newsdes">
<p class="date"><span>{{ article.publishedAt | amDateFormat:'DD MMM YYYY'}}</span></p> — {{ article.description }}
</div>
</div>
</div>
</div>
</td>
</table>
</div>
</div>
</div>
</div>
</body>
</html>