-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add player and team data to flask ui
- Loading branch information
Showing
5 changed files
with
724 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,10 @@ | |
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
<!-- Add Bootstrap CSS and JS --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
|
||
<title>NBA Machine Learning Picks</title> | ||
<script> | ||
tailwind.config = { | ||
|
@@ -14,6 +18,7 @@ | |
} | ||
} | ||
</script> | ||
|
||
</head> | ||
<body class="bg-gray-900"> | ||
<main class="relative isolate"> | ||
|
@@ -30,7 +35,7 @@ <h1 class="py-8 text-left text-4xl font-medium text-white">π NBA AI Model Pic | |
<th class="py-2.5 text-left text-base font-semibold text-white">BetMGM</th> | ||
</tr> | ||
</thead> | ||
<tbody class="divide-y divide-gray-700"> | ||
<tbody class="divide-y divide-gray-700" style="z-index: 9;"> | ||
<tr> | ||
{% for game_key in data.get('fanduel') %} | ||
{% set teams = game_key.split(':') %} | ||
|
@@ -44,10 +49,15 @@ <h1 class="py-8 text-left text-4xl font-medium text-white">π NBA AI Model Pic | |
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="whitespace-nowrap py-1 pl-4 pr-3 text-base font-medium text-white sm:pl-0">{{ teams[0] }}</td> | ||
<td class="whitespace-nowrap py-1 pl-4 pr-3 text-base font-medium text-white sm:pl-0"> | ||
<span class="team-name" data-bs-toggle="modal" data-bs-target="#modal-{{ teams[0]|replace(' ', '-')|lower }}">{{ teams[0] }}</span> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="whitespace-nowrap py-1 pl-4 pr-3 text-base font-medium text-white sm:pl-0"><span class="text-gray-600">@</span> {{ teams[1] }}</td> | ||
<td class="whitespace-nowrap py-1 pl-4 pr-3 text-base font-medium text-white sm:pl-0"> | ||
<span class="text-gray-600">@</span> | ||
<span class="team-name" data-bs-toggle="modal" data-bs-target="#modal-{{ teams[1]|replace(' ', '-')|lower }}">{{ teams[1] }}</span> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
@@ -120,13 +130,14 @@ <h1 class="py-8 text-left text-4xl font-medium text-white">π NBA AI Model Pic | |
</table> | ||
</section> | ||
</section> | ||
|
||
<div class="absolute inset-x-0 -top-16 -z-10 flex transform-gpu justify-center overflow-hidden blur-3xl" aria-hidden="true"> | ||
<div class="aspect-[1318/752] w-[82.375rem] flex-none bg-gradient-to-r from-[#80caff] to-[#4f46e5] opacity-15" style="clip-path: polygon(73.6% 51.7%, 91.7% 11.8%, 100% 46.4%, 97.4% 82.2%, 92.5% 84.9%, 75.7% 64%, 55.3% 47.5%, 46.5% 49.4%, 45% 62.9%, 50.3% 87.2%, 21.3% 64.1%, 0.1% 100%, 5.4% 51.1%, 21.4% 63.9%, 58.9% 0.2%, 73.6% 51.7%)"></div> | ||
</div> | ||
<div class="absolute inset-x-0 -bottom-24 -z-10 flex transform-gpu justify-center overflow-hidden blur-3xl" aria-hidden="true"> | ||
<div class="aspect-[1318/752] w-[82.375rem] flex-none rotate-180 bg-gradient-to-r from-[#80caff] to-[#4f46e5] opacity-15" style="clip-path: polygon(73.6% 51.7%, 91.7% 11.8%, 100% 46.4%, 97.4% 82.2%, 92.5% 84.9%, 75.7% 64%, 55.3% 47.5%, 46.5% 49.4%, 45% 62.9%, 50.3% 87.2%, 21.3% 64.1%, 0.1% 100%, 5.4% 51.1%, 21.4% 63.9%, 58.9% 0.2%, 73.6% 51.7%)"></div> | ||
</div> | ||
|
||
</main> | ||
<script> | ||
function perc2color(perc, min, max) { | ||
|
@@ -189,5 +200,7 @@ <h1 class="py-8 text-left text-4xl font-medium text-white">π NBA AI Model Pic | |
ous[i].classList.add('text-' + perc2color(parsePerc(ous[i].textContent), 0, 100)) | ||
} | ||
</script> | ||
{% include 'team_modal.html' %} | ||
{% include 'player_modal.html' %} | ||
</body> | ||
</html> | ||
</html> |
Oops, something went wrong.