Skip to content

Commit

Permalink
Merge branch 'live-images-display'
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-murer committed Jan 11, 2022
2 parents 99a5a29 + 7b201b5 commit 7095709
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ def on_index():
def on_take_test():
return render_template("take_test.html", pictures=get_pictures(), pic_path="/static/images/")

@app.route("/images_display")
def on_images_display():
original_images_names = pic_names[::3]
readable_names = ['Books', 'Water', 'Tiger', 'Dogs', 'Hand', 'Mountains', 'Tree', 'London', 'Poppies', 'Bear']
return render_template("images_display.html", pictures=original_images_names,
pic_path="/static/images/", readable_names=readable_names)

@app.route("/graph_display")
def graph_display():
return render_template("graph_display.html")
Expand Down
1 change: 1 addition & 0 deletions templates/done_take_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
<link href="{{url_for('static', filename='stylesheets/style.css')}}" rel="stylesheet" type="text/css">
<link rel="icon" type="image/x-icon" href="{{url_for('static', filename='icons/favicon.ico')}}">

Expand Down
5 changes: 5 additions & 0 deletions templates/graph_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
<link href="{{url_for('static', filename='stylesheets/style.css')}}" rel="stylesheet" type="text/css">
<link rel="icon" type="image/x-icon" href="{{url_for('static', filename='icons/favicon.ico')}}">

Expand All @@ -27,6 +28,10 @@ <h2>Mos Graph</h2>

<h2>Standard Deviation Graph</h2>
<div id="stddev_mos_graph_div"></div>
<br><br>
<a href="/images_display">
<button class="button" type="button">View the live session test images</button>
</a>
<br><br><br><br>

<footer id="footer">
Expand Down
39 changes: 39 additions & 0 deletions templates/images_display.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
<link href="{{url_for('static', filename='stylesheets/style.css')}}" rel="stylesheet" type="text/css">
<link rel="icon" type="image/x-icon" href="{{url_for('static', filename='icons/favicon.ico')}}">

<title>SIQA - Images Display</title>
</head>
<body>

<nav id="navbar" class="sticky">
{% include 'navbar.html' %}
</nav>

<h1 class="blue">Live image quality assessment session - Images</h1>

<h2>Images used in the live session test</h2>
<div id="images_div" style="padding: 0%;">
{% for pic in pictures %}
<div>
<h4 id="title_{{loop.index}}">Image name: "{{readable_names[loop.index - 1]}}"</h4>
</div>
<div>
<img id="{{loop.index}}" src="{{pic_path}}{{pic}}.jpg" data-pic="{{pic}}" alt="" class="img_responsive" />
</div>
{% endfor %}
</div>
<br><br><br><br>

<footer id="footer">
{% include 'footer.html' %}
</footer>

</body>
</html>
1 change: 1 addition & 0 deletions templates/take_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
<title>SIQA - Test</title>
<link href="{{url_for('static', filename='stylesheets/style.css')}}" rel="stylesheet" type="text/css">
<link rel="icon" type="image/x-icon" href="{{url_for('static', filename='icons/favicon.ico')}}">
Expand Down

0 comments on commit 7095709

Please sign in to comment.