Skip to content
Snippets Groups Projects
Commit 489084a3 authored by Jean-Marie PRIGENT's avatar Jean-Marie PRIGENT
Browse files

update gradient color on mini site

parent 041165f6
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ function gotResult(error, results) {
if (label === "nail-biting"){
document.body.style.backgroundColor = "#ff416c";
document.body.style.backgroundImage = "linear-gradient(to right, #ff416c, #ff4b2b)";
// Play sound trigger not working sound without user interaction: cf https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
// Play sound trigger
notifyAudio.play();
}
......
......@@ -84,11 +84,14 @@ function gotResult(error, results) {
label = results[0].label;
confidence = nf(results[0].confidence, 0, 2);
if (label === "no-nail-biting"){
document.body.style.backgroundColor = "green";
document.body.style.backgroundColor = "#00b712";
document.body.style.backgroundImage = "linear-gradient(315deg, #00b712 0%, #5aff15 74%)";
}
if (label === "nail-biting"){
document.body.style.backgroundColor = "red";
// Play sound trigger not working sound without user interaction: cf https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
document.body.style.backgroundColor = "#ff416c";
document.body.style.backgroundImage = "linear-gradient(to right, #ff416c, #ff4b2b)";
// Play sound trigger
notifyAudio.play();
}
// Classifiy again!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment