Style changes.
This commit is contained in:
parent
8c300cc72a
commit
db8843bdbb
@ -77,16 +77,6 @@ async function get_updated_filepath() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This won't work properly. For now, the user will need to input themselves.
|
|
||||||
// async function get_filepath() {
|
|
||||||
// try {
|
|
||||||
// const filepath_selection = await window.showDirectoryPicker();
|
|
||||||
// console.log(filepath_selection);
|
|
||||||
// } catch {
|
|
||||||
// console.log("Browser does not support showDirectoryPicker()");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function get_updated_server_address() {
|
async function get_updated_server_address() {
|
||||||
fetch(`${document.URL}get/address`)
|
fetch(`${document.URL}get/address`)
|
||||||
.then(
|
.then(
|
||||||
@ -366,30 +356,59 @@ 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(
|
||||||
"from-highlight-both-translucent-light",
|
"from-highlight-both-light",
|
||||||
"from-highlight-checks-translucent-light",
|
"from-highlight-checks-light",
|
||||||
"from-highlight-entrances-translucent-light",
|
"from-highlight-entrances-light",
|
||||||
"to-highlight-both-translucent-dark",
|
"from-highlight-empty-light",
|
||||||
"to-highlight-checks-translucent-dark",
|
"from-highlight-undiscovered-light",
|
||||||
"to-highlight-entrances-translucent-dark"
|
"to-highlight-both-dark",
|
||||||
|
"to-highlight-checks-dark",
|
||||||
|
"to-highlight-entrances-dark",
|
||||||
|
"to-highlight-empty-dark",
|
||||||
|
"to-highlight-undiscovered-dark",
|
||||||
|
"text-highlight-both-text",
|
||||||
|
"text-highlight-checks-text",
|
||||||
|
"text-highlight-entrances-text",
|
||||||
|
"text-highlight-empty-text",
|
||||||
|
"text-highlight-undiscovered-text"
|
||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
scene_checks_undiscovered > 0 &&
|
scene_checks_undiscovered > 0 &&
|
||||||
scene_entrances_undiscovered > 0
|
scene_entrances_undiscovered > 0
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
scene_checks_total == scene_checks_undiscovered &&
|
||||||
|
scene_entrances_total == scene_entrances_undiscovered
|
||||||
) {
|
) {
|
||||||
summary_block.firstElementChild.classList.add(
|
summary_block.firstElementChild.classList.add(
|
||||||
"from-highlight-both-translucent-light",
|
"from-highlight-undiscovered-light",
|
||||||
"to-highlight-both-translucent-dark"
|
"to-highlight-undiscovered-dark",
|
||||||
|
"text-highlight-undiscovered-text"
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
summary_block.firstElementChild.classList.add(
|
||||||
|
"from-highlight-both-light",
|
||||||
|
"to-highlight-both-dark",
|
||||||
|
"text-highlight-both-text"
|
||||||
|
);
|
||||||
|
}
|
||||||
} else if (scene_checks_undiscovered > 0) {
|
} else if (scene_checks_undiscovered > 0) {
|
||||||
summary_block.firstElementChild.classList.add(
|
summary_block.firstElementChild.classList.add(
|
||||||
"from-highlight-checks-translucent-light",
|
"from-highlight-checks-light",
|
||||||
"to-highlight-checks-translucent-dark"
|
"to-highlight-checks-dark",
|
||||||
|
"text-highlight-checks-text"
|
||||||
);
|
);
|
||||||
} else if (scene_entrances_undiscovered > 0) {
|
} else if (scene_entrances_undiscovered > 0) {
|
||||||
summary_block.firstElementChild.classList.add(
|
summary_block.firstElementChild.classList.add(
|
||||||
"from-highlight-entrances-translucent-light",
|
"from-highlight-entrances-light",
|
||||||
"to-highlight-entrances-translucent-dark"
|
"to-highlight-entrances-dark",
|
||||||
|
"text-highlight-entrances-text"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
summary_block.firstElementChild.classList.add(
|
||||||
|
"from-highlight-empty-light",
|
||||||
|
"to-highlight-empty-dark",
|
||||||
|
"text-highlight-empty-text"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,16 +483,6 @@ async function refresh_elements(cross_codes) {
|
|||||||
document.getElementById(`${scene}-summary`).onclick = () => {
|
document.getElementById(`${scene}-summary`).onclick = () => {
|
||||||
show_breakdown(scene);
|
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) => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container monospace py-4 space-y-2 text-[#eee] [text-shadow:_1px_1px_0_rgb(0_0_0_/_50%)]">
|
<div class="container monospace py-4 space-y-2 text-[#E0FFFF] [text-shadow:_1px_1px_0_rgb(0_0_0_/_50%)]">
|
||||||
<div class="p-2 rounded-lg bg-white bg-opacity-10 shadow-lg shadow-bluelight-background-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">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
class="rounded-xl {{ is_hidden }}"
|
class="rounded-xl {{ is_hidden }}"
|
||||||
id="{{ scene }}-summary">
|
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="p-2 *:mr-auto *:justify-start *:text-left min-h-full flex flex-col rounded-lg bg-gradient-to-tl 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 }}
|
||||||
|
@ -5,11 +5,17 @@
|
|||||||
{% 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="from-highlight-both-translucent-light to-highlight-both-translucent-dark" is_hidden="" %}
|
{% if scene_data.Totals.Checks.Undiscovered == scene_data.Totals.Checks.Total and scene_data.Totals.Entrances.Undiscovered == scene_data.Totals.Entrances.Total %}
|
||||||
|
{% include "tracker/summary/block.html" with extra_classes="from-highlight-undiscovered-light to-highlight-undiscovered-dark text-highlight-undiscovered-text" is_hidden="" %}
|
||||||
|
{% else %}
|
||||||
|
{% include "tracker/summary/block.html" with extra_classes="from-highlight-both-light to-highlight-both-dark text-highlight-both-text" is_hidden="" %}
|
||||||
|
{% endif %}
|
||||||
{% elif scene_data.Totals.Checks.Undiscovered > 0 %}
|
{% elif scene_data.Totals.Checks.Undiscovered > 0 %}
|
||||||
{% include "tracker/summary/block.html" with extra_classes="from-highlight-checks-translucent-light to-highlight-checks-translucent-dark" is_hidden="" %}
|
{% include "tracker/summary/block.html" with extra_classes="from-highlight-checks-light to-highlight-checks-dark text-highlight-checks-text" is_hidden="" %}
|
||||||
{% elif scene_data.Totals.Entrances.Undiscovered > 0 %}
|
{% elif scene_data.Totals.Entrances.Undiscovered > 0 %}
|
||||||
{% include "tracker/summary/block.html" with extra_classes="from-highlight-entrances-translucent-light to-highlight-entrances-translucent-dark" is_hidden="" %}
|
{% include "tracker/summary/block.html" with extra_classes="from-highlight-entrances-light to-highlight-entrances-dark text-highlight-entrances-text" is_hidden="" %}
|
||||||
|
{% else %}
|
||||||
|
{% include "tracker/summary/block.html" with extra_classes="from-highlight-empty-light to-highlight-empty-dark text-highlight-empty-text" is_hidden="" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -27,8 +27,6 @@ def session_key(session, key):
|
|||||||
f'Session {key} set to: {session[key]}')
|
f'Session {key} set to: {session[key]}')
|
||||||
return session[key]
|
return session[key]
|
||||||
|
|
||||||
is_hidden = True
|
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
request_data = None
|
request_data = None
|
||||||
@ -43,7 +41,6 @@ def index(request):
|
|||||||
with open('empty_spoiler.json', 'r') as t:
|
with open('empty_spoiler.json', 'r') as t:
|
||||||
try:
|
try:
|
||||||
request_data = t.read()
|
request_data = t.read()
|
||||||
is_hidden = False
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
@ -51,7 +48,6 @@ def index(request):
|
|||||||
with open('empty_spoiler.json', 'r') as t:
|
with open('empty_spoiler.json', 'r') as t:
|
||||||
try:
|
try:
|
||||||
tracker_output = loads(t.read())
|
tracker_output = loads(t.read())
|
||||||
is_hidden = False
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
@ -61,7 +57,6 @@ def index(request):
|
|||||||
with open('empty_spoiler.json', 'r') as t:
|
with open('empty_spoiler.json', 'r') as t:
|
||||||
try:
|
try:
|
||||||
tracker_output = loads(t.read())
|
tracker_output = loads(t.read())
|
||||||
is_hidden = False
|
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
with open('tracker/static/tracker/data/holy_cross_codes.json', 'r') as t:
|
with open('tracker/static/tracker/data/holy_cross_codes.json', 'r') as t:
|
||||||
@ -96,7 +91,7 @@ def index(request):
|
|||||||
context = {
|
context = {
|
||||||
'backend_filepath': backend_filepath,
|
'backend_filepath': backend_filepath,
|
||||||
'server_address': listen_address,
|
'server_address': listen_address,
|
||||||
'is_hidden': is_hidden,
|
# 'is_hidden': is_hidden,
|
||||||
'debug': tracker_debug,
|
'debug': tracker_debug,
|
||||||
'default_codes': cross_codes['Default'],
|
'default_codes': cross_codes['Default'],
|
||||||
'tracked_codes': tracker_codes,
|
'tracked_codes': tracker_codes,
|
||||||
|
@ -85,25 +85,32 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
highlight: {
|
highlight: {
|
||||||
checks: {
|
checks: {
|
||||||
|
text: "hsl(210, 92.86%, 90%)",
|
||||||
|
light: "hsla(293.9,72.3%,45%,1)",
|
||||||
DEFAULT: "#A431B1",
|
DEFAULT: "#A431B1",
|
||||||
translucent: {
|
dark: "hsla(293.9,72.3%,30%,1)",
|
||||||
light: "#A431B1E8",
|
|
||||||
dark: "#A431B1A0",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
entrances: {
|
entrances: {
|
||||||
|
text: "hsla(41.86,95.56%,90%,1)",
|
||||||
|
light: "hsla(23.9,85%,40%,1)",
|
||||||
DEFAULT: "#B16431",
|
DEFAULT: "#B16431",
|
||||||
translucent: {
|
dark: "hsla(23.9,85%,25%,1)",
|
||||||
light: "#B16431E8",
|
|
||||||
dark: "#B16431B0",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
both: {
|
both: {
|
||||||
|
text: "hsla(116.4,75.76%,90%,1)",
|
||||||
|
light: "hsla(113.9,72.3%,40%,1)",
|
||||||
DEFAULT: "#3EB131",
|
DEFAULT: "#3EB131",
|
||||||
translucent: {
|
dark: "hsla(113.9,72.3%,25%,1)",
|
||||||
light: "#3EB131E8",
|
|
||||||
dark: "#3EB13190",
|
|
||||||
},
|
},
|
||||||
|
undiscovered: {
|
||||||
|
text: "hsla(0,0%,96%,1)",
|
||||||
|
light: "hsla(0,0%,45%,1)",
|
||||||
|
dark: "hsla(0,0%,20%,1)",
|
||||||
|
},
|
||||||
|
empty: {
|
||||||
|
text: "hsla(0,100%,100%,1)",
|
||||||
|
light: "hsla(0,100%,100%,0.05)",
|
||||||
|
dark: "hsla(0,100%,100%,0.17)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"holy-cross": {
|
"holy-cross": {
|
||||||
|
Loading…
Reference in New Issue
Block a user