Breakdowns can now be selected to be shown, and entrances mapped will now show the breakdown of the scene they're from.

This commit is contained in:
Ada Werefox 2024-03-12 22:30:39 -05:00
parent d4660f49d4
commit 6f573685e5
12 changed files with 209 additions and 126 deletions

View File

@ -5,9 +5,9 @@ from json import loads
class ServerAddressForm(forms.Form): class ServerAddressForm(forms.Form):
server_address_form = forms.URLField( server_address_form = forms.URLField(
max_length=1312, initial="http://localhost:8000/", empty_value="http://localhost:8000/", label="") max_length=1312, initial="http://localhost:8000/", empty_value="http://localhost:8000/", label="")
server_address_form.widget.attrs["class"] = "w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10" server_address_form.widget.attrs["class"] = "w-full rounded-xl border-none shadow-inner shadow-[#242424] bg-white bg-opacity-10"
class BackendFilepathForm(forms.Form): class BackendFilepathForm(forms.Form):
backend_filepath_form = forms.CharField() backend_filepath_form = forms.CharField()
backend_filepath_form.widget.attrs["class"] = "w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10" backend_filepath_form.widget.attrs["class"] = "w-full rounded-xl border-none shadow-inner shadow-[#242424] bg-white bg-opacity-10"

View File

