From a8f9c6771167bb1bac53845a2a9c736dd2242e8d Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 26 Jan 2023 19:33:39 +0000 Subject: [PATCH] remove template in index, add article content in js Signed-off-by: Arthur Lu --- index.html | 20 -------------------- scripts/elements.js | 23 ++++++++++++++++++++--- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/index.html b/index.html index f4c1a56..6d69e2c 100644 --- a/index.html +++ b/index.html @@ -17,24 +17,4 @@
- \ No newline at end of file diff --git a/scripts/elements.js b/scripts/elements.js index 1a62973..3fd9f6f 100644 --- a/scripts/elements.js +++ b/scripts/elements.js @@ -7,9 +7,26 @@ class Instance extends HTMLElement { super(); let shadowRoot = this.attachShadow({mode: "open"}); - let instanceTemplate = document.querySelector("#instance-template"); - let instanceTemplateContent = instanceTemplate.content; - shadowRoot.append(instanceTemplateContent.cloneNode(true)); + shadowRoot.innerHTML = ` +
+
+
+ +

+

+
+
+ instance node +

+
+
+
+
+ + change instance configuration +
+
+ `; let styleLink = document.createElement("link"); styleLink.rel = "stylesheet";