moviedb/templates/profile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% extends "base.html" %} {% block title %}{{ session['user'] }}'s Profile{% endblock %} {% block content %} {% if session['user'] %} <div class="mycontainer"> <div class="profile"> <div class="profile-head"> <div class="profile-head-left"> <h1>{{ session['user'] }}</h1> <p class="profile-fav-count"> <i class="material-icons md-fav">favorite</i> {{ user_data['favorite_count'] }} Favorites </p> </div> <div class="profile-head-right"> <p class="profile-fav-genre"> Favorite Genre: <strong>{{ user_data['favorite_genre'] }}</strong> </p> <p class="profile-fav-genre"> Recent Favorite: <strong>{{ user_data['recent_fav'] }}</strong> </p> </div> </div> <div class="divider"></div> <h2>Favorite Titles</h2> {% for movie in user_data['movies'] %} <a href="{{ url_for('main.info', id=movie['id']) }}" class="profile-list-item"> {% if posters_on_profile_page %} <img class="profile-list-poster" src="{{ movie['cover'] }}"> {% endif %} <div class="profile-list-item-text"> <p class="profile-list-title">{{ movie['long title'] }}</p> <p class="genres">{{ movie['genres'] }}</p> <div class="profile-list-rating"> <i class="material-icons gold"> star </i> <p class="rating-no">{{ movie['rating'] }}</p> </div> </div> </a> {% endfor %} </div> </div> {% else %} <h1> You need to <a class="has-text-primary" href="{{ url_for('auth.login') }}">Login</a> in order to view your profile </h1> {% endif %} {% endblock %}