6
6
< meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7
7
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
8
8
9
- <!--
9
+ <!--
10
10
- primary meta tags
11
11
-->
12
12
< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css ">
16
16
< meta name ="title " content ="SkillWise ">
17
17
< meta name ="description " content ="This is a education html template made by Priya Ghosal ">
18
18
19
- <!--
19
+ <!--
20
20
- favicon
21
21
-->
22
22
< link rel ="shortcut icon " href ="./favicon.svg " type ="image/svg+xml ">
23
23
24
- <!--
24
+ <!--
25
25
- custom font link
26
26
-->
27
27
< link rel ="stylesheet " href ="./assets/font/font.css ">
28
28
29
- <!--
29
+ <!--
30
30
- custom css link
31
31
-->
32
32
< link rel ="stylesheet " href ="./assets/css/style.css " id ="theme-style ">
33
33
34
- <!--
34
+ <!--
35
35
-dark mode css link disabled
36
36
-->
37
37
<!-- <link rel="stylesheet" href="./assets/css/darkmode.css" id="theme-style" > -->
38
38
39
- <!--
39
+ <!--
40
40
- preload images
41
41
-->
42
42
< link rel ="preload " as ="image " href ="./assets/images/hero-banner.png ">
49
49
50
50
< body >
51
51
52
- <!--
52
+ <!--
53
53
- PRELOADER
54
54
-->
55
55
60
60
61
61
62
62
63
- <!--
63
+ <!--
64
64
- #HEADER
65
65
-->
66
66
< header class ="header " data-header >
119
119
</ li >
120
120
< li class ="navbar-item ">
121
121
< div class ="searchBox ">
122
- < input class ="searchInput " id = "search-bar " type ="text " name ="" placeholder ="Search something ">
122
+ < input class ="searchInput " id = "search-bar " type ="text " name ="" placeholder ="Search courses ">
123
123
< button onclick ="searchCourses() " class ="searchButton SearchBTN " href ="# ">
124
124
< div id ="search-results "> </ div >
125
125
< svg xmlns ="http://www.w3.org/2000/svg " width ="20 " height ="20 " viewBox ="0 0 29 29 " fill ="none ">
126
-
126
+
127
127
< g clip-path ="url(#clip0_2_17) ">
128
128
< g filter ="url(#filter0_d_2_17) ">
129
129
< path
150
150
</ clipPath >
151
151
</ defs >
152
152
</ svg >
153
-
153
+
154
154
</ button >
155
155
</ div >
156
156
</ li >
177
177
< main >
178
178
< article >
179
179
180
- <!--
180
+ <!--
181
181
- #HERO
182
182
-->
183
183
@@ -258,7 +258,7 @@ <h3>Your Email</h3>
258
258
259
259
260
260
261
- <!--
261
+ <!--
262
262
- #CATEGORY
263
263
-->
264
264
@@ -402,7 +402,7 @@ <h3 class="title-lg">Finances</h3>
402
402
403
403
404
404
405
- <!--
405
+ <!--
406
406
- #ABOUT
407
407
-->
408
408
@@ -477,7 +477,7 @@ <h2 class="headline-md section-title">
477
477
478
478
479
479
480
- <!--
480
+ <!--
481
481
- #COURSE
482
482
-->
483
483
@@ -825,7 +825,7 @@ <h3 class="title-lg card-title">
825
825
826
826
827
827
828
- <!--
828
+ <!--
829
829
- #CTA
830
830
-->
831
831
@@ -928,7 +928,7 @@ <h2 id="Trust">Trusted by Organizations</h2>
928
928
</ div >
929
929
930
930
931
- <!--
931
+ <!--
932
932
- #BLOG
933
933
-->
934
934
@@ -1009,7 +1009,7 @@ <h3 class="title-lg card-title">
1009
1009
</ section >
1010
1010
1011
1011
1012
- <!--
1012
+ <!--
1013
1013
- #PRICING
1014
1014
-->
1015
1015
@@ -1124,7 +1124,7 @@ <h5> Starting at $2,000.00 per month.
1124
1124
</ div >
1125
1125
</ section >
1126
1126
1127
- <!--
1127
+ <!--
1128
1128
#Testimonials
1129
1129
-->
1130
1130
@@ -1177,23 +1177,23 @@ <h3 class="title-lg card-title">Emily Johnson</h3>
1177
1177
</ div >
1178
1178
</ li >
1179
1179
</ ul >
1180
-
1180
+
1181
1181
< div class ="button-container ">
1182
1182
< a href ="./pages/testimonials.html " class ="btn btn-primary " data-aos ="zoom-in "> See All Testimonials</ a >
1183
1183
</ div >
1184
-
1184
+
1185
1185
</ div >
1186
1186
1187
1187
</ section >
1188
-
1188
+
1189
1189
< section id ="events " class ="section events " aria-labelledby ="events-label ">
1190
1190
< div class ="container ">
1191
1191
< p class ="title-sm text-center section-subtitle " id ="events-label "> Upcoming Workshops</ p >
1192
-
1192
+
1193
1193
< h2 class ="headline-md text-center section-title " data-aos ="fade-down ">
1194
1194
Join Our Skill Development < span class ="span has-after "> Events</ span >
1195
1195
</ h2 >
1196
-
1196
+
1197
1197
< div class ="event-list ">
1198
1198
<!-- Event 1 -->
1199
1199
< div class ="event-item " data-aos ="fade-right ">
@@ -1207,7 +1207,7 @@ <h3 class="event-title">Web Development Bootcamp</h3>
1207
1207
</ div >
1208
1208
< a href ="# " class ="event-button "> View Event</ a >
1209
1209
</ div >
1210
-
1210
+
1211
1211
<!-- Event 2 -->
1212
1212
< div class ="event-item " data-aos ="fade-right ">
1213
1213
< div class ="event-date-box ">
@@ -1220,7 +1220,7 @@ <h3 class="event-title">Data Science Workshop</h3>
1220
1220
</ div >
1221
1221
< a href ="# " class ="event-button "> View Event</ a >
1222
1222
</ div >
1223
-
1223
+
1224
1224
<!-- Event 3 -->
1225
1225
< div class ="event-item " data-aos ="fade-right ">
1226
1226
< div class ="event-date-box ">
@@ -1234,16 +1234,16 @@ <h3 class="event-title">Creative Design Thinking</h3>
1234
1234
< a href ="# " class ="event-button "> View Event</ a >
1235
1235
</ div >
1236
1236
</ div >
1237
-
1237
+
1238
1238
< div class ="button-container ">
1239
1239
< a href ="./pages/events.html " class ="btn btn-primary see-all " data-aos ="zoom-in "> View All Workshops</ a >
1240
1240
</ div >
1241
1241
</ div >
1242
1242
</ section >
1243
-
1244
-
1245
-
1246
-
1243
+
1244
+
1245
+
1246
+
1247
1247
1248
1248
</ article >
1249
1249
</ main >
@@ -1310,7 +1310,7 @@ <h3 class="event-title">Creative Design Thinking</h3>
1310
1310
< img src ="./assets/images/youtube.svg " width ="40 " height ="40 " loading ="lazy " alt ="Youtube ">
1311
1311
</ a >
1312
1312
</ li >
1313
-
1313
+
1314
1314
1315
1315
</ ul >
1316
1316
@@ -1441,17 +1441,17 @@ <h3 class="event-title">Creative Design Thinking</h3>
1441
1441
-->
1442
1442
1443
1443
< section id ="contact " class ="cta " aria-labelledby ="cta-label ">
1444
-
1444
+
1445
1445
< div class ="container " style ="align-items: center;
1446
1446
justify-content: center;
1447
1447
display: flex;
1448
1448
flex-direction: column;
1449
1449
gap: 10px; ">
1450
-
1450
+
1451
1451
< h2 class ="headline-md section-title " id ="cta-label " data-aos ="fade-right " style ="font-size: clamp(4rem, 100px, 3vw); ">
1452
1452
Contact Us.
1453
1453
</ h2 >
1454
-
1454
+
1455
1455
< form id ="contact-form " data-aos ="fade-left " style ="
1456
1456
max-width: 90%;
1457
1457
width: 400px;
@@ -1463,7 +1463,7 @@ <h2 class="headline-md section-title" id="cta-label" data-aos="fade-right" style
1463
1463
" onmouseover ="this.style.boxShadow='0 10px 20px rgba(0, 0, 0, 0.2)' "
1464
1464
onmouseout ="this.style.boxShadow='0 6px 12px rgba(0, 0, 0, 0.15)' ">
1465
1465
1466
- < input type ="text " name ="name " placeholder ="Your Name " required required pattern ="[a-zA-Z ]+ " oninvalid ="this.setCustomValidity('Numbers and Symbols are not allowed') "
1466
+ < input type ="text " name ="name " placeholder ="Your Name " required required pattern ="[a-zA-Z ]+ " oninvalid ="this.setCustomValidity('Numbers and Symbols are not allowed') "
1467
1467
oninput ="this.setCustomValidity('') " style ="
1468
1468
width: 100%;
1469
1469
padding: 12px;
@@ -1502,9 +1502,9 @@ <h2 class="headline-md section-title" id="cta-label" data-aos="fade-right" style
1502
1502
height: 150px;
1503
1503
resize: none;
1504
1504
transition: border-color 0.3s ease, box-shadow 0.3s ease;
1505
- " onfocus ="this.style.borderColor='#ff66b2'; this.style.boxShadow='0 0 10px rgba(255, 102, 178, 0.3)' "
1505
+ " onfocus ="this.style.borderColor='#ff66b2'; this.style.boxShadow='0 0 10px rgba(255, 102, 178, 0.3)' "
1506
1506
onblur ="this.style.borderColor='#ccc'; this.style.boxShadow='none' "> </ textarea >
1507
-
1507
+
1508
1508
< button type ="submit " style ="
1509
1509
background-color: #ff66b2;
1510
1510
color: white;
@@ -1542,33 +1542,55 @@ <h2 class="headline-md section-title" id="cta-label" data-aos="fade-right" style
1542
1542
1543
1543
<!--JS for searching courses -->
1544
1544
< script >
1545
-
1546
- // Define searchCourses function
1547
- function searchCourses ( ) {
1548
- const searchTerm = document . getElementById ( 'search-bar' ) . value . toLowerCase ( ) ;
1549
- const courses = document . querySelectorAll ( '.category-card' ) ;
1550
- const resultsDiv = document . getElementById ( 'search-results' ) ;
1551
- resultsDiv . innerHTML = '' ; // Clear previous results
1552
- let found = false ; // Flag to track if any course is found
1553
-
1554
- courses . forEach ( ( course ) => {
1555
- const courseTitle = course . querySelector ( '.title-lg' ) . innerText . toLowerCase ( ) ;
1556
- if ( courseTitle . includes ( searchTerm ) ) {
1557
- const resultCard = course . cloneNode ( true ) ; // Clone the course card
1558
- resultsDiv . appendChild ( resultCard ) ; // Show matching result at the top
1559
- found = true ; // Set flag to true if a course is found
1560
- }
1561
- } ) ;
1562
-
1563
- // If no courses match, show "No results found"
1564
- if ( ! found ) {
1565
- resultsDiv . innerHTML = '<p>No results found</p>' ;
1545
+
1546
+ document . addEventListener ( "DOMContentLoaded" , ( ) => {
1547
+ const searchInput = document . getElementById ( 'search-bar' ) ;
1548
+
1549
+ // Add event listener for Enter key press
1550
+ searchInput . addEventListener ( 'keypress' , ( event ) => {
1551
+ if ( event . key === 'Enter' ) {
1552
+ event . preventDefault ( ) ; // Prevent form submission if inside a form
1553
+ searchCourses ( ) ; // Call the search function
1566
1554
}
1555
+ } ) ;
1556
+ } ) ;
1557
+
1558
+ function searchCourses ( ) {
1559
+ const searchTerm = document . getElementById ( 'search-bar' ) . value . toLowerCase ( ) ;
1560
+ const courses = document . querySelectorAll ( '.category-card' ) ;
1561
+ const resultsDiv = document . getElementById ( 'search-results' ) ;
1562
+ resultsDiv . innerHTML = '' ; // Clear previous results
1563
+
1564
+ // Exit early if search term is empty
1565
+ if ( ! searchTerm . trim ( ) ) {
1566
+ resultsDiv . innerHTML = '<p class="no-results">Please enter a search term</p>' ;
1567
+ return ;
1568
+ }
1569
+
1570
+ let found = false ; // Flag to track if any course is found
1571
+ const uniqueCourses = new Set ( ) ; // Set to track unique courses
1572
+
1573
+ courses . forEach ( ( course ) => {
1574
+ const courseTitle = course . querySelector ( '.title-lg' ) . innerText . toLowerCase ( ) ;
1575
+ if ( courseTitle . includes ( searchTerm ) ) {
1576
+ if ( ! uniqueCourses . has ( courseTitle ) ) {
1577
+ uniqueCourses . add ( courseTitle ) ; // Add course title to the set
1578
+ const resultCard = course . cloneNode ( true ) ; // Clone the course card
1579
+ resultsDiv . appendChild ( resultCard ) ; // Show matching result at the top
1580
+ found = true ; // Set flag to true if a course is found
1581
+ }
1582
+ }
1583
+ } ) ;
1584
+
1585
+ // If no courses match, show "No results found"
1586
+ if ( ! found ) {
1587
+ resultsDiv . innerHTML = '<p class="no-results">No results found</p>' ;
1588
+ }
1567
1589
}
1568
1590
1569
1591
</ script >
1570
1592
1571
- <!--
1593
+ <!--
1572
1594
- custom js link
1573
1595
-->
1574
1596
<!-- Custom JS Links -->
@@ -1594,7 +1616,7 @@ <h2 class="headline-md section-title" id="cta-label" data-aos="fade-right" style
1594
1616
1595
1617
< script src ="./assets/js/blogs.js "> </ script >
1596
1618
1597
- <!--
1619
+ <!--
1598
1620
- ionicon
1599
1621
-->
1600
1622
< script type ="
module "
src ="
https://unpkg.com/[email protected] /dist/ionicons/ionicons.esm.js "
> </ script >
0 commit comments