From 26f8b4d98b04e8710899e7eb956b05f2750269c0 Mon Sep 17 00:00:00 2001 From: bdherouville Date: Wed, 29 Nov 2023 17:38:16 +0100 Subject: [PATCH] add files --- src/app.py | 19 +++++++++++++++++++ src/static/style.css | 18 ++++++++++++++++++ src/templates/index.html | 29 +++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 src/app.py create mode 100644 src/static/style.css create mode 100644 src/templates/index.html diff --git a/src/app.py b/src/app.py new file mode 100644 index 0000000..9dc2427 --- /dev/null +++ b/src/app.py @@ -0,0 +1,19 @@ +import platform +from flask import Flask, render_template + +app = Flask(__name__) + +@app.route('/') +def system_info(): + system_info = { + 'System': platform.system(), + 'Node Name': platform.node(), + 'Release': platform.release(), + 'Version': platform.version(), + 'Machine': platform.machine(), + 'Processor': platform.processor() + } + return render_template('system_info.html', system_info=system_info) + +if __name__ == '__main__': + app.run(debug=True) \ No newline at end of file diff --git a/src/static/style.css b/src/static/style.css new file mode 100644 index 0000000..b2a609e --- /dev/null +++ b/src/static/style.css @@ -0,0 +1,18 @@ +/* static/style.css */ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + background-color: #f2f2f2; +} + +header { + background-color: #333; + color: white; + padding: 1em; + text-align: center; +} + +main { + margin: 2em; +} \ No newline at end of file diff --git a/src/templates/index.html b/src/templates/index.html new file mode 100644 index 0000000..89a0327 --- /dev/null +++ b/src/templates/index.html @@ -0,0 +1,29 @@ + + + + + + + + System Information + + +
+

System Information

+
+
+ + + + + + {% for key, value in system_info.items() %} + + + + + {% endfor %} +
AttributeValue
{{ key }}{{ value }}
+
+ +