ShadowWolf1999 commited on
Commit
7b0f09e
·
verified ·
1 Parent(s): a3b2589

是不是 样式没起作用,前端还是乱的 包含各种组件也没有起作用

Browse files
Files changed (3) hide show
  1. components/testcase-dashboard.js +48 -8
  2. index.html +9 -3
  3. style.css +15 -10
components/testcase-dashboard.js CHANGED
@@ -5,16 +5,16 @@ class TestcaseDashboard extends HTMLElement {
5
  <style>
6
  :host {
7
  display: block;
8
- --primary: #667eea;
9
- --primary-dark: #764ba2;
 
10
  }
11
-
12
  .header {
13
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
14
  color: white;
 
15
  }
16
-
17
- .phase-tab {
18
  transition: all 0.3s ease;
19
  border-bottom: 3px solid transparent;
20
  cursor: pointer;
@@ -25,14 +25,47 @@ class TestcaseDashboard extends HTMLElement {
25
  color: var(--primary);
26
  font-weight: 600;
27
  }
28
-
29
  .pill {
30
- display: inline-block;
 
31
  font-size: 0.75rem;
32
  font-weight: 600;
33
  padding: 0.25rem 0.75rem;
34
  border-radius: 9999px;
35
  text-transform: capitalize;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
  </style>
38
 
@@ -178,9 +211,16 @@ class TestcaseDashboard extends HTMLElement {
178
  </main>
179
  </div>
180
  `;
 
 
 
 
 
 
 
181
 
182
  // Add event listeners for tabs
183
- const tabs = this.shadowRoot.querySelectorAll('.phase-tab');
184
  tabs.forEach(tab => {
185
  tab.addEventListener('click', () => {
186
  tabs.forEach(t => t.classList.remove('active'));
 
5
  <style>
6
  :host {
7
  display: block;
8
+ font-family: 'Inter', sans-serif;
9
+ --primary: #6366f1;
10
+ --primary-dark: #4f46e5;
11
  }
 
12
  .header {
13
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
14
  color: white;
15
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
16
  }
17
+ .phase-tab {
 
18
  transition: all 0.3s ease;
19
  border-bottom: 3px solid transparent;
20
  cursor: pointer;
 
25
  color: var(--primary);
26
  font-weight: 600;
27
  }
 
28
  .pill {
29
+ display: inline-flex;
30
+ align-items: center;
31
  font-size: 0.75rem;
32
  font-weight: 600;
33
  padding: 0.25rem 0.75rem;
34
  border-radius: 9999px;
35
  text-transform: capitalize;
36
+ line-height: 1;
37
+ }
38
+
39
+ table {
40
+ width: 100%;
41
+ border-collapse: collapse;
42
+ }
43
+
44
+ th, td {
45
+ padding: 0.75rem 1.5rem;
46
+ text-align: left;
47
+ border-bottom: 1px solid #e5e7eb;
48
+ }
49
+
50
+ th {
51
+ font-weight: 600;
52
+ color: #6b7280;
53
+ background-color: #f9fafb;
54
+ text-transform: uppercase;
55
+ letter-spacing: 0.05em;
56
+ font-size: 0.75rem;
57
+ }
58
+
59
+ tr:hover {
60
+ background-color: #f9fafb;
61
+ }
62
+
63
+ button {
64
+ transition: all 0.2s ease;
65
+ }
66
+
67
+ button:hover {
68
+ transform: translateY(-1px);
69
  }
70
  </style>
71
 
 
211
  </main>
212
  </div>
213
  `;
214
+
215
+ // Initialize feather icons
216
+ setTimeout(() => {
217
+ if (window.feather) {
218
+ window.feather.replace();
219
+ }
220
+ }, 100);
221
 
222
  // Add event listeners for tabs
223
+ const tabs = this.shadowRoot.querySelectorAll('.phase-tab');
224
  tabs.forEach(tab => {
225
  tab.addEventListener('click', () => {
226
  tabs.forEach(t => t.classList.remove('active'));
index.html CHANGED
@@ -4,8 +4,11 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>TestCase Visualizer Pro</title>
 
 
 
 
7
  <script src="https://cdn.tailwindcss.com"></script>
8
- <script src="https://unpkg.com/feather-icons"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
  <link rel="stylesheet" href="style.css">
11
  </head>
@@ -14,8 +17,11 @@
14
 
15
  <script src="components/testcase-dashboard.js"></script>
16
  <script>
17
- feather.replace();
 
 
 
 
18
  </script>
19
- <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
20
  </body>
21
  </html>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>TestCase Visualizer Pro</title>
7
+ <meta name="description" content="TestCase Visualizer Pro - Visualize your FSD test cases with clarity">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
11
  <script src="https://cdn.tailwindcss.com"></script>
 
12
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
13
  <link rel="stylesheet" href="style.css">
14
  </head>
 
17
 
18
  <script src="components/testcase-dashboard.js"></script>
19
  <script>
20
+ document.addEventListener('DOMContentLoaded', function() {
21
+ if (window.feather) {
22
+ feather.replace();
23
+ }
24
+ });
25
  </script>
 
26
  </body>
27
  </html>
style.css CHANGED
@@ -1,16 +1,21 @@
1
 
2
  :root {
3
- --primary: #667eea;
4
- --primary-dark: #764ba2;
5
- --secondary: #f7fafc;
6
- --success: #48bb78;
7
- --danger: #f56565;
8
- --warning: #ed8936;
9
- --info: #4299e1;
10
- --light: #f8f9fa;
11
- --dark: #2d3748;
 
 
 
 
 
 
12
  }
13
-
14
  /* Base styles */
15
  body {
16
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
 
1
 
2
  :root {
3
+ --primary: #6366f1;
4
+ --primary-dark: #4f46e5;
5
+ --secondary: #f9fafb;
6
+ --success: #10b981;
7
+ --danger: #ef4444;
8
+ --warning: #f59e0b;
9
+ --info: #3b82f6;
10
+ --light: #f8fafc;
11
+ --dark: #1f2937;
12
+ }
13
+
14
+ * {
15
+ box-sizing: border-box;
16
+ margin: 0;
17
+ padding: 0;
18
  }
 
19
  /* Base styles */
20
  body {
21
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,