Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
05aa9cb
basic home
AlbertProfe Jan 13, 2025
8dffb74
sandbox component Card
AlbertProfe Jan 13, 2025
e4c02d1
front docs add image
AlbertProfe Jan 13, 2025
e1841fb
management git-gh resources pronunciationApp v0.1 doc
AlbertProfe Jan 20, 2025
c57534b
resources pronunciationApp v0.1 images
AlbertProfe Jan 20, 2025
6ad82fe
resources pronunciationApp v0.1 images
AlbertProfe Jan 20, 2025
f25d8e3
add mui, cards, axios, hooks, useEffect and hero image
AlbertProfe Jan 20, 2025
322b112
decouple axios data api as function import
AlbertProfe Jan 20, 2025
3714946
resources image where to see
AlbertProfe Jan 20, 2025
ec64258
variant gradient css adn transition card
AlbertProfe Jan 20, 2025
a175404
doc: renaming images
AlbertProfe Jan 21, 2025
2fb3b8d
doc: words.json added
AlbertProfe Jan 21, 2025
1ebb26d
refactor: rename Hero component to Header and update imports; add new…
Antonicv Jan 26, 2025
0b2c8bf
feat: implement word filtering functionality and update API endpoints
Antonicv Jan 28, 2025
00f1ecf
fix: update image source in Header component
Antonicv Jan 28, 2025
2baf157
transition efect
Antonicv Jan 28, 2025
151fe7e
feat: add UsersList component and fetch users from API
Antonicv Jan 29, 2025
357ab2e
fix: update avatar display in UsersList component to use img tag
Antonicv Jan 29, 2025
d1a411d
style: enhance avatar display in UsersList component with improved st…
Antonicv Jan 29, 2025
db8b61f
fix: update user fetching logic and enhance avatar display in UsersLi…
Antonicv Jan 30, 2025
bb734b7
fix: update avatar size in UsersList component for better display
Antonicv Jan 30, 2025
f81ca86
feat: add animated background to UsersList component and adjust avata…
Antonicv Jan 30, 2025
0e762ad
feat: add tabbed interface for word details and synonyms in WordList …
Antonicv Jan 31, 2025
d7e19c7
fix: correct color values in WordList component for better visibility
Antonicv Jan 31, 2025
989d3b5
refactor: update comments for clarity in Cards and UsersList components
Antonicv Jan 31, 2025
2080e5f
docs: add comprehensive project documentation in Markdown format
Antonicv Feb 4, 2025
e406c74
docs: update project documentation to improve clarity and consistency
Antonicv Feb 4, 2025
60f6e80
feat: add Practice, About, Home, and NoPage components for applicatio…
Antonicv Feb 13, 2025
444f8da
feat: implement Layout component with navigation and styling
Antonicv Feb 13, 2025
969e32b
feat: restructure App component to include routing and new pages
Antonicv Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,331 changes: 1,247 additions & 84 deletions frontend/pronunciationAppFront/package-lock.json

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion frontend/pronunciationAppFront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fontsource/roboto": "^5.1.1",
"@mui/icons-material": "^6.4.0",
"@mui/material": "^6.4.1",
"@vitejs/plugin-react": "^4.3.4",
"axios": "^1.7.9",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand All @@ -23,6 +30,6 @@
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0",
"vite": "^6.0.5"
"vite": "^6.0.11"
}
}
37 changes: 3 additions & 34 deletions frontend/pronunciationAppFront/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,7 @@
text-align: center;
}

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}

.card {
padding: 2em;
}

.read-the-docs {
color: #888;
}
ul {
list-style-type: none;
}
53 changes: 22 additions & 31 deletions frontend/pronunciationAppFront/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import Cards from "./Cards.jsx"
import UsersList from './users.jsx';
import Header from "./Header.jsx";
import About from './about.jsx'
import layout from './Layout.jsx';
import nopage from './noPage.jsx';
import Practice from './Practice.jsx';
import { Route } from '@mui/icons-material';

function App() {
const [count, setCount] = useState(0)
export default function App() {

return (
<>
<div>
<a href="https://vite.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
)
}
return(
<BrowserRouter>
<Routes>
<Route path="/" element= {<Layout/>}>
<Route index element={<Home/>} />
<Route path="practice" element= {<Practive />} />
<Route path = "about" element = {<About />} />
<Route path= "*" element= {<noPage/>}/>
</Route>
</Routes>
</BrowserRouter>
);

export default App
};
23 changes: 23 additions & 0 deletions frontend/pronunciationAppFront/src/BoxAnimation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@keyframes backgroundAnimation {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}

