Skip to content
Snippets Groups Projects
Commit ea9adc42 authored by Rhiannon Austin's avatar Rhiannon Austin
Browse files

Merge branch 'main' into 'WebPages'

# Conflicts:
#   Pipfile
#   Pipfile.lock
#   database.py
#   main.py
parents 391a89a7 d9b76f3e
No related branches found
No related tags found
3 merge requests!18Login,!7Login,!2Web pages
FLASK_APP=main.py
FLASK_ENV=development
__pycache__/
.vscode/
database.db
......@@ -5,6 +5,7 @@ name = "pypi"
[packages]
flask = "*"
python-dotenv = "*"
[dev-packages]
......
{
"_meta": {
"hash": {
"sha256": "f7f1cea682a03d85328caf2f88382c4380283d3892a9ba31b374784fb29536c4"
"sha256": "e75fbf7398b2878d5624ff5f88aa44b1590e34754d2c19b0cc4512a42eb8676e"
},
"pipfile-spec": 6,
"requires": {
......@@ -131,6 +131,14 @@
"markers": "python_version >= '3.6'",
"version": "==2.0.1"
},
"python-dotenv": {
"hashes": [
"sha256:32b2bdc1873fd3a3c346da1c6db83d0053c3c62f28f1f38516070c4c8971b1d3",
"sha256:a5de49a31e953b45ff2d2fd434bbc2670e8db5273606c1e737cc6b93eff3655f"
],
"index": "pypi",
"version": "==0.19.2"
},
"werkzeug": {
"hashes": [
"sha256:63d3dc1cf60e7b7e35e97fa9861f7397283b75d765afcaefd993d6046899de8f",
......
......@@ -71,7 +71,7 @@ class Workspace:
def from_query(conn, tuple):
(id, name, address, main_photo, description, website, email, phone_number, opening_hours, checkin_instructions) = tuple
additional_photos = []
conn.execute("SELECT url FROM AdditionalPhotos WHERE workspace_id = ?", (str(id)))
for x in conn.cursor.fetchall():
additional_photos.append(x[0])
......
import database
print(database.add_workspace(database.Workspace(
"CodeBase",
"CodeBase Edinburgh, 37a Castle Terrace, Edinburgh, EH1 2EL",
"https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1505921023376-PAHUDHVOOKIYF4XQPHOO/5951229048_3e3d50fcb1_o.jpg?format=750w",
["https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1636387943314-W9JWMS6ZX4DEZSPUV7T0/Copy+of+Unfiltered_square+%281%29.png?format=500w"],
"We've been exploring the world of startups...",
"https://www.thisiscodebase.com",
"hannah@thisiscodebase.com",
"+44 131 560 2003",
"Monday - Friday, 9am - 5pm",
"Tramsched members should contact Hannah using the email address listed."
)))
static/Tramshed_Logo.jpg

18.9 KiB

h1
{ color: blue;}
button
{color: greenyellow;
border-spacing: 20px;
size: 4000000px;
}
li {
nav li {
display: inline;
border-right: 1px solid #bbb;
float:left;
......@@ -15,14 +9,14 @@ li {
border-bottom-right-radius: 1000%;
}
li:last-child {
nav li:last-child {
color: red;
background-color: red;
border-right: none;
border-top-left-radius: 1000%;
border-bottom-left-radius: 1000%;
}
ul {
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
......@@ -31,7 +25,7 @@ ul {
}
li a {
nav li a {
display: block;
color: white;
text-align: center;
......@@ -40,7 +34,7 @@ li a {
}
li a:hover {
nav li a:hover {
border-bottom-right-radius: 1000%;
border-top-right-radius: 1000%;
border-top-left-radius: -1000%;
......@@ -48,7 +42,7 @@ li a:hover {
background-color: #111;
}
li a:hover:last-child {
nav li a:hover:last-child {
border-bottom-right-radius: 1000%;
border-top-right-radius: 1000%;
border-top-left-radius: 1000%;
......
{% extends "main.html" %}
{% block title %}Home{% endblock %}
{% block mainBlock %}
<ul>
{% for workspace in workspaces %}
<li><a href="{{ workspace.website }}">{{ workspace.name }}</a>
<img src="{{ workspace.main_photo }}"></li>
<ul>
<li>{{ workspace.address }}</li>
<li>{{ workspace.description }}</li>
<li>{{ workspace.email }}</li>
<li>{{ workspace.phone_number }}</li>
<li>{{ workspace.opening_hours }}</li>
<li>{{ workspace.checkin_instructions }}</li>
</ul>
{% endfor %}
</ul>
{% endblock %}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="styles.css">
<head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="static/style.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href=
......@@ -12,14 +11,13 @@
"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous">
<title>Hello</title>
<title>{% block title %}{% endblock %} - Tramshed Workspaces</title>
</head>
<div class="parallax">
<body class="body">
<h1>Welcome</h1>
<!-- navigation -->
<img src="static/Tramshed_Logo.jpg" alt="Logo" height="50" width="100">
<!-- navigation -->
<nav>
<ul>
<li><a href="#home">Home</a></li>
......@@ -27,4 +25,7 @@
<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>
</nav>
{% block mainBlock %}{% endblock %}
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment