diff --git a/frontend/src/App.js b/frontend/src/App.js index b379d9b..14b9648 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,5 +1,6 @@ import React, { useState, useEffect, useCallback } from 'react'; -import { GeistProvider, CssBaseline, useToasts } from '@geist-ui/core'; +import { GeistProvider, CssBaseline, useToasts, Page, Text, User, Button, Spacer, Breadcrumbs } from '@geist-ui/core'; +import { Settings } from '@geist-ui/icons'; import Editor from './components/Editor'; import FileTree from './components/FileTree'; import { fetchFileList, fetchFileContent, saveFileContent } from './services/api'; @@ -52,31 +53,52 @@ function App() { } }, [setToast]); + const renderBreadcrumbs = () => { + if (!selectedFile) return null; + const pathParts = selectedFile.split('/'); + return ( + + {pathParts.map((part, index) => ( + {part} + ))} + + ); + }; + return ( - - - {error ? ( - {error} - ) : ( - + + NovaMD + + + + } /> + + + + {error ? ( + {error} + ) : ( + + )} + + + {renderBreadcrumbs()} + - )} - - - NovaMD - - - + + + ); } diff --git a/frontend/src/App.scss b/frontend/src/App.scss index ebde6d5..fd325ab 100644 --- a/frontend/src/App.scss +++ b/frontend/src/App.scss @@ -2,26 +2,38 @@ $sidebar-width: 250px; $border-color: #eaeaea; $padding: 20px; +$navbar-height: 64px; // Adjust this value based on your preference -.App { +.custom-navbar { display: flex; - height: 100vh; + align-items: center; + justify-content: space-between; + padding: 0 $padding; + height: $navbar-height; + border-bottom: 1px solid $border-color; +} - .sidebar { - width: $sidebar-width; - padding: $padding; - border-right: 1px solid $border-color; - overflow-y: auto; - } +.main-container { + display: flex; + height: calc(100vh - #{$navbar-height}); + padding: 0 !important; // Override Geist UI's default padding +} - .main-content { - flex-grow: 1; - padding: $padding; - overflow-y: auto; +.sidebar { + width: $sidebar-width; + padding: $padding; + border-right: 1px solid $border-color; + overflow-y: auto; +} - h1 { - margin-top: 0; - } +.main-content { + flex-grow: 1; + padding: $padding; + overflow-y: auto; + + // Add styles for breadcrumbs + .breadcrumbs { + margin-bottom: $padding; } }