-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
73 lines (71 loc) · 2.51 KB
/
index.html
File metadata and controls
73 lines (71 loc) · 2.51 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="shortcut icon" href="assets/images/favicon.ico" />
<title>AyudaEnPython | Demo</title>
<link href="https://unpkg.com/cirrus-ui" type="text/css" rel="stylesheet" />
<link
href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200;300;400;600;700&family=Montserrat:wght@400;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"
integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://pyscript.net/releases/2024.9.1/core.css"
/>
<script
type="module"
src="https://pyscript.net/releases/2024.9.1/core.js"
></script>
</head>
<body>
<py-config>
[[fetch]]
files = ['main.py']
</py-config>
<py-script>
from pyscript import when, display, document
from main import greetings
@when("click", "#clear-btn")
def clear_all(event):
document.getElementById("main-input").value = ""
document.getElementById("result").innerHTML = "</br>"
@when("click", "#show-btn")
def click_handler(event):
name = document.getElementById("main-input").value
result = greetings(name)
document.getElementById("result").innerHTML = result
</py-script>
<div class="hero fullscreen bg-yellow-200">
<div class="hero-body">
<div class="mx-auto">
<h1 class="title uppercase text-indigo-600" id="title"></h1>
<h3 class="subtitle text-gray-600" id="subtitle"></h1>
<!-- Make changes from here -->
<div class="form-group">
<label class="form-group-label">></label>
<input type="text" id="main-input" class="form-group-input"/>
</div>
<div class="u-center u-gap-2">
<button id="show-btn">Show</button>
<button id="clear-btn">Clear</button>
</div>
<div class="u-round-xs u-shadow-xl p-3 bg-indigo-200">
<div class="u-flex u-justify-center u-gap-2">
<div class="text-indigo-600 font-semibold tracking-looser" id="result"></br></div>
</div>
</div>
<!-- to here -->
</div>
</div>
</div>
<script src="assets/js/main.js"></script>
</body>
</html>