further fixes for more generic version

This commit is contained in:
2026-03-16 16:12:15 +01:00
parent 382ecf67aa
commit 31dc713a3d
2 changed files with 6 additions and 83 deletions
+4 -1
View File
@@ -18,7 +18,10 @@ args = Args(*sys.argv[1:])
@app.route('/')
def index():
return render_template(f'{args.webpage}.html', svg_ui=f'{args.webpage}.svg')
return render_template(f'{args.webpage}.html',
svg_ui=f'{args.webpage}.svg',
css=f'{args.webpage}.css',
secop_js='secop.js')
if __name__ == '__main__':
app.run(host="0.0.0.0", port=args.port, debug=True)
+2 -82
View File
@@ -5,92 +5,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pump Control</title>
<style>
body, html {
height: 100%;
margin: 0;
padding: 0;
background-color: lightgrey;
display: flex;
}
.svg-container {
flex: 2;
height: 100%;
position: relative;
display: flex;
}
#pump-svg {
width: 100%;
height: 100%;
display: block;
border-radius: 12px;
}
.control-panel {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding: 10px;
background-color: #B8EBE5;
border-radius: 12px;
}
.control-panel p {
font-size: 20px;
font-family:verdana;
}
.control-panel h {
font-size: 32px;
font-family:verdana;
}
.button-container {
display: flex;
flex-direction: rows;
gap: 10px;
margin-bottom: 20px;
font-size: 20px;
font-family:verdana;
}
.control-button {
padding: 10px;
background-color: #AFB0B1;
color: black;
border: none;
border-radius: 5px;
cursor: pointer;
width: 100px;
font-weight: bold;
}
.control-button:hover {
background-color: #DADBDC;
}
#outputtext {
width: 100%;
height: 200px;
resize: none;
border-radius: 12px;
}
.content-container {
display: flex;
flex-direction: row;
gap: 10px;
margin-bottom: 20px;
}
{% include css %}
</style>
</head>
<body>
<div class="content-container">
<! object id="pump-svg" type="image/svg+xml" data="/static/UI5.svg"><! /object>
{% include svg_ui %}
<div class="control-panel">
<h1> DIL5 Control </h1>
@@ -128,6 +47,7 @@
console.log('bad mod', mod)
continue;
}
console.log(mdesc);
const elems = document.querySelectorAll("[id^='" + mod + ":']");
let stateElement = null;
let clickElement = null;