base.html 6.62 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
11
12
13
14
  <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="">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
Timo Heikkilä's avatar
Timo Heikkilä committed
15
    <title>Onni</title>
Timo Heikkilä's avatar
Timo Heikkilä committed
16
17
18
19
20

    <!-- Bootstrap core CSS -->
    <link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- Custom styles for this template -->
Timo Heikkilä's avatar
Timo Heikkilä committed
21
22
23
    
    <link href="/static/css/slider.css" rel="stylesheet">
    
Timo Heikkilä's avatar
Timo Heikkilä committed
24
25
26
27
  </head>
  <body>
    <header>
<!-- Navigation -->
Timo Heikkilä's avatar
Timo Heikkilä committed
28
<nav class="navbar navbar-expand navbar-dark bg-dark fixed-top">
Timo Heikkilä's avatar
Timo Heikkilä committed
29
30
31
  <div class="col navbar-brand">
      <img src="/static/img/madam-300x250.jpg" alt="Logo" style="width:70px;">
        {% if pages %}  
Timo Heikkilä's avatar
Timo Heikkilä committed
32
            <a class="navbar-brand pl-5 font-weight-light"><span class="text-success font-weight-bold">{{ session['user']}}</span></a>
Timo Heikkilä's avatar
Timo Heikkilä committed
33
        {% else %}
Timo Heikkilä's avatar
Timo Heikkilä committed
34
35
36
37
38
        
            
            <a class="navbar-brand pl-3 text-success font-weight-light" href="{{ url_for('index') }}" class="nav-link">Onni</a>
            
            
Timo Heikkilä's avatar
Timo Heikkilä committed
39
40
        {% endif %}
    </div>
Timo Heikkilä's avatar
Timo Heikkilä committed
41
    <div class="navbar-nav w-50">
Timo Heikkilä's avatar
Timo Heikkilä committed
42
        {% if pages %}    
Timo Heikkilä's avatar
Timo Heikkilä committed
43
            <div class="progress-bar bg-success progress-bar-striped" role="progressbar" style="width: {{ progress_bar_percentage }}%" aria-valuemin="0" aria-valuemax="100">{{ _('Task progress:') }} {{   progress_bar_percentage }}%</div>
Timo Heikkilä's avatar
Timo Heikkilä committed
44
45
46
47
48
49
50
51
52
53
54
55
56
        {% endif %}        
    </div>
            <div class="col text-success text-right">
                  {% block navbar %}
                    {% with messages = get_flashed_messages() %}
                        {% if messages %}
                            {% for message in messages %}
                                <a class="text">{{ message }}</a>
                            {% endfor %}
                        {% endif %}
                    {% endwith %}
                  {% endblock %}
                  {% if current_user.is_authenticated %}
Timo Heikkilä's avatar
Timo Heikkilä committed
57
58
59
60
61
62
63
64
65



        <a class="nav-item dropdown">
        <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" aria-labelledby="navbarDropdown">
          
Timo Heikkilä's avatar
Timo Heikkilä committed
66
67
68
69
70
71
72
          <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 experiments</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
73
        </div>
Timo Heikkilä's avatar
Timo Heikkilä committed
74
75
76
         <a class="nav-item" href="{{ url_for('researcher_info') }}" class="nav-link">| Info |</a>
         <a class="nav-item" href="{{ url_for('create_experiment') }}" class="nav-link">Create |</a>
         <a class="nav-item" href="" class="nav-link">Archives |</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
77

Timo Heikkilä's avatar
Timo Heikkilä committed
78
79
                  {% endif %}
                {% if current_user.is_anonymous %}
Timo Heikkilä's avatar
Timo Heikkilä committed
80
81
82
83
84
85
86
87
                <a class="nav-item" href="{{ url_for('login') }}" class="nav-link">Researcher login |</a>
                
        <a class="nav-item dropdown">
        <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" aria-labelledby="navbarDropdown">
          
Timo Heikkilä's avatar
Timo Heikkilä committed
88
89
90
91
92
93
94
          <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 experiments</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
95
96
97
        </div>
                
                
Timo Heikkilä's avatar
Timo Heikkilä committed
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
                {% else %}
                <a class="nav-item" href="{{ url_for('logout') }}" class="nav-link">Logout</a>
                {% endif %}
            </div>
            
            
            
            
</nav>
</header>
      
<main role="main" class="container">
          {% block content %}{% endblock %}
</main>
    <footer class="footer">
      <div class="container">
          <br>
        <span class="text-muted">Human Emotion Systems Laboratory | <a href="http://emotion.utu.fi">emotion.utu.fi</a></span>
      </div>
    </footer>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
    <script src="../../assets/js/vendor/popper.min.js"></script>
    <script src="../../dist/js/bootstrap.min.js"></script>
  </body>
</html>