From debce45ebbfa9859ff74052189f68a1088732f01 Mon Sep 17 00:00:00 2001 From: SeeChen Date: Sun, 8 Dec 2024 22:59:17 +0800 Subject: [PATCH] Update --- Data/About/SessionList.json | 137 +++--------------------------------- JavaScript/About/about.js | 12 +++- 2 files changed, 20 insertions(+), 129 deletions(-) diff --git a/Data/About/SessionList.json b/Data/About/SessionList.json index f34cf29..3657493 100644 --- a/Data/About/SessionList.json +++ b/Data/About/SessionList.json @@ -1,133 +1,14 @@ { "_language_": { - "_chinese_": { - "handle": "" - }, - "_english_": { - "handle": "" - } - }, - - "_about_": { - "": { - "handle": "" - } - }, - - "_my_post_": { - - }, - - "_acknowledgments_": { - "_angus_tan_": { - "handle": "" - }, - "_eugene_yip_": { - "handle": "" - } - }, - - "test": { - - "test_01": { - "handle": "" - }, - "test_02": { - "handle": "" - }, - "test_03": { - "handle": "" - }, - "test_04": { - "handle": "" - }, - "test_05": { - "handle": "" - }, - "test_06": { - "handle": "" - }, - "test_07": { - "handle": "" - }, - "test_08": { - "handle": "" - }, - "test_09": { - "handle": "" - }, - "test_10": { - "handle": "" - }, - "test_11": { - "handle": "" - }, - "test_12": { - "handle": "" - }, - "test_13": { - "handle": "" - }, - "test_14": { - "handle": "" - }, - "test_15": { - "handle": "" - }, - "test_16": { - "handle": "" - } - }, - - "test_1": { - - "test_01": { - "handle": "" - }, - "test_22": { - "handle": "" - }, - "test_03": { - "handle": "" - }, - "test_04": { - "handle": "" - }, - "test_05": { - "handle": "" - }, - "test_06": { - "handle": "" - }, - "test_07": { - "handle": "" - }, - "test_08": { - "handle": "" - }, - "test_09": { - "handle": "" - }, - "test_10": { - "handle": "" - }, - "test_11": { - "handle": "" - }, - "test_12": { - "handle": "" - }, - "test_13": { - "handle": "" - }, - "test_14": { - "handle": "" - }, - "test_15": { - "handle": "" - }, - "test_16": { - "handle": "" + "id": "aboutSession_Language", + "handle": "test", + "children": { + "_chinese_": { + "handle": "test" + }, + "_english_": { + "handle": "" + } } } } \ No newline at end of file diff --git a/JavaScript/About/about.js b/JavaScript/About/about.js index 59ba3ad..d51d1b6 100644 --- a/JavaScript/About/about.js +++ b/JavaScript/About/about.js @@ -31,10 +31,13 @@ export const SeeChen_AboutPage = { Object.keys(aboutSessionList).forEach(sessionTitle => { var aboutSession = window.myTools.deepCopy(aboutSessionTemplate); + aboutSession.props["data-event-handler"] = aboutSessionList[sessionTitle]["handle"]; + aboutSession.children[1].lang = "about"; aboutSession.children[1].children = [sessionTitle]; + aboutSession.children[1].props["id"] = aboutSessionList[sessionTitle]["id"]; - Object.keys(aboutSessionList[sessionTitle]).forEach(sessionContent => { + Object.keys(aboutSessionList[sessionTitle]["children"]).forEach(sessionContent => { aboutSession.children[2].children.push({ tag: "span", @@ -72,6 +75,13 @@ export const SeeChen_AboutPage = { window.eventBus.emit("sessionExpand", { e, ele }); }); }); + + document.querySelectorAll(".box_Session").forEach(boxSession => { + + boxSession.addEventListener("click", (e) => { + console.log(boxSession.dataset.eventHandler); + }) + }); }, registerEvents: async () => {