1 |
<!doctype html> |
2 |
<html> |
3 |
<head> |
4 |
<meta charset="utf-8"> |
5 |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
6 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
7 |
<title>SWeeT Store</title> |
8 |
<link rel=stylesheet type=text/css href="{{ url_for('.static', filename='css/bootstrap.min.css') }}"> |
9 |
<link rel=stylesheet type=text/css href="{{ url_for('.static', filename='css/bootstrap-theme.min.css') }}"> |
10 |
<link rel=stylesheet type=text/css href="{{ url_for('.static', filename='css/style.css') }}"> |
11 |
{% block head %}{% endblock %} |
12 |
</head> |
13 |
<body> |
14 |
<div class="container"> |
15 |
<div class="header"> |
16 |
<ul class="nav nav-tabs pull-right" role="navigation"> |
17 |
<li> |
18 |
<a href="{{ url_for('frontend.index') }}"> Home </a> |
19 |
</li> |
20 |
{% if not user %} |
21 |
<li> |
22 |
<a id="login" href="#"> Login </a> |
23 |
</li> |
24 |
{% else %} |
25 |
<!-- the cog menu --> |
26 |
<li class="dropdown user-menu"> |
27 |
<a class="dropdown-toggle" data-toggle="dropdown" href="#"> |
28 |
<span class="glyphicon glyphicon-cog"></span> |
29 |
</a> |
30 |
<ul class="dropdown-menu" role="menu"> |
31 |
<li> <a href="{{ url_for('app.register') }}">Register New App</a> </li> |
32 |
<li> <a href="{{ url_for('app.list') }}">Registered Apps</a> </li> |
33 |
<li class="divider"></li> |
34 |
<li> <a href="{{ url_for('context.register') }}">Register New Context</a> </li> |
35 |
<li> <a href="{{ url_for('context.list') }}">Registered Contexts</a> </li> |
36 |
</ul> |
37 |
</li> |
38 |
<!-- the user menu --> |
39 |
<li class="dropdown user-menu"> |
40 |
<a class="dropdown-toggle" data-toggle="dropdown" href="#"> |
41 |
<span class="glyphicon glyphicon-user"></span> |
42 |
<span class="caret"></span> |
43 |
</a> |
44 |
<ul class="dropdown-menu" role="menu"> |
45 |
<li> |
46 |
<a href="{{ url_for('user.profile') }}"><small> |
47 |
{% if user.username %} |
48 |
{{ user.username }} |
49 |
{% else %} |
50 |
{{ user.email }} |
51 |
{% endif %} |
52 |
</small></a> |
53 |
</li> |
54 |
<li class="divider"></li> |
55 |
<li> <a href="#" id="logout">Logout</a> </li> |
56 |
</ul> |
57 |
</li> |
58 |
{% endif %} |
59 |
</ul> |
60 |
<h3 class="text-muted"> SWTStore </h3> |
61 |
</div> |
62 |
<div class="notif"> |
63 |
{% for message in get_flashed_messages() %} |
64 |
<div class="flash">{{ message }}</div> |
65 |
{% endfor %} |
66 |
</div> |
67 |
<div class="content"> |
68 |
{% block body %}{% endblock %} |
69 |
</div> |
70 |
<!--div class="footer"> |
71 |
<a href="http://swtr.us">What is swt web?</a> • |
72 |
<a href="http://swtr.us">FAQ</a> • |
73 |
<a href="http://swtr.us">Help</a> • |
74 |
<a href="#">Stats</a> |
75 |
</div--> |
76 |
</div> |
77 |
|
78 |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> |
79 |
<!--script>window.jQuery || document.write('<script src="{{ url_for('.static', filename='js/jquery-1.9.1.min.js')}}"><\/script>')</script--> |
80 |
<script src="{{ url_for('.static', filename='js/lib/bootstrap.min.js') }}"></script> |
81 |
<script src="https://login.persona.org/include.js"></script> |
82 |
|
83 |
<script> |
84 |
window.ss = window.ss || {}; |
85 |
ss.loginURL = function() { return "{{ url_for('user.login') }}"; }; |
86 |
ss.logoutURL = function() { return "{{ url_for('user.logout') }}"; }; |
87 |
ss.loggedInUser = function() { |
88 |
{% if not user %} |
89 |
var user = ''; |
90 |
{% else %} |
91 |
var user = "{{ user.email }}"; |
92 |
{% endif %} |
93 |
if(user) { |
94 |
return user; |
95 |
} |
96 |
return null; |
97 |
}; |
98 |
window.onload = function() { |
99 |
ss.init(); |
100 |
}; |
101 |
</script> |
102 |
<script src="{{ url_for('.static', filename='js/main.js') }}"></script> |
103 |
{% block scripts %} {% endblock %} |
104 |
</body> |
105 |
</html> |