From 768dd154bf50d3a880c1e860b485d9c8d5468731 Mon Sep 17 00:00:00 2001
From: Natasha Nunez <n.nunez@student.maastrichtuniversity.nl>
Date: Sat, 28 Sep 2024 10:34:15 +0000
Subject: [PATCH] fix sidebar

---
 docs/.vuepress/components/HumanPractices.vue | 10 ++---
 docs/.vuepress/config.js                     | 44 +++++++++++++++++---
 docs/.vuepress/styles/index.scss             |  2 +-
 3 files changed, 45 insertions(+), 11 deletions(-)

diff --git a/docs/.vuepress/components/HumanPractices.vue b/docs/.vuepress/components/HumanPractices.vue
index bb3a517..8bee292 100644
--- a/docs/.vuepress/components/HumanPractices.vue
+++ b/docs/.vuepress/components/HumanPractices.vue
@@ -13,7 +13,7 @@ export default {
     },
     sidebarWidth: {
       type: String,
-      default: '18rem',
+      default: '18rem', // Default value for sidebar width, adjust if needed
     },
   },
 }
@@ -23,7 +23,7 @@ export default {
 .banner {
   position: relative;
   left: 0;
-  width: calc(100% - var(--sidebar-width)); /* Dynamic width calculation */
+  width: calc(100% - 18rem); /* Use the default value for calculation */
   max-width: 100%;
   display: block;
   margin: 0 auto;
@@ -35,8 +35,8 @@ export default {
 }
 @media (max-width: 768px) {
   .banner {
-    width: 100%;
-    right: 0; /* Adjust for smaller screens */
+    width: 100%; /* Adjust to full width for smaller screens */
+    right: 0; /* No offset on smaller screens */
   }
 }
-</style>
+</style>
\ No newline at end of file
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 5ba0360..fc0d0b7 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -44,16 +44,50 @@ export default defineUserConfig({
       },
     ],
     sidebar: {
+      '/team/': [
+        {
+          text: 'Team',
+          children: [
+            '/team/', // Corresponds to '/team/README.md' or '/team/index.md'
+            '/team/attributions', // Corresponds to '/team/attributions.md'
+          ],
+        },
+      ],
+      '/project/': [
+        {
+          text: 'Project',
+          children: [
+            '/project/contribution',
+            '/project/description',
+            '/project/engineering',
+            '/project/parts',
+          ],
+        },
+      ],
+      '/human-practices/': [
+        {
+          text: 'Human Practices',
+          children: ['/human-practices/'], // Make sure file path exists
+        },
+      ],
+      '/awards/': [
+        {
+          text: 'Awards',
+          children: [
+            '/awards/education',
+            '/awards/sustainable',
+            '/awards/new-basic-part',
+          ],
+        },
+      ],
       '/': [
         {
-          title: 'On This Page', // Title for the sidebar
-          children: 'auto', // Automatically generate based on headers
+          text: 'On This Page',
+          children: 'auto',
         },
       ],
-      '/team': false, // Disable sidebar on team page
+      '/team': false, // Disable sidebar on /team path (if needed)
     },
-    sidebarDepth: 2, // Controls depth of headers in sidebar
-    displayAllHeaders: true, // Show all headers in the sidebar
   }),
   bundler: viteBundler({
     viteOptions: {},
diff --git a/docs/.vuepress/styles/index.scss b/docs/.vuepress/styles/index.scss
index 3994ffb..24aaf34 100644
--- a/docs/.vuepress/styles/index.scss
+++ b/docs/.vuepress/styles/index.scss
@@ -45,7 +45,7 @@ height: 50px; /* Adjust based on your image size */
   top: 1rem; /* Space from the top of the page */
   max-height: calc(100vh - 2rem); /* Full height minus some margin */
   overflow-y: auto; /* Enable vertical scrolling */
-  width: var(--sidebar-width); /* Use the theme's sidebar width */
+  width: 18rem; /* Ensure sidebar width is explicitly defined */
   background-color: #f9f9f9; /* Optional: Background color */
   padding: 1rem; /* Sidebar padding */
   border: 1px solid #ddd; /* Optional: Border for the sidebar */
-- 
GitLab