artsmithai commited on
Commit
cb14410
·
verified ·
1 Parent(s): 015310a

can you modernize please, this looks like a database form the 90s

Browse files
components/navbar.js CHANGED
@@ -4,11 +4,14 @@ class CustomNavbar extends HTMLElement {
4
  this.shadowRoot.innerHTML = `
5
  <style>
6
  nav {
7
- background-color: white;
8
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
9
  padding: 1rem 2rem;
 
 
 
10
  }
11
- .nav-container {
12
  max-width: 1400px;
13
  margin: 0 auto;
14
  display: flex;
 
4
  this.shadowRoot.innerHTML = `
5
  <style>
6
  nav {
7
+ background-color: var(--surface);
8
+ box-shadow: var(--shadow);
9
  padding: 1rem 2rem;
10
+ backdrop-filter: blur(8px);
11
+ background-color: rgba(255, 255, 255, 0.8);
12
+ border-bottom: 1px solid var(--border);
13
  }
14
+ .nav-container {
15
  max-width: 1400px;
16
  margin: 0 auto;
17
  display: flex;
components/task-card.js CHANGED
@@ -13,13 +13,14 @@ class CustomTaskCard extends HTMLElement {
13
  .task-card {
14
  transition: all 0.2s ease;
15
  cursor: pointer;
16
- background-color: white;
17
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
18
  padding: 1.5rem;
19
  position: relative;
 
 
20
  }
21
-
22
- .task-header {
23
  display: flex;
24
  justify-content: space-between;
25
  align-items: flex-start;
 
13
  .task-card {
14
  transition: all 0.2s ease;
15
  cursor: pointer;
16
+ background-color: var(--surface);
17
+ box-shadow: var(--shadow-sm);
18
  padding: 1.5rem;
19
  position: relative;
20
+ border-radius: var(--radius);
21
+ border: 1px solid var(--border);
22
  }
23
+ .task-header {
 
24
  display: flex;
25
  justify-content: space-between;
26
  align-items: flex-start;
components/task-drawer.js CHANGED
@@ -19,34 +19,31 @@ class CustomTaskDrawer extends HTMLElement {
19
  width: 42rem;
20
  max-width: 90vw;
21
  height: 100vh;
22
- background-color: white;
23
  box-shadow: -4px 0 15px rgba(0,0,0,0.1);
24
  z-index: 100;
25
  transform: translateX(100%);
26
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 
27
  }
28
  :host([open]) {
29
  transform: translateX(0);
30
  }
31
-
32
  .drawer-header {
33
- border-bottom: 1px solid #e5e7eb;
 
34
  }
35
-
36
- .drawer-content {
37
  height: calc(100vh - 60px);
38
  overflow-y: auto;
39
  }
40
-
41
  .info-section {
42
- border-bottom: 1px solid #e5e7eb;
43
  }
44
-
45
  .activity-item {
46
- border-left: 2px solid #e5e7eb;
47
  }
48
-
49
- @media (max-width: 1024px) {
50
  :host {
51
  width: 60%;
52
  }
 
19
  width: 42rem;
20
  max-width: 90vw;
21
  height: 100vh;
22
+ background-color: var(--surface);
23
  box-shadow: -4px 0 15px rgba(0,0,0,0.1);
24
  z-index: 100;
25
  transform: translateX(100%);
26
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
27
+ border-left: 1px solid var(--border);
28
  }
29
  :host([open]) {
30
  transform: translateX(0);
31
  }
 
32
  .drawer-header {
33
+ border-bottom: 1px solid var(--border);
34
+ background: var(--surface-2);
35
  }
36
+ .drawer-content {
 
37
  height: calc(100vh - 60px);
38
  overflow-y: auto;
39
  }
 
40
  .info-section {
41
+ border-bottom: 1px solid var(--border);
42
  }
 
43
  .activity-item {
44
+ border-left: 2px solid var(--border);
45
  }
46
+ @media (max-width: 1024px) {
 
47
  :host {
48
  width: 60%;
49
  }
index.html CHANGED
@@ -14,8 +14,8 @@
14
  </head>
15
  <body class="bg-gray-50">
16
  <custom-navbar></custom-navbar>
17
- <div class="container mx-auto px-4 py-8">
18
- <div class="dashboard-header">
19
  <div class="flex justify-between items-start">
20
  <div>
21
  <h1 class="text-3xl font-bold mb-2">Purchase Order Tasks</h1>
@@ -33,18 +33,16 @@
33
  </div>
34
  </div>
35
  </div>
36
-
37
  <div class="flex justify-between items-center mb-8">
38
  <div>
39
- <h2 class="text-2xl font-bold text-gray-800">Active Tasks</h2>
40
- <p class="text-gray-600">Tasks that need your attention</p>
41
  </div>
42
- <button id="openDrawer" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center shadow-md hover:shadow-lg transition-all">
43
  <i data-feather="plus" class="mr-2"></i> Add Task
44
  </button>
45
  </div>
46
-
47
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
48
  <custom-task-card
49
  title="QC Cotton Shipment"
50
  po="#12345"
 
14
  </head>
15
  <body class="bg-gray-50">
16
  <custom-navbar></custom-navbar>
17
+ <div class="container mx-auto px-4 py-8 max-w-7xl">
18
+ <div class="dashboard-header">
19
  <div class="flex justify-between items-start">
20
  <div>
21
  <h1 class="text-3xl font-bold mb-2">Purchase Order Tasks</h1>
 
33
  </div>
34
  </div>
35
  </div>
 
36
  <div class="flex justify-between items-center mb-8">
37
  <div>
38
+ <h2 class="text-2xl font-bold text-gray-900">Active Tasks</h2>
39
+ <p class="text-gray-500">Tasks that need your attention</p>
40
  </div>
41
+ <button id="openDrawer" class="bg-primary hover:bg-primary-hover text-white px-4 py-2 rounded-lg flex items-center shadow hover:shadow-md transition-all">
42
  <i data-feather="plus" class="mr-2"></i> Add Task
43
  </button>
44
  </div>
45
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
 
46
  <custom-task-card
47
  title="QC Cotton Shipment"
48
  po="#12345"
style.css CHANGED
@@ -1,9 +1,29 @@
1
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  body {
3
  font-family: 'Inter', sans-serif;
4
- background-color: #f8fafc;
 
 
5
  }
6
-
7
  .container {
8
  max-width: 1400px;
9
  }
@@ -63,12 +83,14 @@ body {
63
  background-color: #dcfce7;
64
  color: #166534;
65
  }
66
-
67
  .task-card {
68
  transition: all 0.2s ease;
69
- border-radius: 0.75rem;
70
  overflow: hidden;
71
  position: relative;
 
 
 
72
  }
73
 
74
  .task-card::before {
@@ -81,43 +103,42 @@ body {
81
  }
82
 
83
  .task-card.priority-high::before {
84
- background-color: #ef4444;
85
  }
86
 
87
  .task-card.priority-medium::before {
88
- background-color: #f59e0b;
89
  }
90
 
91
  .task-card.priority-low::before {
92
- background-color: #10b981;
93
  }
94
 
95
  .task-card:hover {
96
- transform: translateY(-4px);
97
- box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
 
98
  }
99
-
100
  .dashboard-header {
101
- background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
102
- color: white;
103
- border-radius: 0.75rem;
104
  padding: 2rem;
105
  margin-bottom: 2rem;
106
  position: relative;
107
  overflow: hidden;
 
 
108
  }
109
 
110
- .dashboard-header::after {
111
  content: '';
112
  position: absolute;
113
- top: -50%;
114
- right: -50%;
115
  width: 100%;
116
- height: 200%;
117
- background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
118
- background-size: 20px 20px;
119
- opacity: 0.5;
120
- transform: rotate(30deg);
121
  }
122
  .task-drawer {
123
  transition: transform 0.3s ease-in-out;
 
1
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+ :root {
3
+ --primary: #6366f1;
4
+ --primary-hover: #4f46e5;
5
+ --surface: #ffffff;
6
+ --surface-2: #f9fafb;
7
+ --surface-3: #f3f4f6;
8
+ --text-primary: #111827;
9
+ --text-secondary: #6b7280;
10
+ --border: #e5e7eb;
11
+ --success: #10b981;
12
+ --warning: #f59e0b;
13
+ --danger: #ef4444;
14
+ --radius: 12px;
15
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
16
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
17
+ --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
18
+ --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
19
+ }
20
+
21
  body {
22
  font-family: 'Inter', sans-serif;
23
+ background-color: var(--surface-2);
24
+ color: var(--text-primary);
25
+ -webkit-font-smoothing: antialiased;
26
  }
 
27
  .container {
28
  max-width: 1400px;
29
  }
 
83
  background-color: #dcfce7;
84
  color: #166534;
85
  }
 
86
  .task-card {
87
  transition: all 0.2s ease;
88
+ border-radius: var(--radius);
89
  overflow: hidden;
90
  position: relative;
91
+ background: var(--surface);
92
+ box-shadow: var(--shadow-sm);
93
+ border: 1px solid var(--border);
94
  }
95
 
96
  .task-card::before {
 
103
  }
104
 
105
  .task-card.priority-high::before {
106
+ background-color: var(--danger);
107
  }
108
 
109
  .task-card.priority-medium::before {
110
+ background-color: var(--warning);
111
  }
112
 
113
  .task-card.priority-low::before {
114
+ background-color: var(--success);
115
  }
116
 
117
  .task-card:hover {
118
+ transform: translateY(-2px);
119
+ box-shadow: var(--shadow-md);
120
+ border-color: var(--primary);
121
  }
 
122
  .dashboard-header {
123
+ background: var(--surface);
124
+ color: var(--text-primary);
125
+ border-radius: var(--radius);
126
  padding: 2rem;
127
  margin-bottom: 2rem;
128
  position: relative;
129
  overflow: hidden;
130
+ box-shadow: var(--shadow);
131
+ border: 1px solid var(--border);
132
  }
133
 
134
+ .dashboard-header::before {
135
  content: '';
136
  position: absolute;
137
+ top: 0;
138
+ left: 0;
139
  width: 100%;
140
+ height: 4px;
141
+ background: linear-gradient(90deg, var(--primary), var(--success));
 
 
 
142
  }
143
  .task-drawer {
144
  transition: transform 0.3s ease-in-out;