diff --git a/database.db b/database.db new file mode 100644 index 0000000000000000000000000000000000000000..d64d2deacb19a21923fe2e73e565fe9c410ddf5d Binary files /dev/null and b/database.db differ diff --git a/database.py b/database.py index 44e9e7aa64e4a5bd0a0f6c0964372d8af6a7bcb9..5e323c47c2a9f47ba8ea2089319a5ec83b06e76d 100644 --- a/database.py +++ b/database.py @@ -97,4 +97,4 @@ def get_workspaces(): conn.execute("SELECT * FROM Workspaces") return [Workspace.from_query(conn, x) for x in conn.cursor.fetchall()] -print(get_workspaces()) \ No newline at end of file +print(get_workspaces()) diff --git a/image-asset.png b/image-asset.png new file mode 100644 index 0000000000000000000000000000000000000000..99c8316a155876b636df87f99e8f0ebd97d2e87a Binary files /dev/null and b/image-asset.png differ diff --git a/login.html b/login.html new file mode 100644 index 0000000000000000000000000000000000000000..439e7d014cab39624b6a9171219258b7a8e94828 --- /dev/null +++ b/login.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + + <link rel="stylesheet" href="static/style.css"> + + <!-- Bootstrap CSS --> + <link rel="stylesheet" href= +"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" + integrity= +"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" + crossorigin="anonymous"> + + <title>{% block title %}{% endblock %} - Tramshed Workspaces</title> +</head> +<form class='myForm' method="POST" action=""> + <p>Enter Username: </p> + <br> +<input type = "text" name = "username" placeholder="Username.." ><br> +<button type = "submit" id='mySubmit'> Submit </button> +</form> +<!-- <div class="parallax"> +<body class="body"> + <!--<img src="static/Tramshed_Logo.jpg" alt="Logo" height="50" width="100">--> +<!-- navigation --> --> + <nav> +<ul> + <li><a href="#home">Home</a></li> + <li><a href="#Map">Map</a></li> + <li><a href="#contactUs">Contact Us</a></li> + <li style="float:right"><a class="active" href="#about">About</a></li> +</ul> + </nav> +<!--{% block mainBlock %}{% endblock %}--> + </body> +</html> diff --git a/main.py b/main.py index dc32f70e33060652797c6da10c685ca13c1bac44..e3e3e93d0130445b4a350d5898444b52af9ac7c0 100644 --- a/main.py +++ b/main.py @@ -9,5 +9,14 @@ def home(): workspaces = database.get_workspaces() return render_template("home.html", workspaces = workspaces) +@app.route('/login.html', methods = ["post"]) +def login(): + username = request.form.get('username') + if username == "admin": + return redirect("/templates/home.html") + else: + message = "Wrong Username" + return redirect("/login.html") + if __name__ == "__main__": app.run(debug = True) diff --git a/teamcb_720.jpg b/teamcb_720.jpg new file mode 100644 index 0000000000000000000000000000000000000000..02d13fe930f0cf65aa95a170366f8f84281fcaba Binary files /dev/null and b/teamcb_720.jpg differ diff --git a/testwebpage.html b/testwebpage.html new file mode 100644 index 0000000000000000000000000000000000000000..8d19b9719b5ea3c0c77e141cf3eed81e8a789049 --- /dev/null +++ b/testwebpage.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> +<link rel="stylesheet" href="styles.css"> +<head> + + <link rel="stylesheet" href="style.css"> + + <!-- Bootstrap CSS --> + <link rel="stylesheet" href= +"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" + integrity= +"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" + crossorigin="anonymous"> + + <title>Hello</title> +</head> + +<div class="parallax"> +<body class="body"> + <h1>Welcome</h1> + + <!-- navigation --> + <nav> +<ul> + <li><a href="#home">Home</a></li> + <li><a href="#Map">Map</a></li> + <li><a href="#contactUs">Contact Us</a></li> + <li style="float:right"><a class="active" href="#about">About</a></li> +</ul> + </nav><br><br><br> + + <article class="Data"> + <p>Name: CodeBase<br> + Address: CodeBase Edinburgh, 37a Castle Terrace, Edinburgh, EH1 2EL<br> + <img scr="https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1454334295772-Q9VJNUS49N9KFZXUATJU/image-asset.png"alt="Logo" width="100" height="80" style="float:right"/> + Description: CodeBase Edinburgh is the UK's largest technology incubator. Home to over 90 companies who have<br> + collectively raised over half a billion dollars in investment, it is the centre of the tech scene in city.<br> + <a href="https://www.thisiscodebase.com/">Click Here for the Website!</a> + <img scr="https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1601374465843-3E9V6AK6SWX7W6LLLN0R/teamcb_720.jpg?format=1000w,%20https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1505921023376-PAHUDHVOOKIYF4XQPHOO/5951229048_3e3d50fcb1_o.jpg"alt="The Team" width="100" height="80" style="float:right"/><br> + <a href="mailto:info@thisiscodebase.com">Contact us at our email here!</a><br> + Phone Number: 0131 560 2003<br> + Opening Hours: Our reception at 37a Castle Terrace is open Monday - Friday, 9am - 5pm.<br> + Check-in Instructions: Please go to reception to check in<br> + </p>