From fa67f1f6000094fb2a833ac4be6d5eb7940c207d Mon Sep 17 00:00:00 2001 From: Antoine Lambert <antoine.lambert@inria.fr> Date: Mon, 8 Jan 2018 11:16:02 +0100 Subject: [PATCH] browse: Use a white background when displaying contents --- swh/web/static/css/style.css | 6 ++++++ swh/web/templates/content.html | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/swh/web/static/css/style.css b/swh/web/static/css/style.css index 7b10ac820..fd18c46df 100644 --- a/swh/web/static/css/style.css +++ b/swh/web/static/css/style.css @@ -502,4 +502,10 @@ fieldset[disabled] .btn-swh.active { .pager a { outline: none; +} + +.swh-content { + background-image: none; + border: none; + background-color: white; } \ No newline at end of file diff --git a/swh/web/templates/content.html b/swh/web/templates/content.html index ce138d998..48f9be72e 100644 --- a/swh/web/templates/content.html +++ b/swh/web/templates/content.html @@ -25,7 +25,7 @@ return line_td; } - function removeHash () { + function remove_hash () { history.pushState("", document.title, window.location.pathname + window.location.search); } @@ -35,7 +35,7 @@ $('tr').css('background-color', 'inherit'); } - function scrollToLine(lineDomElt) { + function scroll_to_line(lineDomElt) { $('html, body').animate({ scrollTop: $(lineDomElt).offset().top - 70 }, 500); @@ -54,10 +54,10 @@ reset_highlighted_lines(); if (lines.length == 1) { first_hl_line = parseInt(lines[0]); - scrollToLine(highlight_line(lines[0])); + scroll_to_line(highlight_line(lines[0])); } else if (lines[0] < lines[lines.length - 1]) { first_hl_line = parseInt(lines[0]); - scrollToLine(highlight_line(lines[0])); + scroll_to_line(highlight_line(lines[0])); for (var i = lines[0]+1; i <= lines[lines.length - 1]; ++i) { highlight_line(i); } @@ -88,11 +88,11 @@ reset_highlighted_lines(); highlight_line(line); window.location.hash = '#L' + line; - scrollToLine(evt.target); + scroll_to_line(evt.target); } } else { reset_highlighted_lines(); - removeHash(); + remove_hash(); } }); @@ -114,7 +114,7 @@ {% include "includes/top-navigation.html" %} -<div class="well well-sm" style="margin-bottom: 0px"> +<div class="well well-sm swh-content" style="margin-bottom: 0px"> {% if "inode/x-empty" == mimetype %} <i>File is empty</i> {% elif "text/" in mimetype %} -- GitLab