diff --git a/app.py b/app.py index a6e4ae3..132a512 100644 --- a/app.py +++ b/app.py @@ -13,6 +13,7 @@ import machines app = Flask(__name__) app.config['UPLOAD_FOLDER'] = "squash" +app.config['STYLE_FOLDER'] = "style" app.config['MAX_CONTENT_LENGTH'] = 1024 * 1024 * 512 # 512MB utils.init_threads() @@ -220,5 +221,12 @@ def add_ip(): return jsonify(message="400") +@app.route("/style/") +def get_style(name): + try: + return send_file(os.path.join(app.config['STYLE_FOLDER'], name)) + except: + return "", 404 + if __name__ == '__main__': app.run(host="0.0.0.0") diff --git a/configs/scripts/starttap.sh b/configs/scripts/starttap.sh index 679aef9..5b570f4 100755 --- a/configs/scripts/starttap.sh +++ b/configs/scripts/starttap.sh @@ -1,3 +1,2 @@ - #!/bin/sh ifconfig $TAP 10.20.0.10 netmask 255.255.255.0 up \ No newline at end of file diff --git a/style/create.css b/style/create.css new file mode 100644 index 0000000..ff41fd6 --- /dev/null +++ b/style/create.css @@ -0,0 +1,63 @@ +/* styl dla całej strony */ +body { + font-family: Arial, sans-serif; + background-color: #f2f2f2; +} + +/* styl dla sekcji formularza */ +form { + max-width: 500px; + margin: 0 auto; + padding: 20px; + background-color: #fff; + border-radius: 10px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); +} + +/* styl dla tytułu formularza */ +form h2 { + text-align: center; + font-weight: bold; + margin-bottom: 20px; +} + +/* styl dla etykiet formularza */ +form label { + display: block; + font-weight: bold; + margin-bottom: 5px; +} + +/* styl dla pól formularza */ +form input[type="text"], +form input[type="password"], +form input[type="number"], +form textarea { + width: 100%; + padding: 10px; + border: 2px solid #ccc; + border-radius: 5px; + margin-bottom: 20px; + font-size: 16px; +} + +form input[type="submit"] { + background-color: #4CAF50; + border: none; + color: white; + padding: 10px 20px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 10px 0; + cursor: pointer; +} + +form input[type="submit"] { + background-color: #3e8e41; +} + +form textarea { + resize: none; +} \ No newline at end of file diff --git a/style/index.css b/style/index.css new file mode 100644 index 0000000..7691a7c --- /dev/null +++ b/style/index.css @@ -0,0 +1,52 @@ +body { + font-family: Arial, sans-serif; + background-color: #f5f5f5; + margin: 0; + padding: 0; +} + +h1 { + font-size: 32px; + font-weight: bold; + color: #333; + margin: 20px 0; +} + +table { + border-collapse: collapse; + margin: 20px 0; + width: 100%; +} + +table th, table td { + padding: 10px; + text-align: left; + vertical-align: middle; + border: 1px solid #ccc; +} + +table th { + background-color: #eee; + font-weight: bold; +} + +table tr:hover { + background-color: #f0f0f0; +} + +button { + background-color: #4CAF50; + border: none; + color: white; + padding: 10px 20px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 10px 0; + cursor: pointer; +} + +button:hover { + background-color: #3e8e41; +} \ No newline at end of file diff --git a/style/login.css b/style/login.css new file mode 100644 index 0000000..4dbf22a --- /dev/null +++ b/style/login.css @@ -0,0 +1,46 @@ +body { + background-color: #F2F2F2; + font-family: Arial, sans-serif; +} + +#login-box { + background-color: #FFFFFF; + border-radius: 10px; + padding: 20px; + width: 400px; + margin: 0 auto; + margin-top: 100px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} + +h1 { + text-align: center; + font-size: 28px; + margin-top: 0; +} + +input[type=text], +input[type=password] { + width: 100%; + padding: 10px; + margin-bottom: 20px; + border: none; + border-radius: 5px; + background-color: #F2F2F2; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1); + font-size: 16px; +} + +input[type=submit] { + background-color: #4CAF50; + color: white; + border: none; + border-radius: 5px; + padding: 10px; + font-size: 16px; + cursor: pointer; +} + +input[type=submit]:hover { + background-color: #3e8e41; +} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 38782c3..c26bce7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,9 +3,7 @@ {% block title %}{% endblock %} -