Add per-category details
This commit is contained in:
parent
ac2728b393
commit
6220dd76d5
|
@ -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>.",
|
||||||
};
|
};
|
||||||
|
|
1
main.js
1
main.js
|
@ -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>
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Reference in a new issue