Rename variable 'link' to 'file_link' for clarity

master
voussoir 2017-03-07 21:03:46 -08:00
parent 4838b26f3b
commit aa6ed364a9
1 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" href="/static/common.css"> <link rel="stylesheet" href="/static/common.css">
<script src="/static/common.js"></script> <script src="/static/common.js"></script>
{% set filename = photo.id + photo.dot_extension %} {% set filename = photo.id + photo.dot_extension %}
{% set link = "/file/" + filename %} {% set file_link = "/file/" + filename %}
<style> <style>
#content_body #content_body
@ -198,18 +198,18 @@
<div id="photo_img_holder"> <div id="photo_img_holder">
<img <img
id="photo_img" id="photo_img"
src="{{link}}" src="{{file_link}}"
alt="{{photo.basename}}" alt="{{photo.basename}}"
onclick="toggle_hoverzoom()" onclick="toggle_hoverzoom()"
onload="this.style.opacity=0.99" onload="this.style.opacity=0.99"
> >
</div> </div>
{% elif photo.simple_mimetype == "video" %} {% elif photo.simple_mimetype == "video" %}
<video src="{{link}}" controls preload=none {%if photo.thumbnail%}poster="/thumbnail/{{photo.id}}.jpg"{%endif%}></video> <video src="{{file_link}}" controls preload=none {%if photo.thumbnail%}poster="/thumbnail/{{photo.id}}.jpg"{%endif%}></video>
{% elif photo.simple_mimetype == "audio" %} {% elif photo.simple_mimetype == "audio" %}
<audio src="{{link}}" controls></audio> <audio src="{{file_link}}" controls></audio>
{% else %} {% else %}
<a href="{{link}}">View {{filename}}</a> <a href="{{file_link}}">View {{filename}}</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -295,7 +295,7 @@ function enable_hoverzoom()
img.style.opacity = 0; img.style.opacity = 0;
img.style.display = "none"; img.style.display = "none";
div.style.cursor = "zoom-out"; div.style.cursor = "zoom-out";
div.style.backgroundImage = "url('{{link}}')"; div.style.backgroundImage = "url('{{file_link}}')";
div.onmousemove = move_hoverzoom; div.onmousemove = move_hoverzoom;
setTimeout(function(){div.onclick = disable_hoverzoom;}, 100); setTimeout(function(){div.onclick = disable_hoverzoom;}, 100);
return true; return true;