Redo graph + mobile touch
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
(function(){// main entry
|
(function(){// main entry
|
||||||
updateViewport();
|
updateViewport();
|
||||||
|
addEventListener('touchstart', function() {}); // :hover
|
||||||
})();
|
})();
|
||||||
function updateViewport() {// show at least 2 columns on mobile devices
|
function updateViewport() {// show at least 2 columns on mobile devices
|
||||||
var viewport = document.head.querySelector("meta[name=viewport]");
|
var viewport = document.head.querySelector("meta[name=viewport]");
|
||||||
|
|||||||
@@ -120,38 +120,41 @@ td { padding: 0.2em 1em 0.2em 0.1em; }
|
|||||||
p.trckr { font-size: 0.8em; }
|
p.trckr { font-size: 0.8em; }
|
||||||
|
|
||||||
/* graphs */
|
/* graphs */
|
||||||
.pie-chart { width: 100px; height: 100px; }
|
.dot-graph {
|
||||||
.dot-graph span { outline: 3px solid transparent; outline-offset: 2px; }
|
touch-action: manipulation;
|
||||||
.dot-graph span:hover { outline-color: black; }
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
}
|
||||||
|
.dot-graph span:hover i { border-top: 5px solid black; margin-top: -5px }
|
||||||
.dot-graph span:hover p { display: inline; }
|
.dot-graph span:hover p { display: inline; }
|
||||||
.dot-graph p {
|
.dot-graph p {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
background: white;
|
background: white;
|
||||||
border: 1px solid #ddd;
|
border: 0.4em solid black;
|
||||||
padding: 0.2em;
|
padding: 0.3em 0.8em;
|
||||||
margin: -2em 0;
|
margin-top: -2.8em;
|
||||||
}
|
}
|
||||||
.dot-graph i {
|
.dot-graph i {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
width: 20px;
|
width: 1.5em;
|
||||||
height: 20px;
|
height: 2em;
|
||||||
padding: 0;
|
margin-bottom: 5px;
|
||||||
margin: 1px 1px;
|
|
||||||
}
|
}
|
||||||
/* color-bind friendly color palette */
|
/* color-bind friendly color palette */
|
||||||
.cb0{background:#63ACBE}
|
.cb0 i{background:#63ACBE}
|
||||||
.cb1{background:#601A4A}
|
.cb1 i{background:#601A4A}
|
||||||
.cb2{background:#09F4EC}
|
.cb2 i{background:#09F4EC}
|
||||||
.cb3{background:#1F77B4}
|
.cb3 i{background:#1F77B4}
|
||||||
.cb4{background:#EE442F}
|
.cb4 i{background:#EE442F}
|
||||||
.cb5{background:#7F7F7F}
|
.cb5 i{background:#7F7F7F}
|
||||||
.cb6{background:#0F2080}
|
.cb6 i{background:#0F2080}
|
||||||
.cb7{background:#3b9f35}
|
.cb7 i{background:#3b9f35}
|
||||||
.cb8{background:#F5793A}
|
.cb8 i{background:#F5793A}
|
||||||
.cb9{background:#AC66FB}
|
.cb9 i{background:#AC66FB}
|
||||||
|
|
||||||
.cs0{stroke:#3AE48C}
|
.cs0{stroke:#3AE48C}
|
||||||
.cs1{stroke:#D11}
|
.cs1{stroke:#D11}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ def gen_pie_chart(parts, classes, stroke=0.6):
|
|||||||
else:
|
else:
|
||||||
txt += f'<path fill="transparent" class="{clss}" stroke-width="{stroke_p}" d="M{arc(total)}A{r_p},0,{1 if deg > 180 else 0},1,{arc(total + deg)}" />'
|
txt += f'<path fill="transparent" class="{clss}" stroke-width="{stroke_p}" d="M{arc(total)}A{r_p},0,{1 if deg > 180 else 0},1,{arc(total + deg)}" />'
|
||||||
total += deg
|
total += deg
|
||||||
return '<svg viewBox="0 0 {0} {0}">{1}</svg>'.format(size, txt)
|
return '<svg viewBox="0 0 {0} {0}" width="100" height="100">{1}</svg>'.format(size, txt)
|
||||||
|
|
||||||
|
|
||||||
def gen_radial_graph(percent):
|
def gen_radial_graph(percent):
|
||||||
|
|||||||
@@ -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"></script>
|
<script type="text/javascript" src="/static/script.js?1"></script>
|
||||||
<title>#_TITLE_#AppCheck: Privacy Monitor</title>
|
<title>#_TITLE_#AppCheck: Privacy Monitor</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/style.css">
|
<link rel="stylesheet" type="text/css" href="/static/style.css?1">
|
||||||
<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">
|
||||||
|
|||||||
Reference in New Issue
Block a user