From 669881077ae6dfad3d33425053cb44e81c505a9e Mon Sep 17 00:00:00 2001 From: relikd Date: Sun, 13 Sep 2020 13:42:37 +0200 Subject: [PATCH] Reduce color palette --- out/static/style.css | 15 +++------------ src/html_bundle.py | 8 +++----- templates/base.html | 4 ++-- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/out/static/style.css b/out/static/style.css index 41afa4e..fdb053c 100644 --- a/out/static/style.css +++ b/out/static/style.css @@ -126,14 +126,17 @@ p.trckr { font-size: 0.9em; margin-left: 0.5em; } -webkit-user-select: none; -moz-user-select: none; } +.dot-graph span { margin-right: 3px; } .dot-graph span:hover i { border-top: 5px solid black; margin-top: -5px } .dot-graph i { display: inline-block; vertical-align: bottom; + background: #AAA; width: 1.5em; height: 2em; margin-bottom: 5px; } +.dot-graph .trckr i { background: #D11; } .dot-graph span:hover p { display: inline; } .dot-graph p { display: none; @@ -144,18 +147,6 @@ p.trckr { font-size: 0.9em; margin-left: 0.5em; } margin-top: -2.8em; } -/* color-bind friendly color palette */ -.cb0 i{background:#63ACBE} -.cb1 i{background:#601A4A} -.cb2 i{background:#09F4EC} -.cb3 i{background:#1F77B4} -.cb4 i{background:#EE442F} -.cb5 i{background:#7F7F7F} -.cb6 i{background:#0F2080} -.cb7 i{background:#3b9f35} -.cb8 i{background:#F5793A} -.cb9 i{background:#AC66FB} - .cs0{stroke:#3AE48C} .cs1{stroke:#D11} diff --git a/src/html_bundle.py b/src/html_bundle.py index 00064c8..49c1567 100755 --- a/src/html_bundle.py +++ b/src/html_bundle.py @@ -18,12 +18,10 @@ def seconds_to_time(seconds): def gen_dotgraph(sorted_arr): txt = '' - for i, (name, count, mark) in enumerate(sorted_arr): + for name, count, mark in sorted_arr: title = '{} ({})'.format(name, count) if count > 1 else name - clss = 'cb{}'.format(i % 10) - if mark: - clss += ' trckr' - txt += '

{1}

'.format(clss, title) + clss = ' class="trckr"' if mark else '' + txt += '

{1}

'.format(clss, title) txt += '' * count txt += '
' return '
{}
'.format(txt) diff --git a/templates/base.html b/templates/base.html index aadd1f5..138de8b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,9 +3,9 @@ - + #_TITLE_#AppCheck: Privacy Monitor - +