Early styling
This commit is contained in:
parent
b61db22369
commit
4b4b91a30a
5 changed files with 21 additions and 9 deletions
|
|
@ -68,13 +68,14 @@ function bondageItemsToUl(items) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {string} position
|
||||
* @returns {Promise<HTMLElement>}
|
||||
*/
|
||||
async function generateGearListArticle() {
|
||||
async function generateGearListArticle(position) {
|
||||
let list = await getGearList();
|
||||
|
||||
let bondageItems = document.createElement("article");
|
||||
bondageItems.setAttribute("id", "gl-body");
|
||||
bondageItems.setAttribute("id", position);
|
||||
let heading = document.createElement("h2");
|
||||
heading.textContent = "Gear List";
|
||||
bondageItems.appendChild(heading);
|
||||
|
|
@ -111,5 +112,5 @@ function buildSection(items) {
|
|||
export async function attachGearList(position) {
|
||||
document
|
||||
.getElementById(position)
|
||||
.replaceWith(await generateGearListArticle());
|
||||
.replaceWith(await generateGearListArticle(position));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<header id="hd-box"></header>
|
||||
This will be my gear
|
||||
<article id="gl-body"></article>
|
||||
<article id="main"></article>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { loadHTML } from "/global/loadin.mjs";
|
|||
|
||||
export function loadDependencies() {
|
||||
loadHTML("hd-box", "/header/header.html");
|
||||
attachGearList("gl-body");
|
||||
attachGearList("main");
|
||||
}
|
||||
|
||||
loadDependencies();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue