-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
70 lines (58 loc) · 1.89 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>PyScript Personal Projects</title>
<link rel="stylesheet" href="./style.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<style>
@media all and (max-width: 768px){
button{height:60px;margin-top:2%}
}
</style>
<body>
<div class="centered-container">
<div class="unload main">
<div>
<img id="remove" src="./1.webp" class="load rotate" width="300" height="300" />
<button id="submit"><a href="Base_Converter.html">Base Converter</a></button>
<button id="submit"><a href="borsa.html">Calcolatore Borsa di studio(2022-unica)</a></button>
<!-- the id attribute will be used to modify the DOM and for obataining the input -->
</div>
</div>
</div>
<script>
navigator.serviceWorker.register('/PyScript_various_projects/sw.js')
</script>
<py-script>
class Elements:
__identifier = 0
def __init__(self, query, elements=None):
self._query = query
self._elements = elements
self._identifier = Elements.__identifier
Elements.__identifier += 1
@property
def query(self):
return self._query
@property
def elements(self):
"""Return a list of dom elements"""
if not self._elements:
self._elements = []
i = 0
for el in document.querySelectorAll(f"{self.query}"):
if el.id == "":
el.id = str(f"pys{self._identifier}{i}")
i += 1
self._elements.append(Element(el.id))
return self._elements
for e in Elements(".unload").elements:
e.element.classList.replace("unload","load")
Element("remove").element.remove()
</py-script>
</body>
<!-- by LoreBadTime -->
</html>