-
Notifications
You must be signed in to change notification settings - Fork 1
/
otvinta.html
77 lines (71 loc) · 3.72 KB
/
otvinta.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" type="image/png" href="misc/favicon.png">
<meta name="author" content="Morendil">
<meta name="viewport" content="width=550">
<meta name="theme-color" content="#e9e3cc">
<title>От винта! Бортовой журнал</title>
<style>
BODY {background: #e9e3cc url(misc/paper.jpg) scroll; margin: 0;}
.tV {width: 100%; min-width: 550px; border-collapse: collapse;}
.tV TD {padding: 2px 1px; height: 24px; font: 14px Arial; white-space: nowrap;}
.tV TR:nth-child(2n+1) {background-color: rgba(127,127,127,0.1)}
.topbar {text-align: center; position: sticky; top: 0; background: #e9e3cc url(misc/paper.jpg) scroll; padding: 10px; border-bottom: #bbb 1px dotted;}
.header {text-align: center;}
.vg {border-radius: 4px; font: 12px Arial; padding: 1px 3px; margin: 1px 2px; background-color: #345fb9; color: #fff;}
.vgs {border-radius: 4px; font: 12px Arial; padding: 1px 3px; margin: 1px 2px; background-color: #e00000; color: #fff;}
.m_num {color: #f50600; font: bold 9px Verdana;}
.VHS {font: bold 10px Tahoma; border: #000 2px solid; padding: 0 1px;}
#vNum {margin: 10px 0;}
#sInp {background: #f4efda; border: 0; box-shadow: inset 1px 2px 1px rgba(0,0,0,0.3); font-size: 17px; min-width: 280px; width: 40vw; max-width: 600px; height: 40px; border-radius: 15px; outline: none; padding: 0px 8px; transition: background-color .2s ease-out;}
#sInp:focus {background: #fff;}
label:hover {cursor: pointer;}
#sBut {background-color: #4e9ff9; height: 30px; border-radius: 15px; padding: 0px 8px;}
#prnt {border-bottom: #bbb 1px dotted;}
@media (max-width: 650px) {TD:nth-child(4),TD:nth-child(5) {display: none;}}
</style>
</head>
<script src="tv.js"></script>
<body>
<div class="topbar">
<span style="float: left"><label><input type="checkbox" id="vNum" onchange="showTV(sInp.value)"> <u>СКВОЗНАЯ НУМЕРАЦИЯ</u></label></span>
<input type="search" id="sInp" autocomplete="off" onkeyup="showTV(sInp.value)">
</div>
<div id="prnt"></div>
<script type="text/javascript">
function showTV(vReg) {
let re = new RegExp("(^|\\+|\\s+)"+vReg,"i");
let docPrnt = "";
let result = [];
let games = [];
docPrnt += "<table class='tV'><tr><td class='header' width='30'>№</td><td width='35'>Ист.</td><td>Список игр в выпуске</td><td class='header' width='75'>Дата</td><td width='32'></td></tr>";
for (let i=0; i<otvinta.length; i++) {
result = otvinta[i].split('|');
if ((vReg) && !(re.test(result[1]))) continue;
if(vNum.checked) docPrnt += "<tr><td align='center'>"+(i+1)+"</td><td>";
else docPrnt += "<tr><td align='center'><span>"+(result[0])+"</span></td><td>";
switch(result[3]) {
case "N": docPrnt += "<img src='misc/lg_n.png'></td><td>"; break;
case "M": docPrnt += "<img src='misc/lg_m.png' title='Выпуск "+result[0]+"'>"
if ((result[0] > 59) && (vNum.checked)) docPrnt += "<span class='m_num'>"+result[0]+"</span></td><td>"
else docPrnt += "</td><td>"; break;
case "NM": docPrnt += "<nobr><img src='misc/lg_m.png' title='Выпуск "+result[0]+"'> <img src='misc/lg_n.png'></nobr></td><td>"; break;
case "V": docPrnt += "<span class='VHS'>VHS</span></td><td>"; break;
case "X": docPrnt += "<b>-</b></td><td>"; break;
}
games = result[1].split('+');
for (let j=0; j<games.length; j++) {
if ((vReg) && (re.test(games[j]))) {docPrnt += "<span class='vgs'>"+games[j]+"</span>"}
else {docPrnt += "<span class='vg'>"+games[j]+"</span>"};
}
docPrnt += "</td><td>"+result[2]+"</td>";
docPrnt += (i<25) ? "<td>РТР</td></tr>" : "<td>НТВ</td></tr>"
}
docPrnt += "</table>";
prnt.innerHTML = docPrnt;
}
showTV();
</script>
</body>
</html>