dev-Rachitgarg commited on
Commit
59948ed
·
verified ·
1 Parent(s): 3b0dfc9

make it in the single theme

Browse files
Files changed (2) hide show
  1. components/air-quality-card.js +25 -29
  2. style.css +31 -34
components/air-quality-card.js CHANGED
@@ -5,29 +5,27 @@ class AirQualityCard extends HTMLElement {
5
  this.shadowRoot.innerHTML = `
6
  <style>
7
  @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');
8
-
9
  .air-quality-card {
10
- background: rgba(0, 0, 0, 0.7);
11
  border-radius: 16px;
12
  padding: 1.5rem;
13
- box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
14
- border: 1px solid rgba(0, 255, 255, 0.3);
15
  backdrop-filter: blur(10px);
16
- color: #00ffff;
17
- font-family: 'Orbitron', sans-serif;
18
  position: relative;
19
  overflow: hidden;
20
  }
21
-
22
- .air-quality-card::before {
23
  content: '';
24
  position: absolute;
25
  top: -50%;
26
  left: -50%;
27
  width: 200%;
28
  height: 200%;
29
- background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
30
- animation: rotate 20s linear infinite;
31
  z-index: -1;
32
  }
33
 
@@ -40,11 +38,11 @@ class AirQualityCard extends HTMLElement {
40
  font-size: 1.5rem;
41
  font-weight: 700;
42
  margin-bottom: 1.5rem;
43
- color: #00ffff;
44
  display: flex;
45
  align-items: center;
46
- text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
47
- }
48
 
49
  .card-title i {
50
  margin-right: 0.75rem;
@@ -62,19 +60,19 @@ class AirQualityCard extends HTMLElement {
62
  border-radius: 12px;
63
  padding: 1rem;
64
  border: 1px solid rgba(0, 255, 255, 0.2);
65
- box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
66
- transition: all 0.3s ease;
67
  }
68
 
69
  .metric:hover {
70
  transform: translateY(-5px);
71
- box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
72
- }
73
 
74
  .metric-title {
75
  font-size: 0.9rem;
76
- color: rgba(0, 255, 255, 0.8);
77
- margin-bottom: 0.5rem;
78
  text-transform: uppercase;
79
  letter-spacing: 1px;
80
  }
@@ -95,13 +93,13 @@ class AirQualityCard extends HTMLElement {
95
  font-size: 1.8rem;
96
  font-weight: 700;
97
  color: white;
98
- text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
99
- }
100
 
101
  .metric-subtext {
102
  font-size: 0.75rem;
103
- color: rgba(0, 255, 255, 0.6);
104
- margin-top: 0.5rem;
105
  }
106
 
107
  .gauge {
@@ -118,12 +116,10 @@ class AirQualityCard extends HTMLElement {
118
  border-radius: 4px 4px 0 0;
119
  transition: height 1s ease-out;
120
  }
121
-
122
- .co2-gauge { background: linear-gradient(to top, #00ff88, #00ffff); }
123
- .smoke-gauge { background: linear-gradient(to top, #ffaa00, #ff5500); }
124
- .aqi-gauge { background: linear-gradient(to top, #5500ff, #aa00ff); }
125
-
126
- .gauge-markers {
127
  position: absolute;
128
  bottom: 0;
129
  width: 100%;
 
5
  this.shadowRoot.innerHTML = `
6
  <style>
7
  @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');
 
8
  .air-quality-card {
9
+ background: var(--card-bg);
10
  border-radius: 16px;
11
  padding: 1.5rem;
12
+ box-shadow: 0 0 30px rgba(0, 201, 255, 0.2);
13
+ border: 1px solid var(--primary);
14
  backdrop-filter: blur(10px);
15
+ color: var(--primary);
16
+ font-family: 'Poppins', sans-serif;
17
  position: relative;
18
  overflow: hidden;
19
  }
20
+ .air-quality-card::before {
 
21
  content: '';
22
  position: absolute;
23
  top: -50%;
24
  left: -50%;
25
  width: 200%;
26
  height: 200%;
27
+ background: radial-gradient(circle, rgba(0, 201, 255, 0.1) 0%, transparent 70%);
28
+ animation: rotate 20s linear infinite;
29
  z-index: -1;
30
  }
31
 
 
38
  font-size: 1.5rem;
39
  font-weight: 700;
40
  margin-bottom: 1.5rem;
41
+ color: var(--primary);
42
  display: flex;
43
  align-items: center;
44
+ text-shadow: 0 0 10px rgba(0, 201, 255, 0.5);
45
+ }
46
 
47
  .card-title i {
48
  margin-right: 0.75rem;
 
60
  border-radius: 12px;
61
  padding: 1rem;
62
  border: 1px solid rgba(0, 255, 255, 0.2);
63
+ box-shadow: 0 0 15px rgba(0, 201, 255, 0.1);
64
+ transition: all 0.3s ease;
65
  }
66
 
67
  .metric:hover {
68
  transform: translateY(-5px);
69
+ box-shadow: 0 0 25px rgba(0, 201, 255, 0.3);
70
+ }
71
 
72
  .metric-title {
73
  font-size: 0.9rem;
74
+ color: rgba(0, 201, 255, 0.8);
75
+ margin-bottom: 0.5rem;
76
  text-transform: uppercase;
77
  letter-spacing: 1px;
78
  }
 
93
  font-size: 1.8rem;
94
  font-weight: 700;
95
  color: white;
96
+ text-shadow: 0 0 10px rgba(0, 201, 255, 0.7);
97
+ }
98
 
99
  .metric-subtext {
100
  font-size: 0.75rem;
101
+ color: rgba(0, 201, 255, 0.6);
102
+ margin-top: 0.5rem;
103
  }
104
 
105
  .gauge {
 
116
  border-radius: 4px 4px 0 0;
117
  transition: height 1s ease-out;
118
  }
119
+ .co2-gauge { background: linear-gradient(to top, var(--success), var(--primary)); }
120
+ .smoke-gauge { background: linear-gradient(to top, var(--warning), var(--danger)); }
121
+ .aqi-gauge { background: linear-gradient(to top, #0099ff, var(--primary)); }
122
+ .gauge-markers {
 
 
123
  position: absolute;
124
  bottom: 0;
125
  width: 100%;
style.css CHANGED
@@ -1,34 +1,35 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Orbitron:wght@400;600&display=swap');
 
2
  :root {
3
- --primary: #4f46e5;
4
- --primary-dark: #4338ca;
5
- --secondary: #10b981;
6
- --danger: #dc2626;
7
- --warning: #d97706;
8
- --success: #059669;
9
- --info: #2563eb;
10
- --dark: #1e293b;
11
- --light: #ffffff;
12
  --muted: #64748b;
 
 
13
  }
14
 
15
  body {
16
  font-family: 'Poppins', sans-serif;
17
- background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
18
  min-height: 100vh;
19
- color: #1e293b;
20
  }
21
-
22
  .glass-card {
23
- background: rgba(255, 255, 255, 0.9);
24
  backdrop-filter: blur(10px);
25
  -webkit-backdrop-filter: blur(10px);
26
- box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
27
  transition: all 0.3s ease;
28
- border: 1px solid rgba(203, 213, 225, 0.3);
29
  }
30
  .glass-card:hover {
31
- box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
32
  transform: translateY(-2px);
33
  }
34
  .led {
@@ -39,32 +40,31 @@ body {
39
  transition: all 0.3s ease;
40
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
41
  }
42
-
43
  .led-green {
44
- background-color: #10b981;
45
- border: 1px solid #059669;
46
  }
47
 
48
  .led-yellow {
49
- background-color: #f59e0b;
50
- border: 1px solid #d97706;
51
  }
52
 
53
  .led-red {
54
- background-color: #ef4444;
55
- border: 1px solid #dc2626;
56
  }
57
 
58
  .led-active-green {
59
- box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
60
  }
61
 
62
  .led-active-yellow {
63
- box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
64
  }
65
 
66
  .led-active-red {
67
- box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
68
  }
69
  .led-pulse {
70
  animation: pulse 1.5s infinite;
@@ -145,20 +145,18 @@ body {
145
  ::-webkit-scrollbar {
146
  width: 8px;
147
  }
148
-
149
  ::-webkit-scrollbar-track {
150
- background: rgba(255, 255, 255, 0.05);
151
  }
152
 
153
  ::-webkit-scrollbar-thumb {
154
- background: rgba(255, 255, 255, 0.2);
155
  border-radius: 4px;
156
  }
157
 
158
  ::-webkit-scrollbar-thumb:hover {
159
- background: rgba(255, 255, 255, 0.3);
160
  }
161
-
162
  /* Animations */
163
  @keyframes fadeIn {
164
  from { opacity: 0; transform: translateY(10px); }
@@ -171,7 +169,6 @@ body {
171
 
172
  /* Glow effects */
173
  .glow-primary {
174
- box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
175
  }
176
-
177
  .g
 
1
+
2
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
3
  :root {
4
+ --primary: #00c9ff;
5
+ --primary-dark: #00a8ff;
6
+ --secondary: #00ffaa;
7
+ --danger: #ff3d3d;
8
+ --warning: #ffaa00;
9
+ --success: #00ff88;
10
+ --dark: #0f172a;
11
+ --light: #f8fafc;
 
12
  --muted: #64748b;
13
+ --card-bg: rgba(15, 23, 42, 0.8);
14
+ --card-border: rgba(0, 201, 255, 0.3);
15
  }
16
 
17
  body {
18
  font-family: 'Poppins', sans-serif;
19
+ background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
20
  min-height: 100vh;
21
+ color: #f8fafc;
22
  }
 
23
  .glass-card {
24
+ background: var(--card-bg);
25
  backdrop-filter: blur(10px);
26
  -webkit-backdrop-filter: blur(10px);
27
+ box-shadow: 0 4px 30px 0 rgba(0, 201, 255, 0.1);
28
  transition: all 0.3s ease;
29
+ border: 1px solid var(--card-border);
30
  }
31
  .glass-card:hover {
32
+ box-shadow: 0 8px 40px 0 rgba(0, 201, 255, 0.2);
33
  transform: translateY(-2px);
34
  }
35
  .led {
 
40
  transition: all 0.3s ease;
41
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
42
  }
 
43
  .led-green {
44
+ background-color: var(--success);
45
+ border: 1px solid #00d494;
46
  }
47
 
48
  .led-yellow {
49
+ background-color: var(--warning);
50
+ border: 1px solid #e69500;
51
  }
52
 
53
  .led-red {
54
+ background-color: var(--danger);
55
+ border: 1px solid #ff2e2e;
56
  }
57
 
58
  .led-active-green {
59
+ box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
60
  }
61
 
62
  .led-active-yellow {
63
+ box-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
64
  }
65
 
66
  .led-active-red {
67
+ box-shadow: 0 0 15px rgba(255, 61, 61, 0.5);
68
  }
69
  .led-pulse {
70
  animation: pulse 1.5s infinite;
 
145
  ::-webkit-scrollbar {
146
  width: 8px;
147
  }
 
148
  ::-webkit-scrollbar-track {
149
+ background: rgba(0, 0, 0, 0.1);
150
  }
151
 
152
  ::-webkit-scrollbar-thumb {
153
+ background: rgba(0, 201, 255, 0.4);
154
  border-radius: 4px;
155
  }
156
 
157
  ::-webkit-scrollbar-thumb:hover {
158
+ background: var(--primary);
159
  }
 
160
  /* Animations */
161
  @keyframes fadeIn {
162
  from { opacity: 0; transform: translateY(10px); }
 
169
 
170
  /* Glow effects */
171
  .glow-primary {
172
+ box-shadow: 0 0 15px rgba(0, 201, 255, 0.5);
173
  }
 
174
  .g