Skip to content

Commit 0d1ce1e

Browse files
committed
updated the tabs location in the varnmala page
1 parent a4acc89 commit 0d1ce1e

File tree

2 files changed

+35
-36
lines changed

2 files changed

+35
-36
lines changed

src/assets/styles/varnmala.css

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
1-
.container__varnmala {
2-
& .tabs {
3-
position: sticky;
4-
top: var(--header-height);
5-
z-index: 10;
6-
padding: 1rem;
7-
width: fit-content;
8-
border: 1px solid var(--border);
9-
border-radius: 1rem;
10-
background: var(--background);
11-
display: flex;
12-
gap: 1rem;
13-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
14-
}
1+
.tabs {
2+
z-index: 10;
3+
width: fit-content;
4+
border: 1px solid var(--border);
5+
border-radius: 1rem;
6+
background: var(--background);
7+
display: flex;
8+
gap: 1rem;
9+
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
10+
}
1511

16-
& .tab {
17-
padding: 0.5rem 2rem;
18-
font-size: 1.2rem;
19-
border-bottom: 2px solid transparent;
20-
transition: all 0.2s ease;
21-
position: relative;
22-
background: var(--background-alt);
23-
border-radius: 0.5rem;
12+
.tab {
13+
padding: 0.5rem 2rem;
14+
font-size: 1.2rem;
15+
border-bottom: 2px solid transparent;
16+
transition: all 0.2s ease;
17+
position: relative;
18+
background: var(--background-alt);
19+
border-radius: 0.5rem;
2420

25-
&:hover {
26-
background: var(--background-hover);
27-
}
21+
&:hover {
22+
background: var(--background-hover);
2823
}
24+
}
2925

30-
& .tab.active {
31-
color: var(--primary);
32-
border-bottom-color: var(--primary);
33-
background: var(--primary);
34-
color: var(--background);
35-
}
26+
.tab.active {
27+
color: var(--primary);
28+
border-bottom-color: var(--primary);
29+
background: var(--primary);
30+
color: var(--background);
31+
}
32+
33+
.container__varnmala {
3634

3735
#english,
3836
& #hindi {
3937
scroll-margin-top: calc(var(--header-height) + 80px);
4038
}
41-
}
39+
}

src/pages/varnmala.astro

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ import { varnmala_english, varnmala_hindi } from "@/utils/common";
88

99
<BaseLayout meta={{ title: "Alphabets" }}>
1010
<Fragment slot="header-right">
11+
<nav class="tabs">
12+
<button class="tab active" data-target="english">English</button>
13+
<button class="tab" data-target="hindi">Hindi</button>
14+
</nav>
1115
<Help
1216
title="Varnmala"
1317
description="Varnmala is a collection of alphabets in Hindi and English. It is used to teach kids the basics of language."
1418
/>
1519
</Fragment>
1620

1721
<article class="container__varnmala">
18-
<nav class="tabs">
19-
<button class="tab active" data-target="english">English</button>
20-
<button class="tab" data-target="hindi">Hindi</button>
21-
</nav>
22+
2223
<div id="english">
2324
<Alphabet list={varnmala_english} title="English" />
2425
</div>

0 commit comments

Comments
 (0)