Reduce color palette

This commit is contained in:
relikd
2020-09-13 13:42:37 +02:00
parent 408fe305f8
commit 669881077a
3 changed files with 8 additions and 19 deletions

View File

@@ -126,14 +126,17 @@ p.trckr { font-size: 0.9em; margin-left: 0.5em; }
-webkit-user-select: none; -webkit-user-select: none;
-moz-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 span:hover i { border-top: 5px solid black; margin-top: -5px }
.dot-graph i { .dot-graph i {
display: inline-block; display: inline-block;
vertical-align: bottom; vertical-align: bottom;
background: #AAA;
width: 1.5em; width: 1.5em;
height: 2em; height: 2em;
margin-bottom: 5px; margin-bottom: 5px;
} }
.dot-graph .trckr i { background: #D11; }
.dot-graph span:hover p { display: inline; } .dot-graph span:hover p { display: inline; }
.dot-graph p { .dot-graph p {
display: none; display: none;
@@ -144,18 +147,6 @@ p.trckr { font-size: 0.9em; margin-left: 0.5em; }
margin-top: -2.8em; 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} .cs0{stroke:#3AE48C}
.cs1{stroke:#D11} .cs1{stroke:#D11}

View File

@@ -18,12 +18,10 @@ def seconds_to_time(seconds):
def gen_dotgraph(sorted_arr): def gen_dotgraph(sorted_arr):
txt = '' 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 title = '{} ({})'.format(name, count) if count > 1 else name
clss = 'cb{}'.format(i % 10) clss = ' class="trckr"' if mark else ''
if mark: txt += '<span{0} title="{1}"><p>{1}</p>'.format(clss, title)
clss += ' trckr'
txt += '<span class="{0}" title="{1}"><p>{1}</p>'.format(clss, title)
txt += '<i></i>' * count txt += '<i></i>' * count
txt += '</span>' txt += '</span>'
return '<div class="dot-graph">{}</div>'.format(txt) return '<div class="dot-graph">{}</div>'.format(txt)

View File

@@ -3,9 +3,9 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=0.75" /> <meta name="viewport" content="width=device-width, initial-scale=0.75" />
<script type="text/javascript" src="/static/script.js?2"></script> <script type="text/javascript" src="/static/script.js?3"></script>
<title>#_TITLE_#AppCheck: Privacy Monitor</title> <title>#_TITLE_#AppCheck: Privacy Monitor</title>
<link rel="stylesheet" type="text/css" href="/static/style.css?2"> <link rel="stylesheet" type="text/css" href="/static/style.css?3">
<link rel="stylesheet" type="text/css" href="/static/fonts/font.css"> <link rel="stylesheet" type="text/css" href="/static/fonts/font.css">
<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/static/favicon/favicon-32x32.png">