diff --git a/lib/components/WikiPage.tsx b/lib/components/WikiPage.tsx index 2722122..b76a96a 100644 --- a/lib/components/WikiPage.tsx +++ b/lib/components/WikiPage.tsx @@ -48,9 +48,9 @@ export default function WikiPage({ page, visible }) { visibility: visible ? "" : "hidden", }} > -
You start skimming through the manual...
You start skimming through the manual...
${treatment.innerHTML}
`; + } + if (metabolism) { + content += ` `; + } + if (addiction && addiction.innerHTML.trim() != "N/A") { + content += `${addiction.innerHTML}
`; + } + if (overdose && overdose.innerHTML.trim() != "N/A") { + content += `${overdose.innerHTML}
`; + } + if (desc) { + content += `${desc.innerHTML}
`; + } + title.classList.add("reagent-ext"); + title.innerHTML = content; + if (desc) desc.parentElement.removeChild(desc); + if (treatment) treatment.parentElement.removeChild(treatment); + if (metabolism) metabolism.parentElement.removeChild(metabolism); + if (overdose) overdose.parentElement.removeChild(overdose); + if (addiction) addiction.parentElement.removeChild(addiction); + }); + document.body.addEventListener("keydown", function (ev) { if (ev.shiftKey) { switch (ev.keyCode) { diff --git a/style/bgus.scss b/style/bgus.scss index fa73fbc..7157cf8 100644 --- a/style/bgus.scss +++ b/style/bgus.scss @@ -27,8 +27,10 @@ #bgus_fz_searchbox ul { list-style: none; margin: 5px; + padding: 0; } #bgus_fz_searchbox li { + margin: 0; padding: 5px; cursor: pointer; } @@ -71,8 +73,8 @@ span.bgus_nested_element:not(.bgus_collapsed) + div.tooltiptext { padding: 5px 8px; line-height: 10pt; } -table.wikitable > tbody > tr > td:nth-child(2) { - min-width: 30%; +.bchem table.wikitable > tbody > tr > td:nth-child(2) { + width: 45%; padding: 10px; } .bgus_fz_selected { @@ -101,3 +103,39 @@ body.bgus_cbox input[type="checkbox"]:checked + span[data-src]:before, body.bgus_cbox input[type="checkbox"]:checked + span[data-src] { color: green; } + +.reagent-ext { + .reagent-header { + font-size: 12pt; + text-align: left; + padding: 10pt; + padding-bottom: 0; + } + p { + font-size: 8pt; + font-weight: 300; + line-height: 1.4em; + word-spacing: -0.1em; + } + .treatment { + font-size: 10pt; + } + .metabolism:before { + font-size: 9pt; + content: "Metabolism rate: "; + font-weight: bold; + } + .overdose, + .addiction { + font-size: 9pt; + font-weight: bold; + } + .overdose:before { + color: #ffae68; + content: "Overdose at "; + } + .addiction:before { + color: #ffdf97; + content: "Addiction at "; + } +} diff --git a/style/main.scss b/style/main.scss index 0c7022d..7fd9ef3 100644 --- a/style/main.scss +++ b/style/main.scss @@ -76,18 +76,23 @@ body { grid-row: 1; grid-column: 1; &.waiting { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + overflow: hidden; display: flex; flex-direction: column; height: 100%; .speen { flex: 1; display: flex; + flex-direction: column; justify-content: center; align-items: center; img { - flex: 1; - width: 50%; - height: 50%; + width: 60vmin; opacity: 0.9; } }