Add per-category details

This commit is contained in:
Chandler Swift 2023-09-01 22:23:40 -05:00
parent ac2728b393
commit 6220dd76d5
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
2 changed files with 2 additions and 0 deletions

View file

@ -25,4 +25,5 @@ let layers = [];
export default { export default {
name: "Light Pollution", name: "Light Pollution",
layers: layers, layers: layers,
details: "For legend and more information, see <a href='https://www.cleardarksky.com/'>cleardarksky.com</a>.",
}; };

View file

@ -28,6 +28,7 @@ for (let category of layerCategories) {
catDiv.innerHTML = ` catDiv.innerHTML = `
<details ${category.layers.filter(l => l.enabled).length > 0 ? "open" : ""}> <details ${category.layers.filter(l => l.enabled).length > 0 ? "open" : ""}>
<summary>${category.name}</summary> <summary>${category.name}</summary>
${category.details ? "<p>" + category.details + "</p>" : ""}
<ul></ul> <ul></ul>
</details> </details>
`; `;