Organized elements more. Added overview panel.
This commit is contained in:
parent
a1e77de4b3
commit
6f06455cf6
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@ TunicTransitionTracker
|
|||||||
settings.json
|
settings.json
|
||||||
**/db.sqlite3
|
**/db.sqlite3
|
||||||
**/node_modules/**
|
**/node_modules/**
|
||||||
|
**/dist/**
|
||||||
|
spoiler.json
|
@ -3,56 +3,76 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container monospace">
|
<div class="container monospace">
|
||||||
<div class="m-4 pl-2 pr-2 ring-4 rounded-md text-[#eee] bg-bluelight-translucent-dark ring-bluelight-dark">
|
<div class="m-4 ring-4 rounded-md text-[#eee] bg-bluelight-translucent-dark ring-bluelight-dark">
|
||||||
<div class="flex flex-col">
|
<div class="p-4 flex flex-col space-y-4">
|
||||||
<div class="flex pt-4 text-2xl mx-2">
|
<div class="flex pt-4 text-2xl mx-2">
|
||||||
<span class="relative inline-block align-middle h-8 w-8"><img src="{% static 'tracker/images/neofox_flag_trans_256.png' %}" alt="A trans pride fox emoji." /></span>
|
<span class="relative inline-block align-middle h-8 w-8"><img src="{% static 'tracker/images/neofox_flag_trans_256.png' %}" alt="A trans pride fox emoji." /></span>
|
||||||
Tunic Transition Tracker
|
Tunic Transition Tracker
|
||||||
</div>
|
</div>
|
||||||
<hr class="m-2 mb-0 border-2 border-[#2fd5ff27] rounded-md" />
|
<hr class="border-2 border-bluelight-translucent-dark rounded-md" />
|
||||||
<div class="flex mx-3 my-2 text-xl">
|
<div class="p-4 flex flex-col max-w-full space-y-2 md:space-y-4 text-md rounded-md ring-4 bg-bluelight-translucent ring-bluelight-dark">
|
||||||
Checks: {{ totals.Checks.Undiscovered }}/{{ totals.Checks.Total }} Entrances: {{ totals.Entrances.Undiscovered }}/{{ totals.Entrances.Total }}
|
<div class="text-lg">Overview</div>
|
||||||
<br />Current Area: {{ scene }}
|
<div class="flex flex-col md:flex-row md:space-x-4 space-y-2 md:space-y-0">
|
||||||
|
<div class="flex basis-1/2">Checks: {{ totals.Checks.Undiscovered }}/{{ totals.Checks.Total }}</div>
|
||||||
|
<div class="flex basis-1/2">Entrances: {{ totals.Entrances.Undiscovered }}/{{ totals.Entrances.Total }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mx-4 mb-4 p-1 flex flex-col space-y-4">
|
<hr class="border-2 border-bluelight-translucent-dark rounded-md" />
|
||||||
<details open class="px-4 max-w-full rounded-md ring-4 bg-bluelight-translucent ring-[#2fd5ff10] text-[#eee]">
|
<details class="group p-2 flex flex-col space-y-4 rounded-md ring-4 bg-bluelight-translucent ring-bluelight-dark">
|
||||||
<summary class="justify-start p-2 text-lg">Checks: {{ scene_data.Totals.Checks.Undiscovered }}/{{ scene_data.Totals.Checks.Total }} Entrances: {{ scene_data.Totals.Entrances.Undiscovered }}/{{ scene_data.Totals.Entrances.Total }}</summary>
|
<summary class="text-lg">Breakdown</summary>
|
||||||
<hr class="mb-2 border-2 border-[#2fd5ff27] rounded-md" />
|
<div class="grid gap-4 md:grid-cols-3 grid-flow-row">
|
||||||
<div class="flex flex-row justify-center space-x-4">
|
{% for scene, scene_totals in totals.items %}
|
||||||
<div class="my-2 flex flex-col basis-1/2 space-y-2 overflow-x-auto">
|
{% if scene != 'Entrances' and scene != 'Checks' %}
|
||||||
<div class="text-md">Checks</div>
|
<div class="p-2 flex flex-col rounded-md ring-4 ring-bluelight-dark bg-opacity-50 {% if scene_totals.Checks.Undiscovered > 0 and scene_totals.Entrances.Undiscovered > 0 %}bg-green-900{% elif scene_totals.Checks.Undiscovered > 0 %}bg-yellow-900{% elif scene_totals.Entrances.Undiscovered > 0 %}bg-blue-900{% else %}{% endif %}">
|
||||||
<hr class="border-2 border-[#2fd5ff27] rounded-md" />
|
<div>{{ scene }}:</div>
|
||||||
|
<div>Checks: {{ scene_totals.Checks.Undiscovered }}/{{ scene_totals.Checks.Total }}</div>
|
||||||
|
<div>Entrances: {{ scene_totals.Entrances.Undiscovered }}/{{ scene_totals.Entrances.Total }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-2 flex flex-col basis-1/2 space-y-2 overflow-x-auto">
|
|
||||||
<div class="text-md">Entrances</div>
|
|
||||||
<hr class="border-2 border-[#2fd5ff27] rounded-md" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex flex-row justify-center space-x-4">
|
|
||||||
<div class="pb-4 flex flex-col basis-1/2 space-y-2 overscroll-x-auto">
|
|
||||||
{% for check_name, check in scene_data.Checks.items %}
|
|
||||||
{% if not check.Check %}
|
|
||||||
<ul class="min-w-max bg-bluelight-translucent rounded-sm px-1">❌ {{ check_name }}</ul>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="pb-4 flex flex-col basis-1/2 space-y-2 overflow-x-auto">
|
|
||||||
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
|
|
||||||
{% if not entrance_destination.Entrance != '' %}
|
|
||||||
<ul class="min-w-max bg-bluelight-translucent rounded-sm px-1">❌ {{ entrance_origin }} -> {{ entrance_destination.Entrance }}</ul>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</details>
|
</details>
|
||||||
<div class="pb-4 flex flex-col space-y-2 overscroll-x-auto">
|
</div>
|
||||||
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
|
<div class="p-4 flex flex-col max-w-full rounded-md ring-4 bg-bluelight-translucent ring-bluelight-dark">
|
||||||
{% if entrance_destination.Entrance %}
|
<div class="flex text-lg">{{ scene }}</div>
|
||||||
<ul class="min-w-max bg-bluelight rounded-sm px-1">✔️ {{ entrance_origin }} -> {{ entrance_destination.Entrance }}</ul>
|
<div class="flex flex-col md:flex-row justify-center md:space-x-4">
|
||||||
|
<div class="flex flex-col basis-1/2 overflow-hidden">
|
||||||
|
<div class="my-2 flex flex-col space-y-2">
|
||||||
|
<div class="text-md">Checks: {{ scene_data.Totals.Checks.Undiscovered }}/{{ scene_data.Totals.Checks.Total }}</div>
|
||||||
|
<hr class="border-2 border-bluelight-translucent-dark rounded-md" />
|
||||||
|
</div>
|
||||||
|
<div class="pb-4 flex flex-col space-y-2 overflow-x-scroll">
|
||||||
|
{% for check_name, check in scene_data.Checks.items %}
|
||||||
|
{% if not check.Check %}
|
||||||
|
<ul class="min-w-max bg-bluelight-translucent rounded-md px-1">❌ {{ check_name }}</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<details class="group flex max-w-full rounded-md ring-4 bg-bluelight-translucent ring-[#2fd5ff10] text-[#eee]">
|
</div>
|
||||||
|
<div class="flex flex-col basis-1/2 overflow-hidden">
|
||||||
|
<div class="my-2 flex flex-col space-y-2">
|
||||||
|
<div class="text-md">Entrances: {{ scene_data.Totals.Entrances.Undiscovered }}/{{ scene_data.Totals.Entrances.Total }}</div>
|
||||||
|
<hr class="border-2 border-bluelight-translucent-dark rounded-md" />
|
||||||
|
</div>
|
||||||
|
<div class="pb-4 flex flex-col space-y-2 overflow-x-scroll">
|
||||||
|
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
|
||||||
|
{% if not entrance_destination.Entrance != '' %}
|
||||||
|
<ul class="min-w-max bg-bluelight-translucent rounded-md px-1">❌ {{ entrance_origin }} -> {{ entrance_destination.Entrance }}</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="overflow-x-scroll">
|
||||||
|
<div class="flex flex-col space-y-2 mx-auto min-w-max">
|
||||||
|
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
|
||||||
|
{% if entrance_destination.Entrance %}
|
||||||
|
<ul class="bg-bluelight rounded-md px-1">✔️ {{ entrance_origin }} -> {{ entrance_destination.Entrance }}</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<details class="group flex max-w-full rounded-md ring-4 bg-bluelight-translucent ring-bluelight-dark">
|
||||||
<summary class="justify-start p-2">Tracker Debug</summary>
|
<summary class="justify-start p-2">Tracker Debug</summary>
|
||||||
<div class="p-2 pl-4 pr-4 flex flex-col space-y-2">
|
<div class="p-2 pl-4 pr-4 flex flex-col space-y-2">
|
||||||
<div>
|
<div>
|
||||||
@ -70,5 +90,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -9,14 +9,31 @@ import requests
|
|||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
tracker_output = loads(requests.get('http://localhost:8000/spoiler').text)
|
# tracker_output = loads(requests.get('http://localhost:8000/spoiler').text)
|
||||||
# with open('structure_final_final_v10.json', 'r') as t:
|
with open('spoiler.json', 'r') as t:
|
||||||
# tracker_output = loads(t.read())
|
tracker_output = loads(t.read())
|
||||||
tracker_debug = tracker_output["Debug"]
|
tracker_debug = tracker_output["Debug"]
|
||||||
tracker_totals = tracker_output["Totals"]
|
tracker_totals = tracker_output["Totals"]
|
||||||
tracker_current_scene = tracker_output["Scene"]
|
tracker_current_scene = tracker_output["Scene"]
|
||||||
tracker_current_scene_data = tracker_output["Scenes"][tracker_current_scene]
|
tracker_current_scene_data = tracker_output["Scenes"][tracker_current_scene]
|
||||||
template = loader.get_template("tracker/index.html")
|
template = loader.get_template("tracker/index.html")
|
||||||
|
for i in tracker_output["Scenes"]:
|
||||||
|
if i != tracker_current_scene:
|
||||||
|
checks_total = tracker_output["Scenes"][i]["Totals"]["Checks"]["Total"]
|
||||||
|
checks_undiscovered = tracker_output["Scenes"][i]["Totals"]["Checks"]["Undiscovered"]
|
||||||
|
entrances_total = tracker_output["Scenes"][i]["Totals"]["Entrances"]["Total"]
|
||||||
|
entrances_undiscovered = tracker_output["Scenes"][i]["Totals"]["Entrances"]["Undiscovered"]
|
||||||
|
temp_data = {
|
||||||
|
"Checks": {
|
||||||
|
"Total": checks_total,
|
||||||
|
"Undiscovered": checks_undiscovered
|
||||||
|
},
|
||||||
|
"Entrances": {
|
||||||
|
"Total": entrances_total,
|
||||||
|
"Undiscovered": entrances_undiscovered
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tracker_totals[i] = temp_data
|
||||||
temp_tracker_checks = tracker_current_scene_data["Checks"]
|
temp_tracker_checks = tracker_current_scene_data["Checks"]
|
||||||
for i, check in enumerate(temp_tracker_checks.keys()):
|
for i, check in enumerate(temp_tracker_checks.keys()):
|
||||||
temp_data = {
|
temp_data = {
|
||||||
|
1052
tunictracker/werefoxtheme/static/css/dist/styles.css
vendored
1052
tunictracker/werefoxtheme/static/css/dist/styles.css
vendored
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user