diff --git a/.vscode/tailwind.json b/.vscode/tailwind.json new file mode 100644 index 0000000..a45bccc --- /dev/null +++ b/.vscode/tailwind.json @@ -0,0 +1,55 @@ +{ + "version": 1.1, + "atDirectives": [ + { + "name": "@tailwind", + "description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#tailwind" + } + ] + }, + { + "name": "@apply", + "description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#apply" + } + ] + }, + { + "name": "@responsive", + "description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#responsive" + } + ] + }, + { + "name": "@screen", + "description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#screen" + } + ] + }, + { + "name": "@variants", + "description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#variants" + } + ] + } + ] +} diff --git a/tunictracker/tracker/static/tracker/assets/refresh.js b/tunictracker/tracker/static/tracker/assets/refresh.js index be84b29..41dd624 100644 --- a/tunictracker/tracker/static/tracker/assets/refresh.js +++ b/tunictracker/tracker/static/tracker/assets/refresh.js @@ -106,10 +106,10 @@ async function refresh_elements(cross_codes) { // Clone all the needed elements for updating. let overview_checks_title = document - .getElementById("overview") + .getElementById("overview-totals") .querySelector(".overview-checks"); let overview_entrances_title = document - .getElementById("overview") + .getElementById("overview-totals") .querySelector(".overview-entrances"); let summary_block = document .getElementById("overview") @@ -180,7 +180,6 @@ async function refresh_elements(cross_codes) { let breakdown_block_checks_list_item = breakdown_block .querySelector(".breakdown-block-checks-list") .firstElementChild.cloneNode(true); - breakdown_block_checks_list_item.classList.remove("hidden"); let breakdown_block_entrances_title = breakdown_block.querySelector( ".breakdown-block-entrances-title" ); @@ -190,14 +189,12 @@ async function refresh_elements(cross_codes) { let breakdown_block_entrances_list_item = breakdown_block .querySelector(".breakdown-block-entrances-list") .firstElementChild.cloneNode(true); - breakdown_block_entrances_list_item.classList.remove("hidden"); let new_breakdown_block_mapped_list = breakdown_block .querySelector(".breakdown-block-mapped-list") .cloneNode(true); let breakdown_block_mapped_list_item = breakdown_block .querySelector(".breakdown-block-mapped-list") .firstElementChild.cloneNode(true); - breakdown_block_mapped_list_item.classList.remove("hidden"); cross_codes_block = document .getElementById("overview") @@ -219,12 +216,15 @@ async function refresh_elements(cross_codes) { new_breakdown_block_checks_list.appendChild( breakdown_block_checks_list_item.cloneNode(true) ); + breakdown_block_checks_list_item.classList.remove("hidden"); new_breakdown_block_entrances_list.appendChild( breakdown_block_entrances_list_item.cloneNode(true) ); + breakdown_block_entrances_list_item.classList.remove("hidden"); new_breakdown_block_mapped_list.appendChild( breakdown_block_mapped_list_item.cloneNode(true) ); + breakdown_block_mapped_list_item.classList.remove("hidden"); // Create variables for commonly used values. let scene_checks_undiscovered = @@ -324,25 +324,24 @@ async function refresh_elements(cross_codes) { } // Apply color coding to summary block - summary_block.classList.remove( - "bg-green-900", - "bg-yellow-900", - "bg-blue-900", - "bg-red-900" + summary_block.firstElementChild.classList.remove( + "bg-highlight-both-translucent", + "bg-highlight-checks-translucent", + "bg-highlight-entrances-translucent" ); if ( scene_checks_undiscovered > 0 && scene_entrances_undiscovered > 0 ) { - if (scene_entrances_undiscovered == scene_entrances_total) { - summary_block.classList.add("bg-red-900"); - } else { - summary_block.classList.add("bg-green-900"); - } + summary_block.firstElementChild.classList.add("bg-highlight-both-translucent"); } else if (scene_checks_undiscovered > 0) { - summary_block.classList.add("bg-yellow-900"); + summary_block.firstElementChild.classList.add( + "bg-highlight-checks-translucent" + ); } else if (scene_entrances_undiscovered > 0) { - summary_block.classList.add("bg-blue-900"); + summary_block.firstElementChild.classList.add( + "bg-highlight-entrances-translucent" + ); } // Replace lists @@ -375,7 +374,6 @@ async function refresh_elements(cross_codes) { scene_entrances_undiscovered <= 0 ) { summary_block.classList.add("hidden"); - // breakdown_block.classList.add("hidden"); } new_summary_list.firstElementChild.appendChild( summary_block.cloneNode(true) diff --git a/tunictracker/tracker/static/tracker/images/trunic_title.png b/tunictracker/tracker/static/tracker/images/trunic_title.png new file mode 100644 index 0000000..104f935 Binary files /dev/null and b/tunictracker/tracker/static/tracker/images/trunic_title.png differ diff --git a/tunictracker/tracker/templates/index.html b/tunictracker/tracker/templates/index.html index 7e835cb..4cf74ff 100644 --- a/tunictracker/tracker/templates/index.html +++ b/tunictracker/tracker/templates/index.html @@ -13,7 +13,7 @@ {% tailwind_css %} -
+ {% block content %} {% endblock content %} diff --git a/tunictracker/tracker/templates/tracker/breakdown/block.html b/tunictracker/tracker/templates/tracker/breakdown/block.html index 2ac1fa9..c40c980 100644 --- a/tunictracker/tracker/templates/tracker/breakdown/block.html +++ b/tunictracker/tracker/templates/tracker/breakdown/block.html @@ -1,61 +1,63 @@ -