Skip to content

Commit

Permalink
Include the current URL in the page when viewing the version diff
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Feb 1, 2021
1 parent 7b4ed24 commit 25b565d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def diff_history_page(uuid):
#print (dates, l_file, r_file)
output = render_template("diff.html", watch_a=watch, messages=messages, left=left_file_contents,
right=right_file_contents, extra_stylesheets=extra_stylesheets, versions=dates[:-1],
current_previous_version=str(previous_version))
current_previous_version=str(previous_version), current_diff_url=watch['url'])
return output

@app.route("/favicon.ico", methods=['GET'])
Expand Down
2 changes: 1 addition & 1 deletion backend/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ section.content {
white-space: nowrap;
}

.watch-table .title-col a[target="_blank"]::after {
.watch-table .title-col a[target="_blank"]::after, .current-diff-url::after {
content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==);
margin: 0 3px 0 5px;
}
Expand Down
3 changes: 3 additions & 0 deletions backend/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<div class="header">
<div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
<a class="pure-menu-heading" href="/"><strong>Change</strong>Detection.io</a>
{% if current_diff_url %}
<a class=current-diff-url href="{{ current_diff_url }}">{{ current_diff_url }}</a>
{% endif %}

<ul class="pure-menu-list">

Expand Down

0 comments on commit 25b565d

Please sign in to comment.