Ghostgim commited on
Commit
b57b902
·
verified ·
1 Parent(s): c8d027c

OKay now you can add links to all of the 15 services, and , let each service be open on a new tab

Browse files
Files changed (2) hide show
  1. components/service-card.js +22 -10
  2. index.html +31 -1
components/service-card.js CHANGED
@@ -1,9 +1,24 @@
 
1
  class ServiceCard extends HTMLElement {
2
  connectedCallback() {
3
  const icon = this.getAttribute('icon') || 'code';
4
  const title = this.getAttribute('title') || 'Service';
5
  const description = this.getAttribute('description') || 'Professional service description';
 
 
6
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  this.attachShadow({ mode: 'open' });
8
  this.shadowRoot.innerHTML = `
9
  <style>
@@ -21,17 +36,14 @@ class ServiceCard extends HTMLElement {
21
  background-color: #10b981;
22
  color: white;
23
  }
 
 
 
 
 
24
  </style>
25
- <div class="card bg-white rounded-xl shadow-md overflow-hidden hover-scale transition-all-300 animate-on-scroll">
26
- <div class="p-8">
27
- <div class="icon-container w-16 h-16 rounded-lg bg-primary-100 text-primary-500 flex items-center justify-center mb-6">
28
- <i data-feather="${icon}" class="w-8 h-8"></i>
29
- </div>
30
- <h3 class="text-xl font-bold mb-3 text-gray-800">${title}</h3>
31
- <p class="text-gray-600">${description}</p>
32
- </div>
33
- </div>
34
- `;
35
 
36
  // Initialize feather icons after component is rendered
37
  setTimeout(() => {
 
1
+
2
  class ServiceCard extends HTMLElement {
3
  connectedCallback() {
4
  const icon = this.getAttribute('icon') || 'code';
5
  const title = this.getAttribute('title') || 'Service';
6
  const description = this.getAttribute('description') || 'Professional service description';
7
+ const link = this.getAttribute('link');
8
+ const target = this.getAttribute('target') || '_self';
9
 
10
+ const content = `
11
+ <div class="card bg-white rounded-xl shadow-md overflow-hidden hover-scale transition-all-300 animate-on-scroll">
12
+ <div class="p-8">
13
+ <div class="icon-container w-16 h-16 rounded-lg bg-primary-100 text-primary-500 flex items-center justify-center mb-6">
14
+ <i data-feather="${icon}" class="w-8 h-8"></i>
15
+ </div>
16
+ <h3 class="text-xl font-bold mb-3 text-gray-800">${title}</h3>
17
+ <p class="text-gray-600">${description}</p>
18
+ </div>
19
+ </div>
20
+ `;
21
+
22
  this.attachShadow({ mode: 'open' });
23
  this.shadowRoot.innerHTML = `
24
  <style>
 
36
  background-color: #10b981;
37
  color: white;
38
  }
39
+ a {
40
+ display: block;
41
+ text-decoration: none;
42
+ color: inherit;
43
+ }
44
  </style>
45
+ ${link ? `<a href="${link}" target="${target}">${content}</a>` : content}
46
+ `;
 
 
 
 
 
 
 
 
47
 
48
  // Initialize feather icons after component is rendered
49
  setTimeout(() => {
index.html CHANGED
@@ -74,92 +74,122 @@
74
  icon="globe"
75
  title="Web Design"
76
  description="Beautiful, intuitive interfaces that engage users and reflect your brand identity."
 
 
77
  ></service-card>
78
 
79
  <service-card
80
  icon="code"
81
  title="Web Development"
82
  description="Robust, scalable websites built with modern technologies and best practices."
 
 
83
  ></service-card>
84
 
85
  <service-card
86
  icon="cpu"
87
  title="Software Development"
88
  description="Custom software solutions designed to streamline your business operations."
 
 
89
  ></service-card>
90
 
91
  <service-card
92
  icon="joystick"
93
  title="Game Development"
94
  description="Immersive gaming experiences across multiple platforms and devices."
 
 
95
  ></service-card>
96
 
97
  <service-card
98
  icon="activity"
99
  title="AI Integration"
100
  description="Smart automation and intelligence infused into your digital products."
 
 
101
  ></service-card>
102
 
103
  <service-card
104
  icon="brain"
105
  title="AI Engineering"
106
  description="Custom AI models and machine learning solutions for your specific needs."
 
 
107
  ></service-card>
108
 
109
  <service-card
110
  icon="link"
111
  title="API Integration"
112
  description="Seamless connectivity between your systems and third-party services."
 
 
113
  ></service-card>
114
 
115
  <service-card
116
  icon="shield"
117
  title="Cybersecurity"
118
  description="Comprehensive protection for your digital assets and user data."
 
 
119
  ></service-card>
120
 
121
  <service-card
122
  icon="cloud"
123
  title="Cloud Services"
124
  description="Migration, setup, and management of cloud infrastructure."
 
 
125
  ></service-card>
126
 
127
  <service-card
128
  icon="zap"
129
  title="WebAssembly"
130
  description="High-performance web applications with near-native speed."
 
 
131
  ></service-card>
132
 
133
  <service-card
134
  icon="trending-up"
135
  title="Performance Optimization"
136
  description="Faster loading, better SEO, and improved user experience."
 
 
137
  ></service-card>
138
 
139
  <service-card
140
  icon="repeat"
141
  title="Business Automation"
142
  description="Streamline workflows with no-code/low-code solutions."
 
 
143
  ></service-card>
144
 
145
  <service-card
146
  icon="globe"
147
  title="Localization"
148
  description="Multi-language support for global audience reach."
 
 
149
  ></service-card>
150
 
151
  <service-card
152
  icon="tool"
153
  title="Maintenance Plans"
154
  description="Ongoing support to keep your digital products running smoothly."
 
 
155
  ></service-card>
156
 
157
  <service-card
158
  icon="smartphone"
159
  title="App Development"
160
  description="Cross-platform mobile applications for iOS and Android."
 
 
161
  ></service-card>
162
- </div>
163
  </div>
164
  </section>
165
 
 
74
  icon="globe"
75
  title="Web Design"
76
  description="Beautiful, intuitive interfaces that engage users and reflect your brand identity."
77
+ link="https://codecraftcomplex.com/web-design"
78
+ target="_blank"
79
  ></service-card>
80
 
81
  <service-card
82
  icon="code"
83
  title="Web Development"
84
  description="Robust, scalable websites built with modern technologies and best practices."
85
+ link="https://codecraftcomplex.com/web-development"
86
+ target="_blank"
87
  ></service-card>
88
 
89
  <service-card
90
  icon="cpu"
91
  title="Software Development"
92
  description="Custom software solutions designed to streamline your business operations."
93
+ link="https://codecraftcomplex.com/software-development"
94
+ target="_blank"
95
  ></service-card>
96
 
97
  <service-card
98
  icon="joystick"
99
  title="Game Development"
100
  description="Immersive gaming experiences across multiple platforms and devices."
101
+ link="https://codecraftcomplex.com/game-development"
102
+ target="_blank"
103
  ></service-card>
104
 
105
  <service-card
106
  icon="activity"
107
  title="AI Integration"
108
  description="Smart automation and intelligence infused into your digital products."
109
+ link="https://codecraftcomplex.com/ai-integration"
110
+ target="_blank"
111
  ></service-card>
112
 
113
  <service-card
114
  icon="brain"
115
  title="AI Engineering"
116
  description="Custom AI models and machine learning solutions for your specific needs."
117
+ link="https://codecraftcomplex.com/ai-engineering"
118
+ target="_blank"
119
  ></service-card>
120
 
121
  <service-card
122
  icon="link"
123
  title="API Integration"
124
  description="Seamless connectivity between your systems and third-party services."
125
+ link="https://codecraftcomplex.com/api-integration"
126
+ target="_blank"
127
  ></service-card>
128
 
129
  <service-card
130
  icon="shield"
131
  title="Cybersecurity"
132
  description="Comprehensive protection for your digital assets and user data."
133
+ link="https://codecraftcomplex.com/cybersecurity"
134
+ target="_blank"
135
  ></service-card>
136
 
137
  <service-card
138
  icon="cloud"
139
  title="Cloud Services"
140
  description="Migration, setup, and management of cloud infrastructure."
141
+ link="https://codecraftcomplex.com/cloud-services"
142
+ target="_blank"
143
  ></service-card>
144
 
145
  <service-card
146
  icon="zap"
147
  title="WebAssembly"
148
  description="High-performance web applications with near-native speed."
149
+ link="https://codecraftcomplex.com/webassembly"
150
+ target="_blank"
151
  ></service-card>
152
 
153
  <service-card
154
  icon="trending-up"
155
  title="Performance Optimization"
156
  description="Faster loading, better SEO, and improved user experience."
157
+ link="https://codecraftcomplex.com/performance-optimization"
158
+ target="_blank"
159
  ></service-card>
160
 
161
  <service-card
162
  icon="repeat"
163
  title="Business Automation"
164
  description="Streamline workflows with no-code/low-code solutions."
165
+ link="https://codecraftcomplex.com/business-automation"
166
+ target="_blank"
167
  ></service-card>
168
 
169
  <service-card
170
  icon="globe"
171
  title="Localization"
172
  description="Multi-language support for global audience reach."
173
+ link="https://codecraftcomplex.com/localization"
174
+ target="_blank"
175
  ></service-card>
176
 
177
  <service-card
178
  icon="tool"
179
  title="Maintenance Plans"
180
  description="Ongoing support to keep your digital products running smoothly."
181
+ link="https://codecraftcomplex.com/maintenance-plans"
182
+ target="_blank"
183
  ></service-card>
184
 
185
  <service-card
186
  icon="smartphone"
187
  title="App Development"
188
  description="Cross-platform mobile applications for iOS and Android."
189
+ link="https://codecraftcomplex.com/app-development"
190
+ target="_blank"
191
  ></service-card>
192
+ </div>
193
  </div>
194
  </section>
195