fix double id on divs

This commit is contained in:
ReznoRMichael 2021-07-12 14:33:17 +02:00
parent 71222533be
commit 9a79c2100c
6 changed files with 28 additions and 8 deletions

View file

@ -5505,15 +5505,20 @@ function CompletionFillNoSave(section) {
var h2 = "";
var h2id = "";
var mp = ""; // max Percent
var cl = ""; // class
// let cl = ""; // class
id = section.id;
h2 = section.h2;
h2id = "h2-" + section.id;
mp = "<div class='percent-box'>".concat(id === "hk-intro" ? 0 : section.maxPercent, "%</div>");
if (!section.hasOwnProperty("maxPercent")) mp = "";
return ["<div id=\"".concat(id, "\" ").concat(cl, ">"), "<h2 id='".concat(h2id, "'>").concat(h2).concat(mp, "</h2>"), "</div>\n"].join("");
/* return [
`<div id="${id}" ${cl}>`,
`<h2 id='${h2id}'>${h2}${mp}</h2>`,
"</div>\n"
].join(""); */
return "<h2 id='".concat(h2id, "'>").concat(h2).concat(mp, "</h2>");
}
/**
* Replaces the h2 titles with a current percent/max percent values as read from the database

File diff suppressed because one or more lines are too long

View file

@ -227,6 +227,13 @@ h6 {
color: rgba(0, 255, 220, 0.6);
}
#hk-hints {
border: 1px solid #fff;
border-radius: 1rem;
padding: 1.3rem;
margin: 1.3rem;
}
#save-location-input {
display: block;
font-family: 'Consolas', monospace;

File diff suppressed because one or more lines are too long

View file

@ -120,6 +120,13 @@ h6 {
color: rgba(0, 255, 220, 0.6);
}
#hk-hints {
border: 1px solid #fff;
border-radius: 1rem;
padding: 1.3rem;
margin: 1.3rem;
}
#save-location-input {
display: block;
font-family: 'Consolas', monospace;

View file

@ -474,7 +474,7 @@ function SectionStart(section) {
let h2 = "";
let h2id = "";
let mp = ""; // max Percent
let cl = ""; // class
// let cl = ""; // class
id = section.id;
h2 = section.h2;
@ -483,11 +483,12 @@ function SectionStart(section) {
mp = `<div class='percent-box'>${(id === "hk-intro") ? 0: section.maxPercent}%</div>`;
if (!section.hasOwnProperty("maxPercent")) mp = "";
return [
/* return [
`<div id="${id}" ${cl}>`,
`<h2 id='${h2id}'>${h2}${mp}</h2>`,
"</div>\n"
].join("");
].join(""); */
return `<h2 id='${h2id}'>${h2}${mp}</h2>`;
}
/**