feat: test

This commit is contained in:
2026-01-20 13:11:20 +00:00
parent 9180187748
commit f64ac403fd
35 changed files with 10338 additions and 343 deletions

View File

@@ -2,7 +2,8 @@
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1, "version": 1,
"cli": { "cli": {
"packageManager": "npm" "packageManager": "npm",
"analytics": false
}, },
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
@@ -68,6 +69,74 @@
"builder": "@angular/build:unit-test" "builder": "@angular/build:unit-test"
} }
} }
},
"maktapp.student": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "projects/maktapp.student",
"sourceRoot": "projects/maktapp.student/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular/build:application",
"options": {
"browser": "projects/maktapp.student/src/main.ts",
"tsConfig": "projects/maktapp.student/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "projects/maktapp.student/public"
}
],
"styles": [
"projects/maktapp.student/src/styles.scss"
]
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "maktapp.student:build:production"
},
"development": {
"buildTarget": "maktapp.student:build:development"
}
},
"defaultConfiguration": "development"
},
"test": {
"builder": "@angular/build:unit-test"
}
}
} }
} }
} }

43
blueprint.md Normal file
View File

@@ -0,0 +1,43 @@
# Maktapp.Student - Student Learning Dashboard
## Overview
Maktapp.Student is a personalized learning dashboard for students on an online education platform. The application provides a focused and distraction-free environment where students can access their enrolled courses, track their progress, and complete lessons.
## Features
* **Authentication:** Secure login for students.
* **Student Dashboard:** A personalized view of enrolled courses and progress.
* **Course Pages:** Detailed view of course content, including modules and lessons.
* **Lesson Pages:** Dedicated pages for different lesson types (text, video, quiz, homework).
* **Modern UI/UX:** A clean, minimal, and responsive design focused on learning.
## Development Plan
### Phase 1: Project Setup and Authentication
* **DONE** Initialize the Angular application.
* **DONE** Create the `blueprint.md` file.
* Create a `Login` component for user authentication.
* Set up the basic routing for the application.
* Style the login page with a minimal and modern design.
### Phase 2: Student Dashboard
* Create a `Dashboard` component to display the student's enrolled courses.
* Create a `CourseCard` component to display individual course information.
* Implement a progress indicator for each course.
* Add an "empty state" message for students with no enrolled courses.
### Phase 3: Course and Lesson Pages
* Create a `Course` component to display the course details and module list.
* Create a `Module` component to display the lessons within a module.
* Create `Lesson` components for different lesson types (text, video, quiz, homework).
* Implement collapsible/expandable modules.
### Phase 4: Navigation and Final Touches
* Implement a sidebar for navigation.
* Add breadcrumbs for easy navigation within courses.
* Refine the overall styling and user experience.

