Skip to content
Snippets Groups Projects
Commit e7df511a authored by Ethan Clay (Student)'s avatar Ethan Clay (Student)
Browse files

Hook up bookings and home items on nav bar

parent 266bea70
No related branches found
No related tags found
No related merge requests found
......@@ -4,10 +4,15 @@ from flask import Flask
from config import Config
from flask_cookies import Cookies
def create_app(config_class=Config):
app = Flask(__name__)
app.config.from_object(config_class)
#Cookies, can add optional Google Tag Manager ID below
cookies = Cookies()
cookies.init_app(app)
# Initialize Flask extensions here
# Register blueprints here
......@@ -17,7 +22,7 @@ def create_app(config_class=Config):
from app.bookings import bp as bookings_bp
app.register_blueprint(bookings_bp, url_prefix='/bookings')
@app.route('/test/')
@app.route('/test')
def test_page():
return '<h1>Testing the Flask Application Factory Pattern</h1>'
......
No preview for this file type
from flask import render_template
from flask import render_template, redirect, url_for
from app.bookings import bp
@bp.route('/')
@bp.route('/home')
def index():
return render_template('bookings/index.html')
@bp.route('/')
def redirect_index():
return redirect(url_for('bookings.index'), code=301)
\ No newline at end of file
No preview for this file type
......@@ -79,6 +79,10 @@
flex: 1; /* Allows content to expand */
}
.wrapper {
flex: 1;
}
/*
Remove default padding which occurs around the nav bar on some browsers such as Edge and setup default font.
This should be changed where required on inherited elements
......
<!-- Core HTML page which includes navigation bar and footer and determines the order in which items are loaded, all other templates should extend this base template -->
<!DOCTYPE html>
<html>
<head>
......@@ -16,8 +15,8 @@
<img src="{{ url_for('static', filename='images/nav_icon.jpeg')}}">
<nav class="navbar">
<ul>
<li class="nav_list_item"><a href="#">Home</a></li>
<li class="nav_list_item"><a href="#">About</a></li>
<li class="nav_list_item"><a href="{{ url_for('main.index') }}">Home</a></li>
<li class="nav_list_item"><a href="{{ url_for('bookings.index') }}">Bookings</a></li>
<li class="nav_list_item"><a href="#">Pricing</a></li>
<li class="nav_list_item"><a href="#">Terms of use</a></li>
<li class="nav_list_item"><a href="#">Contact</a></li>
......@@ -34,7 +33,10 @@
<footer>
<div class="footer">
<div class="row">
<div class="footer_column">About Us</div>
<div class="footer_column">
<div><a >About Us</div>
<div>About Us</div>
</div>
<div class="footer_column">Contact</div>
<div class="footer_column">Login</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment