Add README and commit previous changes

This commit is contained in:
Jonathan Carter
2024-06-21 18:58:20 +02:00
parent 12e943f65c
commit fff1f8987a
9 changed files with 52 additions and 7 deletions

View File

View File

@@ -0,0 +1,6 @@
from flask import Blueprint
bp = Blueprint('webui', __name__)
from applets.webui import routes

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,33 @@
from applets.webui import bp
@bp.route('/webui')
def webui_index():
"""
The page you'd get if you access the root of
this app in a browser.
"""
return ("""
<head>
<script src="https://unpkg.com/htmx.org@1.9.11" integrity="sha384-0gxUXCCR8yv9FM2b+U3FDbsKthCI66oH5IA9fHppQq9DDMHuMauqq1ZHBpJxQ0J0" crossorigin="anonymous"></script>
</head>
<button hx-post="/clicked"
hx-trigger="click"
hx-target="#parent-div"
hx-swap="outerHTML" >
Click Me!
</button>
<div style="background-color: black; color: white; height: 200px; width: 200px;" hx-get="/welcome" hx-trigger="every 2s"></div>
<div hx-post="/welcome" hx-trigger="mouseenter">
1
<br><br><br><br>
[Here Mouse, Mouse!]
<br><Br><br><br>
2
</div>
Welcome to System Installer Daemon POC <br />
This is the WebUI Index
""")