From 25b565d9ba81f7ae35c9297eed6a0a278e252a9c Mon Sep 17 00:00:00 2001 From: Leigh Morresi <275001+dgtlmoon@users.noreply.github.com> Date: Mon, 1 Feb 2021 21:56:18 +0100 Subject: [PATCH] Include the current URL in the page when viewing the version diff --- backend/backend.py | 2 +- backend/static/css/styles.css | 2 +- backend/templates/base.html | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/backend.py b/backend/backend.py index be9c29c6..85dce37f 100644 --- a/backend/backend.py +++ b/backend/backend.py @@ -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']) diff --git a/backend/static/css/styles.css b/backend/static/css/styles.css index 476b4a07..9a5afd7c 100644 --- a/backend/static/css/styles.css +++ b/backend/static/css/styles.css @@ -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; } diff --git a/backend/templates/base.html b/backend/templates/base.html index 098fe727..ea7293ab 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -18,6 +18,9 @@