Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit f21aca3

Browse files
authored
Update index.html
Signed-off-by: Blake Arnold <[email protected]>
1 parent 76ab0a3 commit f21aca3

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

index.html

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,31 @@
33
<style>
44
/* Add basic styles for tabs */
55
.tab {
6-
display: flex;
7-
cursor: pointer;
8-
padding: 10px;
9-
background-color: #f1f1f1;
10-
border: 1px solid #ccc;
11-
margin-right: 5px;
12-
}
6+
background: #f7f7f7;
7+
border: 1px solid #bbb;
8+
border-bottom: none;
9+
border-radius: 8px 8px 0 0;
10+
padding: 8px 28px;
11+
margin-right: 4px;
12+
font-family: sans-serif;
13+
font-size: 15px;
14+
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.04);
15+
cursor: pointer;
16+
position: relative;
17+
top: 1px;
18+
transition: background 0.2s;
19+
}
1320

14-
.tab:hover {
15-
background-color: #ddd;
16-
}
21+
.tab.active {
22+
background: #fff;
23+
font-weight: bold;
24+
border-color: #888 #888 #fff #888;
25+
z-index: 1;
26+
}
27+
28+
.tab:not(.active):hover {
29+
background: #ececec;
30+
}
1731

1832
.tab-content {
1933
display: none;
@@ -133,12 +147,19 @@
133147
}
134148
}
135149

136-
// Tab logic (unchanged)
150+
// Tab logic
137151
function showTabContent(tabId) {
138-
document.querySelectorAll('.tab-content').forEach(
139-
c => c.classList.remove('active'));
140-
document.getElementById(tabId).classList.add('active');
152+
document.querySelectorAll('.tab-content').forEach(
153+
c => c.classList.remove('active'));
154+
document.getElementById(tabId).classList.add('active');
155+
// Add this to update tab styling
156+
document.querySelectorAll('#tabs .tab').forEach(tab => tab.classList.remove('active'));
157+
if (tabId === 'tab1') {
158+
document.querySelectorAll('#tabs .tab')[0].classList.add('active');
159+
} else {
160+
document.querySelectorAll('#tabs .tab')[1].classList.add('active');
141161
}
162+
}
142163
</script>
143164
</html>
144165

0 commit comments

Comments
 (0)