Added Home page

This commit is contained in:
2025-02-11 23:15:32 +01:00
parent 8e16b82996
commit 809b9dc638
5 changed files with 148 additions and 1 deletions

View File

@ -0,0 +1,5 @@
from flask import Blueprint, request, redirect, url_for, flash, render_template
from app.models import db
def home():
return render_template('home.html')

View File

@ -1,12 +1,13 @@
from flask import Blueprint from flask import Blueprint
from flask_login import login_required from flask_login import login_required
from app.controllers.auth_controller import login, logout from app.controllers.auth_controller import login, logout
from app.controllers.home_controller import home
main = Blueprint('main', __name__) main = Blueprint('main', __name__)
@main.route('/') @main.route('/')
def index(): def index():
return login() return home()
@main.route('/login', methods=['GET', 'POST']) @main.route('/login', methods=['GET', 'POST'])
def login_route(): def login_route():

127
app/views/home.html Normal file
View File

@ -0,0 +1,127 @@
{% block content %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BEACON</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: #2a2a2a;
min-height: 100vh;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
}
.spotlight {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 100%;
background: radial-gradient(
circle at 50% 30%,
rgba(255, 255, 255, 0.1) 0%,
rgba(0, 0, 0, 0.5) 70%
);
pointer-events: none;
}
header {
position: absolute;
top: 1rem;
right: 1rem;
z-index: 2;
}
.login-btn {
color: rgba(255, 255, 255, 0.8);
text-decoration: none;
font-size: 0.9rem;
padding: 0.5rem 1rem;
border: none;
background: none;
cursor: pointer;
}
.login-btn:hover {
background: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
main {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 2rem;
z-index: 1;
}
.title {
font-size: 4rem;
font-weight: bold;
color: #f7e7b2;
margin-bottom: 2rem;
text-align: center;
}
.request-btn {
padding: 0.75rem 2rem;
font-size: 1rem;
color: rgba(255, 255, 255, 0.9);
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 25px;
cursor: pointer;
transition: all 0.3s ease;
}
.request-btn:hover {
background: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.3);
}
footer {
text-align: center;
padding: 2rem;
color: rgba(255, 255, 255, 0.6);
z-index: 1;
}
@media (max-width: 768px) {
.title {
font-size: 3rem;
}
}
</style>
</head>
<body>
<div class="spotlight"></div>
<header>
<button class="login-btn" onclick="location.href='{{ url_for('main.login_route') }}'">Login</button>
</header>
<main>
<h1 class="title">BEACON</h1>
<button class="request-btn">Request</button>
</main>
<footer>
<p>Guiding Your IT Journey</p>
</footer>
</body>
</html>
{% endblock %}

View File

@ -17,6 +17,19 @@
flex-direction: column; flex-direction: column;
} }
.spotlight {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 100%;
background: radial-gradient(circle at 50% 30%,
rgba(255, 255, 255, 0.1) 0%,
rgba(0, 0, 0, 0.5) 70%);
pointer-events: none;
}
header { header {
padding-top: 20px; padding-top: 20px;
padding-left: 20px; padding-left: 20px;

View File

@ -110,6 +110,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="spotlight"></div>
<div class="container"> <div class="container">
<div class="login-signup-container"> <div class="login-signup-container">