From f2ab71cf3f00798bc9d445e9e034db04a7f7de50 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 14 Jan 2019 13:17:05 +0100 Subject: [PATCH] Work progress on project UI --- .../Export.html | 74 ++++++++++++++++--- .../assets/css/main.css | 14 ++++ .../assets/js/main.js | 34 +++++++++ 3 files changed, 110 insertions(+), 12 deletions(-) create mode 100644 assets/zip/personnal-data-export-navigator/assets/js/main.js diff --git a/assets/zip/personnal-data-export-navigator/Export.html b/assets/zip/personnal-data-export-navigator/Export.html index 6e44d71d..32df0013 100644 --- a/assets/zip/personnal-data-export-navigator/Export.html +++ b/assets/zip/personnal-data-export-navigator/Export.html @@ -12,22 +12,72 @@ - +
+ + + + +
+ +
+ +
+ Please use the navigation bar located at the left of this page to access to the different categories of content. +
+ +
+ Loading user information +
+ +
+ Loading friends list +
+ +
+ Loading posts +
+ +
+ Loading comments +
+ +
+ Loading likes +
+ +
+ Loading survey responses +
+ +
+ Loading movies +
+ +
+ Loading all conversation messages +
+ +
+ Loading conversations +
+ +
+ \ No newline at end of file diff --git a/assets/zip/personnal-data-export-navigator/assets/css/main.css b/assets/zip/personnal-data-export-navigator/assets/css/main.css index e9cfe838..e11ae8f6 100644 --- a/assets/zip/personnal-data-export-navigator/assets/css/main.css +++ b/assets/zip/personnal-data-export-navigator/assets/css/main.css @@ -1,5 +1,19 @@ +/** + * Data export result stylesheet + * + * @author Pierre HUBERT + */ + .sidenav.sidenav-fixed { /*transform: unset;*/ /*margin-top: 80px;*/ +} + +main { + margin-left: 300px; +} + +main .container { + display: none; } \ No newline at end of file diff --git a/assets/zip/personnal-data-export-navigator/assets/js/main.js b/assets/zip/personnal-data-export-navigator/assets/js/main.js new file mode 100644 index 00000000..472f58eb --- /dev/null +++ b/assets/zip/personnal-data-export-navigator/assets/js/main.js @@ -0,0 +1,34 @@ +/** + * Data export visualization navigator + * + * @author Pierre HUBERT + */ + +/** + * Refresh tabs visibility accordingly to the hash of + * the current URL + */ +function RefreshTabsVisibility(){ + + var hash = location.href.toString().split("#")[1]; + + if(!hash) + return; + + document.querySelectorAll(".category").forEach(el => { + + el.style.display = el.id === hash ? "block" : "none"; + + }); + +} + +/** + * Automatically switch the tab when it + * is required by the user + */ +window.addEventListener("hashchange", RefreshTabsVisibility); + + +//Page initialization +RefreshTabsVisibility(); \ No newline at end of file