From 03d307056659c04f65c2f00ac719f67478e9ca52 Mon Sep 17 00:00:00 2001 From: DGSWcsh <101883606+ChoiSihun@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:15:12 +0900 Subject: [PATCH] feat: sheet --- canbus-web/route/addRoute.js | 0 canbus-web/route/editRoute.js | 7 ++ canbus-web/route/editroute.html | 12 +++ canbus-web/sheet/sheet.html | 153 ++++++++++++++++++++++++++++++++ canbus-web/sheet/sheet.js | 19 ++++ 5 files changed, 191 insertions(+) create mode 100644 canbus-web/route/addRoute.js create mode 100644 canbus-web/route/editRoute.js create mode 100644 canbus-web/sheet/sheet.html create mode 100644 canbus-web/sheet/sheet.js diff --git a/canbus-web/route/addRoute.js b/canbus-web/route/addRoute.js new file mode 100644 index 0000000..e69de29 diff --git a/canbus-web/route/editRoute.js b/canbus-web/route/editRoute.js new file mode 100644 index 0000000..5c8391e --- /dev/null +++ b/canbus-web/route/editRoute.js @@ -0,0 +1,7 @@ +useEffect(() => { + document.body.style.overflow = "hidden"; + + return () => { + document.body.style.overflow = "unset"; + }; + }, []); \ No newline at end of file diff --git a/canbus-web/route/editroute.html b/canbus-web/route/editroute.html index 0dc7065..f6b7b27 100644 --- a/canbus-web/route/editroute.html +++ b/canbus-web/route/editroute.html @@ -5,6 +5,16 @@ Form Example + + + + + + + + + diff --git a/canbus-web/sheet/sheet.js b/canbus-web/sheet/sheet.js new file mode 100644 index 0000000..82eb845 --- /dev/null +++ b/canbus-web/sheet/sheet.js @@ -0,0 +1,19 @@ +document.addEventListener('DOMContentLoaded', function () { + const modal = document.getElementById('modal'); + const openModalBtn = document.getElementById('openModalBtn'); + const closeModalBtn = document.getElementById('closeModalBtn'); + + openModalBtn.addEventListener('click', function () { + modal.classList.add('show'); + }); + + closeModalBtn.addEventListener('click', function () { + modal.classList.remove('show'); + }); + + window.addEventListener('click', function (event) { + if (event.target === modal) { + modal.classList.remove('show'); + } + }); +});