diff --git a/flake.nix b/flake.nix index 6f5fdca..1d4e865 100644 --- a/flake.nix +++ b/flake.nix @@ -35,8 +35,6 @@ http-server prettier vscode-langservers-extracted - typescript-language-server - typescript ]; }; }; diff --git a/gear/gear.html b/gear/gear.html new file mode 100644 index 0000000..0b8015b --- /dev/null +++ b/gear/gear.html @@ -0,0 +1 @@ + diff --git a/gear/gear.js b/gear/gear.js new file mode 100644 index 0000000..aa6ff23 --- /dev/null +++ b/gear/gear.js @@ -0,0 +1 @@ +// Gear list JS diff --git a/gear/gear.json b/gear/gear.json deleted file mode 100644 index 4e36d13..0000000 --- a/gear/gear.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "bondage": { - "name": "Bondage", - "id": "bondage", - "values": [ - { - "name": "Rope", - "id": "rope", - "desc": "10m pink, black, or purple" - } - ] - } -} diff --git a/gear/gear.mjs b/gear/gear.mjs deleted file mode 100644 index 43247c6..0000000 --- a/gear/gear.mjs +++ /dev/null @@ -1,115 +0,0 @@ -// Gear list JS -// @ts-check - -/** - * @typedef {{name: string, id: string, desc: string}} GearListItem - * - * @typedef {{name: string, id: string, values: GearListItem[]}} GearListSection - * - * @typedef {{bondage: GearListSection}} GearList - */ - -/** - * Fetches the gear.json to be parsed seperately - * @returns {Promise} - */ -async function getGearList() { - try { - const response = await fetch("/gear/gear.json"); - const data = await response.json(); - return data; - } catch (error) { - console.error("Error fetching JSON:", error); - throw "Could not load gear.json"; - } -} - -/** - * @param {GearListItem} gear - * @param {string} group - * @returns {HTMLLIElement} - */ -function gearToElement(gear, group) { - let li = document.createElement("li"); - li.setAttribute("id", `gl-${group}-${gear.id}`); - let heading = document.createElement("h3"); - heading.setAttribute("class", "gl-item-name"); - heading.textContent = gear.name; - li.appendChild(heading); - let description = document.createElement("p"); - description.setAttribute("class", "gl-item-desc"); - li.appendChild(description); - return li; -} - -/** - * @param {GearListSection} gear - * @returns {HTMLLIElement[]} - */ -function gearListToList(gear) { - let lis = []; - for (const item of gear.values) { - lis.push(gearToElement(item, gear.id)); - } - return lis; -} - -/** - * @param {GearListSection} items - * @returns {HTMLUListElement} - */ -function bondageItemsToUl(items) { - let ul = document.createElement("ul"); - ul.setAttribute("id", `gl-${items.id}-list`); - for (const i of gearListToList(items)) { - ul.appendChild(i); - } - return ul; -} - -/** - * @returns {Promise} - */ -async function generateGearListArticle() { - let list = await getGearList(); - - let bondageItems = document.createElement("article"); - bondageItems.setAttribute("id", "gl-body"); - let heading = document.createElement("h2"); - heading.textContent = "Gear List"; - bondageItems.appendChild(heading); - - for (const section of Object.values(list)) { - let listSection = buildSection(section); - bondageItems.appendChild(listSection); - } - - return bondageItems; -} - -/** - * @param {GearListSection} items - * @returns {HTMLElement} - */ -function buildSection(items) { - let section = document.createElement("article"); - section.setAttribute("id", `gl-${items.id}-body`); - let heading = document.createElement("h3"); - heading.textContent = items.name; - section.appendChild(heading); - - let ul = bondageItemsToUl(items); - - section.appendChild(ul); - return section; -} - -/** - * @param {string} position - * @returns void - */ -export async function attachGearList(position) { - document - .getElementById(position) - .replaceWith(await generateGearListArticle()); -} diff --git a/gear/index.html b/gear/index.html index 78eb770..5b5f35d 100644 --- a/gear/index.html +++ b/gear/index.html @@ -7,19 +7,17 @@ - - - - - - + + -
+ This will be my gear -
diff --git a/gear/page.mjs b/gear/page.mjs deleted file mode 100644 index 8ea2f57..0000000 --- a/gear/page.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { attachGearList } from "/gear/gear.mjs"; -import { loadHTML } from "/global/loadin.mjs"; - -export function loadDependencies() { - loadHTML("hd-box", "/header/header.html"); - attachGearList("gl-body"); -} - -loadDependencies(); diff --git a/global/global.css b/global/global.css index c900fc9..85a1601 100644 --- a/global/global.css +++ b/global/global.css @@ -1,10 +1 @@ /* Global CSS options */ - -body { - font-family: "Truculenta", sans-serif; - font-optical-sizing: auto; - font-weight: 500; - font-style: normal; - font-variation-settings: "wdth" 100; - font-size: 16pt; -} diff --git a/global/loadin.mjs b/global/loadin.js similarity index 84% rename from global/loadin.mjs rename to global/loadin.js index 9b30f3a..45d2695 100644 --- a/global/loadin.mjs +++ b/global/loadin.js @@ -1,4 +1,4 @@ -export function loadHTML(elementId, url) { +function loadHTML(elementId, url) { fetch(url) .then((response) => response.text()) .then((data) => { diff --git a/header/header.css b/header/header.css index 923edf7..ff722bc 100644 --- a/header/header.css +++ b/header/header.css @@ -1,44 +1 @@ /* Header CSS */ -header { - font-family: "Roboto Mono", monospace; - font-optical-sizing: auto; - font-weight: 600; - font-style: normal; - font-size: 14pt; - - height: 1.5rem; - width: calc(100% - 1.5rem); - - margin-bottom: 0.25rem; - padding: 0.5rem; - border-width: 3px; - border-style: solid; - - position: sticky; - top: 0; - - display: flex; - - #hd-left { - width: min-width; - padding-left: 0.25rem; - padding-right: 0.25rem; - font-style: italic; - } - - #hd-mid { - width: 100%; - } - - #hd-right { - display: flex; - width: fit-content; - padding-left: 0.25rem; - padding-right: 0.25rem; - } - - .spacer { - width: 2rem; - display: block; - } -} diff --git a/header/header.html b/header/header.html index da676fc..9f531db 100644 --- a/header/header.html +++ b/header/header.html @@ -1,16 +1 @@ - -
nekoapril.blog
-
-
- Home - - Kinks - - Gear -
diff --git a/index.html b/index.html index fd449cc..8e5b19c 100644 --- a/index.html +++ b/index.html @@ -6,16 +6,8 @@ Kinklist - - - - - - + @@ -26,7 +18,6 @@ your experience.

-
Look ma, I'm horny! diff --git a/index.js b/index.js new file mode 100644 index 0000000..2d9ed3a --- /dev/null +++ b/index.js @@ -0,0 +1 @@ +// Landing page JS diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 9928c16..0000000 --- a/index.mjs +++ /dev/null @@ -1,8 +0,0 @@ -// Landing page JS -import { loadHTML } from "/global/loadin.mjs"; - -function loadDependencies() { - loadHTML("hd-box", "/header/header.html"); -} - -loadDependencies(); diff --git a/kinks/kinks.mjs b/kinks/kinks.js similarity index 100% rename from kinks/kinks.mjs rename to kinks/kinks.js