.animated-box {
background: linear-gradient(90deg, #ff7e5f, #feb47b, #86e3ce, #d4a5a5);
background-size: 300% 300%;
animation: backgroundAnimation 6s ease infinite;
}
.animated-box:hover {
background: linear-gradient(90deg, #ff7e5f, #feb47b, #86e3ce, #d4a5a5);
background-size: 300% 300%;
animation: backgroundAnimation 0.5s ease infinite;
transform: scale(1.1);
}
8 changes: 8 additions & 0 deletions frontend/pronunciationAppFront/src/Cards.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.card {
transition: transform 0.3s ease-in-out;
}

.card:hover {
transform: scale(1.05);
}

154 changes: 154 additions & 0 deletions frontend/pronunciationAppFront/src/Cards.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import { useState, useEffect } from "react";
import {
Box,
Card,
CardContent,
Typography,
Container,
Grid,
Button,
Tabs,
Tab,
} from "@mui/material";

import { fetchWords } from "./data-api.js";

// Componente de la pestaña
function TabPanel(props) {
const { children, value, index, ...other } = props;

return (
<div
role="tabpanel"
hidden={value !== index}
id={`simple-tabpanel-${index}`}
aria-labelledby={`simple-tab-${index}`}
{...other}
>
{value === index && (
<Box sx={{ p: 3 }}>
<Typography>{children}</Typography>
</Box>
)}
</div>
);
}

export default function WordList() {
const [words, setWords] = useState([]);
const [filteredWords, setFilteredWords] = useState([]);
const [level, setLevel] = useState("ALL");
const [tabValue, setTabValue] = useState(0); // Estado para manejar las pestañas

useEffect(() => {
const getWords = async () => {
try {
const data = await fetchWords();
setWords(data);
setFilteredWords(data);
} catch (error) {
console.error("Failed to fetch words:", error);
}
};

getWords();
}, []);

// filtro de la dificultad
const handleFilter = (level) => {
setLevel(level);
if (level === "ALL") {
setFilteredWords(words);
} else {
const filtered = words.filter((word) => word.level === level);
setFilteredWords(filtered);
}
};

// cambio de pestaña
const handleTabChange = (event, newValue) => {
setTabValue(newValue);
};

return (
<Container maxWidth="md">
<Box sx={{ my: 4 }}>
<Typography
variant="h4"
component="h1"
gutterBottom
sx={{ color: "#fffff" }}
>
Word Filter
</Typography>

{/* Botones para filtrar */}
<div className="flex gap-2 mb-4">
<Button onClick={() => handleFilter("ALL")} variant="outline">
All
</Button>
<Button onClick={() => handleFilter("🟢 EASY")} variant="outline">
Easy 🟢
</Button>
<Button onClick={() => handleFilter("🟠 MEDIUM")} variant="outline">
Medium 🟠
</Button>
<Button onClick={() => handleFilter("🔴 HARD")} variant="outline">
Hard 🔴
</Button>
</div>

{/* Lista de palabras */}
<Grid container spacing={2}>
{filteredWords.map((word) => (
<Grid item xs={12} sm={6} md={4} key={word.id}>
<Card
sx={{
backgroundColor: "rgba(240, 244, 248, 0.1)",
backdropFilter: "blur(10px)",
boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
transition: "0.3s",
"&:hover": {
transform: "translateY(-5px)",
boxShadow: "0 6px 8px rgba(0, 0, 0, 0.15)",
},
}}
>
<CardContent>
<Typography
variant="h6"
component="div"
sx={{ color: "#fffff" }}
>
{word.word}
</Typography>
<Tabs
value={tabValue}
onChange={handleTabChange}
aria-label="word details tabs"
>
<Tab label="Details" />
<Tab label="Synonyms" />
</Tabs>
<TabPanel value={tabValue} index={0}>
<Typography variant="body2" sx={{ color: "#fffff" }}>
Pronunciation: {word.pronunciation} <br />
Phonetic: {word.phonetic} <br />
Theme: {word.theme} <br />
Level: {word.level}
</Typography>
</TabPanel>
<TabPanel value={tabValue} index={1}>
<Typography variant="body2" sx={{ color: "#FFFFF" }}>
Synonyms: {word.synonym}
</Typography>
</TabPanel>
</CardContent>
</Card>
</Grid>
))}
</Grid>
</Box>
</Container>
);
}
Loading