-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpliki.html
121 lines (111 loc) · 5.14 KB
/
pliki.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
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PLIKI - SCHOOL PROJECTS</title>
<link rel="stylesheet" href="style.css" />
<meta name="author" content="rotkiW285">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<meta name="google" content="notranslate">
<meta property="og:title" content="School Projects">
<meta property="og:image" content="https://sp.285.ovh/img/embed.jpg">
<meta property="og:url" content="https://sp.285.ovh">
<meta property="og:type" content="website">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://sp.285.ovh">
<meta property="twitter:title" content="School Projects">
<meta property="twitter:image" content="https://sp.285.ovh/img/embed.jpg">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/site.webmanifest">
<link rel="stylesheet" href="php-table.css" />
<meta name="theme-color" content="#00000c"/>
</head>
<body>
<div class="logo">
<img src="/favicon/logo.png" alt="logo" />
<p>SCHOOL PROJECTS</p>
</div>
<script src="navbar.js"></script>
<h1>Urządzenie jest zbyt wąskie żeby wyświetlić tabelę<br>Obróć urządzenie lub użyj urządzenia z większym ekranem</h1>
<div class="zeszyty">
<p><a href="https://docs.google.com/document/d/1wmfDnKYrY6Kq8SfuyD4WRn_7wZglFRAQYvtqOQOnuKw" target="_blank">E-ZESZYT <b>4 klasa</b></a></p><br>
<p><a href="https://docs.google.com/document/d/1JRkazzwamYu3MZH7w4-6ktF0Syd6llK5a-qsf3Tp4po" target="_blank">E-ZESZYT PAI [PHP]</a></p><br>
<p><a href="https://jankupczyk.github.io/EE-09/" target="_blank">Rozwiązania Jana Kupczyka</a></p>
<p><a href="https://github.com/Chr1skyy/Egzamin-Zawodowy-E14-EE09-INF03" target="_blank">Rozwiązania Chr1skyy`ego</a></p>
</div>
<div class="input-container">
<input type="text" id="searchInput" onkeyup="searchTable()" placeholder="🔍 Wyszukaj...">
</div>
<div class="table-container">
<table id="data-table">
<thead>
<tr>
<th>Nazwa</th>
<th>Data</th>
<th>Typ</th>
<th>Przedmiot</th>
<th>Pobierz</th>
</tr>
</thead>
<tbody id="table-body"></tbody>
</table>
</div>
<script>
fetch("pliki.json")
.then((response) => response.json())
.then((data) => {
const tableBody = document.getElementById("table-body");
data.forEach((record) => {
const row = document.createElement("tr");
const nameCell = document.createElement("td");
const dateCell = document.createElement("td");
const typeCell = document.createElement("td");
const subjectCell = document.createElement("td");
const downloadCell = document.createElement("td");
nameCell.textContent = record.name;
dateCell.textContent = record.date;
typeCell.textContent = record.type;
subjectCell.textContent = record.subject;
downloadCell.innerHTML = `<a href="${record.download}">Pobierz</a>`;
row.appendChild(nameCell);
row.appendChild(dateCell);
row.appendChild(typeCell);
row.appendChild(subjectCell);
row.appendChild(downloadCell);
tableBody.appendChild(row);
});
});
function searchTable() {
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("searchInput");
filter = input.value.toUpperCase();
table = document.getElementById("data-table");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td");
for (var j = 0; j < td.length; j++) {
let cell = td[j];
if (cell) {
txtValue = cell.textContent || cell.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
break;
} else {
tr[i].style.display = "none";
}
}
}
}
}
// Table appearance and operation inspired from Jan Kupczyk EE-09 repo
</script>
</body>
<footer>
<p><a href="info">© 2025 rotkiW285</a></p>
</footer>
</html>