Add initial project structure with Docker setup and frontend/backend files

This commit is contained in:
2024-10-17 18:57:05 -04:00
parent 86f36c4754
commit 4cce05f7d6
15 changed files with 606 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="container">
<h1>Welcome, {{ user.name }}</h1>
<a href="{{ url_for('logout') }}">Logout</a>
<h2>Search Users</h2>
<form method="GET">
<input type="text" name="location" placeholder="Location">
<input type="number" name="age" placeholder="Age">
<select name="gender">
<option value="Any">Any</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
<button type="submit">Search</button>
</form>
<h2>Users</h2>
<ul>
{% for user in users %}
<li>{{ user.name }} - {{ user.age }} years old - {{ user.location }} - {{ user.gender }}</li>
{% else %}
<li>No users found.</li>
{% endfor %}
</ul>
<h2>Messages</h2>
<form method="POST" action="{{ url_for('send_message') }}">
<input type="hidden" name="receiver_id" value="{{ user.id }}">
<textarea name="message_content" placeholder="Type your message here..."></textarea>
<button type="submit">Send Message</button>
</form>
<ul>
{% for message in messages %}
<li>{{ message.content }}</li>
{% else %}
<li>No messages found.</li>
{% endfor %}
</ul>
</div>
</body>
</html>

13
frontend/templates/eula.html Executable file
View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>End User License Agreement</title>
</head>
<body>
<h1>End User License Agreement (EULA)</h1>
<p>[Insert your EULA text here]</p>
<a href="{{ url_for('register') }}">Back to Registration</a>
</body>
</html>

18
frontend/templates/index.html Executable file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="container">
<h1>Welcome to the Workout Buddy</h1>
<div>
<a href="{{ url_for('login') }}">Login</a>
<a href="{{ url_for('register') }}">Register</a>
</div>
</div>
</body>
</html>

26
frontend/templates/login.html Executable file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="container">
<h1>Login</h1>
<form method="POST">
<label for="email">Email:</label>
<input type="email" name="email" required>
<label for="password">Password:</label>
<input type="password" name="password" required>
<button type="submit">Login</button>
</form>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
</div>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="container">
<h1>Register</h1>
<form method="POST">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" name="name" required>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" name="email" required>
</div>
<div class="form-group">
<label for="age">Age:</label>
<input type="number" name="age" min="18" required>
</div>
<div class="form-group">
<label for="location">Location:</label>
<input type="text" name="location" required>
</div>
<div class="form-group">
<label for="gender">Gender:</label>
<select name="gender" required>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Prefer Not to Say">Prefer Not to Say</option>
</select>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" name="password" required>
</div>
<p>By registering, you agree to our <a href="/eula" target="_blank">End User License Agreement (EULA)</a>.</p>
<button type="submit">Register</button>
</form>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
</div>
</body>
</html>

View File

@@ -0,0 +1,40 @@
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4; /* Light background color for better visibility */
}
.container {
max-width: 400px; /* Limit the width of the form container */
margin: 50px auto; /* Center the form horizontally and add vertical margin */
padding: 20px;
background-color: white; /* White background for the form */
border-radius: 8px; /* Rounded corners for the form */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}
h1 {
text-align: center; /* Center the heading */
}
.form-group {
margin-bottom: 500px; /* Increase space between form groups */
}
button {
width: 100%; /* Make the button full-width */
padding: 10px; /* Add padding to the button */
background-color: #28a745; /* Green background color */
color: white; /* White text color */
border: none; /* Remove default border */
border-radius: 5px; /* Rounded corners for the button */
cursor: pointer; /* Change cursor to pointer on hover */
}
button:hover {
background-color: #218838; /* Darker green on hover */
}
.error {
color: red; /* Red color for error messages */
text-align: center; /* Center error messages */
}

40
frontend/templates/styles.css Executable file
View File

@@ -0,0 +1,40 @@
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4; /* Light background color for better visibility */
}
.container {
max-width: 400px; /* Limit the width of the form container */
margin: 50px auto; /* Center the form horizontally and add vertical margin */
padding: 20px;
background-color: white; /* White background for the form */
border-radius: 8px; /* Rounded corners for the form */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}
h1 {
text-align: center; /* Center the heading */
}
.form-group {
margin-bottom: 500px; /* Increase space between form groups */
}
button {
width: 100%; /* Make the button full-width */
padding: 10px; /* Add padding to the button */
background-color: #28a745; /* Green background color */
color: white; /* White text color */
border: none; /* Remove default border */
border-radius: 5px; /* Rounded corners for the button */
cursor: pointer; /* Change cursor to pointer on hover */
}
button:hover {
background-color: #218838; /* Darker green on hover */
}
.error {
color: red; /* Red color for error messages */
text-align: center; /* Center error messages */
}