Skip to content
Snippets Groups Projects
Commit 3851a016 authored by Michael Drury's avatar Michael Drury
Browse files

adding a user page

parent 00de52ed
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -287,11 +287,15 @@ def get_total_cart_price(): ...@@ -287,11 +287,15 @@ def get_total_cart_price():
return total_price return total_price
# just takes you to the thank you page # just takes you to the thank you page
@app.route('/thank_you', methods=['GET', 'POST']) @app.route('/thank_you')
@login_required @login_required
def thank_you(): def thank_you():
return render_template('thank_you.html') return render_template('thank_you.html')
@app.route('/user_page')
@login_required
def user_page():
return render_template('user_page.html')
@lm.user_loader @lm.user_loader
def load_user(id): def load_user(id):
......
shop/static/images/fox36.jpg

238 KiB | W: | H:

shop/static/images/fox36.jpg

83.3 KiB | W: | H:

shop/static/images/fox36.jpg
shop/static/images/fox36.jpg
shop/static/images/fox36.jpg
shop/static/images/fox36.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -184,11 +184,9 @@ li { ...@@ -184,11 +184,9 @@ li {
display: block; display: block;
font-family: Andale Mono, monospace; font-family: Andale Mono, monospace;
color: grey; color: grey;
font-size: 2vw; font-size: 150%;
text-align: center; text-align: center;
padding: 10% 10%; padding: 10% 10%;
float: right
text-align: center;
} }
.cart_box { .cart_box {
...@@ -548,3 +546,18 @@ li { ...@@ -548,3 +546,18 @@ li {
color: red; color: red;
margin: 0px; margin: 0px;
} }
.avatar_img {
height: 100%;
margin-left: 10%;
padding: 0%;
}
.navbar_username {
font-size: 400%;
padding-left: 20%;
font-family: Andale Mono, monospace;
color: grey;
margin-top: -10%;
}
\ No newline at end of file
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
<li><div class = "navbar_box"><a class = "navbar_item" href="{{ url_for('cart') }}">Cart</a></div></li> <li><div class = "navbar_box"><a class = "navbar_item" href="{{ url_for('cart') }}">Cart</a></div></li>
<li><div class = "navbar_box"><a class = "navbar_item" href="{{ url_for('wishlist') }}">Wishlist</a></div></li> <li><div class = "navbar_box"><a class = "navbar_item" href="{{ url_for('wishlist') }}">Wishlist</a></div></li>
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<li class = "navbar_right_logoutin"><div class = "navbar_box"><img class = "avatar_img" src = "{{ url_for('static', filename='images/Logged_in.png') }}" alt="logged_in_avatar"><a class = "navbar_username" href="{{ url_for('user_page') }}">{{current_user.username[0].upper()}}</a></div></li>
<li class = "navbar_right_logoutin"><div class = "navbar_box"><a class="navbar_item" href="{{ url_for('logout') }}">Logout</a></div></li> <li class = "navbar_right_logoutin"><div class = "navbar_box"><a class="navbar_item" href="{{ url_for('logout') }}">Logout</a></div></li>
{% else %} {% else %}
<li class = "navbar_right_logoutin"><div class = "navbar_box"><a class="navbar_item" href="{{ url_for('login') }}">Login</a></div></li> <li class = "navbar_right_logoutin"><div class = "navbar_box"><a class="navbar_item" href="{{ url_for('login') }}">Login</a></div></li>
<li class = "navbar_right"><div class = "navbar_box"><a class="navbar_item" href="{{ url_for('signup') }}">Sign up</a></div></li> <li class = "navbar_right"><div class = "navbar_box"><a class="navbar_item" href="{{ url_for('signup') }}">Sign up</a></div></li>
......
{% extends "layout.html" %}
{% block title %}Login Example{% endblock %}
{% block page_content %}
<div id="content-wrap">
</div>
<!--repeated footer in page as dont want every page to have it-->
<footer id="footer">
<div class = "footer_logo_left_div">
<img class = "footer_logo_left" src = "{{ url_for('static', filename='images/dark_logo.png') }}" alt="logo image"/>
</div>
<div class = "footer_contact">
<p>Contact us:</p>
<p>e-mail: mpdrury15@gmail.com</p>
<p>telephone: 07874810762</p>
</div>
<div class = "footer_logo_right_div">
<img class = "footer_logo_right" src = "{{ url_for('static', filename='images/footer_mtb.png') }}" alt="mtb image"/>
</div>
</footer>
{% endblock %}
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