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>SWT 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 session.email %}
21
          <li>
22
            <a id="login" href="#"> Login </a>
23
          </li>
24
          {% else %}
25
          <!-- swts list -->
26
          <li>
27
            <a href="{{ url_for('user.mySweets') }}"> My Sweets </a>
28
          </li>
29
          <!-- the cog menu -->
30
          <li class="dropdown user-menu">
31
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
32
              <span class="glyphicon glyphicon-cog"></span>
33
            </a>
34
            <ul class="dropdown-menu" role="menu">
35
              <li> <a href="{{ url_for('app.register') }}">Register New App</a> </li>
36
              <li> <a href="{{ url_for('user.myApps') }}">Registered Apps</a> </li>
37
              <li class="divider"></li>
38
              <li> <a href="{{ url_for('context.register') }}">Register New Context</a> </li>
39
              <li> <a href="{{ url_for('user.myContexts') }}">Registered Contexts</a> </li>
40
            </ul>
41
          </li>
42
          <!-- the user menu -->
43
          <li class="dropdown user-menu">
44
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
45
              <span class="glyphicon glyphicon-user"></span>
46
              <span class="caret"></span>
47
            </a>
48
            <ul class="dropdown-menu" role="menu">
49
              <li>
50
              <a href="{{ url_for('user.profile') }}"><small>
51
                  {{ session.email }}
52
              </small></a>
53
              </li>
54
              <li>
55
                <a href="{{ url_for('user.authorizedApps') }}">
56
                  My authorized apps
57
                </a>
58
              </li>
59
              <li class="divider"></li>
60
              <li> <a href="#" id="logout"> Logout </a> </li>
61
            </ul>
62
          </li>
63
          {% endif %}
64
        </ul>
65
        <h3 class="text-muted"> SWTStore </h3>
66
      </div>
67
      <div class="notif">
68
        {% for message in get_flashed_messages() %}
69
          <div class="alert alert-danger">{{ message }}</div>
70
        {% endfor %}
71
      </div>
72
      <div class="content">
73
        {% block body %}{% endblock %}
74
      </div>
75
      <!--div class="footer">
76
        <a href="http://swtr.us">What is swt web?</a> &bull;
77
        <a href="http://swtr.us">FAQ</a> &bull;
78
        <a href="http://swtr.us">Help</a> &bull;
79
        <a href="#">Stats</a>
80
      </div-->
81
    </div>
82
83
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
84
    <!--script>window.jQuery || document.write('<script src="{{ url_for('.static', filename='js/jquery-1.9.1.min.js')}}"><\/script>')</script-->
85
    <script src="{{ url_for('.static', filename='js/lib/bootstrap.min.js') }}"></script>
86
    <script src="https://login.persona.org/include.js"></script>
87
88
    <script>
89
      window.ss = window.ss || {};
90
      ss.loginURL = function() { return "{{ url_for('user.login') }}"; };
91
      ss.logoutURL = function() { return "{{ url_for('user.logout') }}"; };
92
      ss.loggedInUser = function() {
93
        return ("{{ session.email }}") ? "{{ session.email }}" : null;
94
      };
95
      window.onload = function() {
96
        ss.init();
97
      };
98
    </script>
99
    <script src="{{ url_for('.static', filename='js/main.js') }}"></script>
100
    {% block scripts %} {% endblock %}
101
  </body>
102
</html>