is it possible to extract index.html, script.js, and style.css - so we have a clean structure from the beginning?
Browse files- index.html +4 -46
- script.js +60 -0
- style.css +21 -20
index.html
CHANGED
|
@@ -5,51 +5,10 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Nexus Vision | Data Ingestion Dashboard</title>
|
| 7 |
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
|
|
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
-
<script>
|
| 11 |
-
tailwind.config = {
|
| 12 |
-
theme: {
|
| 13 |
-
extend: {
|
| 14 |
-
colors: {
|
| 15 |
-
primary: {
|
| 16 |
-
500: '#6366f1',
|
| 17 |
-
600: '#4f46e5',
|
| 18 |
-
},
|
| 19 |
-
secondary: {
|
| 20 |
-
500: '#ec4899',
|
| 21 |
-
600: '#db2777',
|
| 22 |
-
}
|
| 23 |
-
}
|
| 24 |
-
}
|
| 25 |
-
}
|
| 26 |
-
}
|
| 27 |
-
</script>
|
| 28 |
-
<style>
|
| 29 |
-
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 30 |
-
body {
|
| 31 |
-
font-family: 'Inter', sans-serif;
|
| 32 |
-
}
|
| 33 |
-
.vanta-bg {
|
| 34 |
-
position: absolute;
|
| 35 |
-
top: 0;
|
| 36 |
-
left: 0;
|
| 37 |
-
width: 100%;
|
| 38 |
-
height: 350px;
|
| 39 |
-
z-index: 0;
|
| 40 |
-
}
|
| 41 |
-
.dashboard-grid {
|
| 42 |
-
display: grid;
|
| 43 |
-
grid-template-columns: 240px 1fr;
|
| 44 |
-
grid-template-rows: 60px 1fr;
|
| 45 |
-
min-height: 100vh;
|
| 46 |
-
}
|
| 47 |
-
@media (max-width: 768px) {
|
| 48 |
-
.dashboard-grid {
|
| 49 |
-
grid-template-columns: 1fr;
|
| 50 |
-
}
|
| 51 |
-
}
|
| 52 |
-
</style>
|
| 53 |
</head>
|
| 54 |
<body class="h-full">
|
| 55 |
<!-- Vanta.js background -->
|
|
@@ -173,7 +132,7 @@
|
|
| 173 |
<div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
|
| 174 |
<div class="flex items-center justify-between mb-6">
|
| 175 |
<h2 class="text-lg font-semibold text-gray-800">CSV Data Ingestion</h2>
|
| 176 |
-
<button class="px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 flex items-center space-x-2">
|
| 177 |
<i data-feather="upload" class="w-4 h-4"></i>
|
| 178 |
<span>Upload CSV</span>
|
| 179 |
</button>
|
|
@@ -252,6 +211,5 @@
|
|
| 252 |
|
| 253 |
<!-- Scripts -->
|
| 254 |
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
|
| 255 |
-
<script src="/static/js/main.js"></script>
|
| 256 |
</body>
|
| 257 |
-
</html>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Nexus Vision | Data Ingestion Dashboard</title>
|
| 7 |
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<link rel="stylesheet" href="/static/css/style.css">
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<script src="/static/js/script.js" defer></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
</head>
|
| 13 |
<body class="h-full">
|
| 14 |
<!-- Vanta.js background -->
|
|
|
|
| 132 |
<div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
|
| 133 |
<div class="flex items-center justify-between mb-6">
|
| 134 |
<h2 class="text-lg font-semibold text-gray-800">CSV Data Ingestion</h2>
|
| 135 |
+
<button id="upload-csv-btn" class="px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 flex items-center space-x-2">
|
| 136 |
<i data-feather="upload" class="w-4 h-4"></i>
|
| 137 |
<span>Upload CSV</span>
|
| 138 |
</button>
|
|
|
|
| 211 |
|
| 212 |
<!-- Scripts -->
|
| 213 |
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
|
|
|
|
| 214 |
</body>
|
| 215 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```javascript
|
| 2 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 3 |
+
// Initialize feather icons
|
| 4 |
+
feather.replace();
|
| 5 |
+
|
| 6 |
+
// Initialize Vanta.js background
|
| 7 |
+
if (window.VANTA) {
|
| 8 |
+
VANTA.GLOBE({
|
| 9 |
+
el: "#vanta-bg",
|
| 10 |
+
mouseControls: true,
|
| 11 |
+
touchControls: true,
|
| 12 |
+
gyroControls: false,
|
| 13 |
+
minHeight: 200.00,
|
| 14 |
+
minWidth: 200.00,
|
| 15 |
+
scale: 1.00,
|
| 16 |
+
scaleMobile: 1.00,
|
| 17 |
+
color: 0x6366f1,
|
| 18 |
+
backgroundColor: 0xf8fafc,
|
| 19 |
+
size: 0.80
|
| 20 |
+
});
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
// Tailwind config
|
| 24 |
+
tailwind.config = {
|
| 25 |
+
theme: {
|
| 26 |
+
extend: {
|
| 27 |
+
colors: {
|
| 28 |
+
primary: {
|
| 29 |
+
500: '#6366f1',
|
| 30 |
+
600: '#4f46e5',
|
| 31 |
+
},
|
| 32 |
+
secondary: {
|
| 33 |
+
500: '#ec4899',
|
| 34 |
+
600: '#db2777',
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
// File upload functionality
|
| 42 |
+
const fileUpload = document.getElementById('file-upload');
|
| 43 |
+
const uploadBtn = document.getElementById('upload-csv-btn');
|
| 44 |
+
|
| 45 |
+
if (fileUpload && uploadBtn) {
|
| 46 |
+
uploadBtn.addEventListener('click', () => {
|
| 47 |
+
fileUpload.click();
|
| 48 |
+
});
|
| 49 |
+
|
| 50 |
+
fileUpload.addEventListener('change', (e) => {
|
| 51 |
+
const file = e.target.files[0];
|
| 52 |
+
if (file) {
|
| 53 |
+
// Handle file upload logic here
|
| 54 |
+
console.log('File selected:', file.name);
|
| 55 |
+
// You would typically upload to server here
|
| 56 |
+
}
|
| 57 |
+
});
|
| 58 |
+
}
|
| 59 |
+
});
|
| 60 |
+
```
|
style.css
CHANGED
|
@@ -1,28 +1,29 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
-
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
margin-top: 0;
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
| 1 |
+
```css
|
| 2 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
body {
|
| 5 |
+
font-family: 'Inter', sans-serif;
|
|
|
|
| 6 |
}
|
| 7 |
|
| 8 |
+
.vanta-bg {
|
| 9 |
+
position: absolute;
|
| 10 |
+
top: 0;
|
| 11 |
+
left: 0;
|
| 12 |
+
width: 100%;
|
| 13 |
+
height: 350px;
|
| 14 |
+
z-index: 0;
|
| 15 |
}
|
| 16 |
|
| 17 |
+
.dashboard-grid {
|
| 18 |
+
display: grid;
|
| 19 |
+
grid-template-columns: 240px 1fr;
|
| 20 |
+
grid-template-rows: 60px 1fr;
|
| 21 |
+
min-height: 100vh;
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
+
@media (max-width: 768px) {
|
| 25 |
+
.dashboard-grid {
|
| 26 |
+
grid-template-columns: 1fr;
|
| 27 |
+
}
|
| 28 |
}
|
| 29 |
+
```
|