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>}
|
* @returns {Promise<HTMLElement>}
|
||||||
*/
|
*/
|
||||||
async function generateGearListArticle() {
|
async function generateGearListArticle(position) {
|
||||||
let list = await getGearList();
|
let list = await getGearList();
|
||||||
|
|
||||||
let bondageItems = document.createElement("article");
|
let bondageItems = document.createElement("article");
|
||||||
bondageItems.setAttribute("id", "gl-body");
|
bondageItems.setAttribute("id", position);
|
||||||
let heading = document.createElement("h2");
|
let heading = document.createElement("h2");
|
||||||
heading.textContent = "Gear List";
|
heading.textContent = "Gear List";
|
||||||
bondageItems.appendChild(heading);
|
bondageItems.appendChild(heading);
|
||||||
|
|
@ -111,5 +112,5 @@ function buildSection(items) {
|
||||||
export async function attachGearList(position) {
|
export async function attachGearList(position) {
|
||||||
document
|
document
|
||||||
.getElementById(position)
|
.getElementById(position)
|
||||||
.replaceWith(await generateGearListArticle());
|
.replaceWith(await generateGearListArticle(position));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header id="hd-box"></header>
|
<header id="hd-box"></header>
|
||||||
This will be my gear
|
<article id="main"></article>
|
||||||
<article id="gl-body"></article>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { loadHTML } from "/global/loadin.mjs";
|
||||||
|
|
||||||
export function loadDependencies() {
|
export function loadDependencies() {
|
||||||
loadHTML("hd-box", "/header/header.html");
|
loadHTML("hd-box", "/header/header.html");
|
||||||
attachGearList("gl-body");
|
attachGearList("main");
|
||||||
}
|
}
|
||||||
|
|
||||||
loadDependencies();
|
loadDependencies();
|
||||||
|
|
|
||||||
|
|
@ -9,16 +9,22 @@ body {
|
||||||
font-size: 16pt;
|
font-size: 16pt;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-height: 100svh;
|
min-height: 100svh;
|
||||||
|
height: 100svh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
background-color: #1e2030;
|
||||||
|
color: #cad3f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main {
|
#main {
|
||||||
width: 40rem;
|
max-width: 40rem;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
margin: 0.25rem;
|
margin: 0.25rem;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding: 0.25rem;
|
padding: 0.25rem;
|
||||||
border-left: solid 2px;
|
border-left: solid 2px #c6a0f6;
|
||||||
border-right: solid 2px;
|
border-right: solid 2px #c6a0f6;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ header {
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
border-width: 3px;
|
border-width: 3px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
border-color: #c6a0f6;
|
||||||
|
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -42,4 +43,9 @@ header {
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #cad3f5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue