Skip to content

Commit

Permalink
moved the controls menu to header in varnmala/english and hid record …
Browse files Browse the repository at this point in the history
…page
  • Loading branch information
Ciphrox committed Mar 1, 2025
1 parent 8793777 commit 6e7f56c
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 65 deletions.
4 changes: 2 additions & 2 deletions src/assets/styles/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
display: block;
padding: 1rem;

> .moto {
& .moto {
color: #3a8657;
font-size: 3rem;
font-size: 2rem;
}
}
21 changes: 18 additions & 3 deletions src/assets/styles/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
border-bottom: 1px solid var(--border);
height: var(--header-h);
padding: 0 1.5rem;
display: flex;
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
justify-content: space-between;

.header__brand {
display: flex;
align-items: center;
gap: 0.75rem;
justify-self: start;

.logo {
width: 2rem;
Expand All @@ -33,6 +34,7 @@

.caption {
text-align: center;
justify-self: center;

h1 {
font-size: 1.25rem;
Expand All @@ -48,14 +50,27 @@
display: flex;
gap: 1rem;
align-items: center;
justify-self: end;
justify-content: flex-end;
}
}

[slot="header-right"] {
display: flex;
align-items: center;
max-width: 33vw;
flex-wrap: nowrap;
justify-content: flex-end;
}

.controls {
flex-shrink: 0;
}

.switch {
background-color: black;
height: 2rem;
width: 2rem;
border-radius: 50%;
cursor: pointer;
}
}
115 changes: 69 additions & 46 deletions src/assets/styles/varnmala/english.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,72 @@
.container__english {

.controls {
background-color: color-mix(in srgb, var(--background) 95%, var(--text) 5%);
padding: 0.5rem 0.7rem;
z-index: 100;
display: flex;
flex-direction: row;
align-items: center;
gap: 0.8rem;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
color: var(--text);
border-radius: 4px;
margin-left: 0.5rem;
}

.control-group {
display: flex;
align-items: center;
gap: 0.5rem;
accent-color: var(--primary);
}

.control-group label {
font-weight: bold;
color: var(--text);
font-size: 0.85rem;
white-space: nowrap;
}

.control-group select {
padding: 0.35rem 0.5rem;
border-radius: 4px;
border: 1px solid var(--border);
background-color: var(--background);
color: var(--text);
font-size: 0.85rem;
max-width: 80px;
}

.control-group button {
padding: 0.4rem 0.7rem;
border-radius: 4px;
border: 1px solid var(--border);
background-color: var(--background);
color: var(--text);
font-size: 0.85rem;
cursor: pointer;
transition: all 0.3s;
white-space: nowrap;
min-width: 65px;
font-weight: 500;
}

.control-group input[type="color"] {
width: 35px;
height: 30px;
padding: 0;
border: 1px solid var(--border);
cursor: pointer;
}

.control-group button:hover,
.control-group select:hover {
background-color: color-mix(in srgb, var(--background) 90%, var(--text) 10%);
border-color: var(--primary);
transform: translateY(-1px);
}

/* Container styles */
.container__english {
& .letter {
font-size: min(100vw, 100vh);
line-height: 1;
Expand All @@ -10,50 +77,6 @@
transition: color 0.5s ease-in;
}

/* Controls styles */
& .controls {
position: relative;
background-color: color-mix(in srgb, var(--background) 95%, var(--text) 5%);
padding: 1rem;
z-index: 100;
display: flex;
justify-content: space-around;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
color: var(--text);
}

& .control-group {
display: flex;
align-items: center;
gap: 1rem;
accent-color: var(--primary);
}

& .control-group label {
font-weight: bold;
color: var(--text);
}

& .control-group select,
& .control-group button {
padding: 0.5rem;
border-radius: 4px;
border: 1px solid var(--border);
background-color: var(--background);
color: var(--text);
}

& .control-group button {
cursor: pointer;
transition: all 0.3s;
}

& .control-group button:hover,
& .control-group select:hover {
background-color: color-mix(in srgb, var(--background) 90%, var(--text) 10%);
border-color: var(--primary);
}

/* Background styles */
& .bg-gradient1 {
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
Expand Down
26 changes: 13 additions & 13 deletions src/pages/varnmala/english.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@ import BackButton from "@/components/ui/backButton.astro";

<BaseLayout meta={{ title: "English" }}>
<Fragment slot="header-right">
<Help
title="Hindi Varnmala"
description="Just press any letter fron keyboard and it display the letter and it's relative word in clear way and if you type again it will change the color"
/>
</Fragment>
<BackButton />
<article class="container__english">
<div class="controls" id="controls">
<div class="control-group">
<label>Background:</label>
<label>Bg:</label>
<select id="bgSelector">
<option value="none">None</option>
<option value="gradient1">Gradient 1</option>
<option value="gradient2">Gradient 2</option>
<option value="pattern1">Pattern 1</option>
<option value="gradient1">G1</option>
<option value="gradient2">G2</option>
<option value="pattern1">P1</option>
</select>
<button id="toggleBg">Toggle Background</button>
<button id="toggleBg">Toggle</button>
</div>

<div class="control-group">
<label>Font:</label>
<select id="fontSelector">
<option value="Arial">Arial</option>
<option value="Georgia">Georgia</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Times New Roman">Times</option>
</select>
<input type="color" id="colorPicker" value="#000000" />
</div>
</div>
<Help
title="Hindi Varnmala"
description="Just press any letter fron keyboard and it display the letter and it's relative word in clear way and if you type again it will change the color"
/>
</Fragment>
<BackButton />
<article class="container__english">
<article class="container__hindi" id="letterContainer">
<div class="letter">A</div>
</article>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const NavbarLinks: LinkProps[] = [
title: "Record",
path: "/record",
icon: RecordIcon,
isActive: true
isActive: false
},
{
name: "Alphabets",
Expand Down

0 comments on commit 6e7f56c

Please sign in to comment.