Spaces:
Runtime error
Runtime error
Update templates/index.html
Browse files- templates/index.html +14 -2
templates/index.html
CHANGED
|
@@ -115,6 +115,12 @@
|
|
| 115 |
.tab button:hover {
|
| 116 |
background-color: #444;
|
| 117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
</style>
|
| 119 |
</head>
|
| 120 |
|
|
@@ -123,7 +129,7 @@
|
|
| 123 |
<h1>Visiting Card Data Extractor</h1>
|
| 124 |
|
| 125 |
<div class="tab">
|
| 126 |
-
<button class="tablinks" onclick="openLink('https://webashalarforml-imagedataextractor2.hf.space/')">Image Extractor</button>
|
| 127 |
<button class="tablinks" onclick="openLink('https://webashalarforml-ResumeExtractor2.hf.space/')">Resume Parser Extractor</button>
|
| 128 |
</div>
|
| 129 |
|
|
@@ -176,8 +182,14 @@
|
|
| 176 |
}, 3000);
|
| 177 |
|
| 178 |
// Function to open links in the same tab
|
| 179 |
-
function openLink(url) {
|
| 180 |
window.location.href = url; // Redirects to the specified URL in the same tab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
}
|
| 182 |
</script>
|
| 183 |
</body>
|
|
|
|
| 115 |
.tab button:hover {
|
| 116 |
background-color: #444;
|
| 117 |
}
|
| 118 |
+
|
| 119 |
+
.tab button:active,
|
| 120 |
+
.tab button.active {
|
| 121 |
+
background-color: #444;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
</style>
|
| 125 |
</head>
|
| 126 |
|
|
|
|
| 129 |
<h1>Visiting Card Data Extractor</h1>
|
| 130 |
|
| 131 |
<div class="tab">
|
| 132 |
+
<button class="tablinks active" onclick="openLink('https://webashalarforml-imagedataextractor2.hf.space/')">Image Extractor</button>
|
| 133 |
<button class="tablinks" onclick="openLink('https://webashalarforml-ResumeExtractor2.hf.space/')">Resume Parser Extractor</button>
|
| 134 |
</div>
|
| 135 |
|
|
|
|
| 182 |
}, 3000);
|
| 183 |
|
| 184 |
// Function to open links in the same tab
|
| 185 |
+
function openLink(url,element) {
|
| 186 |
window.location.href = url; // Redirects to the specified URL in the same tab
|
| 187 |
+
// Remove "active" class from all buttons
|
| 188 |
+
const buttons = document.querySelectorAll('.tab button');
|
| 189 |
+
buttons.forEach(button => button.classList.remove('active'));
|
| 190 |
+
|
| 191 |
+
// Add "active" class to the clicked button
|
| 192 |
+
element.classList.add('active');
|
| 193 |
}
|
| 194 |
</script>
|
| 195 |
</body>
|