diff --git a/main.mjs b/main.mjs index 8762ae9..c353447 100644 --- a/main.mjs +++ b/main.mjs @@ -13,7 +13,7 @@ app.get("/", async (request, response) => { const posts = await prisma.post.findMany(); const html = template.replace( "", - posts.map((post) => `
  • ${escapeHTML(post.message)}
  • `).join(""), + posts.map((post) => `
  • ${escapeHTML(post.message)}
  • `).join("") ); response.send(html); }); diff --git a/static/mypage/index.html b/static/mypage/index.html new file mode 100644 index 0000000..fdde8c4 --- /dev/null +++ b/static/mypage/index.html @@ -0,0 +1,13 @@ + + + + + + ユーザー登録 + + + +
    + + + \ No newline at end of file diff --git a/static/mypage/script.js b/static/mypage/script.js new file mode 100644 index 0000000..10913e3 --- /dev/null +++ b/static/mypage/script.js @@ -0,0 +1,23 @@ +const app = document.getElementById("app"); +const title = document.createElement("h1"); +title.textContent = "ユーザー登録"; +const form = document.createElement("form"); +const table = document.createElement("table"); +const info = ["苗字", "名前", "誕生日", "性別"]; +for (tag of info) { + const tr = document.createElement("tr"); + const td1 = document.createElement("td"); + td1.textContent = tag; + const td2 = document.createElement("td"); + const input = document.createElement("input"); + td2.appendChild(input); + tr.appendChild(td1); + tr.appendChild(td2); + table.appendChild(tr); +} +const button = document.createElement("button"); +button.textContent = "登録"; +form.appendChild(table); +form.appendChild(button); +app.appendChild(title); +app.appendChild(form); diff --git a/static/mypage/style.css b/static/mypage/style.css new file mode 100644 index 0000000..1f63b67 --- /dev/null +++ b/static/mypage/style.css @@ -0,0 +1,3 @@ +#app { + background-color: rgb(99, 184, 184); +} \ No newline at end of file