|
| 1 | +import { ChangeDetectionStrategy, Component } from '@angular/core'; |
| 2 | +import { RouterLink } from '@angular/router'; |
| 3 | + |
| 4 | +@Component({ |
| 5 | + selector: 'cha-landing-page', |
| 6 | + template: ` |
| 7 | + <div class="bg-gray-50 text-gray-900"> |
| 8 | + <!-- Hero Section --> |
| 9 | + <section |
| 10 | + class="relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-red-600 to-orange-500 px-4 text-center text-white"> |
| 11 | + <!-- Decorative background shapes --> |
| 12 | + <div |
| 13 | + class="pointer-events-none absolute inset-0 bg-gradient-to-r from-red-700 to-orange-600 opacity-20 blur-3xl"></div> |
| 14 | +
|
| 15 | + <h1 |
| 16 | + class="mb-6 transform text-4xl font-extrabold transition duration-700 hover:scale-105 md:text-6xl"> |
| 17 | + Master Angular One Challenge at a Time |
| 18 | + </h1> |
| 19 | + <p class="mb-8 max-w-xl text-lg md:text-xl"> |
| 20 | + Practice real-world Angular problems. Enhance your skills. Get |
| 21 | + job-ready. |
| 22 | + </p> |
| 23 | + <div |
| 24 | + class="flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0"> |
| 25 | + <a |
| 26 | + routerLink="/challenges" |
| 27 | + class="rounded-lg bg-white px-8 py-4 font-semibold text-red-600 transition hover:bg-gray-100"> |
| 28 | + Start Solving Challenges |
| 29 | + </a> |
| 30 | + <a |
| 31 | + routerLink="/challenges" |
| 32 | + class="rounded-lg border border-white px-8 py-4 font-semibold transition hover:bg-white hover:text-red-600"> |
| 33 | + Browse Challenges |
| 34 | + </a> |
| 35 | + </div> |
| 36 | + </section> |
| 37 | +
|
| 38 | + <!-- Features Section --> |
| 39 | + <section class="py-20"> |
| 40 | + <div class="container mx-auto px-4 text-center"> |
| 41 | + <h2 class="mb-12 text-3xl font-bold md:text-4xl"> |
| 42 | + Why Angular Challenges? |
| 43 | + </h2> |
| 44 | + <div class="grid gap-8 md:grid-cols-3"> |
| 45 | + <!-- Feature 1 --> |
| 46 | + <div |
| 47 | + class="transform rounded-lg bg-white p-8 shadow transition duration-500 hover:-translate-y-2"> |
| 48 | + <svg |
| 49 | + class="mx-auto mb-4 h-12 w-12 text-red-600" |
| 50 | + fill="currentColor" |
| 51 | + viewBox="0 0 20 20"> |
| 52 | + <path |
| 53 | + d="M10 2a8 8 0 100 16 8 8 0 000-16zM9 12l-3-3 1.414-1.414L9 9.172l4.586-4.586L15 6l-6 6z" /> |
| 54 | + </svg> |
| 55 | + <h3 class="mb-2 text-xl font-semibold">Real-world scenarios</h3> |
| 56 | + <p> |
| 57 | + Learn by solving practical Angular problems from beginner to |
| 58 | + expert. |
| 59 | + </p> |
| 60 | + </div> |
| 61 | +
|
| 62 | + <!-- Feature 2 --> |
| 63 | + <div |
| 64 | + class="transform rounded-lg bg-white p-8 shadow transition duration-500 hover:-translate-y-2"> |
| 65 | + <svg |
| 66 | + class="mx-auto mb-4 h-12 w-12 text-red-600" |
| 67 | + fill="currentColor" |
| 68 | + viewBox="0 0 20 20"> |
| 69 | + <path |
| 70 | + d="M2 5a2 2 0 012-2h3v2H4v10h3v2H4a2 2 0 01-2-2V5zm12-2h3a2 2 0 012 2v10a2 2 0 01-2 2h-3v-2h3V5h-3V3zm-2 0v14h-4V3h4z" /> |
| 71 | + </svg> |
| 72 | + <h3 class="mb-2 text-xl font-semibold">Instant feedback</h3> |
| 73 | + <p> |
| 74 | + See results in real-time with embedded unit tests and solutions. |
| 75 | + </p> |
| 76 | + </div> |
| 77 | +
|
| 78 | + <!-- Feature 3 --> |
| 79 | + <div |
| 80 | + class="transform rounded-lg bg-white p-8 shadow transition duration-500 hover:-translate-y-2"> |
| 81 | + <svg |
| 82 | + class="mx-auto mb-4 h-12 w-12 text-red-600" |
| 83 | + fill="currentColor" |
| 84 | + viewBox="0 0 20 20"> |
| 85 | + <path |
| 86 | + d="M10 2a8 8 0 100 16 8 8 0 000-16zm1 12H9v-2h2v2zm0-4H9V6h2v4z" /> |
| 87 | + </svg> |
| 88 | + <h3 class="mb-2 text-xl font-semibold">Career growth</h3> |
| 89 | + <p>Ace interviews and improve your confidence in Angular.</p> |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + </section> |
| 94 | +
|
| 95 | + <!-- Popular Challenges Section --> |
| 96 | + <section class="bg-gray-100 py-20"> |
| 97 | + <div class="container mx-auto px-4"> |
| 98 | + <h2 class="mb-12 text-center text-3xl font-bold md:text-4xl"> |
| 99 | + Popular Challenges |
| 100 | + </h2> |
| 101 | + <div class="grid gap-8 md:grid-cols-3"> |
| 102 | + <!-- Example Challenge Card --> |
| 103 | + <div |
| 104 | + class="transform rounded-lg bg-white p-6 shadow transition hover:-translate-y-2 hover:shadow-lg"> |
| 105 | + <h3 class="mb-2 text-xl font-semibold">Build a Custom Pipe</h3> |
| 106 | + <p class="mb-4 text-gray-600"> |
| 107 | + Create a pipe to transform data for your templates. |
| 108 | + </p> |
| 109 | + <span |
| 110 | + class="mb-4 inline-block rounded bg-green-100 px-2 py-1 text-xs text-green-800"> |
| 111 | + Beginner |
| 112 | + </span> |
| 113 | + <a |
| 114 | + routerLink="/challenges/custom-pipe" |
| 115 | + class="block rounded bg-red-600 px-4 py-2 text-center text-white transition hover:bg-red-700"> |
| 116 | + Solve Now |
| 117 | + </a> |
| 118 | + </div> |
| 119 | +
|
| 120 | + <!-- Repeat dynamically with *ngFor --> |
| 121 | + </div> |
| 122 | + </div> |
| 123 | + </section> |
| 124 | +
|
| 125 | + <!-- Call to Action Section --> |
| 126 | + <section |
| 127 | + class="bg-gradient-to-r from-red-600 to-orange-500 py-20 text-center text-white"> |
| 128 | + <h2 class="mb-6 text-3xl font-bold md:text-4xl"> |
| 129 | + Ready to become an Angular pro? |
| 130 | + </h2> |
| 131 | + <a |
| 132 | + routerLink="/challenges" |
| 133 | + class="rounded-lg bg-white px-8 py-4 font-semibold text-red-600 transition hover:bg-gray-100"> |
| 134 | + Get Started For Free |
| 135 | + </a> |
| 136 | + </section> |
| 137 | +
|
| 138 | + <!-- Footer --> |
| 139 | + <footer class="bg-gray-800 py-10 text-center text-gray-400"> |
| 140 | + <div class="mb-4"> |
| 141 | + <a routerLink="/" class="mx-2 hover:text-white">Home</a> |
| 142 | + <a routerLink="/challenges" class="mx-2 hover:text-white"> |
| 143 | + Challenges |
| 144 | + </a> |
| 145 | + <a routerLink="/about" class="mx-2 hover:text-white">About</a> |
| 146 | + <a |
| 147 | + href="https://github.com/angular-challenges" |
| 148 | + target="_blank" |
| 149 | + class="mx-2 hover:text-white"> |
| 150 | + GitHub |
| 151 | + </a> |
| 152 | + <a routerLink="/contact" class="mx-2 hover:text-white">Contact</a> |
| 153 | + </div> |
| 154 | + <p class="text-sm"> |
| 155 | + © 2025 Angular Challenges. Built with ❤️ for the Angular community. |
| 156 | + </p> |
| 157 | + </footer> |
| 158 | + </div> |
| 159 | + `, |
| 160 | + changeDetection: ChangeDetectionStrategy.OnPush, |
| 161 | + imports: [RouterLink], |
| 162 | +}) |
| 163 | +export class LandingPage {} |
0 commit comments