You need to sign in or sign up before continuing.
Commit c241dcc5 authored by Almouhannad's avatar Almouhannad

(F) Add login form

parent 4e374cb3
export const apiUrl = "https://localhost:7046/api";
\ No newline at end of file
...@@ -11,6 +11,7 @@ import { LayoutComponent } from './components/template/layout/layout.component'; ...@@ -11,6 +11,7 @@ import { LayoutComponent } from './components/template/layout/layout.component';
import { HeaderComponent } from './components/template/header/header.component'; import { HeaderComponent } from './components/template/header/header.component';
import { FooterComponent } from './components/template/footer/footer.component'; import { FooterComponent } from './components/template/footer/footer.component';
import { HomeComponent } from './components/home/home.component'; import { HomeComponent } from './components/home/home.component';
import { LoginFormComponent } from './components/Authentication/login-form/login-form.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -34,7 +35,8 @@ import { HomeComponent } from './components/home/home.component'; ...@@ -34,7 +35,8 @@ import { HomeComponent } from './components/home/home.component';
LayoutComponent, LayoutComponent,
HeaderComponent, HeaderComponent,
FooterComponent, FooterComponent,
HomeComponent HomeComponent,
LoginFormComponent
], ],
// identifies the root component that Angular should // identifies the root component that Angular should
......
import { Component } from '@angular/core';
@Component({
selector: 'app-login-form',
templateUrl: './login-form.component.html',
styleUrl: './login-form.component.css'
})
export class LoginFormComponent {
}
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
للاستفادة من خدمات هذا التطبيق، يحب عليك تسجيل الدخول أولاً للاستفادة من خدمات هذا التطبيق، يحب عليك تسجيل الدخول أولاً
</p> </p>
<div class="text-center"> <div class="text-center">
<a href="#about" class="more-btn"><span>تسجيل الدخول </span> <i <button (click)="openLoginForm(loginModal)" class="btn more-btn">
class="bi bi-chevron-right"></i></a> <a>تسجيل الدخول<i class="bi bi-chevron-right"></i></a>
</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -198,4 +199,19 @@ ...@@ -198,4 +199,19 @@
</section> </section>
<!-- #endregion --> <!-- #endregion -->
<!-- #region login pop-up -->
<ng-template #loginModal let-modal>
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">تسجيل الدخول</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
(click)="modal.dismiss('Cross click')"></button>
</div>
<div class="modal-body">
<app-login-form></app-login-form>
</div>
<!-- <div class="modal-footer">
</div> -->
</ng-template>
<!-- #endregion -->
</div> </div>
\ No newline at end of file
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
...@@ -7,4 +8,13 @@ import { Component } from '@angular/core'; ...@@ -7,4 +8,13 @@ import { Component } from '@angular/core';
}) })
export class HomeComponent { export class HomeComponent {
//#region CTOR DI
constructor (private modalService: NgbModal) {}
//#endregion
//#region Login
openLoginForm (content: any): void {
this.modalService.open(content);
}
//#endregion
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment