-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
184 lines (181 loc) · 4.16 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
<!DOCTYPE html>
<html>
<head>
<title>D2 API Test</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
body {
font-family: sans-serif;
}
/*
App
*/
.app {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
/*
Loader
*/
.loader {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/*
Table
*/
.newsTable {
width: 100%;
max-width: 1000px;
border-spacing: 0;
display: none;
}
/*
Table Head
*/
.headRow {
height: 50px;
}
.headCell {
text-align: left;
padding: 0 14px;
align-items: flex-start;
}
.headCell__link {
cursor: pointer;
display: flex;
align-items: center;
}
.headCell__link:hover {
text-decoration: underline;
}
.headCell__link.active::after {
font-size: 10px;
padding: 0 7px;
{# background: red; #}
}
.headCell__link.asc::after {
content: '▲';
}
.headCell__link.desc::after {
content: '▼';
}
/*
News Row
*/
.newsRow {
height: 75px;
background-size: cover;
background-position: center;
}
.newsRow__creationDate {
text-align: right;
background: linear-gradient(270deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 10%, rgba(255,255,255,0) 100%);
}
.newsRow__displayName {
background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 10%, rgba(255,255,255,0) 100%);
}
.newsRow__image {
padding: 0;
}
.newsRow__imageElement {
objectFit: cover;
width: 100%;
height: 150px;
vertical-align: top;
padding: 0;
}
.newsCell {
padding: 0 14px;
border-bottom: solid 1px #fff;
color: #fff;
}
.newsCell__link {
color: #fff;
}
</style>
</head>
<body>
<template id="newsRow">
<tr class="newsRow">
<td class="newsCell newsRow__displayName">
<a class="newsCell__link" href="{{ link }}">
{{ displayName }}
</a>
</td>
<td class="newsCell newsRow__creationDate">{{ creationDate }}</td>
</tr>
</template>
<div class="app">
<div class="loader">
<div class="loader__svg">
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
<svg width="45" height="45" viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" stroke="#000">
<g fill="none" fill-rule="evenodd" transform="translate(1 1)" stroke-width="2">
<circle cx="22" cy="22" r="6" stroke-opacity="0">
<animate attributeName="r"
begin="1.5s" dur="3s"
values="6;22"
calcMode="linear"
repeatCount="indefinite" />
<animate attributeName="stroke-opacity"
begin="1.5s" dur="3s"
values="1;0" calcMode="linear"
repeatCount="indefinite" />
<animate attributeName="stroke-width"
begin="1.5s" dur="3s"
values="2;0" calcMode="linear"
repeatCount="indefinite" />
</circle>
<circle cx="22" cy="22" r="6" stroke-opacity="0">
<animate attributeName="r"
begin="3s" dur="3s"
values="6;22"
calcMode="linear"
repeatCount="indefinite" />
<animate attributeName="stroke-opacity"
begin="3s" dur="3s"
values="1;0" calcMode="linear"
repeatCount="indefinite" />
<animate attributeName="stroke-width"
begin="3s" dur="3s"
values="2;0" calcMode="linear"
repeatCount="indefinite" />
</circle>
<circle cx="22" cy="22" r="8">
<animate attributeName="r"
begin="0s" dur="1.5s"
values="6;1;2;3;4;5;6"
calcMode="linear"
repeatCount="indefinite" />
</circle>
</g>
</svg>
</div>
<div class="loader__text">
Contacting Destiny 2 API
</div>
</div>
<table class="newsTable">
<thead>
<tr class="headRow">
<th class="headCell sortable">
<span class="headCell__link" data-fieldName="displayName">Name</span>
</th>
<th class="headCell sortable headRow__date">
<span class="headCell__link" data-fieldName="creationDate">Date</span>
</th>
</tr>
</thead>
<tbody class="newsContents" />
</table>
</div>
<script src="src/index.js">
</script>
</body>
</html>