Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html: support dark scheme #17

Merged
merged 1 commit into from Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions checks.html
Expand Up @@ -35,6 +35,19 @@
flex: 50%;
padding: 1em;
}

@media (prefers-color-scheme: dark) {
body {
color: #eee;
background: #121212;
}
a {
color: #809fff;
}
tr:nth-child(even) {
background-color: #000000;
}
}
</style>
</head>
<body>
Expand Down
13 changes: 13 additions & 0 deletions contest/contest.html
Expand Up @@ -45,6 +45,19 @@
padding: 1em;
border-radius: 0.2em;
}

@media (prefers-color-scheme: dark) {
body {
color: #eee;
background: #121212;
}
a {
color: #809fff;
}
tr:nth-child(even) {
background-color: #000000;
}
}
</style>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion contest/contest.js
Expand Up @@ -3,7 +3,7 @@ function colorify_str(value)
if (value == "pass") {
ret = '<span style="color:green">';
} else if (value == "skip") {
ret = '<span style="color:blue">';
ret = '<span style="color:#809fff">';
} else {
ret = '<span style="color:red">';
}
Expand Down
13 changes: 13 additions & 0 deletions contest/flakes.html
Expand Up @@ -40,6 +40,19 @@
flex: 50%;
padding: 1em;
}

@media (prefers-color-scheme: dark) {
body {
color: #eee;
background: #121212;
}
a {
color: #809fff;
}
tr:nth-child(even) {
background-color: #000000;
}
}
</style>
</head>
<body>
Expand Down
13 changes: 13 additions & 0 deletions status.html
Expand Up @@ -54,6 +54,19 @@
#flake-link {
margin: 1em;
}

@media (prefers-color-scheme: dark) {
body {
color: #eee;
background: #121212;
}
a {
color: #809fff;
}
tr:nth-child(even) {
background-color: #000000;
}
}
</style>
</head>
<body>
Expand Down
8 changes: 4 additions & 4 deletions status.js
Expand Up @@ -115,7 +115,7 @@ function colorify_basic(value)
{
return colorify_str_any(value, {"fail": "red",
"pass": "green",
"pending": "blue"});
"pending": "#809fff"});
}

function colorify_str(value, good)
Expand Down Expand Up @@ -393,7 +393,7 @@ function load_result_table_one(data_raw, table, reported, avgs)
var str_psf = {"str": "", "overall": ""};

colorify_str_psf(str_psf, "fail", fail, "red");
colorify_str_psf(str_psf, "skip", skip, "blue");
colorify_str_psf(str_psf, "skip", skip, "#809fff");
colorify_str_psf(str_psf, "pass", pass, "green");

const span_small = " <span style=\"font-size: small;\">(";
Expand Down Expand Up @@ -449,10 +449,10 @@ function load_result_table_one(data_raw, table, reported, avgs)
if (passed > 1000 * 60 * 15 /* 15 min */)
color = "red";
else
color = "blue";
color = "#809fff";
} else if (remain > 0) {
pend = "pending (expected in " + (msec_to_str(remain)).toString() + ")";
color = "blue";
color = "#809fff";
} else if (remain < -1000 * 60 * 60 * 2) { /* 2 h */
pend = "timeout";
} else {
Expand Down