Added school overview

This commit is contained in:
Peter Bjerg Lidegaard
2022-05-16 07:21:39 +02:00
parent 8e811623d7
commit 3e4611a3ee
3 changed files with 7789 additions and 0 deletions
+4
View File
@@ -16,6 +16,10 @@ spellsJs.forEach(jsFile => {
const spells = require(path.join(jsFolder, jsFile));
html += pug.renderFile(path.join(pugFolder, 'spellsDatalists.pug'), {pretty: true, data: spells});
if (jsFile === 'wizardSpells.js') {
let schoolTable = pug.renderFile(path.join(pugFolder, 'schoolOverview.pug'), {pretty: true, data: spells});
fs.writeFileSync(path.join(miscFolder, 'school-overview.html'), schoolTable);
}
if (jsFile === 'priestSpells.js') {
let sphereTable = pug.renderFile(path.join(pugFolder, 'sphereOverview.pug'), {pretty: true, data: spells});
fs.writeFileSync(path.join(miscFolder, 'sphere-overview.html'), sphereTable);
File diff suppressed because it is too large Load Diff
+37
View File
@@ -0,0 +1,37 @@
style("text/css").
table {
border-collapse: collapse;
position: relative;
text-align: left;
}
tr.gray th {
background: lightgray;
}
th, td {
padding: 2px;
}
th {
position: sticky;
top: 0;
}
table
tr(class="gray")
th name
th schools
th book
each levelObject, level in data
each spell, spellName in levelObject
if (!spell['school-spells-and-magic'])
- continue
tr
td #{spellName}
td #{spell.school}
td #{spell.book}
if (spell['school-spells-and-magic'])
tr
td #{spellName}
td #{spell['school-spells-and-magic']}
td Player's Option: Spells & Magic
tr
td