made names more clear and added better error info
This commit is contained in:
parent
28a9f2dda5
commit
4ef33e8534
@ -9,7 +9,7 @@ def prepare(config):
|
|||||||
out = f"""
|
out = f"""
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<a href="{config[1]}" style='{config[3]}'>
|
<a href="{config[1]}" style='{config[3]}'>
|
||||||
<h2>{config[0]}</h2>
|
<h3>{config[0]}</h3>
|
||||||
<p>{config[2]}</p>
|
<p>{config[2]}</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -22,7 +22,7 @@ html = ""
|
|||||||
for i in groups:
|
for i in groups:
|
||||||
items = os.listdir(f"{os.path.dirname(sys.argv[0])}/services/{i}")
|
items = os.listdir(f"{os.path.dirname(sys.argv[0])}/services/{i}")
|
||||||
html = html + f"""
|
html = html + f"""
|
||||||
<h1>{i}</h1>
|
<h2>{i}</h2>
|
||||||
<div class="group">
|
<div class="group">
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -34,6 +34,7 @@ for i in groups:
|
|||||||
|
|
||||||
css = open(f"{os.path.dirname(sys.argv[0])}/template/temp.css")
|
css = open(f"{os.path.dirname(sys.argv[0])}/template/temp.css")
|
||||||
html = f"""
|
html = f"""
|
||||||
|
<h1> My ok ish dashboard </h1>
|
||||||
<style>
|
<style>
|
||||||
{css.read()}
|
{css.read()}
|
||||||
</style>
|
</style>
|
||||||
@ -42,4 +43,12 @@ html = f"""
|
|||||||
f = open(f"{os.path.dirname(sys.argv[0])}/render/render.html","w")
|
f = open(f"{os.path.dirname(sys.argv[0])}/render/render.html","w")
|
||||||
f.write(html)
|
f.write(html)
|
||||||
|
|
||||||
exec(load(f"{os.path.dirname(sys.argv[0])}/dash.py"))
|
port = 1111
|
||||||
|
try:
|
||||||
|
exec(open(f"{os.path.dirname(sys.argv[0])}/run.py").read())
|
||||||
|
except OSError as error:
|
||||||
|
if error.errno == 98:
|
||||||
|
print(f"recompiled, another service or instance of this server is running on port {port}")
|
||||||
|
print("if this server is running, it will have the current config")
|
||||||
|
else:
|
||||||
|
print(f"unexpected error: '{error}'")
|
File diff suppressed because one or more lines are too long
@ -26,4 +26,4 @@ def run(server_class=HTTPServer, handler_class=SimpleHTTPRequestHandler, port=11
|
|||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
run()
|
run(port=port)
|
@ -3,23 +3,30 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 1fr;
|
grid-template-rows: 1fr;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||||
grid-gap: .5vw;
|
grid-gap: .1vw;
|
||||||
|
background-color: #35465a9f;
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
padding: 20px;
|
||||||
|
margin: 20px;
|
||||||
|
border-radius: 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: rgb(67, 95, 102);
|
background-image: url('https://www.atlasandboots.com/wp-content/uploads/2019/05/ama-dablam2-most-beautiful-mountains-in-the-world.jpg');
|
||||||
|
background-size:cover
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
background-color: rgb(58, 69, 77);
|
background-color: rgba(58, 69, 77, 0.726);
|
||||||
color: #CCCCCC;
|
color: #CCCCCC;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
|
size: 200px;
|
||||||
font: bold 11px Arial;
|
font: bold 11px Arial;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: #EEEEEE;
|
background-color: #EEEEEE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user