Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
635 changes: 332 additions & 303 deletions dataedit/static/metaedit/metaedit.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dataedit/static/metaedit/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
'@tailwindcss/postcss': {},
},
}

export default config
248 changes: 248 additions & 0 deletions dataedit/static/metaedit/sidebar-layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
/* Sidebar Layout Styles */
.sidebar-layout {
display: flex;
min-height: calc(100vh - 200px);
background-color: #f8f9fa;
margin-top: 1rem;
}

.sidebar {
width: 300px;
background-color: #ffffff;
border-right: 1px solid #dee2e6;
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
overflow-y: auto;
position: relative;
min-height: 600px;
}

.sidebar-header {
padding: 1.5rem 1rem;
border-bottom: 1px solid #dee2e6;
background-color: #f8f9fa;
}

.sidebar-header h3 {
margin: 0;
font-size: 1.25rem;
color: #495057;
font-weight: 600;
}

.sidebar-nav {
padding: 1rem 0;
}

.nav-list {
list-style: none;
padding: 0;
margin: 0;
}

.nav-item {
margin-bottom: 0.25rem;
}

.nav-link {
display: flex;
align-items: center;
padding: 0.75rem 1rem;
color: #495057;
text-decoration: none;
border-left: 3px solid transparent;
transition: all 0.2s ease;
cursor: pointer;
font-size: 0.9rem;
}

.nav-link:hover {
background-color: #f8f9fa;
color: #007bff;
text-decoration: none;
}

.nav-link.active {
background-color: #e3f2fd;
color: #1976d2;
border-left-color: #1976d2;
font-weight: 500;
}

.nav-link i {
margin-right: 0.75rem;
width: 16px;
text-align: center;
}

.nav-link .badge {
margin-left: auto;
font-size: 0.75rem;
}

.main-content {
flex: 1;
padding: 2rem;
overflow-y: auto;
background-color: #ffffff;
border-radius: 8px;
margin-left: 1rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-header {
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid #dee2e6;
}

.content-header h2 {
margin: 0;
color: #495057;
font-weight: 600;
font-size: 1.5rem;
}

.content-header p {
margin: 0.5rem 0 0 0;
color: #6c757d;
font-size: 0.95rem;
}

.form-container {
background-color: #ffffff;
}

/* Resource Management */
.resource-manager {
padding: 1rem;
border-top: 1px solid #dee2e6;
background-color: #f8f9fa;
}

.resource-manager h4 {
margin: 0 0 1rem 0;
font-size: 1rem;
color: #495057;
font-weight: 600;
}

.resource-list {
background-color: #ffffff;
border-radius: 6px;
padding: 0.75rem;
margin-bottom: 1rem;
border: 1px solid #dee2e6;
min-height: 100px;
}

.loading-state {
text-align: center;
color: #6c757d;
font-style: italic;
padding: 1rem;
}

.resource-item {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 4px;
padding: 0.75rem;
margin-bottom: 0.5rem;
cursor: pointer;
transition: all 0.2s ease;
}

.resource-item:hover {
border-color: #007bff;
box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.resource-item.active {
border-color: #007bff;
background-color: #e3f2fd;
}

.resource-item h5 {
margin: 0 0 0.25rem 0;
color: #495057;
font-size: 0.9rem;
font-weight: 500;
}

.resource-item p {
margin: 0;
color: #6c757d;
font-size: 0.8rem;
}

/* Hide default JSON Editor tabs */
.je-object__controls .nav-tabs {
display: none !important;
}

.je-object__container > .tab-content {
border: none !important;
padding: 0 !important;
}

/* Show/hide form sections based on sidebar selection */
.form-section {
display: none;
}

.form-section.active {
display: block;
}

/* Fixed controls positioning - adjust for sidebar layout */
.fixed-controls {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1050;
background-color: white;
padding: 1rem;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive design */
@media (max-width: 768px) {
.sidebar-layout {
flex-direction: column;
}

.sidebar {
width: 100%;
position: relative;
min-height: auto;
}

.main-content {
margin-left: 0;
margin-top: 1rem;
}
}

/* Custom JSON Editor overrides */
.json-editor-btn-add {
margin-left: 5px;
}

.card-body {
padding-left: 30px;
}

.je-object__container {
margin-bottom: 20px;
}

label[data-bs-toggle="popover"]:after {
color: var(--primary);
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f05a";
vertical-align: super;
font-size: small;
margin-left: 2px;
}
Loading
Loading