-
Notifications
You must be signed in to change notification settings - Fork 0
/
Profile.html
172 lines (143 loc) · 4.62 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
body {font-family: Arial, Helvetica, sans-serif;}
* {
width: 50%
box-sizing: border-box;}
input[type=text], select, textarea {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 16px;
resize: vertical;
}
input[type=submit] {
background-color: #000000;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.8);
}
button{
background-color: #000000;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.8);
}
li{
cursor: pointer;
box-shadow: 0 2px 6px 0 rgba(0,0,0,0.8);
}
.container {
border-radius: 5px;
background-color: #f2f2f2;
margin: auto;
padding: 12px 20px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.8);
width: 50%;
}
table, td, th {
border: 1px solid black;
}
table {
border-collapse: collapse;
width: 100%;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.8);
}
td {
height: 50px;
vertical-align: bottom;
text-align: center;
vertical-align: middle;
}
th{
text-align:center;
}
</style>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">IG</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li ><a href="/">Home</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ url }}"><span class="glyphicon glyphicon-log-in"></span> Logout</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<h1 style="text-align: center;background-color: BLACK; color:WHITE;" > You are viewing {{email}}
</h1></br>
<center>
<button onclick="location.href='/FollowingFollowerslist?Followers=True&email={{email}}'">Followers: {{followers-1}}</button>
<button onclick="location.href='/FollowingFollowerslist?Followings=True&email={{email}}'">Following: {{following-1}}</button>
<br>
{% if role=="visitor" and email not in profiledata %}
<br>
<button onclick="location.href='/FollowUser?followingemail={{email}}'">Follow</button>
{% elif role=="visitor" and email in profiledata %}
<br>
<button onclick="location.href='/UnFollowUser?followingemail={{email}}'">Unfollow</button>
{% endif %}
</center>
<br>
<ul class="list-group">
{% for i in posts %}
<b ><li class="list-group-item" >
<a>Post by: {{i.Post_owner}}</a></br>
<a>Date: {{i.Post_timestamp }}</a></br>
<center>
<img src="{{i.Post_Blob}}" width="100%"></br>
</center>
<ul class="list-group">
<div style=" border: 3px solid black;padding: 10px;">
<a style="color:BLACK;">Caption: {{i.Post_Caption}}</a></br>
{% if role == "visitor" and email in profiledata%}
<div><button onclick="location.href='/Comment?CommentView=True&postid={{i.Post_Uid}}'">comment</button></div>
{% elif role !="visitor" %}
<div><button onclick="location.href='/Comment?CommentView=True&postid={{i.Post_Uid}}'">comment</button></div>
{% endif %}
</br>
<a>Comments:</a></br>
{% for j in i.Post_comments|reverse %}
{% if loop.index < 6 and j.Comment_owner!='None' %}
<li class="list-group-item"><a style="color:BLACK;text-size:14px;">{{j.Comment_owner}}: {{j.Comment_content}}</a>
<a style="float:right;">{{j.comment_time}}</a>
</li>
{% endif %}
{% if loop.index==6 and j.Comment_content!='None' %}
<li class="list-group-item"><a href="/ViewComments?postuid={{i.Post_Uid}}">more.</a></li>
{% endif %}
{% endfor %}
</li>
</ul>
</br>
{% endfor %}
</ul>
<footer style="float: right;">Signed in as <b>{{users}}</b></footer>
</div>
</div>
</body>
</html>