From e45cb6e45b966d8a5018da4b0d7e7dcc62f2773f Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Sun, 7 Jul 2019 22:34:20 +0200 Subject: [PATCH] Some style fixes --- res/static/script/Toolbar.js | 16 +++++- res/static/style/viewer.css | 13 ++++- res/template/account/file_manager.html | 1 - res/template/admin.html | 23 ++++++-- res/template/file_viewer.html | 76 +++++++++++++------------- 5 files changed, 83 insertions(+), 46 deletions(-) diff --git a/res/static/script/Toolbar.js b/res/static/script/Toolbar.js index 5679de6..3f89f3c 100644 --- a/res/static/script/Toolbar.js +++ b/res/static/script/Toolbar.js @@ -189,6 +189,10 @@ var DetailsWindow = { this.detailsButton.classList.add("button_highlight") this.visible = true; + // This is a workaround for a chrome bug which makes it so hidden + // windows can't be scrolled after they are shown + this.popupDiv.focus(); + if (this.graph === 0) { this.renderGraph(); } @@ -301,6 +305,9 @@ var DetailsWindow = { scaleLabel: { display: true, labelString: "Downloads" + }, + gridLines: { + color: "rgba(100, 255, 100, .1)" } }, { type: "linear", @@ -312,7 +319,14 @@ var DetailsWindow = { labelString: "Views" }, gridLines: { - color: "rgba(0, 0, 0, 0)" + color: "rgba(128, 128, 255, .2)" + } + } + ], + xAxes: [ + { + gridLines: { + display: false } } ] diff --git a/res/static/style/viewer.css b/res/static/style/viewer.css index 2500f91..d8256ac 100644 --- a/res/static/style/viewer.css +++ b/res/static/style/viewer.css @@ -194,8 +194,10 @@ body{ .popup { position: fixed; visibility: hidden; + display: flex; + flex-direction: column; opacity: 0; - transition: visibility 1s, opacity 1s; + transition: visibility .5s, opacity .5s; background-color: var(--body_color); border-color: var(--accent_color_dark_border); max-height: 100%; @@ -207,13 +209,18 @@ body{ box-sizing: border-box; text-align: left; box-shadow: var(--shadow_color) 0px 0px 50px; + overflow: hidden; } -.popup .highlight_light { +.popup > .highlight_light { font-size: 1.2em; } +.popup > .content_area { + flex: 1; + overflow-y: scroll; + padding: 10px; +} .details_popup{ - overflow-y: scroll; width: 1500px; height: 800px; z-index: 100; diff --git a/res/template/account/file_manager.html b/res/template/account/file_manager.html index 5848e4d..464103d 100644 --- a/res/template/account/file_manager.html +++ b/res/template/account/file_manager.html @@ -22,7 +22,6 @@ } .file_manager > .nav_bar :first-child {margin-left: 5px;} .file_manager > .nav_bar :last-child {margin-right: 5px;} - .file_manager > .nav_bar > button {flex: 0;} .file_manager > .nav_bar > .breadcrumbs {flex: 1; margin: 1px 10px; min-width: 100px;} .file_manager > .status_bar {text-align: left;} .file_manager > .directory_area { diff --git a/res/template/admin.html b/res/template/admin.html index 3e1aaa3..7b75ba4 100644 --- a/res/template/admin.html +++ b/res/template/admin.html @@ -20,7 +20,7 @@