-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
140 lines (115 loc) · 3.25 KB
/
index.html
File metadata and controls
140 lines (115 loc) · 3.25 KB
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
<!doctype html>
<html lang="us">
<head>
<meta charset="utf-8">
<title>Боевые операции Tactical Shift</title>
<link rel="icon" href="src/img/ts_icon.png">
<link rel="stylesheet" href="src/css/jquery-ui.css">
<link rel="stylesheet" href="src/css/baarv_viewer.css">
<script src="config.ini"></script>
<script src="aarListConfig.ini"></script>
<script src="src/js/jquery.min.js"></script>
<script src="src/js/jquery-ui.min.js"></script>
<script src="src/js/jquery.panzoom.js"></script>
<script src="src/js/jquery.mousewheel.js"></script>
<script type="text/javascript" src="src/js/zip.js"></script>
<script src="src/js/baarv_viewer.js"></script>
<style>
body {
overflow: auto;
}
#header-sans {
font-family: sans-serif;
font-weight: 100;
font-size: 21px;
line-height: 45px;
}
#wrapper {
margin-top: 10px;
margin-left: 8%;
width: 83%;
}
.item {
margin: 5px 5px;
border-left: 5px solid rgba(37, 37, 37, 0.36);
cursor: default;
line-height: 25px;
}
.item:hover {
margin: 5px 5px;
border-left: 5px solid #c52334;
background-color:rgba(37, 37, 37, 0.36);
}
.line2 {
display: inline-block;
width: 20%;
text-align: center;
padding: 5px 0px;
}
.line4 {
display: inline-block;
width: 38%;
text-align: center;
padding: 5px 0px;
}
.btn {
border: 1px solid #252525;
color: #252525;
cursor:pointer;
}
.btn:hover {
background-color: #c52334;
color: white;
}
a {
text-decoration: none;
}
</style>
<script>
function openFromList(i) {
/*
localStorage.setItem('aarTitle', aarConfig[i].title);
localStorage.setItem('aarLink', aarConfig[i].link);
window.open("Web-AAR-Viewer.html","_self")
*/
window.open("viewer.html?aar=" + encodeURI(aarConfig[i].link),"_self");
};
function showNoItems() {
$( "#wrapper" ).append(
"<div class='item'><div class='line4'>Нет данных для отображения</div></div>"
);
};
$( document ).ready(function () {
if (typeof aarConfig === 'undefined') {
showNoItems()
} else {
if (aarConfig.length == 0) {
showNoItems();
};
let isAvailable = function (aarInfo) {
return (aarInfo.hasOwnProperty("available") ? aarInfo.available : true)
};
for (var i=0; i < aarConfig.length; i++) {
$( "#wrapper" ).append(
"<div class='item'>"
+ "<div class='line2'>" + aarConfig[i].date
+ "</div><div class='line4'>" + aarConfig[i].title
+ "</div><div class='line2'>" + aarConfig[i].terrain
+ (isAvailable(aarConfig[i]) ? "</div><div class='line2'><div class='btn' onClick='openFromList(" + i + ")'>► Показать</div></div>" : "</div><div class='line2'><div >N/A</div></div>")
+ "</div>"
);
};
};
});
</script>
</head>
<body>
<div id="header">
<div id="header-title">
<span><a href="https://tacticalshift.github.io" style="text-decoration: none; color: inherit;">tS</a></span> <tt id='header-sans'>Боевые операции</tt>
</div>
</div>
<div id="wrapper">
</div>
</body>
</html>