base.html 5.52 KB
Newer Older
Timo Heikkilä's avatar
Timo Heikkilä committed
1
2
3
4

{% import "bootstrap/wtf.html" as wtf %}

<!doctype html>
Timo Heikkilä's avatar
Timo Heikkilä committed
5
<html>
Timo Heikkilä's avatar
Timo Heikkilä committed
6
7
8
9
10
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
11
    <link rel="stylesheet" href="{{ url_for('static', filename='lib/css/bootstrap.min.css') }}" ></link>
12
    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" ></link>
13
    <script src="{{ url_for('static', filename='lib/js/jquery-3.3.1.js') }}" ></script>
14
15
    <script src="{{ url_for('static', filename='lib/js/popper.min.js') }}" ></script>
    <script src="{{ url_for('static', filename='lib/js/bootstrap.min.js') }}" ></script>
Timo Heikkilä's avatar
Timo Heikkilä committed
16
    <title>Onni</title>
Timo Heikkilä's avatar
Timo Heikkilä committed
17
18

    <!-- Bootstrap core CSS -->
19
    <link href="/lib/css/bootstrap.min.css" rel="stylesheet">
Timo Heikkilä's avatar
Timo Heikkilä committed
20
21
    
    <!-- Custom styles for this template -->
Timo Heikkilä's avatar
Timo Heikkilä committed
22
23
24
    
    <link href="/static/css/slider.css" rel="stylesheet">
    
Timo Heikkilä's avatar
Timo Heikkilä committed
25
26
  </head>
  <body>
27

Ossi Laine's avatar
Ossi Laine committed
28
29
  <!-- Navigation -->
  <nav class="navbar navbar-expand bg-light fixed-top">
30

Ossi Laine's avatar
Ossi Laine committed
31
    {% if pages %}  
32

Ossi Laine's avatar
Ossi Laine committed
33
34
35
36
        <div class="navbar-brand font-weight-light"><span class="text-primary font-weight-bold">ID:{{ session['user']}}</span>
        </div>
        <div class="progress-bar progress-bar-striped" role="progressbar" style="width: {{ progress_bar_percentage }}%;" aria-valuemin="0" aria-valuemax="100">{{ _('Task progress:') }} {{   progress_bar_percentage }}%
        </div>
37

Ossi Laine's avatar
Ossi Laine committed
38
    {% else %}
Timo Heikkilä's avatar
Timo Heikkilä committed
39

Ossi Laine's avatar
Ossi Laine committed
40
41
42
43
      <div class="col-1 navbar-brand">
        <a href="{{ url_for('index') }}">
        <img class="mt-1 mb-1" src="/static/img/onni_LOGO-horizontal-RGB-transparent_bg_cut.png" alt="Logo" height="40">
        </a>
Timo Heikkilä's avatar
Timo Heikkilä committed
44

Ossi Laine's avatar
Ossi Laine committed
45
46
47
48
49
50
51
52
53
54
        {% block navbar %}
          {% with messages = get_flashed_messages() %}
              {% if messages %}
                  {% for message in messages %}
                      <a class="pl-5 text-align-center text-danger">{{ message }}</a>
                  {% endfor %}
              {% endif %}
          {% endwith %}
        {% endblock %}
      </div>
Timo Heikkilä's avatar
Timo Heikkilä committed
55

Ossi Laine's avatar
Ossi Laine committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
      {% if current_user.is_authenticated %}
        <div class="col-11 text-primary text-right">
          <a class="nav-item" href="{{ url_for('researcher_info') }}" class="nav-link">Info |</a>
          <a class="nav-item" href="{{ url_for('create.create_experiment') }}" class="nav-link">Create |</a>
          <a class="nav-item" href="" class="nav-link">Archives |</a>
          <a class="nav-item" href="{{ url_for('logout') }}" class="nav-link">Logout |</a>

          <a class="nav-item dropdown">
          <a class="nav-item dropdown-toggle text-align-right" href="#" id="navbarDropdown_auth" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Language 
          </a>
          <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown_auth">
            <a class="dropdown-item" href="{{ url_for('set_language', language='Finnish', lang='fi') }}">Finnish</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='English', lang='en') }}">English</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Persian', lang='fa') }}">Persian</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Greek',   lang='el') }}">Greek</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Italian', lang='it') }}">Italian</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Chinese', lang='zh') }}">Chinese</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='All') }}">Show all</a>
          </div>
76
77
78
79
80
81
82
83
        </div>
        
        {% endif %}
                  
        {% if current_user.is_anonymous %}
        
        <div class="col-11 text-primary text-right">

Ossi Laine's avatar
Ossi Laine committed
84
          <a class="nav-item" href="{{ url_for('login') }}" class="nav-link">Login |</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
85

Ossi Laine's avatar
Ossi Laine committed
86
87
88
89
90
91
92
93
94
95
96
          <a class="nav-item dropdown-toggle text-align-right" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Language
          </a>
          <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
            <a class="dropdown-item" href="{{ url_for('set_language', language='Finnish', lang='fi') }}">Finnish</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='English', lang='en') }}">English</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Persian', lang='fa') }}">Persian</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Greek',   lang='el') }}">Greek</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Italian', lang='it') }}">Italian</a>
            <a class="dropdown-item" href="{{ url_for('set_language', language='Chinese', lang='zh') }}">Chinese</a>
          </div>
Timo Heikkilä's avatar
Timo Heikkilä committed
97
98
        </div>
                
99
        {% endif %}
Ossi Laine's avatar
Ossi Laine committed
100
      {% endif %}
Timo Heikkilä's avatar
Timo Heikkilä committed
101
            
Ossi Laine's avatar
Ossi Laine committed
102
103
104
105
106
107
    </nav>
        
    <main role="main" class="container">
            {% block content %}{% endblock %}
    </main>

Timo Heikkilä's avatar
Timo Heikkilä committed
108
109
110
    <footer class="footer">
      <div class="container">
          <br>
111
        <span class="text-muted">Developed by Timo Heikkilä | Human Emotion Systems Labratory, Turku PET Centre | <a href="http://emotion.utu.fi">emotion.utu.fi</a></span>
Timo Heikkilä's avatar
Timo Heikkilä committed
112
113
114
115
116
117
118
119
120
121
122
123
      </div>
    </footer>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
  </body>
</html>