From 4b6987d94457573206add0ac4f766094484ba2a2 Mon Sep 17 00:00:00 2001 From: Bomi Kwon <49463954+kwonET@users.noreply.github.com> Date: Fri, 21 Apr 2023 23:34:42 +0900 Subject: [PATCH] update --- dummy.js | 68 ++++++++++++++ index.html | 97 ++++++++++++++++++++ script.js | 144 +++++++++++++++++++++++++++++ style.css | 264 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 573 insertions(+) create mode 100644 dummy.js create mode 100644 index.html create mode 100644 script.js create mode 100644 style.css diff --git a/dummy.js b/dummy.js new file mode 100644 index 0000000..0c650bf --- /dev/null +++ b/dummy.js @@ -0,0 +1,68 @@ +export default [ + { + "menuName":"국물닭발", + "menuTag":["#칼칼","#닭발엔소주", "#국물","#냠냠"], + "menuImgUrl":"./images/chicken_foot.jpeg", + "category":"안주", + }, + { + "menuName":"야채곱창", + "menuTag":["#돼지곱창", "#야채듬뿍","#매콤"], + "menuImgUrl":"./images/gopchang.jpeg", + "category":"안주" + }, + { + "menuName":"오돌뼈", + "menuTag":["#주먹밥","#매콤", "#오독오독"], + "menuImgUrl":"./images/odol.jpeg", + "category":"안주" + }, + { + "menuName":"어묵탕", + "menuTag":["#소주친구","#뜨근국물", "#탕"], + "menuImgUrl":"./images/odang.jpeg", + "category":"탕" + }, + { + "menuName":"알탕", + "menuTag":["#소주친구","#알&곤이", "#탕"], + "menuImgUrl":"./images/altang.jpeg", + "category":"탕" + }, + { + "menuName":"짬뽕탕", + "menuTag":["#소주친구","#해물가득", "#탕"], + "menuImgUrl":"./images/jjam.jpeg", + "category":"탕" + }, + { + "menuName":"황도", + "menuTag":["#시원함","#과일가득"], + "menuImgUrl":"./images/hwangdo.jpeg", + "category":"사이드" + }, + { + "menuName":"계란찜", + "menuTag":["#포슬포슬","#닭발과함께"], + "menuImgUrl":"./images/egg.jpeg", + "category":"사이드" + }, + { + "menuName":"참이슬", + "menuTag":["#소주","#참이슬누가먹음"], + "menuImgUrl":"./images/chami.jpeg", + "category":"술" + }, + { + "menuName":"처음처럼", + "menuTag":["#소주","#소주1위의존엄"], + "menuImgUrl":"./images/cheo.jpeg", + "category":"술" + }, + { + "menuName":"한라산", + "menuTag":["#소주","#화끈하게21도"], + "menuImgUrl":"./images/han.jpeg", + "category":"술" + } +] diff --git a/index.html b/index.html new file mode 100644 index 0000000..bf06ef3 --- /dev/null +++ b/index.html @@ -0,0 +1,97 @@ + + + + + + + bomipocha + + + + + + +
+

+ 보미포차 +

+

+ + + +

+
+ + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..1913d13 --- /dev/null +++ b/script.js @@ -0,0 +1,144 @@ +import data from './dummy.js'; +/** + * nav에서 선택된 카테고리에 따라 카드, 태그 생성/삭제함 + */ +var target=document.querySelectorAll('.nav-container'); +var btnClose=document.querySelectorAll('.selected-ctgr .cancel-btn') +var targetID, targetClass; +const selectedCtgr=[]; +var ctgrAllList=[".ctgr-dish",".ctgr-tang",".ctgr-side",".ctgr-alcohol"] +var nonSelectedCtgr=[]; +// 생성 +for(var i=0;i !selectedCtgr.includes(x)); + for (var t=0;t