Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24,719 changes: 24,719 additions & 0 deletions package-lock 2.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"markdown-it": "^14.1.0",
"marked": "^15.0.6",
"posthog-js": "^1.217.0",
"react": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.28.0",
Expand Down
13 changes: 12 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ProgressProvider } from './context/AppContext';
import 'firebaseui/dist/firebaseui.css';
import Language from './components/langauge/language';
import Practice from './components/practice/practice';
import NewPage from './pages/NewPage';
const PrivateRoute: React.FC<{ children: React.ReactElement }> = ({ children }) => {
const isAuthenticated = !!localStorage.getItem('token');
return isAuthenticated ? children : <Navigate to="/" />;
Expand All @@ -22,7 +23,7 @@ const App: React.FC = () => {
<AuthProvider>
<div className="appContainer">
{/* Render Navbar only if the current path is not the home page */}
{location.pathname !== '/' && <Navbar />}
{location.pathname !== '/' && <Navbar />}

<Routes>
<Route path="/" element={<HomePage />} />
Expand Down Expand Up @@ -56,6 +57,16 @@ const App: React.FC = () => {
</PrivateRoute>
}
/>
<Route
path="/newpage"
element={
<PrivateRoute>

<NewPage/>

</PrivateRoute>
}
/>

</Routes>

Expand Down
165 changes: 165 additions & 0 deletions src/Styles/NewPage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/*
.container {
background-color: #f7fafc;
padding: 2rem;
}

.title {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 1rem;
display: flex;
justify-content: start;
padding-top: 40px;
padding-bottom: 30px;
}

.topics-container {
display: flex;
flex-direction: column;
gap: 1rem;
}

.topic {
border: 1px solid #d1d5db;
padding: 1rem;
border-radius: 0.5rem;
}

.topic-title {
font-weight: 600;
margin-bottom: 0.5rem;
cursor: pointer;
}

.subtopic {
border: 1px solid #d1d5db;
padding: 0.5rem;
border-radius: 0.5rem;
margin-bottom: 0.5rem;
cursor: pointer;
}

.challenge {
border: 1px solid #d1d5db;
padding: 0.5rem;
border-radius: 0.5rem;
margin-bottom: 0.5rem;
cursor: pointer;
}

.start-learning {
background-color: #3b82f6;
color: white;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
margin-top: 1rem;
cursor: pointer;
display: end;
}
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: Arial, sans-serif;
background-color: #f7fafc;
}

.container {
background-color: #f7fafc;
padding: 2rem;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh; /* Ensures full viewport height */
position: relative;
}

.title {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 1rem;
width: 100%;
text-align: center;
}

.topics-container {
width: 100%;
display: flex;
flex-direction: column;
gap: 1rem;
max-height: 70vh; /* Restricts scrolling area */
overflow-y: auto; /* Enables scrolling */
padding-bottom: 60px; /* Space for button */
}

.topic {
border: 1px solid #d1d5db;
padding: 1rem;
border-radius: 0.5rem;
background: white;
}

.topic-title {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: 0.5rem;
cursor: pointer;
}

.subtopics-container {
margin-left: 1rem;
padding-top: 1rem;
}

.subtopic {
border: 1px solid #d1d5db;
padding: 0.5rem;
border-radius: 0.5rem;
margin-bottom: 0.5rem;
background: #f1f5f9;
}

.subtopic-title {
font-weight: 550;
cursor: pointer;
color: #374151;
}

.challenges-container {
margin-left: 1rem;
padding-top: 0.5rem;
}

.challenge {
border: 1px solid #d1d5db;
padding: 0.5rem;
border-radius: 0.5rem;
margin-bottom: 0.5rem;
cursor: pointer;
background: #e2e8f0;
}

/* Sticky Button */
.start-learning {
background-color: #3b82f6;
color: white;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
cursor: pointer;
font-size: 1rem;
font-weight: 500;
transition: background 0.3s ease;
position: sticky;
bottom: 10px; /* Makes it visible when scrolling */
align-self: center;
z-index: 1000;
}

.start-learning:hover {
background-color: #2563eb;
}
Loading