@ -20,6 +20,27 @@ window.onload = () => {
); );
}; };
function banana(event) {
show_breakdown(event.dataset.scene);
}
function show_breakdown(scene) {
console.log(scene);
Array.from(document.getElementById("breakdown-list").children).forEach(
(breakdown) => {
if (breakdown.id == `${scene}-breakdown`) {
breakdown.classList.remove("hidden");
} else {
breakdown.classList.add("hidden");
}
}
);
}
function notices_ur_debug() {
document.getElementById("debug-block").classList.toggle("hidden");
}
async function get_updated_filepath() { async function get_updated_filepath() {
fetch(`${document.URL}get/settings`) fetch(`${document.URL}get/settings`)
.then((response) => response.json()) .then((response) => response.json())
@ -112,16 +133,15 @@ async function refresh_elements(cross_codes) {
.getElementById("overview-totals") .getElementById("overview-totals")
.querySelector(".overview-entrances"); .querySelector(".overview-entrances");
let summary_block = document let summary_block = document
.getElementById("overview") .getElementById("summary-list")
.querySelector(".summary-list")
.firstElementChild.firstElementChild.cloneNode(true); .firstElementChild.firstElementChild.cloneNode(true);
summary_block.id = "";
let breakdown_block = document let breakdown_block = document
.getElementById("overview") .getElementById("breakdown-list")
.querySelector(".breakdown-list")
.firstElementChild.cloneNode(true); .firstElementChild.cloneNode(true);
breakdown_block.id = "";
let cross_codes_block = document let cross_codes_block = document
.getElementById("overview") .getElementById("breakdown-list")
.querySelector(".breakdown-list")
.firstElementChild.querySelector(".codes-block") .firstElementChild.querySelector(".codes-block")
.cloneNode(true); .cloneNode(true);
breakdown_block.classList.remove("hidden"); breakdown_block.classList.remove("hidden");
@ -130,16 +150,20 @@ async function refresh_elements(cross_codes) {
.firstElementChild.cloneNode(true); .firstElementChild.cloneNode(true);
debug_item.classList.remove("hidden"); debug_item.classList.remove("hidden");
let new_breakdown_list = document let new_breakdown_list = document
.getElementById("overview") .getElementById("breakdown-list")
.querySelector(".breakdown-list")
.cloneNode(true); .cloneNode(true);
let new_summary_list = document let new_summary_list = document
.getElementById("overview") .getElementById("summary-list")
.querySelector(".summary-list")
.cloneNode(true); .cloneNode(true);
let new_debug_block = document let new_debug_block = document
.getElementById("debug-block") .getElementById("debug-block")
.cloneNode(true); .cloneNode(true);
let current_open_breakdown = "";
Array.from(new_breakdown_list.children).forEach((scene) => {
if (!Array.from(scene.classList).includes("hidden")) {
current_open_breakdown = scene.id;
}
});
// Clear out the current lists. // Clear out the current lists.
new_breakdown_list.innerHTML = ""; new_breakdown_list.innerHTML = "";
@ -154,8 +178,7 @@ async function refresh_elements(cross_codes) {
Object.keys(all_scenes).forEach((scene) => { Object.keys(all_scenes).forEach((scene) => {
// Create variables for element pointers. // Create variables for element pointers.
summary_block = document summary_block = document
.getElementById("overview") .getElementById("summary-list")
.querySelector(".summary-list")
.firstElementChild.firstElementChild.cloneNode(true); .firstElementChild.firstElementChild.cloneNode(true);
summary_block.classList.remove("hidden"); summary_block.classList.remove("hidden");
let summary_title = summary_block.querySelector(".summary-title"); let summary_title = summary_block.querySelector(".summary-title");
@ -164,10 +187,8 @@ async function refresh_elements(cross_codes) {
summary_block.querySelector(".summary-entrances"); summary_block.querySelector(".summary-entrances");
breakdown_block = document breakdown_block = document
.getElementById("overview") .getElementById("breakdown-list")
.querySelector(".breakdown-list")
.firstElementChild.cloneNode(true); .firstElementChild.cloneNode(true);
breakdown_block.classList.remove("hidden");
let breakdown_block_title = breakdown_block.querySelector( let breakdown_block_title = breakdown_block.querySelector(
".breakdown-block-title" ".breakdown-block-title"
); );
@ -197,8 +218,7 @@ async function refresh_elements(cross_codes) {
.firstElementChild.cloneNode(true); .firstElementChild.cloneNode(true);
cross_codes_block = document cross_codes_block = document
.getElementById("overview") .getElementById("breakdown-list")
.querySelector(".breakdown-list")
.firstElementChild.querySelector(".codes-block") .firstElementChild.querySelector(".codes-block")
.cloneNode(true); .cloneNode(true);
let new_cross_codes_block_list = cross_codes_block let new_cross_codes_block_list = cross_codes_block
@ -253,13 +273,19 @@ async function refresh_elements(cross_codes) {
} }
}); });
Object.keys(all_scenes[scene].Entrances).forEach((entrances) => { Object.keys(all_scenes[scene].Entrances).forEach((entrances) => {
if (all_scenes[scene].Entrances[entrances] == "") { if (all_scenes[scene].Entrances[entrances].Door == "") {
breakdown_block_entrances_list_item.textContent = `${entrances}`; breakdown_block_entrances_list_item.textContent = `${entrances}`;
new_breakdown_block_entrances_list.appendChild( new_breakdown_block_entrances_list.appendChild(
breakdown_block_entrances_list_item.cloneNode(true) breakdown_block_entrances_list_item.cloneNode(true)
); );
} else { } else {
breakdown_block_mapped_list_item.textContent = `✔️ ${entrances} -> ${all_scenes[scene].Entrances[entrances]}`; breakdown_block_mapped_list_item.textContent = `✔️ ${entrances} -> ${all_scenes[scene].Entrances[entrances].Door}`;
breakdown_block_mapped_list_item.id = `${entrances}-mapped`;
breakdown_block_mapped_list_item.dataset.scene =
all_scenes[scene].Entrances[entrances].Scene;
// breakdown_block_mapped_list_item.onclick = () => {
// show_breakdown(all_scenes[scene].Entrances[entrances].Scene);
// };
new_breakdown_block_mapped_list.appendChild( new_breakdown_block_mapped_list.appendChild(
breakdown_block_mapped_list_item.cloneNode(true) breakdown_block_mapped_list_item.cloneNode(true)
); );
@ -325,22 +351,30 @@ async function refresh_elements(cross_codes) {
// Apply color coding to summary block // Apply color coding to summary block
summary_block.firstElementChild.classList.remove( summary_block.firstElementChild.classList.remove(
"bg-highlight-both-translucent", "from-highlight-both-translucent-light",
"bg-highlight-checks-translucent", "from-highlight-checks-translucent-light",
"bg-highlight-entrances-translucent" "from-highlight-entrances-translucent-light",
"to-highlight-both-translucent-dark",
"to-highlight-checks-translucent-dark",
"to-highlight-entrances-translucent-dark"
); );
if ( if (
scene_checks_undiscovered > 0 && scene_checks_undiscovered > 0 &&
scene_entrances_undiscovered > 0 scene_entrances_undiscovered > 0
) { ) {
summary_block.firstElementChild.classList.add("bg-highlight-both-translucent"); summary_block.firstElementChild.classList.add(
"from-highlight-both-translucent-light",
"to-highlight-both-translucent-dark"
);
} else if (scene_checks_undiscovered > 0) { } else if (scene_checks_undiscovered > 0) {
summary_block.firstElementChild.classList.add( summary_block.firstElementChild.classList.add(
"bg-highlight-checks-translucent" "from-highlight-checks-translucent-light",
"to-highlight-checks-translucent-dark"
); );
} else if (scene_entrances_undiscovered > 0) { } else if (scene_entrances_undiscovered > 0) {
summary_block.firstElementChild.classList.add( summary_block.firstElementChild.classList.add(
"bg-highlight-entrances-translucent" "from-highlight-entrances-translucent-light",
"to-highlight-entrances-translucent-dark"
); );
} }
@ -359,9 +393,21 @@ async function refresh_elements(cross_codes) {
.querySelector(".codes-list") .querySelector(".codes-list")
.replaceWith(new_cross_codes_block_list); .replaceWith(new_cross_codes_block_list);
breakdown_block.id = `${
breakdown_block.querySelector(".breakdown-block-title").textContent
}-breakdown`;
summary_block.id = `${
summary_block.querySelector(".summary-title").textContent
}-summary`;
breakdown_block.classList.add("hidden");
// Append relevant elements to lists. // Append relevant elements to lists.
if (current_open_breakdown == breakdown_block.id) {
breakdown_block.classList.remove("hidden");
}
if (scene == current_scene_name) { if (scene == current_scene_name) {
summary_block.classList.add("hidden"); summary_block.classList.add("hidden");
breakdown_block.classList.remove("hidden");
breakdown_block breakdown_block
.querySelector(".codes-block") .querySelector(".codes-block")
.classList.remove("hidden"); .classList.remove("hidden");
@ -369,9 +415,12 @@ async function refresh_elements(cross_codes) {
.getElementById("breakdown-current") .getElementById("breakdown-current")
.firstElementChild.replaceWith(breakdown_block.cloneNode(true)); .firstElementChild.replaceWith(breakdown_block.cloneNode(true));
breakdown_block.classList.add("hidden"); breakdown_block.classList.add("hidden");
breakdown_block
.querySelector(".codes-block")
.classList.add("hidden");
} else if ( } else if (
scene_checks_undiscovered <= 0 && scene_checks_undiscovered <= 0 &&
scene_entrances_undiscovered <= 0 scene_entrances_total <= 0
) { ) {
summary_block.classList.add("hidden"); summary_block.classList.add("hidden");
} }
@ -387,16 +436,30 @@ async function refresh_elements(cross_codes) {
// Replace with new data. // Replace with new data.
document document
.getElementById("overview") .getElementById("summary-list")
.querySelector(".summary-list")
.replaceWith(new_summary_list.cloneNode(true)); .replaceWith(new_summary_list.cloneNode(true));
document document
.getElementById("overview") .getElementById("breakdown-list")
.querySelector(".breakdown-list")
.replaceWith(new_breakdown_list.cloneNode(true)); .replaceWith(new_breakdown_list.cloneNode(true));
document document
.getElementById("debug-block") .getElementById("debug-block")
.replaceWith(new_debug_block.cloneNode(true)); .replaceWith(new_debug_block.cloneNode(true));
Object.keys(all_scenes).forEach((scene) => {
document.getElementById(`${scene}-summary`).onclick = () => {
show_breakdown(scene);
};
// Object.keys(all_scenes[scene].Entrances).forEach((entrance) => {
// if (all_scenes[scene].Entrances[entrance].Door != "") {
// let test = document.getElementById(`${entrance}-mapped`);
// console.log(all_scenes[scene].Entrances[entrance].Scene);
// document.getElementById(`${entrance}-mapped`).onclick = () => {
// console.log("aaaaa");
// // show_breakdown(all_scenes[scene].Entrances[entrance].Scene);
// };
// }
// });
});
}, },
(error) => { (error) => {
document.getElementById("status-block").classList.remove("hidden"); document.getElementById("status-block").classList.remove("hidden");

View File

@ -13,7 +13,7 @@
{% tailwind_css %} {% tailwind_css %}
<script src="{% static "tracker/assets/refresh.js" %}"></script> <script src="{% static "tracker/assets/refresh.js" %}"></script>
</head> </head>
<body class="bg-[#242424] font-nerd"> <body class="font-nerd min-h-screen bg-gradient-to-br from-bluelight-background-dark to-bluelight-background">
{% block content %} {% block content %}
{% endblock content %} {% endblock content %}
</body> </body>

View File

@ -1,14 +1,13 @@
<form action="{% url "set_address" %}" <form action="{% url "set_address" %}"
method="post" method="post"
class="flex flex-row space-x-2"> class="flex flex-row space-x-2">
<div class="w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10" <div class="w-full rounded-xl border-2 border-bluelight-dark bg-[#242424]/10"
hidden></div> hidden></div>
{% csrf_token %} {% csrf_token %}
<label for="server-address-form" <label for="server-address-form"
class="m-auto text-md justify-center align-top min-w-fit text-md text-nowrap">Backend</label> class="my-auto justify-center align-top min-w-fit text-md text-nowrap">Backend</label>
{% for field in server_address_form %}{{ field }}{% endfor %} {% for field in server_address_form %}{{ field }}{% endfor %}
<input type="submit" <button type="submit"
value="Submit" class="p-2 rounded-md bg-white bg-opacity-10 shadow-sm shadow-[#242424]"
class="p-2 m-auto text-sm rounded-xl border-2 border-bluelight-dark bg-bluelight-translucent" id="server-address-form">Submit</button>
id="server-address-form" />
</form> </form>

View File

@ -1,4 +1,5 @@
<div class="flex flex-col space-y-2 max-w-full {{ extra_classes }}"> <div class="flex flex-col space-y-2 max-w-full {{ extra_classes }}"
id="{{ scene }}-breakdown">
<div class="px-2"> <div class="px-2">
<div class="flex text-xl breakdown-block-title">{{ scene_title }}</div> <div class="flex text-xl breakdown-block-title">{{ scene_title }}</div>
<div class="flex flex-col md:flex-row justify-center md:space-x-4"> <div class="flex flex-col md:flex-row justify-center md:space-x-4">
@ -32,7 +33,7 @@
<ul class="py-0.5 min-w-max bg-bluelight-translucent rounded-md px-1 text-sm hidden"> <ul class="py-0.5 min-w-max bg-bluelight-translucent rounded-md px-1 text-sm hidden">
</ul> </ul>
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %} {% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
{% if entrance_destination == "" %} {% if entrance_destination.Door == "" %}
<ul class="py-0.5 min-w-max bg-bluelight-translucent rounded-md px-1 text-sm"> <ul class="py-0.5 min-w-max bg-bluelight-translucent rounded-md px-1 text-sm">
❌ {{ entrance_origin }} ❌ {{ entrance_origin }}
</ul> </ul>
@ -46,18 +47,24 @@
</div> </div>
</div> </div>
<div class="max-h-64 overflow-scroll scrollbar scrollbar-thumb-trans-pride-cyan-translucent scrollbar-track-bluelight-translucent"> <div class="max-h-64 overflow-scroll scrollbar scrollbar-thumb-trans-pride-cyan-translucent scrollbar-track-bluelight-translucent">
<div class="flex flex-col space-y-2 mx-auto min-w-max breakdown-block-mapped-list"> <div class="p-1 flex flex-col space-y-2 mx-auto min-w-max breakdown-block-mapped-list">
<ul class="py-0.5 bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm hidden"> <button type="button"
</ul> class="py-0.5 text-start bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm hidden"
onclick="banana(this)"></button>
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %} {% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
{% if entrance_destination %} {% if entrance_destination %}
<ul class="py-0.5 bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm"> <button type="button"
✔️ {{ entrance_origin }} -> {{ entrance_destination }} class="py-0.5 text-start bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm shadow-sm shadow-[#242424]"
</ul> id="{{ entrance_origin }}-mapped"
onclick="banana(this)"
data-scene="{{ entrance_destination.Scene }}">
✔️ {{ entrance_origin }} -> {{ entrance_destination.Door }}
</button>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
{% include "tracker/codes/index.html" %} {% include "tracker/codes/index.html" %}
</div> </div>
<hr class="px-2 border-2 border-bluelight-translucent-dark rounded-xl" />
</div> </div>

View File

@ -1,4 +1,4 @@
<details class="py-4 px-2 mt-2 flex flex-col space-y-4 max-w-full text-holy-cross text-base [text-shadow:_1px_1px_4px_rgb(0_0_0_/_100%)] rounded-xl bg-gradient-to-br from-[#ffe28530] to-[#ffffff30] drop-shadow-[0px_0px_4px_rgba(255,255,255,1)] justify-start {% if current_scene.title != scene_title %}hidden{% endif %} codes-block"> <details class="py-2 px-2 mt-2 flex flex-col space-y-4 max-w-full text-holy-cross text-base [text-shadow:_1px_1px_4px_rgb(0_0_0_/_100%)] rounded-xl bg-gradient-to-br from-[#ffe28530] to-[#ffffff30] drop-shadow-[0px_0px_4px_rgba(255,255,255,1)] justify-start {% if current_scene.title != scene_title %}hidden{% endif %} codes-block">
<summary>Holy Cross Codes</summary> <summary>Holy Cross Codes</summary>
<hr class="border-2 border-holy-cross opacity-30 rounded-xl" /> <hr class="border-2 border-holy-cross opacity-30 rounded-xl" />
<div class="flex flex-col space-y-2 max-h-96 rounded-xl overflow-y-scroll"> <div class="flex flex-col space-y-2 max-h-96 rounded-xl overflow-y-scroll">

View File

@ -1,19 +1,19 @@
{% extends "index.html" %} {% extends "index.html" %}
{% load static %} {% load static %}
{% block content %} {% block content %}
<div class="container monospace py-4"> <div class="container monospace py-4 space-y-2 text-[#eee] [text-shadow:_1px_1px_0_rgb(0_0_0_/_50%)]">
<div class="p-2 border-4 rounded-xl text-[#eee] [text-shadow:_1px_1px_0_rgb(0_0_0_/_50%)] bg-bluelight-translucent-dark border-bluelight-dark"> <div class="p-2 rounded-lg bg-white bg-opacity-10 shadow-lg shadow-bluelight-background-dark">
{% if debug != '' %} {% if debug != '' %}
<div class="space-y-2 px-2"> <div class="space-y-2 px-2">
<div class="flex flex-col align-middle max-w-fit"> <div class="flex flex-col align-middle max-w-fit">
<div class="flex flex-row align-middle max-w-fit h-12 space-x-2"> <div class="flex flex-row align-middle max-w-fit h-12 space-x-2">
<span class="h-8 max-w-8 my-auto align-middle"> <span class="h-8 max-w-8 my-auto align-middle backdrop-blur">
<img src="{% static 'tracker/images/neofox_flag_trans_256.png' %}" <img src="{% static 'tracker/images/neofox_flag_trans_256.png' %}"
alt="A trans pride fox emoji." alt="A trans pride fox emoji."
width="32" width="32"
height="32" /> height="32" />
</span> </span>
<span class="max-h-12 max-w-64 my-auto align-middle"> <span class="max-h-12 max-w-64 my-auto align-middle invert drop-shadow-[1px_2px_2px_rgba(0,0,0,1)] ">
<img src="{% static 'tracker/images/trunic_title.png' %}" <img src="{% static 'tracker/images/trunic_title.png' %}"
alt="A trans pride fox emoji." alt="A trans pride fox emoji."
width="365" width="365"
@ -25,67 +25,68 @@
</div> </div>
<div class="space-y-1"> <div class="space-y-1">
<hr class="mt-2 border-2 border-bluelight-dark rounded-xl" /> <hr class="mt-2 border-2 border-bluelight-dark rounded-xl" />
<div class="px-2 flex flex-col md:flex-row md:space-x-4 space-y-2 md:space-y-0 text-lg bg-bluelight-translucent-dark rounded-sm" <div class="px-2 flex flex-col md:flex-row md:space-x-4 space-y-2 md:space-y-0 text-lg bg-gradient-to-r from-bluelight-light to-bluelight-dark rounded-sm"
id="overview-totals"> id="overview-totals">
<div class="flex basis-1/2 overview-checks">Checks: {{ totals.Checks.Undiscovered }}/{{ totals.Checks.Total }}</div> <div class="flex basis-1/2 overview-checks">Checks: {{ totals.Checks.Undiscovered }}/{{ totals.Checks.Total }}</div>
<div class="flex basis-1/2 overview-entrances"> <div class="flex basis-1/2 overview-entrances">
Entrances: {{ totals.Entrances.Undiscovered }}/{{ totals.Entrances.Total }} Entrances: {{ totals.Entrances.Undiscovered }}/{{ totals.Entrances.Total }}
</div> </div>
</div> </div>
<details class="group flex flex-col rounded-lg bg-gradient-to-br from-bluelight-background-light to-bluelight-background">
<summary class="py-2 px-4 justify-start">Summary</summary>
<div class="px-2 rounded-xl">
<hr class="border-2 border-bluelight-translucent-dark rounded-xl" />
<div class="py-2" id="summary-list">{% include "tracker/summary/list.html" %}</div>
</div>
</details>
<hr class="mb-2 border-2 border-bluelight-dark rounded-xl" /> <hr class="mb-2 border-2 border-bluelight-dark rounded-xl" />
</div> </div>
<div class="flex flex-col space-y-2"> <div class="flex flex-col space-y-2">
{% include "tracker/status/index.html" %} {% include "tracker/status/index.html" %}
<div class="p-flex flex-col max-w-full" id="overview"> <div class="p-flex flex-col max-w-full space-y-2">
<div class="flex flex-col space-y-2"> <div id="breakdown-list">
<div id="breakdown-current"> {% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
{% include "tracker/breakdown/block.html" with scene_title=current_scene.title scene_data=current_scene.data %} {% for scene_title, scene_data in scenes.items %}
</div> {% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
<hr class="border-2 border-bluelight-translucent-dark rounded-xl" /> {% endfor %}
<details class="group flex flex-col rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark"> </div>
<summary class="justify-start p-2 text-lg">Summary</summary> <div id="breakdown-current">
<div class="mb-2 px-2 space-y-2 rounded-xl"> {% include "tracker/breakdown/block.html" with scene_title=current_scene.title scene_data=current_scene.data %}
<hr class="border-2 border-bluelight-translucent-dark rounded-xl" />
<div class="summary-list">{% include "tracker/summary/list.html" %}</div>
</div>
</details>
<details class="group flex flex-col rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark">
<summary class="justify-start p-2 text-lg">Breakdown</summary>
<div class="px-2 flex flex-col space-y-2 breakdown-list">
{% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
{% for scene_title, scene_data in scenes.items %}
{% if scene_title == current_scene.title %}
{% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
{% else %}
{% include "tracker/breakdown/block.html" %}
{% endif %}
{% endfor %}
</div>
</details>
</div> </div>
</div> </div>
<details class="group p-2 flex max-w-full rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark"> <details class="py-2 px-4 flex flex-col space-y-2 max-w-full text-md rounded-lg bg-gradient-to-br from-bluelight-background-light to-bluelight-background">
<summary class="justify-start">Settings</summary> <summary class="justify-start">Settings</summary>
<div class="p-2 flex flex-col space-y-2"> {% include "tracker/settings/index.html" %}
{% include "tracker/settings/index.html" %} {% include "tracker/address/index.html" %}
{% include "tracker/address/index.html" %} <div class="p-2 flex">
</div> <button onclick="notices_ur_debug()"
</details> class="p-2 m-auto rounded-md bg-white bg-opacity-10 shadow-sm shadow-[#242424]"
<details class="group p-2 flex max-w-full rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark"> type="button"
<summary class="justify-start">Tracker Debug</summary> id="show-debug">Sh-OwO Debug</button>
<div class="py-2 flex flex-col space-y-2" id="debug-block">
<ul class="p-2 rounded-xl bg-bluelight-translucent hidden">
</ul>
{% for name, value in debug.items %}
<ul class="p-2 rounded-xl bg-bluelight-translucent">
{{ name }}: {{ value }}
</ul>
{% endfor %}
</div> </div>
</details> </details>
</div> </div>
{% else %} {% else %}
<div id="no_data" />{% endif %}</div> <div id="no_data" />{% endif %}</div>
<div class="p-2 flex flex-col space-y-2 max-w-full rounded-lg bg-white bg-opacity-10 shadow-lg shadow-bluelight-background-dark hidden"
id="debug-block">
<div class="px-2 text-lg">Tracker Debug</div>
<div class="grid grid-flow-row md:grid-cols-2 xl:grid-cols-3 gap-2 space-y-2 max-w-full break-words"
id="debug-block">
<div class="max-h-full hidden">
<ul class="px-2">
</ul>
<hr class="mt-2 border-2 border-bluelight-dark rounded-xl" />
</div>
{% for name, value in debug.items %}
<div class="max-h-full align-bottom flex flex-col-reverse">
<hr class="mt-1 border-2 border-[#24242480] rounded-xl" />
<ul class="px-2">
{{ name }}: {{ value }}
</ul>
</div>
{% endfor %}
</div>
</div>
</div> </div>
{% endblock content %} {% endblock content %}

View File

@ -1,14 +1,13 @@
<form action="{% url "set_settings" %}" <form action="{% url "set_settings" %}"
method="post" method="post"
class="flex flex-row space-x-2"> class="flex flex-row space-x-2">
<div class="w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10" <div class="w-full rounded-lg border-none shadow-[inset_0_35px_60px_-15px_rgba(0,0,0,0.3)] bg-white bg-opacity-10"
hidden></div> hidden></div>
{% csrf_token %} {% csrf_token %}
<label for="backend-filepath-form" <label for="backend-filepath-form"
class="m-auto text-md justify-center align-top min-w-fit text-md text-nowrap">AppData Path</label> class="my-auto justify-center align-top min-w-fit text-md text-nowrap">AppData Path</label>
{% for field in backend_filepath_form %}{{ field }}{% endfor %} {% for field in backend_filepath_form %}{{ field }}{% endfor %}
<input type="submit" <button type="submit"
value="Submit" class="p-2 rounded-md bg-white bg-opacity-10 shadow-sm shadow-[#242424]"
class="p-2 m-auto text-sm rounded-xl border-2 border-bluelight-dark bg-bluelight-translucent" id="backend-filepath-form">Submit</button>
id="backend-filepath-form" />
</form> </form>

View File

@ -1,5 +1,7 @@
<div class="rounded-xl border-4 border-bluelight {{ is_hidden }}"> <button type="button"
<div class="p-2 min-h-full flex flex-col rounded-lg {{ extra_classes }}"> class="rounded-xl {{ is_hidden }}"
id="{{ scene }}-summary">
<div class="p-2 *:mr-auto *:justify-start *:text-left min-h-full flex flex-col rounded-lg bg-gradient-to-tr shadow-sm shadow-[#242424] {{ extra_classes }}">
<div class="summary-title">{{ scene }}:</div> <div class="summary-title">{{ scene }}:</div>
<div class="summary-checks"> <div class="summary-checks">
Checks: {{ scene_data.Totals.Checks.Undiscovered }}/{{ scene_data.Totals.Checks.Total }} Checks: {{ scene_data.Totals.Checks.Undiscovered }}/{{ scene_data.Totals.Checks.Total }}
@ -8,4 +10,4 @@
Entrances: {{ scene_data.Totals.Entrances.Undiscovered }}/{{ scene_data.Totals.Entrances.Total }} Entrances: {{ scene_data.Totals.Entrances.Undiscovered }}/{{ scene_data.Totals.Entrances.Total }}
</div> </div>
</div> </div>
</div> </button>

View File

@ -1,15 +1,15 @@
<div class="grid gap-2 md:grid-cols-3 xl:grid-cols-5 grid-flow-row max-h-96 rounded-xl overflow-y-scroll scrollbar scrollbar-thumb-bluelight-dark scrollbar-track-bluelight"> <div class="p-1 grid gap-2 md:grid-cols-3 xl:grid-cols-5 grid-flow-row max-h-96 rounded-xl overflow-y-scroll scrollbar scrollbar-thumb-bluelight-dark scrollbar-track-bluelight">
{% include "tracker/summary/block.html" with extra_classes="" is_hidden="hidden" %} {% include "tracker/summary/block.html" with extra_classes="" is_hidden="hidden" %}
{% for scene, scene_data in scenes.items %} {% for scene, scene_data in scenes.items %}
{% if scene == current_scene.title %} {% if scene == current_scene.title %}
{% include "tracker/summary/block.html" with extra_classes="" is_hidden="hidden" %} {% include "tracker/summary/block.html" with extra_classes="" is_hidden="hidden" %}
{% elif scene != "Entrances" and scene != "Checks" %} {% elif scene != "Entrances" and scene != "Checks" %}
{% if scene_data.Totals.Checks.Undiscovered > 0 and scene_data.Totals.Entrances.Undiscovered > 0 %} {% if scene_data.Totals.Checks.Undiscovered > 0 and scene_data.Totals.Entrances.Undiscovered > 0 %}
{% include "tracker/summary/block.html" with extra_classes="bg-highlight-both-translucent" is_hidden="" %} {% include "tracker/summary/block.html" with extra_classes="from-highlight-both-translucent-light to-highlight-both-translucent-dark" is_hidden="" %}
{% elif scene_data.Totals.Checks.Undiscovered > 0 %} {% elif scene_data.Totals.Checks.Undiscovered > 0 %}
{% include "tracker/summary/block.html" with extra_classes="bg-highlight-checks-translucent" is_hidden="" %} {% include "tracker/summary/block.html" with extra_classes="from-highlight-checks-translucent-light to-highlight-checks-translucent-dark" is_hidden="" %}
{% elif scene_data.Totals.Entrances.Undiscovered > 0 %} {% elif scene_data.Totals.Entrances.Undiscovered > 0 %}
{% include "tracker/summary/block.html" with extra_classes="bg-highlight-entrances-translucent" is_hidden="" %} {% include "tracker/summary/block.html" with extra_classes="from-highlight-entrances-translucent-light to-highlight-entrances-translucent-dark" is_hidden="" %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -39,7 +39,8 @@ def index(request):
try: try:
request_data = requests.get( request_data = requests.get(
f'{server_address}spoiler', timeout=5, verify=True).text f'{listen_address}spoiler', timeout=5, verify=True).text
logger.info(f'{request_data}')
except: except:
with open('empty_spoiler.json', 'r') as t: with open('empty_spoiler.json', 'r') as t:
try: try:

View File

@ -55,17 +55,19 @@ module.exports = {
}, },
colors: { colors: {
bluelight: { bluelight: {
light: "#378ec880",
DEFAULT: "#317eb1", DEFAULT: "#317eb1",
dark: "#006bb380",
translucent: { translucent: {
light: "#317eb140", light: "#317eb140",
DEFAULT: "#317eb180", DEFAULT: "#317eb180",
dark: "#2facff40", dark: "#2facff40",
}, },
dark: "#2facff80", background: {
}, light: "#317eb1",
greenlight: { DEFAULT: "#26638c",
DEFAULT: "#339649", dark: "#1b4764",
translucent: "#33964930", },
}, },
"trans-pride": { "trans-pride": {
cyan: { cyan: {
@ -81,23 +83,32 @@ module.exports = {
translucent: "#ff8cda69", translucent: "#ff8cda69",
}, },
}, },
"highlight": { highlight: {
checks: { checks: {
DEFAULT: "#A431B1", DEFAULT: "#A431B1",
translucent: "#A431B188", translucent: {
light: "#A431B1E8",
dark: "#A431B1A0",
},
}, },
entrances: { entrances: {
DEFAULT: "#B16431", DEFAULT: "#B16431",
translucent: "#B1643188", translucent: {
light: "#B16431E8",
dark: "#B16431B0",
},
}, },
both: { both: {
DEFAULT: "#3EB131", DEFAULT: "#3EB131",
translucent: "#3EB13188", translucent: {
light: "#3EB131E8",
dark: "#3EB13190",
},
}, },
}, },
"holy-cross": { "holy-cross": {
DEFAULT: "fffae0" DEFAULT: "fffae0",
} },
}, },
}, },
}, },
@ -110,6 +121,6 @@ module.exports = {
require("@tailwindcss/forms"), require("@tailwindcss/forms"),
require("@tailwindcss/typography"), require("@tailwindcss/typography"),
require("@tailwindcss/aspect-ratio"), require("@tailwindcss/aspect-ratio"),
require("tailwind-scrollbar") require("tailwind-scrollbar"),
], ],
}; };