BraydenMoore commited on
Commit
623a8f8
β€’
1 Parent(s): 2c4e511

Update styling

Browse files
Files changed (1) hide show
  1. Templates/index.html +12 -6
Templates/index.html CHANGED
@@ -480,6 +480,9 @@
480
  if (moneyline.Probabilities[0] > 0.6){
481
  wrapperDiv.classList.add("highlight");
482
  }
 
 
 
483
 
484
  const winnerImg = document.createElement('img');
485
  winnerImg.src = `/Static/${moneyline.Winner}.webp`;
@@ -491,12 +494,12 @@
491
  const winnerEmojiDiv = document.createElement('div');
492
  winnerEmojiDiv.className = 'emoji';
493
 
494
- if (moneyline.Winner[0] === moneyline.Result && moneyline.Probabilities[0] > 0.6) {
495
  winnerEmojiDiv.textContent = 'βœ…';
496
- } else if (moneyline.Winner[0] !== moneyline.Result && moneyline.Probabilities[0] > 0.6){
497
  winnerEmojiDiv.textContent = '❌';
498
  }
499
- else {
500
  winnerEmojiDiv.textContent = `(${(moneyline.Probabilities[0] * 100).toFixed(0)}%)`;
501
  }
502
  wrapperDiv.appendChild(winnerEmojiDiv);
@@ -516,6 +519,9 @@
516
  if (data.over_unders[index]['Probability'][0] > 0.6){
517
  overUnderDiv.classList.add("highlight");
518
  }
 
 
 
519
 
520
  const textDiv = document.createElement('div');
521
  textDiv.className = 'over-under-text';
@@ -533,12 +539,12 @@
533
  const overEmojiDiv = document.createElement('div');
534
  overEmojiDiv.className = 'emoji';
535
 
536
- if (data.over_unders[index]['Over/Under'][0] === data.over_unders[index]['Result'] && data.over_unders[index]['Probability'][0] > 0.6) {
537
  overEmojiDiv.textContent = 'βœ…';
538
- } else if (data.over_unders[index]['Over/Under'][0] !== data.over_unders[index]['Result'] && data.over_unders[index]['Probability'][0] > 0.6) {
539
  overEmojiDiv.textContent = '❌';
540
  }
541
- else {
542
  overEmojiDiv.textContent = `(${(data.over_unders[index]['Probability'][0] * 100).toFixed(0)}%)`;
543
  }
544
  overUnderDiv.appendChild(overEmojiDiv);
 
480
  if (moneyline.Probabilities[0] > 0.6){
481
  wrapperDiv.classList.add("highlight");
482
  }
483
+ else {
484
+ wrapperDiv.style.opacity = "0.5";
485
+ }
486
 
487
  const winnerImg = document.createElement('img');
488
  winnerImg.src = `/Static/${moneyline.Winner}.webp`;
 
494
  const winnerEmojiDiv = document.createElement('div');
495
  winnerEmojiDiv.className = 'emoji';
496
 
497
+ if (moneyline.Winner[0] === moneyline.Result) {
498
  winnerEmojiDiv.textContent = 'βœ…';
499
+ } else {
500
  winnerEmojiDiv.textContent = '❌';
501
  }
502
+ if (moneyline.Result === 'N/A') {
503
  winnerEmojiDiv.textContent = `(${(moneyline.Probabilities[0] * 100).toFixed(0)}%)`;
504
  }
505
  wrapperDiv.appendChild(winnerEmojiDiv);
 
519
  if (data.over_unders[index]['Probability'][0] > 0.6){
520
  overUnderDiv.classList.add("highlight");
521
  }
522
+ else {
523
+ overUnderDiv.style.opacity = "0.5";
524
+ }
525
 
526
  const textDiv = document.createElement('div');
527
  textDiv.className = 'over-under-text';
 
539
  const overEmojiDiv = document.createElement('div');
540
  overEmojiDiv.className = 'emoji';
541
 
542
+ if (data.over_unders[index]['Over/Under'][0] === data.over_unders[index]['Result']) {
543
  overEmojiDiv.textContent = 'βœ…';
544
+ } else {
545
  overEmojiDiv.textContent = '❌';
546
  }
547
+ if (data.over_unders[index]['Result'] === 'N/A') {
548
  overEmojiDiv.textContent = `(${(data.over_unders[index]['Probability'][0] * 100).toFixed(0)}%)`;
549
  }
550
  overUnderDiv.appendChild(overEmojiDiv);