From ac206cd94f45f54938bdc473607c42e959b8c067 Mon Sep 17 00:00:00 2001 From: vextv Date: Fri, 15 Nov 2024 14:55:22 +0100 Subject: [PATCH] changed example website --- .idea/inspectionProfiles/Project_Default.xml | 16 ++++++++++++++++ .idea/sqldialects.xml | 7 ------- public/example/index.html | 3 +-- scripts/example.js | 20 ++++++++++++++++---- static/Styles/example.css | 1 + 5 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/sqldialects.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..e1cfb03 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml deleted file mode 100644 index 2834bc7..0000000 --- a/.idea/sqldialects.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/public/example/index.html b/public/example/index.html index 2c5b393..738501c 100644 --- a/public/example/index.html +++ b/public/example/index.html @@ -20,8 +20,7 @@

header

- -

Collapsed Sidebar

+

main

diff --git a/scripts/example.js b/scripts/example.js index ca41a87..d539db9 100644 --- a/scripts/example.js +++ b/scripts/example.js @@ -1,11 +1,23 @@ +let sidebarEl = document.getElementById("mySidebar") +let mainEl = document.getElementById("main") + /* Set the width of the sidebar to 250px and the left margin of the page content to 250px */ function openNav() { - document.getElementById("mySidebar").style.width = "250px"; - document.getElementById("main").style.marginLeft = "250px"; + sidebarEl.style.width = "250px"; + mainEl.style.marginLeft = "250px"; } /* Set the width of the sidebar to 0 and the left margin of the page content to 0 */ function closeNav() { - document.getElementById("mySidebar").style.width = "0"; - document.getElementById("main").style.marginLeft = "0"; + sidebarEl.style.width = "0"; + mainEl.style.marginLeft = "0"; +} + +/* Toggle the sidebar */ +function toggleNav() { + if (sidebarEl.offsetWidth > 0) { + closeNav() + } else { + openNav() + } } \ No newline at end of file diff --git a/static/Styles/example.css b/static/Styles/example.css index 1b5e40d..024d1c7 100644 --- a/static/Styles/example.css +++ b/static/Styles/example.css @@ -10,6 +10,7 @@ overflow-x: hidden; /* Disable horizontal scroll */ padding-top: 60px; /* Place content 60px from the top */ transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */ + font-family: "Agency FB"; } /* The sidebar links */