diff --git a/client/404.html b/client/404.html index a0f0b4f33..ce87eaa57 100644 --- a/client/404.html +++ b/client/404.html @@ -38,7 +38,7 @@
diff --git a/client/about/index.html b/client/about/index.html index 81420b909..664095709 100644 --- a/client/about/index.html +++ b/client/about/index.html @@ -38,7 +38,7 @@ diff --git a/client/about/privacy-policy.html b/client/about/privacy-policy.html index 1163914cc..f00058a0b 100644 --- a/client/about/privacy-policy.html +++ b/client/about/privacy-policy.html @@ -38,7 +38,7 @@ diff --git a/client/about/terms-of-service.html b/client/about/terms-of-service.html index 33de7185f..5acbc0546 100644 --- a/client/about/terms-of-service.html +++ b/client/about/terms-of-service.html @@ -38,7 +38,7 @@ diff --git a/client/admin/category-reports/index.html b/client/admin/category-reports/index.html index 828067a3e..0c09bcd84 100644 --- a/client/admin/category-reports/index.html +++ b/client/admin/category-reports/index.html @@ -37,7 +37,7 @@ diff --git a/client/admin/geoword/category-stats.html b/client/admin/geoword/category-stats.html index bd46df557..78e1f583e 100644 --- a/client/admin/geoword/category-stats.html +++ b/client/admin/geoword/category-stats.html @@ -37,7 +37,7 @@ diff --git a/client/admin/geoword/compare.html b/client/admin/geoword/compare.html index 87485dca2..b66ca01ad 100644 --- a/client/admin/geoword/compare.html +++ b/client/admin/geoword/compare.html @@ -38,7 +38,7 @@ diff --git a/client/admin/geoword/index.html b/client/admin/geoword/index.html index a7e013433..bf25eb4aa 100644 --- a/client/admin/geoword/index.html +++ b/client/admin/geoword/index.html @@ -37,7 +37,7 @@ diff --git a/client/admin/geoword/leaderboard.html b/client/admin/geoword/leaderboard.html index 43944a45d..52afc6262 100644 --- a/client/admin/geoword/leaderboard.html +++ b/client/admin/geoword/leaderboard.html @@ -37,7 +37,7 @@ diff --git a/client/admin/geoword/manage-payments.html b/client/admin/geoword/manage-payments.html index 1304ee60f..b0aaa23c0 100644 --- a/client/admin/geoword/manage-payments.html +++ b/client/admin/geoword/manage-payments.html @@ -37,7 +37,7 @@ diff --git a/client/admin/geoword/protests.html b/client/admin/geoword/protests.html index d101041d6..0bfc48a8c 100644 --- a/client/admin/geoword/protests.html +++ b/client/admin/geoword/protests.html @@ -37,7 +37,7 @@ diff --git a/client/admin/geoword/stats.html b/client/admin/geoword/stats.html index b47d37764..a8999b397 100644 --- a/client/admin/geoword/stats.html +++ b/client/admin/geoword/stats.html @@ -37,7 +37,7 @@ diff --git a/client/admin/index.html b/client/admin/index.html index c66be2b95..c9e3c9c96 100644 --- a/client/admin/index.html +++ b/client/admin/index.html @@ -38,7 +38,7 @@ diff --git a/client/admin/leaderboard/index.html b/client/admin/leaderboard/index.html index 373aae535..fdbbde990 100644 --- a/client/admin/leaderboard/index.html +++ b/client/admin/leaderboard/index.html @@ -38,7 +38,7 @@ diff --git a/client/admin/question-management/packet.html b/client/admin/question-management/packet.html index 862547a98..7fed86638 100644 --- a/client/admin/question-management/packet.html +++ b/client/admin/question-management/packet.html @@ -38,7 +38,7 @@ diff --git a/client/admin/question-management/set.html b/client/admin/question-management/set.html index 27062cfb2..ec6b366aa 100644 --- a/client/admin/question-management/set.html +++ b/client/admin/question-management/set.html @@ -38,7 +38,7 @@ diff --git a/client/db/backups.html b/client/db/backups.html index c42713676..4e5ddae34 100644 --- a/client/db/backups.html +++ b/client/db/backups.html @@ -39,7 +39,7 @@ diff --git a/client/db/bonus-to-html.js b/client/db/bonus-to-html.js new file mode 100644 index 000000000..f0d4f4de3 --- /dev/null +++ b/client/db/bonus-to-html.js @@ -0,0 +1,23 @@ +import getBonusPartLabel from '../scripts/utilities/get-bonus-part-label.js'; + +export default function bonusToHTML (bonus) { + const div = document.createElement('div'); + const span1 = document.createElement('span'); + span1.innerHTML = `${bonus.number}. ${bonus.leadin}`; + div.appendChild(span1); + div.appendChild(document.createElement('br')); + + for (let i = 0; i < bonus.parts.length; i++) { + const span1 = document.createElement('span'); + span1.innerHTML = `${getBonusPartLabel(bonus, i)} ${bonus.parts[i]}`; + div.appendChild(span1); + div.appendChild(document.createElement('br')); + const span2 = document.createElement('span'); + span2.innerHTML = `ANSWER: ${bonus.answers[i]}`; + div.appendChild(span2); + div.appendChild(document.createElement('br')); + } + + div.appendChild(document.createTextNode(`<${bonus.category} / ${bonus.subcategory}${bonus.alternate_subcategory ? ' / ' + bonus.alternate_subcategory : ''}>`)); + return div; +} diff --git a/client/db/explorer/bonus.html b/client/db/bonus/index.html similarity index 97% rename from client/db/explorer/bonus.html rename to client/db/bonus/index.html index 38f9fb5e0..280f40be4 100644 --- a/client/db/explorer/bonus.html +++ b/client/db/bonus/index.html @@ -39,7 +39,7 @@ @@ -98,7 +98,7 @@ - Back to all sets + Back to all sets