8652
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,342 +1 @@
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->
<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->
<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * Delete the template below * * * * * * * * * -->
<!-- * * * * * * * to get started with your project! * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<style>
:host {
--bright-blue: oklch(51.01% 0.274 263.83);
--electric-violet: oklch(53.18% 0.28 296.97);
--french-violet: oklch(47.66% 0.246 305.88);
--vivid-pink: oklch(69.02% 0.277 332.77);
--hot-red: oklch(61.42% 0.238 15.34);
--orange-red: oklch(63.32% 0.24 31.68);
--gray-900: oklch(19.37% 0.006 300.98);
--gray-700: oklch(36.98% 0.014 302.71);
--gray-400: oklch(70.9% 0.015 304.04);
--red-to-pink-to-purple-vertical-gradient: linear-gradient(
180deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);
--red-to-pink-to-purple-horizontal-gradient: linear-gradient(
90deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);
--pill-accent: var(--bright-blue);
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
h1 {
font-size: 3.125rem;
color: var(--gray-900);
font-weight: 500;
line-height: 100%;
letter-spacing: -0.125rem;
margin: 0;
font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
}
p {
margin: 0;
color: var(--gray-700);
}
main {
width: 100%;
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
box-sizing: inherit;
position: relative;
}
.angular-logo {
max-width: 9.2rem;
}
.content {
display: flex;
justify-content: space-around;
width: 100%;
max-width: 700px;
margin-bottom: 3rem;
}
.content h1 {
margin-top: 1.75rem;
}
.content p {
margin-top: 1.5rem;
}
.divider {
width: 1px;
background: var(--red-to-pink-to-purple-vertical-gradient);
margin-inline: 0.5rem;
}
.pill-group {
display: flex;
flex-direction: column;
align-items: start;
flex-wrap: wrap;
gap: 1.25rem;
}
.pill {
display: flex;
align-items: center;
--pill-accent: var(--bright-blue);
background: color-mix(in srgb, var(--pill-accent) 5%, transparent);
color: var(--pill-accent);
padding-inline: 0.75rem;
padding-block: 0.375rem;
border-radius: 2.75rem;
border: 0;
transition: background 0.3s ease;
font-family: var(--inter-font);
font-size: 0.875rem;
font-style: normal;
font-weight: 500;
line-height: 1.4rem;
letter-spacing: -0.00875rem;
text-decoration: none;
white-space: nowrap;
}
.pill:hover {
background: color-mix(in srgb, var(--pill-accent) 15%, transparent);
}
.pill-group .pill:nth-child(6n + 1) {
--pill-accent: var(--bright-blue);
}
.pill-group .pill:nth-child(6n + 2) {
--pill-accent: var(--electric-violet);
}
.pill-group .pill:nth-child(6n + 3) {
--pill-accent: var(--french-violet);
}
.pill-group .pill:nth-child(6n + 4),
.pill-group .pill:nth-child(6n + 5),
.pill-group .pill:nth-child(6n + 6) {
--pill-accent: var(--hot-red);
}
.pill-group svg {
margin-inline-start: 0.25rem;
}
.social-links {
display: flex;
align-items: center;
gap: 0.73rem;
margin-top: 1.5rem;
}
.social-links path {
transition: fill 0.3s ease;
fill: var(--gray-400);
}
.social-links a:hover svg path {
fill: var(--gray-900);
}
@media screen and (max-width: 650px) {
.content {
flex-direction: column;
width: max-content;
}
.divider {
height: 1px;
width: 100%;
background: var(--red-to-pink-to-purple-horizontal-gradient);
margin-block: 1.5rem;
}
}
</style>
<main class="main">
<div class="content">
<div class="left-side">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 982 239"
fill="none"
class="angular-logo"
>
<g clip-path="url(#a)">
<path
fill="url(#b)"
d="M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z"
/>
<path
fill="url(#c)"
d="M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z"
/>
</g>
<defs>
<radialGradient
id="c"
cx="0"
cy="0"
r="1"
gradientTransform="rotate(118.122 171.182 60.81) scale(205.794)"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#FF41F8" />
<stop offset=".707" stop-color="#FF41F8" stop-opacity=".5" />
<stop offset="1" stop-color="#FF41F8" stop-opacity="0" />
</radialGradient>
<linearGradient
id="b"
x1="0"
x2="982"
y1="192"
y2="192"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#F0060B" />
<stop offset="0" stop-color="#F0070C" />
<stop offset=".526" stop-color="#CC26D5" />
<stop offset="1" stop-color="#7702FF" />
</linearGradient>
<clipPath id="a"><path fill="#fff" d="M0 0h982v239H0z" /></clipPath>
</defs>
</svg>
<h1>Hello, {{ title() }}</h1>
<p>Congratulations! Your app is running. 🎉</p>
</div>
<div class="divider" role="separator" aria-label="Divider"></div>
<div class="right-side">
<div class="pill-group">
@for (item of [
{ title: 'Explore the Docs', link: 'https://angular.dev' },
{ title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' },
{ title: 'Prompt and best practices for AI', link: 'https://angular.dev/ai/develop-with-ai'},
{ title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },
{ title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' },
{ title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' },
]; track item.title) {
<a
class="pill"
[href]="item.link"
target="_blank"
rel="noopener"
>
<span>{{ item.title }}</span>
<svg
xmlns="http://www.w3.org/2000/svg"
height="14"
viewBox="0 -960 960 960"
width="14"
fill="currentColor"
>
<path
d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"
/>
</svg>
</a>
}
</div>
<div class="social-links">
<a
href="https://github.com/angular/angular"
aria-label="Github"
target="_blank"
rel="noopener"
>
<svg
width="25"
height="24"
viewBox="0 0 25 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
alt="Github"
>
<path
d="M12.3047 0C5.50634 0 0 5.50942 0 12.3047C0 17.7423 3.52529 22.3535 8.41332 23.9787C9.02856 24.0946 9.25414 23.7142 9.25414 23.3871C9.25414 23.0949 9.24389 22.3207 9.23876 21.2953C5.81601 22.0377 5.09414 19.6444 5.09414 19.6444C4.53427 18.2243 3.72524 17.8449 3.72524 17.8449C2.61064 17.082 3.81137 17.0973 3.81137 17.0973C5.04697 17.1835 5.69604 18.3647 5.69604 18.3647C6.79321 20.2463 8.57636 19.7029 9.27978 19.3881C9.39052 18.5924 9.70736 18.0499 10.0591 17.7423C7.32641 17.4347 4.45429 16.3765 4.45429 11.6618C4.45429 10.3185 4.9311 9.22133 5.72065 8.36C5.58222 8.04931 5.16694 6.79833 5.82831 5.10337C5.82831 5.10337 6.85883 4.77319 9.2121 6.36459C10.1965 6.09082 11.2424 5.95546 12.2883 5.94931C13.3342 5.95546 14.3801 6.09082 15.3644 6.36459C17.7023 4.77319 18.7328 5.10337 18.7328 5.10337C19.3942 6.79833 18.9789 8.04931 18.8559 8.36C19.6403 9.22133 20.1171 10.3185 20.1171 11.6618C20.1171 16.3888 17.2409 17.4296 14.5031 17.7321C14.9338 18.1012 15.3337 18.8559 15.3337 20.0084C15.3337 21.6552 15.3183 22.978 15.3183 23.3779C15.3183 23.7009 15.5336 24.0854 16.1642 23.9623C21.0871 22.3484 24.6094 17.7341 24.6094 12.3047C24.6094 5.50942 19.0999 0 12.3047 0Z"
/>
</svg>
</a>
<a
href="https://x.com/angular"
aria-label="X"
target="_blank"
rel="noopener"
>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
alt="X"
>
<path
d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
/>
</svg>
</a>
<a
href="https://www.youtube.com/channel/UCbn1OgGei-DV7aSRo_HaAiw"
aria-label="Youtube"
target="_blank"
rel="noopener"
>
<svg
width="29"
height="20"
viewBox="0 0 29 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
alt="Youtube"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M27.4896 1.52422C27.9301 1.96749 28.2463 2.51866 28.4068 3.12258C29.0004 5.35161 29.0004 10 29.0004 10C29.0004 10 29.0004 14.6484 28.4068 16.8774C28.2463 17.4813 27.9301 18.0325 27.4896 18.4758C27.0492 18.9191 26.5 19.2389 25.8972 19.4032C23.6778 20 14.8068 20 14.8068 20C14.8068 20 5.93586 20 3.71651 19.4032C3.11363 19.2389 2.56449 18.9191 2.12405 18.4758C1.68361 18.0325 1.36732 17.4813 1.20683 16.8774C0.613281 14.6484 0.613281 10 0.613281 10C0.613281 10 0.613281 5.35161 1.20683 3.12258C1.36732 2.51866 1.68361 1.96749 2.12405 1.52422C2.56449 1.08095 3.11363 0.76113 3.71651 0.596774C5.93586 0 14.8068 0 14.8068 0C14.8068 0 23.6778 0 25.8972 0.596774C26.5 0.76113 27.0492 1.08095 27.4896 1.52422ZM19.3229 10L11.9036 5.77905V14.221L19.3229 10Z"
/>
</svg>
</a>
</div>
</div>
</div>
</main>
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * * * The content above * * * * * * * * * * * * -->
<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * * -->
<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<router-outlet /> <router-outlet />

View File

@@ -1,3 +1,21 @@
import { Routes } from '@angular/router'; import { Routes } from '@angular/router';
import { LoginComponent } from './auth/login';
import { DashboardComponent } from './dashboard/dashboard';
import { CourseListComponent } from './courses/course-list/course-list';
import { CourseDetailComponent } from './courses/course-detail/course-detail';
import { LessonComponent } from './courses/lesson/lesson';
export const routes: Routes = []; export const routes: Routes = [
{ path: 'login', component: LoginComponent },
{
path: '',
component: DashboardComponent,
children: [
{ path: 'courses', component: CourseListComponent },
{ path: 'courses/:id', component: CourseDetailComponent },
{ path: 'courses/:courseId/lessons/:lessonId', component: LessonComponent },
{ path: '', redirectTo: 'courses', pathMatch: 'full' }
]
},
{ path: '**', redirectTo: 'login' }
];

30
src/app/auth/login.html Normal file
View File

@@ -0,0 +1,30 @@
<div class="login-wrapper">
<div class="login-card">
<div class="brand">
<div class="logo-icon">M</div>
<h1>maktapp.student</h1>
</div>
<p class="subtitle">Please sign in to access your learning dashboard.</p>
<form class="login-form">
<div class="form-group">
<label for="email">Email address</label>
<input type="email" id="email" placeholder="name@example.com" required autocomplete="email">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" id="password" placeholder="••••••••" required autocomplete="current-password">
</div>
<div class="form-actions">
<button type="submit" class="btn-primary" (click)="$event.preventDefault()">Sign In</button>
</div>
</form>
<div class="footer">
<p>Having trouble? <a href="#">Contact support</a></p>
</div>
</div>
</div>

134
src/app/auth/login.scss Normal file
View File

@@ -0,0 +1,134 @@
.login-wrapper {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f8fafc;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.login-card {
background: #ffffff;
padding: 3rem;
border-radius: 1.5rem;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
width: 100%;
max-width: 440px;
border: 1px solid #e2e8f0;
.brand {
text-align: center;
margin-bottom: 2.5rem;
.logo-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 56px;
height: 56px;
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
color: white;
font-weight: 800;
font-size: 1.75rem;
border-radius: 1rem;
margin-bottom: 1.25rem;
box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}
h1 {
font-size: 1.75rem;
font-weight: 800;
color: #0f172a;
margin: 0;
letter-spacing: -0.025em;
}
}
.subtitle {
text-align: center;
color: #64748b;
margin-bottom: 2.5rem;
font-size: 1rem;
line-height: 1.5;
}
}
.login-form {
.form-group {
margin-bottom: 1.5rem;
label {
display: block;
font-size: 0.875rem;
font-weight: 600;
color: #334155;
margin-bottom: 0.5rem;
}
input {
width: 100%;
padding: 0.875rem 1rem;
border: 1.5px solid #e2e8f0;
border-radius: 0.75rem;
font-size: 1rem;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
outline: none;
background-color: #f8fafc;
&:focus {
background-color: #ffffff;
border-color: #2563eb;
box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
&::placeholder {
color: #94a3b8;
}
}
}
.form-actions {
margin-top: 2rem;
}
.btn-primary {
width: 100%;
padding: 0.875rem 1.5rem;
background-color: #2563eb;
color: white;
font-weight: 700;
font-size: 1rem;
border-radius: 0.75rem;
border: none;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
&:hover {
background-color: #1d4ed8;
transform: translateY(-1px);
box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}
&:active {
transform: translateY(0);
}
}
}
.footer {
margin-top: 2.5rem;
text-align: center;
font-size: 0.875rem;
color: #64748b;
a {
color: #2563eb;
text-decoration: none;
font-weight: 600;
&:hover {
text-decoration: underline;
}
}
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Login } from './login';
describe('Login', () => {
let component: Login;
let fixture: ComponentFixture<Login>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Login]
})
.compileComponents();
fixture = TestBed.createComponent(Login);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

11
src/app/auth/login.ts Normal file
View File

@@ -0,0 +1,11 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'app-login',
templateUrl: './login.html',
styleUrls: ['./login.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class LoginComponent {
}

View File

@@ -0,0 +1,69 @@
@if (course(); as c) {
<nav class="breadcrumbs">
<a routerLink="/courses">Courses</a>
<span class="separator">/</span>
<span class="current">{{ c.title }}</span>
</nav>
<div class="course-header">
<div class="header-content">
<h1>{{ c.title }}</h1>
<p>{{ c.description }}</p>
<div class="course-stats">
<div class="stat">
<span class="label">Modules</span>
<span class="value">{{ c.modules.length }}</span>
</div>
<div class="stat">
<span class="label">Overall Progress</span>
<span class="value">{{ c.progress }}%</span>
</div>
</div>
</div>
</div>
<div class="modules-container">
<h2>Course Content</h2>
<div class="modules-list">
@for (module of c.modules; track module.id) {
<div class="module-item" [class.expanded]="isExpanded(module.id)">
<button class="module-header" (click)="toggleModule(module.id)">
<div class="module-info">
<span class="toggle-icon">{{ isExpanded(module.id) ? '▾' : '▸' }}</span>
<span class="module-title">{{ module.title }}</span>
</div>
<span class="lesson-count">{{ module.lessons.length }} lessons</span>
</button>
@if (isExpanded(module.id)) {
<div class="lessons-list">
@for (lesson of module.lessons; track lesson.id) {
<a [routerLink]="['/courses', c.id, 'lessons', lesson.id]"
class="lesson-item"
[class.completed]="lesson.status === 'completed'">
<div class="lesson-meta">
<span class="lesson-icon">{{ getLessonIcon(lesson.type) }}</span>
<span class="lesson-title">{{ lesson.title }}</span>
</div>
<div class="lesson-status">
@if (lesson.status === 'completed') {
<span class="status-badge completed">Completed</span>
} @else if (lesson.status === 'available') {
<span class="status-badge available">Available</span>
} @else {
<span class="status-badge locked">Locked</span>
}
</div>
</a>
}
</div>
}
</div>
}
</div>
</div>
} @else {
<div class="loading">Loading course...</div>
}

View File

@@ -0,0 +1,171 @@
.breadcrumbs {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 2rem;
font-size: 0.875rem;
color: #64748b;
a {
color: #2563eb;
text-decoration: none;
font-weight: 500;
&:hover { text-decoration: underline; }
}
.separator { color: #cbd5e1; }
.current { font-weight: 500; color: #1e293b; }
}
.course-header {
background: white;
padding: 2.5rem;
border-radius: 1rem;
border: 1px solid #e2e8f0;
margin-bottom: 2.5rem;
h1 {
font-size: 2.25rem;
font-weight: 800;
color: #1e293b;
margin-bottom: 1rem;
letter-spacing: -0.025em;
}
p {
font-size: 1.125rem;
color: #475569;
max-width: 800px;
line-height: 1.6;
margin-bottom: 2rem;
}
}
.course-stats {
display: flex;
gap: 3rem;
.stat {
display: flex;
flex-direction: column;
gap: 0.25rem;
.label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
color: #94a3b8;
}
.value {
font-size: 1.25rem;
font-weight: 700;
color: #1e293b;
}
}
}
.modules-container {
h2 {
font-size: 1.5rem;
font-weight: 700;
color: #1e293b;
margin-bottom: 1.5rem;
}
}
.modules-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.module-item {
background: white;
border: 1px solid #e2e8f0;
border-radius: 0.75rem;
overflow: hidden;
&.expanded {
border-color: #2563eb;
}
}
.module-header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.25rem 1.5rem;
background: none;
border: none;
cursor: pointer;
text-align: left;
transition: background 0.2s;
&:hover { background: #f8fafc; }
.module-info {
display: flex;
align-items: center;
gap: 1rem;
.toggle-icon {
font-size: 1.25rem;
color: #64748b;
}
.module-title {
font-weight: 600;
color: #1e293b;
font-size: 1rem;
}
}
.lesson-count {
font-size: 0.875rem;
color: #64748b;
}
}
.lessons-list {
border-top: 1px solid #f1f5f9;
padding: 0.5rem;
}
.lesson-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.875rem 1rem;
border-radius: 0.5rem;
text-decoration: none;
transition: all 0.2s;
&:hover { background: #f1f5f9; }
&.completed {
.lesson-title { color: #64748b; text-decoration: line-through; }
}
.lesson-meta {
display: flex;
align-items: center;
gap: 0.75rem;
.lesson-icon { font-size: 1.125rem; }
.lesson-title { font-size: 0.9375rem; font-weight: 500; color: #334155; }
}
}
.status-badge {
font-size: 0.75rem;
font-weight: 600;
padding: 0.25rem 0.625rem;
border-radius: 1rem;
&.completed { background: #ecfdf5; color: #059669; }
&.available { background: #eff6ff; color: #2563eb; }
&.locked { background: #f8fafc; color: #94a3b8; }
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CourseDetail } from './course-detail';
describe('CourseDetail', () => {
let component: CourseDetail;
let fixture: ComponentFixture<CourseDetail>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CourseDetail]
})
.compileComponents();
fixture = TestBed.createComponent(CourseDetail);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,53 @@
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { CourseService, Course } from '../../services/course';
@Component({
selector: 'app-course-detail',
imports: [RouterLink],
templateUrl: './course-detail.html',
styleUrls: ['./course-detail.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CourseDetailComponent {
private route = inject(ActivatedRoute);
private courseService = inject(CourseService);
public course = signal<Course | undefined>(undefined);
public expandedModules = signal<Set<string>>(new Set());
constructor() {
const courseId = this.route.snapshot.paramMap.get('id');
if (courseId) {
const data = this.courseService.getCourseById(courseId);
this.course.set(data);
// Expand first module by default
if (data?.modules.length) {
this.toggleModule(data.modules[0].id);
}
}
}
toggleModule(moduleId: string) {
const next = new Set(this.expandedModules());
if (next.has(moduleId)) {
next.delete(moduleId);
} else {
next.add(moduleId);
}
this.expandedModules.set(next);
}
isExpanded(moduleId: string): boolean {
return this.expandedModules().has(moduleId);
}
getLessonIcon(type: string): string {
switch (type) {
case 'video': return '▶️';
case 'quiz': return '❓';
case 'homework': return '📝';
default: return '📄';
}
}
}

View File

@@ -0,0 +1,40 @@
<header class="page-header">
<div>
<h1>Your Courses</h1>
<p>Continue where you left off and master new skills.</p>
</div>
</header>
<div class="courses-grid">
@for (course of courses(); track course.id) {
<div class="course-card">
<div class="card-image">
<img [src]="course.thumbnail" [alt]="course.title">
</div>
<div class="card-content">
<h3>{{ course.title }}</h3>
<p>{{ course.description }}</p>
<div class="progress-section">
<div class="progress-info">
<span>Progress</span>
<span>{{ course.progress }}%</span>
</div>
<div class="progress-bar">
<div class="progress-fill" [style.width.%]="course.progress"></div>
</div>
</div>
<a [routerLink]="['/courses', course.id]" class="btn-continue">
{{ course.progress === 0 ? 'Start Course' : 'Continue Learning' }}
</a>
</div>
</div>
} @empty {
<div class="empty-state">
<div class="empty-icon">📚</div>
<h2>No courses found</h2>
<p>You haven't been enrolled in any courses yet. Please contact your instructor.</p>
</div>
}
</div>

View File

@@ -0,0 +1,138 @@
.page-header {
margin-bottom: 2.5rem;
h1 {
font-size: 1.875rem;
font-weight: 700;
color: #1e293b;
margin-bottom: 0.5rem;
}
p {
color: #64748b;
font-size: 1rem;
}
}
.courses-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 2rem;
}
.course-card {
background: white;
border-radius: 1rem;
border: 1px solid #e2e8f0;
overflow: hidden;
transition: transform 0.2s, box-shadow 0.2s;
&:hover {
transform: translateY(-4px);
box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.1);
}
.card-image {
height: 180px;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.card-content {
padding: 1.5rem;
h3 {
font-size: 1.125rem;
font-weight: 700;
color: #1e293b;
margin-bottom: 0.75rem;
}
p {
font-size: 0.875rem;
color: #64748b;
line-height: 1.5;
margin-bottom: 1.5rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
}
.progress-section {
margin-bottom: 1.5rem;
.progress-info {
display: flex;
justify-content: space-between;
font-size: 0.75rem;
font-weight: 600;
color: #475569;
margin-bottom: 0.5rem;
}
.progress-bar {
height: 8px;
background: #f1f5f9;
border-radius: 4px;
overflow: hidden;
.progress-fill {
height: 100%;
background: #2563eb;
border-radius: 4px;
transition: width 0.3s ease;
}
}
}
.btn-continue {
display: block;
width: 100%;
padding: 0.75rem;
text-align: center;
background: #f8fafc;
color: #1e293b;
text-decoration: none;
font-weight: 600;
font-size: 0.875rem;
border-radius: 0.5rem;
border: 1px solid #e2e8f0;
transition: all 0.2s;
&:hover {
background: #2563eb;
color: white;
border-color: #2563eb;
}
}
.empty-state {
grid-column: 1 / -1;
text-align: center;
padding: 5rem 2rem;
background: white;
border-radius: 1rem;
border: 2px dashed #e2e8f0;
.empty-icon {
font-size: 3rem;
margin-bottom: 1rem;
}
h2 {
font-size: 1.5rem;
color: #1e293b;
margin-bottom: 0.5rem;
}
p {
color: #64748b;
}
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CourseList } from './course-list';
describe('CourseList', () => {
let component: CourseList;
let fixture: ComponentFixture<CourseList>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CourseList]
})
.compileComponents();
fixture = TestBed.createComponent(CourseList);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,16 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { RouterLink } from '@angular/router';
import { CourseService } from '../../services/course';
import { DecimalPipe } from '@angular/common';
@Component({
selector: 'app-course-list',
imports: [RouterLink, DecimalPipe],
templateUrl: './course-list.html',
styleUrls: ['./course-list.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CourseListComponent {
private courseService = inject(CourseService);
public courses = this.courseService.getCourses();
}

View File

@@ -0,0 +1,77 @@
@if (course(); as c) {
@if (lesson(); as l) {
<nav class="breadcrumbs">
<a routerLink="/courses">Courses</a>
<span class="separator">/</span>
<a [routerLink]="['/courses', c.id]">{{ c.title }}</a>
<span class="separator">/</span>
<span class="current">{{ l.title }}</span>
</nav>
<div class="lesson-container">
<div class="lesson-header">
<span class="lesson-type-badge">{{ l.type }}</span>
<h1>{{ l.title }}</h1>
</div>
<div class="lesson-content">
@switch (l.type) {
@case ('video') {
<div class="video-player-placeholder">
<div class="play-button"></div>
<p>Video Player (Simulated)</p>
</div>
<div class="content-text">
<p>In this video, we explore the core concepts of {{ l.title }}. We will cover the fundamental principles and see practical examples of how to implement these patterns in your Angular applications.</p>
</div>
}
@case ('quiz') {
<div class="quiz-container">
<h3>Question 1 of 5</h3>
<p class="question">Which of the following best describes an Angular Signal?</p>
<div class="options">
<div class="option">A function that returns a value and can notify consumers when it changes.</div>
<div class="option">A new type of Observable that replaces Subject.</div>
<div class="option">A template-only syntax for data binding.</div>
<div class="option">A way to handle HTTP requests.</div>
</div>
<button class="btn-submit">Submit Answer</button>
</div>
}
@case ('homework') {
<div class="homework-container">
<h3>Assignment Description</h3>
<p>Please implement a small project using the concepts learned in this module. Your project should demonstrate proper use of Signals and Standalone components.</p>
<div class="submission-panel">
<h4>Your Submission</h4>
<div class="status-indicator">Status: <strong>{{ l.status }}</strong></div>
<div class="upload-zone">
<p>Drag and drop your files here or click to browse</p>
</div>
</div>
</div>
}
@default {
<div class="content-text">
<h2>Introduction</h2>
<p>Angular signals provide a way for Angular to know exactly which components need to be updated when data changes. This is a significant improvement over the traditional change detection mechanism, which often involves checking many components that haven't actually changed.</p>
<h3>Key Benefits</h3>
<ul>
<li><strong>Fine-grained updates:</strong> Only the parts of the UI that actually depend on a changed signal are updated.</li>
<li><strong>Improved performance:</strong> Especially in large applications, signals can drastically reduce the amount of work the framework needs to do.</li>
<li><strong>Simpler mental model:</strong> Signals make it easier to reason about data flow in your application.</li>
</ul>
</div>
}
}
</div>
<div class="lesson-footer">
<button class="btn-secondary">Previous Lesson</button>
<button class="btn-primary">Complete and Continue</button>
</div>
</div>
}
}

View File

@@ -0,0 +1,163 @@
.breadcrumbs {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 2rem;
font-size: 0.875rem;
color: #64748b;
a {
color: #2563eb;
text-decoration: none;
font-weight: 500;
&:hover { text-decoration: underline; }
}
.separator { color: #cbd5e1; }
.current { font-weight: 500; color: #1e293b; }
}
.lesson-container {
max-width: 900px;
margin: 0 auto;
background: white;
border-radius: 1rem;
border: 1px solid #e2e8f0;
overflow: hidden;
}
.lesson-header {
padding: 2.5rem;
border-bottom: 1px solid #f1f5f9;
.lesson-type-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: #eff6ff;
color: #2563eb;
border-radius: 2rem;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 1rem;
}
h1 {
font-size: 2rem;
font-weight: 800;
color: #1e293b;
margin: 0;
}
}
.lesson-content {
padding: 2.5rem;
}
.content-text {
h2 { font-size: 1.5rem; margin-bottom: 1.25rem; color: #1e293b; }
h3 { font-size: 1.25rem; margin: 1.5rem 0 1rem; color: #334155; }
p { font-size: 1.125rem; line-height: 1.7; color: #475569; margin-bottom: 1.5rem; }
ul { padding-left: 1.5rem; margin-bottom: 1.5rem; }
li { font-size: 1.125rem; color: #475569; margin-bottom: 0.75rem; }
}
.video-player-placeholder {
aspect-ratio: 16/9;
background: #1e293b;
border-radius: 0.75rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white;
margin-bottom: 2rem;
.play-button {
font-size: 4rem;
margin-bottom: 1rem;
opacity: 0.8;
cursor: pointer;
&:hover { opacity: 1; transform: scale(1.1); transition: 0.2s; }
}
}
.quiz-container {
background: #f8fafc;
padding: 2rem;
border-radius: 0.75rem;
border: 1px solid #e2e8f0;
.question { font-size: 1.25rem; font-weight: 600; color: #1e293b; margin-bottom: 1.5rem; }
.options {
display: flex;
flex-direction: column;
gap: 1rem;
margin-bottom: 2rem;
}
.option {
padding: 1rem;
background: white;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.2s;
&:hover { border-color: #2563eb; background: #eff6ff; }
}
}
.homework-container {
.submission-panel {
margin-top: 3rem;
padding: 2rem;
background: #f1f5f9;
border-radius: 0.75rem;
}
.upload-zone {
height: 150px;
border: 2px dashed #cbd5e1;
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
background: white;
margin-top: 1.5rem;
cursor: pointer;
color: #64748b;
&:hover { border-color: #2563eb; color: #2563eb; }
}
}
.lesson-footer {
padding: 1.5rem 2.5rem;
background: #f8fafc;
border-top: 1px solid #f1f5f9;
display: flex;
justify-content: space-between;
.btn-primary {
padding: 0.75rem 1.5rem;
background: #2563eb;
color: white;
border: none;
border-radius: 0.5rem;
font-weight: 600;
cursor: pointer;
&:hover { background: #1d4ed8; }
}
.btn-secondary {
padding: 0.75rem 1.5rem;
background: white;
color: #475569;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
font-weight: 600;
cursor: pointer;
&:hover { background: #f1f5f9; }
}
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Lesson } from './lesson';
describe('Lesson', () => {
let component: Lesson;
let fixture: ComponentFixture<Lesson>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Lesson]
})
.compileComponents();
fixture = TestBed.createComponent(Lesson);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,34 @@
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { CourseService, Course, Lesson } from '../../services/course';
@Component({
selector: 'app-lesson',
imports: [RouterLink],
templateUrl: './lesson.html',
styleUrls: ['./lesson.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class LessonComponent {
private route = inject(ActivatedRoute);
private courseService = inject(CourseService);
public course = signal<Course | undefined>(undefined);
public lesson = signal<Lesson | undefined>(undefined);
constructor() {
const params = this.route.snapshot.paramMap;
const courseId = params.get('courseId');
const lessonId = params.get('lessonId');
if (courseId && lessonId) {
const c = this.courseService.getCourseById(courseId);
this.course.set(c);
const l = c?.modules
.flatMap(m => m.lessons)
.find(l => l.id === lessonId);
this.lesson.set(l);
}
}
}

View File

@@ -0,0 +1,6 @@
<div class="dashboard-layout">
<app-sidebar class="layout-sidebar"></app-sidebar>
<main class="layout-content">
<router-outlet></router-outlet>
</main>
</div>

View File

@@ -0,0 +1,19 @@
.dashboard-layout {
display: flex;
height: 100vh;
overflow: hidden;
background-color: #f8fafc;
}
.layout-sidebar {
width: 280px;
flex-shrink: 0;
border-right: 1px solid #e2e8f0;
background-color: #ffffff;
}
.layout-content {
flex-grow: 1;
overflow-y: auto;
padding: 2rem;
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Dashboard } from './dashboard';
describe('Dashboard', () => {
let component: Dashboard;
let fixture: ComponentFixture<Dashboard>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Dashboard]
})
.compileComponents();
fixture = TestBed.createComponent(Dashboard);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,14 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { SidebarComponent } from '../sidebar/sidebar';
@Component({
selector: 'app-dashboard',
imports: [RouterOutlet, SidebarComponent],
templateUrl: './dashboard.html',
styleUrls: ['./dashboard.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DashboardComponent {
}

30
src/app/login/login.html Normal file
View File

@@ -0,0 +1,30 @@
<div class="login-wrapper">
<div class="login-card">
<div class="brand">
<span class="logo-icon">M</span>
<h1>maktapp.student</h1>
</div>
<p class="subtitle">Please sign in to access your learning dashboard.</p>
<form class="login-form">
<div class="form-group">
<label for="email">Email address</label>
<input type="email" id="email" placeholder="name@example.com" required autocomplete="email">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" id="password" placeholder="••••••••" required autocomplete="current-password">
</div>
<div class="form-actions">
<button type="submit" class="btn-primary">Sign In</button>
</div>
</form>
<div class="footer">
<p>Having trouble? <a href="#">Contact support</a></p>
</div>
</div>
</div>

122
src/app/login/login.scss Normal file
View File

@@ -0,0 +1,122 @@
.login-wrapper {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f8fafc;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.login-card {
background: #ffffff;
padding: 3rem;
border-radius: 1rem;
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
width: 100%;
max-width: 440px;
border: 1px solid #e2e8f0;
.brand {
text-align: center;
margin-bottom: 2rem;
.logo-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
background-color: #2563eb;
color: white;
font-weight: 800;
font-size: 1.5rem;
border-radius: 0.75rem;
margin-bottom: 1rem;
}
h1 {
font-size: 1.5rem;
font-weight: 700;
color: #1e293b;
margin: 0;
letter-spacing: -0.025em;
}
}
.subtitle {
text-align: center;
color: #64748b;
margin-bottom: 2.5rem;
font-size: 0.9375rem;
}
}
.login-form {
.form-group {
margin-bottom: 1.5rem;
label {
display: block;
font-size: 0.875rem;
font-weight: 500;
color: #475569;
margin-bottom: 0.5rem;
}
input {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 1rem;
transition: border-color 0.2s, box-shadow 0.2s;
outline: none;
&:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
&::placeholder {
color: #94a3b8;
}
}
}
.form-actions {
margin-top: 2rem;
}
.btn-primary {
width: 100%;
padding: 0.75rem 1.5rem;
background-color: #2563eb;
color: white;
font-weight: 600;
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: background-color 0.2s;
&:hover {
background-color: #1d4ed8;
}
}
}
.footer {
margin-top: 2.5rem;
text-align: center;
font-size: 0.875rem;
color: #64748b;
a {
color: #2563eb;
text-decoration: none;
font-weight: 500;
&:hover {
text-decoration: underline;
}
}
}

View File

@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { Course } from './course';
describe('Course', () => {
let service: Course;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(Course);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@@ -0,0 +1,83 @@
import { Injectable, signal } from '@angular/core';
export interface Lesson {
id: string;
title: string;
type: 'text' | 'video' | 'quiz' | 'homework';
content?: string;
videoUrl?: string;
status: 'locked' | 'available' | 'completed' | 'submitted' | 'reviewed';
}
export interface Module {
id: string;
title: string;
lessons: Lesson[];
}
export interface Course {
id: string;
title: string;
description: string;
progress: number;
thumbnail: string;
modules: Module[];
}
@Injectable({
providedIn: 'root'
})
export class CourseService {
private courses = signal<Course[]>([
{
id: '1',
title: 'Advanced Angular Architecture',
description: 'Master enterprise-level Angular development with signals, standalone components, and modern patterns.',
progress: 65,
thumbnail: 'https://images.unsplash.com/photo-1516116216624-53e697fedbea?w=400&h=250&fit=crop',
modules: [
{
id: 'm1',
title: 'Foundation & Principles',
lessons: [
{ id: 'l1', title: 'Signals: The New Reactive Core', type: 'text', status: 'completed' },
{ id: 'l2', title: 'Standalone Everything', type: 'video', status: 'completed' }
]
},
{
id: 'm2',
title: 'Advanced State Management',
lessons: [
{ id: 'l3', title: 'Global vs Local State', type: 'quiz', status: 'available' },
{ id: 'l4', title: 'RxJS Interop', type: 'homework', status: 'available' }
]
}
]
},
{
id: '2',
title: 'Modern CSS for Developers',
description: 'Beyond frameworks: Learn CSS Grid, Flexbox, Container Queries, and modern animation techniques.',
progress: 30,
thumbnail: 'https://images.unsplash.com/photo-1507721999472-8ed4421c4af2?w=400&h=250&fit=crop',
modules: [
{
id: 'm3',
title: 'Layout Mastery',
lessons: [
{ id: 'l5', title: 'CSS Grid Deep Dive', type: 'video', status: 'completed' },
{ id: 'l6', title: 'Flexbox Common Patterns', type: 'text', status: 'available' }
]
}
]
}
]);
public getCourses() {
return this.courses.asReadonly();
}
public getCourseById(id: string) {
return this.courses().find(c => c.id === id);
}
}

View File

@@ -0,0 +1,29 @@
<div class="sidebar-container">
<div class="sidebar-header">
<div class="logo">
<span class="logo-icon">M</span>
<span class="logo-text">maktapp</span>
</div>
</div>
<nav class="sidebar-nav">
@for (item of navItems; track item.path) {
<a [routerLink]="item.path"
routerLinkActive="active"
class="nav-item">
<span class="nav-label">{{ item.label }}</span>
</a>
}
</nav>
<div class="sidebar-footer">
<div class="user-info">
<div class="avatar">JS</div>
<div class="details">
<span class="name">John Student</span>
<span class="role">Student</span>
</div>
</div>
<a routerLink="/login" class="logout-btn">Sign Out</a>
</div>
</div>

View File

@@ -0,0 +1,121 @@
.sidebar-container {
display: flex;
flex-direction: column;
height: 100%;
padding: 1.5rem;
}
.sidebar-header {
margin-bottom: 2.5rem;
.logo {
display: flex;
align-items: center;
gap: 0.75rem;
.logo-icon {
width: 32px;
height: 32px;
background: #2563eb;
color: white;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.5rem;
font-weight: 700;
}
.logo-text {
font-size: 1.25rem;
font-weight: 700;
color: #1e293b;
letter-spacing: -0.025em;
}
}
}
.sidebar-nav {
flex-grow: 1;
display: flex;
flex-direction: column;
gap: 0.5rem;
.nav-item {
display: flex;
align-items: center;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
color: #64748b;
text-decoration: none;
font-weight: 500;
transition: all 0.2s;
&:hover {
background: #f1f5f9;
color: #1e293b;
}
&.active {
background: #eff6ff;
color: #2563eb;
}
}
}
.sidebar-footer {
margin-top: auto;
padding-top: 1.5rem;
border-top: 1px solid #e2e8f0;
.user-info {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
.avatar {
width: 40px;
height: 40px;
background: #e2e8f0;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.875rem;
font-weight: 600;
color: #475569;
}
.details {
display: flex;
flex-direction: column;
.name {
font-size: 0.875rem;
font-weight: 600;
color: #1e293b;
}
.role {
font-size: 0.75rem;
color: #64748b;
}
}
}
.logout-btn {
display: block;
width: 100%;
padding: 0.5rem;
text-align: center;
font-size: 0.875rem;
color: #ef4444;
text-decoration: none;
border-radius: 0.5rem;
transition: background 0.2s;
&:hover {
background: #fef2f2;
}
}
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Sidebar } from './sidebar';
describe('Sidebar', () => {
let component: Sidebar;
let fixture: ComponentFixture<Sidebar>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Sidebar]
})
.compileComponents();
fixture = TestBed.createComponent(Sidebar);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,16 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { RouterLink, RouterLinkActive } from '@angular/router';
@Component({
selector: 'app-sidebar',
imports: [RouterLink, RouterLinkActive],
templateUrl: './sidebar.html',
styleUrls: ['./sidebar.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SidebarComponent {
navItems = [
{ path: '/courses', label: 'Dashboard', icon: 'dashboard' },
{ path: '/profile', label: 'Profile', icon: 'person' }
];
}

18
src/app/styles.scss Normal file
View File

@@ -0,0 +1,18 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #f8fafc;
color: #1e293b;
line-height: 1.5;
}
button, input {
font-family: inherit;
}

View File

@@ -28,6 +28,12 @@
}, },
{ {
"path": "./tsconfig.spec.json" "path": "./tsconfig.spec.json"
},
{
"path": "./projects/maktapp.student/tsconfig.app.json"
},
{
"path": "./projects/maktapp.student/tsconfig.spec.json"
} }
] ]
} }