Skip to content
Snippets Groups Projects
Commit 768dd154 authored by Natasha Nunez's avatar Natasha Nunez
Browse files

fix sidebar

parent 01969835
No related branches found
No related tags found
No related merge requests found
Pipeline #456115 failed
......@@ -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
......@@ -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: {},
......
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment