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 @@ -
-
{{ scene_title }}
-
-
-
-
- Checks: {{ scene_data.Totals.Checks.Undiscovered }}/{{ scene_data.Totals.Checks.Total }} +
+
+
{{ scene_title }}
+
+
+
+
+ Checks: {{ scene_data.Totals.Checks.Undiscovered }}/{{ scene_data.Totals.Checks.Total }} +
+
+
+
+ + {% for check_name, check in scene_data.Checks.items %} + {% if not check %} +
    + ❌ {{ check_name }} +
+ {% endif %} + {% endfor %}
-
-
- - {% for check_name, check in scene_data.Checks.items %} - {% if not check %} -
    - ❌ {{ check_name }} -
- {% endif %} - {% endfor %} +
+
+
+ Entrances: {{ scene_data.Totals.Entrances.Undiscovered }}/{{ scene_data.Totals.Entrances.Total }} +
+
+
+
+ + {% for entrance_origin, entrance_destination in scene_data.Entrances.items %} + {% if entrance_destination == "" %} +
    + ❌ {{ entrance_origin }} +
+ {% else %} + + {% endif %} + {% endfor %} +
-
-
-
- Entrances: {{ scene_data.Totals.Entrances.Undiscovered }}/{{ scene_data.Totals.Entrances.Total }} -
-
-
-
-
-
-
- - {% for entrance_origin, entrance_destination in scene_data.Entrances.items %} - {% if entrance_destination %} -
    - ✔️ {{ entrance_origin }} -> {{ entrance_destination }} -
- {% endif %} - {% endfor %} -
-
-
{% include "tracker/codes/index.html" %}
diff --git a/tunictracker/tracker/templates/tracker/codes/block.html b/tunictracker/tracker/templates/tracker/codes/block.html index 87b7264..a547e6c 100644 --- a/tunictracker/tracker/templates/tracker/codes/block.html +++ b/tunictracker/tracker/templates/tracker/codes/block.html @@ -1,8 +1,9 @@ {% if not is_entered %} -
    -
    {{ name }}
    -
    -
    {{ code }}
    +
      +
      {{ name }}
      +
      +
      +
      {{ code }}
    {% endif %} diff --git a/tunictracker/tracker/templates/tracker/codes/index.html b/tunictracker/tracker/templates/tracker/codes/index.html index 2d5a3af..32d9c8c 100644 --- a/tunictracker/tracker/templates/tracker/codes/index.html +++ b/tunictracker/tracker/templates/tracker/codes/index.html @@ -1,7 +1,8 @@ -
    +
    Holy Cross Codes -
    -
      +
      +
      +
        {% for name, code in default_codes.items %} {% include "tracker/codes/block.html" with is_entered=False %} {% endfor %} diff --git a/tunictracker/tracker/templates/tracker/index.html b/tunictracker/tracker/templates/tracker/index.html index ed7321d..9f5299d 100644 --- a/tunictracker/tracker/templates/tracker/index.html +++ b/tunictracker/tracker/templates/tracker/index.html @@ -2,36 +2,55 @@ {% load static %} {% block content %}
        -
        +
        {% if debug != '' %} -

        - - A trans pride fox emoji. - -  Tunic Transition Tracker -

        -
        -
        - {% include "tracker/status/index.html" %} -
        -
        Overview
        -
        -
        Checks: {{ totals.Checks.Undiscovered }}/{{ totals.Checks.Total }}
        -
        - Entrances: {{ totals.Entrances.Undiscovered }}/{{ totals.Entrances.Total }} -
        +
        +
        +
        + + A trans pride fox emoji. + + + A trans pride fox emoji. +
        -
        +
        (Tunic Transition Tracker)
        +
        +
        +
        +
        +
        +
        Checks: {{ totals.Checks.Undiscovered }}/{{ totals.Checks.Total }}
        +
        + Entrances: {{ totals.Entrances.Undiscovered }}/{{ totals.Entrances.Total }} +
        +
        +
        + +
        +
        + {% include "tracker/status/index.html" %} +
        -
        +
        + {% include "tracker/breakdown/block.html" with scene_title=current_scene.title scene_data=current_scene.data %} +
        +
        +
        Summary -
        {% include "tracker/summary/list.html" %}
        +
        +
        +
        {% include "tracker/summary/list.html" %}
        +
        -
        +
        Breakdown
        {% include "tracker/breakdown/block.html" with extra_classes="hidden" %} @@ -46,17 +65,14 @@
        -
        - {% include "tracker/breakdown/block.html" with scene_title=current_scene.title scene_data=current_scene.data %} -
        -
        +
        Settings
        {% include "tracker/settings/index.html" %} {% include "tracker/address/index.html" %}
        -
        +
        Tracker Debug