diff --git a/angular.json b/angular.json index b0ec50ba1167088bb60486187c2be669ae9950dd..fbdddd2d719c29d38b0b542ca24ff70fc9cd4825 100644 --- a/angular.json +++ b/angular.json @@ -28,6 +28,7 @@ "src/assets" ], "styles": [ + "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "src/styles.scss" ], "scripts": [] @@ -88,6 +89,7 @@ "src/assets" ], "styles": [ + "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "src/styles.scss" ], "scripts": [] @@ -119,6 +121,7 @@ } } } - }}, + } + }, "defaultProject": "managementPortal" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 06580ab1ea04839a64d7669594a9340697eef24a..7f333a12d579bfb52399d6a436dfcfe9fe408371 100644 --- a/package-lock.json +++ b/package-lock.json @@ -133,6 +133,23 @@ "tslib": "^1.9.0" } }, + "@angular/cdk": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-8.1.1.tgz", + "integrity": "sha512-5hBmhrHf9+WjGVIT8gbhT0Nh37BAjgI2TGRkt1o4qX8cG+1B6gU2MxM+CDJ7PhxSJi9lW93lq2AMuWwnRSllyg==", + "requires": { + "parse5": "^5.0.0", + "tslib": "^1.7.1" + }, + "dependencies": { + "parse5": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", + "optional": true + } + } + }, "@angular/cli": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-8.1.2.tgz", @@ -995,6 +1012,14 @@ "integrity": "sha512-9DR5TclsEpMIzCmagLHKYDTAqcZUkZKPjkngqIAUJg5R4IUjsuYn8NZX+agoOrS4ky6Dy9FXGYUC+QB0iEiycg==", "dev": true }, + "@angular/material": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-8.1.1.tgz", + "integrity": "sha512-45aaxKuLTrthzhAhG2+OY86wafuRBteZcRjDG7rKZ3Cc3KteUp5QwAi+QbhHzs4O3WXLWTAmuLYJelRqRqqw7g==", + "requires": { + "tslib": "^1.7.1" + } + }, "@angular/platform-browser": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-8.1.2.tgz", @@ -4297,6 +4322,11 @@ "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", "dev": true }, + "hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=" + }, "handle-thing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", diff --git a/package.json b/package.json index 222c7755a4944f48a3e27e3311fb4842bb9cef37..79ecf50322b68cf0fe85fbac5d6e6427df9f768a 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,16 @@ "private": true, "dependencies": { "@angular/animations": "~8.1.2", + "@angular/cdk": "~8.1.1", "@angular/common": "~8.1.2", "@angular/compiler": "~8.1.2", "@angular/core": "~8.1.2", "@angular/forms": "~8.1.2", + "@angular/material": "^8.1.1", "@angular/platform-browser": "~8.1.2", "@angular/platform-browser-dynamic": "~8.1.2", "@angular/router": "~8.1.2", + "hammerjs": "^2.0.8", "rxjs": "~6.4.0", "tslib": "^1.9.0", "zone.js": "~0.9.1" diff --git a/src/app/add-event/add-event.component.html b/src/app/add-event/add-event.component.html new file mode 100644 index 0000000000000000000000000000000000000000..8dfdaad33d211cd942493768c0f7236be077f8ca --- /dev/null +++ b/src/app/add-event/add-event.component.html @@ -0,0 +1 @@ +<p>add-event works!</p> diff --git a/src/app/add-event/add-event.component.scss b/src/app/add-event/add-event.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/add-event/add-event.component.spec.ts b/src/app/add-event/add-event.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..ca3d40bd0736d73f2f264e56d330ff224feeed02 --- /dev/null +++ b/src/app/add-event/add-event.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddEventComponent } from './add-event.component'; + +describe('AddEventComponent', () => { + let component: AddEventComponent; + let fixture: ComponentFixture<AddEventComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AddEventComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddEventComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/add-event/add-event.component.ts b/src/app/add-event/add-event.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..3f157cb54de943c4863bf590046b5cc59196b559 --- /dev/null +++ b/src/app/add-event/add-event.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-add-event', + templateUrl: './add-event.component.html', + styleUrls: ['./add-event.component.scss'] +}) +export class AddEventComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/app.component.html b/src/app/app.component.html index 5226d57f58c4c5f493660d8e328aea558586e3cc..7d3a07f462c80f94ef18691181f12d58504b4ff7 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,20 +1,4 @@ -<!--The content below is only a placeholder and can be replaced.--> -<div style="text-align:center"> - <h1> - Welcome to {{ title }}! - </h1> - <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> -</div> -<h2>Here are some links to help you start: </h2> -<ul> - <li> - <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2> - </li> - <li> - <h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2> - </li> - <li> - <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2> - </li> -</ul> - +<app-home-page></app-home-page> +<app-register></app-register> +<app-login></app-login> +<app-listing></app-listing> diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index f3f689d30f98ec9817f005fb4e4c8a9f45fd7e8e..df60a1687e923c65af2d47c49172cd2e96a1127f 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -16,16 +16,16 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); }); - it(`should have as title 'managementPortal'`, () => { + it(`should have as title 'ncpProj'`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('managementPortal'); + expect(app.title).toEqual('ncpProj'); }); it('should render title in a h1 tag', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to managementPortal!'); + expect(compiled.querySelector('h1').textContent).toContain('Welcome to ncpProj!'); }); }); diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d87ea034906e0d5fe4a510ca203606be1bac824f..20596bfd3a8d653458fe9b5fd0aea4ed887c0809 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -6,5 +6,5 @@ import { Component } from '@angular/core'; styleUrls: ['./app.component.scss'] }) export class AppComponent { - title = 'managementPortal'; + title = 'ncpProj'; } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f65716351aa5930fea545e1e3f016e2980c1f483..3c6310e914f5ceaa109abf57a2b5e9e5d8af1a81 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,13 +2,31 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; +import { HomePageComponent } from './home-page/home-page.component'; +import { LoginComponent } from './login/login.component'; +import { RegisterComponent } from './register/register.component'; +import { MatCardModule, MatButtonModule } from '@angular/material'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { MatInputModule, MatFormFieldModule } from '@angular/material'; +import { ListingComponent } from './listing/listing.component'; +import { AddEventComponent } from './add-event/add-event.component'; @NgModule({ declarations: [ - AppComponent + AppComponent, + RegisterComponent, + HomePageComponent, + LoginComponent, + ListingComponent, + AddEventComponent ], imports: [ - BrowserModule + BrowserModule, + MatInputModule, + MatFormFieldModule, + BrowserAnimationsModule, + MatCardModule, + MatButtonModule, ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/contracts/eventDetails.ts b/src/app/contracts/eventDetails.ts new file mode 100644 index 0000000000000000000000000000000000000000..3e01afb50aa6fd13b7f134ca81ac2d97c5380cd5 --- /dev/null +++ b/src/app/contracts/eventDetails.ts @@ -0,0 +1,14 @@ +export interface eventDetails{ + eventId:number; + eventName:string; + eventPrice?:number; + totalSeats:number; + remainingSeats?:number; + prerequisites?: string[]; + venue?: string; + organizer?: string; + time?: Date; + description?:string; + isRegistrationAllowed:boolean; + +} \ No newline at end of file diff --git a/src/app/contracts/userInfo.ts b/src/app/contracts/userInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..172a0bc4d9ed978b5f2949babf1f600fa40f721e --- /dev/null +++ b/src/app/contracts/userInfo.ts @@ -0,0 +1,10 @@ +export interface userInfo{ + name:string; + regNo:string; + hashedPassword:string; + yearOfAdmission:number; + program:string; + email:string; + mobileNo:number; + type:string; +} \ No newline at end of file diff --git a/src/app/home-page/home-page.component.html b/src/app/home-page/home-page.component.html new file mode 100644 index 0000000000000000000000000000000000000000..61cd23146ac1a9307a06abd0b3b21741bf8ecf9e --- /dev/null +++ b/src/app/home-page/home-page.component.html @@ -0,0 +1,22 @@ +<div class="home"> + + <div class="totalContent"> + <div class="content"> + WCP - WORKSOP/CONFERENCE PORTAL + </div> + <div class="caption"> + engaging minds, empowering success! + </div> + + <div class="seperator"></div> + <div class="centerAlign"> + <div class="controls"> + <button class="controlButton">LOGIN</button> + <div class=verticleLine></div> + <button class="controlButton">REGISTER</button> + + </div> + + </div> + </div> +</div> \ No newline at end of file diff --git a/src/app/home-page/home-page.component.scss b/src/app/home-page/home-page.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..c8b6dead3794558d6ced560ce93764b0649e97fb --- /dev/null +++ b/src/app/home-page/home-page.component.scss @@ -0,0 +1,76 @@ +.home { + width: 100%; + background-image: url("../../assets/images/conference.jpg"); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + position: relative; + height: 60rem; +} + +.totalContent { + display: flex; + flex-direction: column; + position: absolute; + top: 45%; + right: 10%; +} + +.content { + font-family: "Raleway", sans-serif; + -webkit-text-stroke: 0.05rem white; + letter-spacing: 0.1rem; + color: rgb(231, 195, 245); + font-weight: 600; + font-size: 2.5rem; +} + +.caption { + color: white; + display: flex; + flex-direction: row; + font-family: "Alex Brush", cursive; + font-size: 2rem; + justify-content: space-around; + margin-bottom: 1, 5rem; +} + +.seperator { + width: auto; + height: 0.2rem; + background: white; + margin: 2rem; +} +.controls { + display: flex; + width: 50%; + flex-direction: row; + justify-content: space-around; +} + +.controlButton { + padding: 0rem; + width: 8rem; + font-family: "Raleway", sans-serif; + background-color: rgb(178, 83, 216); + color: white; + padding: 0.5rem 1rem; + border-radius: 1rem; + border: none; +} + +.centerAlign { + display: flex; + flex-direction: row; + justify-content: space-around; +} + +.verticleLine { + height: auto; + width: 0.07rem; + background-color: white; +} + +.backGround { + width: 100%; +} diff --git a/src/app/home-page/home-page.component.spec.ts b/src/app/home-page/home-page.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..e1803322c202e2507b561689292ee8a3b326ef93 --- /dev/null +++ b/src/app/home-page/home-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomePageComponent } from './home-page.component'; + +describe('HomePageComponent', () => { + let component: HomePageComponent; + let fixture: ComponentFixture<HomePageComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HomePageComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HomePageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/home-page/home-page.component.ts b/src/app/home-page/home-page.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..8c2f98adf0ab8ecf434cde0c65cf48fe1d6c4d43 --- /dev/null +++ b/src/app/home-page/home-page.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-home-page', + templateUrl: './home-page.component.html', + styleUrls: ['./home-page.component.scss'] +}) +export class HomePageComponent implements OnInit { + title="Hello" + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/listing/listing.component.html b/src/app/listing/listing.component.html new file mode 100644 index 0000000000000000000000000000000000000000..a6cde125b50a2c4e7f8d6a19a4325908b58b68bb --- /dev/null +++ b/src/app/listing/listing.component.html @@ -0,0 +1,24 @@ +<div class="eventsList"> + <div class="heading">Active events:</div> +</div> +<div class="eventsList list"> + <div *ngFor="let event of events"> + <mat-card class="event" [class.mat-elevation-z7]="true"> + <mat-card-header> + <div mat-card-avatar class="example-header-image"></div> + <mat-card-title>{{event.eventName}} <span class="badge badge-secondary tag" *ngIf="event.totalSeats*0.2>=event.remainingSeats">Fast filling</span> </mat-card-title> + <mat-card-subtitle style="margin-bottom: 2rem; margin-top: -1rem;">{{event.remainingSeats}}/{{event.totalSeats}} + seats available</mat-card-subtitle> + </mat-card-header> + <div class="eventImage"> + <img mat-card-image src="../../assets/images/logo.jpg" style="max-width: 10rem" alt="Photo of a Shiba Inu"> + </div> + <mat-card-actions class="controls"> + <button mat-button color="primary">View Details</button> + <button mat-button color="primary" *ngIf="event.isRegistrationAllowed">Register</button> + <button mat-button disabled *ngIf="!event.isRegistrationAllowed">Closed</button> + + </mat-card-actions> + </mat-card> + </div> +</div> \ No newline at end of file diff --git a/src/app/listing/listing.component.scss b/src/app/listing/listing.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..db121797d7e9def573000487e26b72fede6d70a5 --- /dev/null +++ b/src/app/listing/listing.component.scss @@ -0,0 +1,109 @@ +.eventsList { + padding: 2rem; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; + width: 100%; + background: + radial-gradient( + farthest-side at top left, + rgba(196, 181, 46, 0.795), + transparent + ), + radial-gradient( + farthest-side at bottom right, + rgba(196, 181, 46, 0.795), + transparent + ); +} + +.list{ + background: + radial-gradient( + farthest-side at bottom left, + rgba(255, 0, 255, 0.5), + transparent + ), + radial-gradient( + farthest-corner at bottom right, + rgba(255, 50, 50, 0.5), + transparent 400px + ), + radial-gradient( + farthest-corner at top left, + rgba(255, 50, 50, 0.5), + transparent 400px + ), + radial-gradient( + farthest-corner at top right, + rgba(196, 181, 46, 0.795), + transparent + ); +} + +.heading { + padding: 1rem; + // border: rgb(145, 143, 143) 0.15rem solid; + font-family: "Pacifico", cursive; + font-size: 2.5rem; + color: rgb(255, 255, 255); + -webkit-text-stroke-width: 1px; + letter-spacing: 1px; + -webkit-text-stroke-color: black; +} +.event { +// text-overflow: ellipsis; + overflow: hidden; +// white-space: nowrap; +position: relative; + padding: 1.5rem; + width: 18rem; + margin: 1rem; + height: 22rem; + border-radius: 3rem 0rem 0rem 0rem; +} + +.example-header-image { + background-image: url("../../assets/images/logo.jpg"); + background-size: cover; +} + +.eventImage { + display: flex; + flex-direction: row; + justify-content: space-around; + width: 100%; +} + +// .mat-button.register, .mat-raised-button.register{ +// background-color:#327ac7; +// } + +.mat-button.mat-primary, +.mat-icon-button.mat-primary, +.mat-stroked-button.mat-primary { + color: black; +} + +.mat-button.mat-primary:hover, +.mat-icon-button.mat-primary:hover, +.mat-stroked-button.mat-primary:hover { + background-color: #3480eb; + color: white; + border-radius: 2rem; +} + +.tag { + font-size: 50%; + font-weight: 100; + margin-left: 1rem; + height: 1rem; +} + +.controls{ + position: absolute; + bottom: 1rem; + right: 1rem; + +} diff --git a/src/app/listing/listing.component.spec.ts b/src/app/listing/listing.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..58e34d7044c18102df36a74f6144c6ce0af1d601 --- /dev/null +++ b/src/app/listing/listing.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListingComponent } from './listing.component'; + +describe('ListingComponent', () => { + let component: ListingComponent; + let fixture: ComponentFixture<ListingComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ListingComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListingComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/listing/listing.component.ts b/src/app/listing/listing.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3847e837a18265c3bfaba31c7a93c274df6ba7e --- /dev/null +++ b/src/app/listing/listing.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; +import { EventServiceService } from '../services/event-service.service'; +import { eventDetails } from '../contracts/eventDetails'; + +@Component({ + selector: 'app-listing', + templateUrl: './listing.component.html', + styleUrls: ['./listing.component.scss'] +}) +export class ListingComponent implements OnInit { + public events: eventDetails[] = null; + constructor(public eventsService: EventServiceService) { } + + ngOnInit() { + this.events = this.eventsService.getEvents(); + console.log(this.events); + } + +} diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html new file mode 100644 index 0000000000000000000000000000000000000000..147cfc4f8f814706025c8e9a855dacc3eaa0f40c --- /dev/null +++ b/src/app/login/login.component.html @@ -0,0 +1 @@ +<p>login works!</p> diff --git a/src/app/login/login.component.scss b/src/app/login/login.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/login/login.component.spec.ts b/src/app/login/login.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..d6d85a8465b79ee37cb75c371f6e6e936997c573 --- /dev/null +++ b/src/app/login/login.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoginComponent } from './login.component'; + +describe('LoginComponent', () => { + let component: LoginComponent; + let fixture: ComponentFixture<LoginComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ LoginComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LoginComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..12de138adf7093dd940ed5356c43e1a4d98dad8e --- /dev/null +++ b/src/app/login/login.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-login', + templateUrl: './login.component.html', + styleUrls: ['./login.component.scss'] +}) +export class LoginComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/register/register.component.html b/src/app/register/register.component.html new file mode 100644 index 0000000000000000000000000000000000000000..344534e0a92bd608c17dcec25a3325999af1701b --- /dev/null +++ b/src/app/register/register.component.html @@ -0,0 +1,45 @@ +<div class="registerPage"> + <div class="content"> + <div class="title"> + <div class=vertical></div> + <div>REGISTER FOR WCP</div> + </div> + <div class="inputs"> + <form class="example-form"> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Name</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Reg. No.</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="password"> + <mat-placeholder class="placeholder">Password</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="password"> + <mat-placeholder class="placeholder">Confirm Password</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Program</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="email"> + <mat-placeholder class="placeholder">Email</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="number"> + <mat-placeholder class="placeholder">Phone no.</mat-placeholder> + </mat-form-field> + </form> + <div class="register"> + <button class="controlButton">REGISTER ME</button> + </div> + </div> + </div> +</div> + + \ No newline at end of file diff --git a/src/app/register/register.component.scss b/src/app/register/register.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..bf772949ed0902a4e3a0e76217c2a8459eb500b3 --- /dev/null +++ b/src/app/register/register.component.scss @@ -0,0 +1,110 @@ +.registerPage{ + background-image: url("../../assets/images/register_bgimg.jpg"); + background-repeat: no-repeat; + background-size: cover; + background-position:center; + width: 100%; + height: 60rem; + display: flex; + flex-direction: row; + justify-content: space-around; +} + +.content{ + display: flex; + flex-direction: column; + +} + +.title{ + margin-bottom: 1.5rem; + margin-top: 30%; + display: flex; + flex-direction: row; + justify-content: flex-start; + font-family: 'Raleway', sans-serif; + -webkit-text-stroke: 0.5px white; + letter-spacing: 0.1rem; + color:white; + font-weight: 500; + font-size: 2.5rem; +} + +.horizontal{ + display: flex; + color: white; + flex-direction: row; + justify-content: flex-start; +} + +.inputs{ + color: white; + width: 30rem; +} + +.example-form { + min-width: 150px; + max-width: 500px; + width: 100%; + padding: 2rem; + border-radius:1rem; + border: 5px solid white; + background: rgba(19, 17, 17, 0.555); + + } + + .example-full-width { + width: 100%; + } + + .example-form { + min-width: 150px; + max-width: 500px; + width: 100%; + } + + .example-full-width { + width: 100%; + } + + ::ng-deep .mat-focused .mat-form-field-label { + color: white !important; + } + + ::ng-deep.mat-form-field-underline { + background-color: white !important; + } + + ::ng-deep.mat-form-field-ripple { + background-color: white !important;; + } + + +.controlButton{ + padding: 0rem; + width: 12rem; + font-family: 'Raleway', sans-serif; + background-color: rgb(178, 83, 216); + color: white; + padding: 0.5rem 1rem; + border-radius: 1rem; + border: none; +} + +.register{ + display: flex; + flex-direction: row; + justify-content: space-around; + margin-top: 2rem; +} + +.placeholder{ +color: white; +} + +.vertical{ + height: auto; + width: 0.2rem; + background-color: white; + margin-right: 1rem; +} diff --git a/src/app/register/register.component.spec.ts b/src/app/register/register.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..6c19551bf9c857aafe04cfd5214040cf7058c4b9 --- /dev/null +++ b/src/app/register/register.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RegisterComponent } from './register.component'; + +describe('RegisterComponent', () => { + let component: RegisterComponent; + let fixture: ComponentFixture<RegisterComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RegisterComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/register/register.component.ts b/src/app/register/register.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..c6fd519faf261e343e1eab7214527c56fec35d8b --- /dev/null +++ b/src/app/register/register.component.ts @@ -0,0 +1,17 @@ +import { Component, OnInit } from '@angular/core'; +import { userInfo } from '../contracts/userInfo'; + +@Component({ + selector: 'app-register', + templateUrl: './register.component.html', + styleUrls: ['./register.component.scss'] +}) +export class RegisterComponent implements OnInit { + harsha:userInfo; + value=""; + constructor() { } + + ngOnInit(){ + } + +} diff --git a/src/app/services/event-service.service.spec.ts b/src/app/services/event-service.service.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..5fe76be83fab67f822b08ef4aeecf0d84648657c --- /dev/null +++ b/src/app/services/event-service.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { EventServiceService } from './event-service.service'; + +describe('EventServiceService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: EventServiceService = TestBed.get(EventServiceService); + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/event-service.service.ts b/src/app/services/event-service.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..839e32568e5fa9dd4f3c9aa05fc28d3ab5b247c5 --- /dev/null +++ b/src/app/services/event-service.service.ts @@ -0,0 +1,71 @@ +import { Injectable } from '@angular/core'; +import { eventDetails } from '../contracts/eventDetails'; + +@Injectable({ + providedIn: 'root' +}) +export class EventServiceService { + testData:eventDetails[]=[ + { + eventId:1, + eventName:"Event 1", + totalSeats:50, + remainingSeats:30, + isRegistrationAllowed:true + }, + { + eventId:2, + eventName:"Event 2", + totalSeats:70, + remainingSeats:10, + isRegistrationAllowed:true + }, + { + eventId:3, + eventName:"Event 3", + totalSeats:100, + remainingSeats:70, + isRegistrationAllowed:true + }, + { + eventId:4, + eventName:"Event 4", + totalSeats:75, + remainingSeats:10, + isRegistrationAllowed:true + }, + { + eventId:5, + eventName:"Event 5", + totalSeats:50, + remainingSeats:45, + isRegistrationAllowed:true + }, + { + eventId:6, + eventName:"Event 6", + totalSeats:50, + remainingSeats:5, + isRegistrationAllowed:true + }, + { + eventId:7, + eventName:"Event 7", + totalSeats:50, + remainingSeats:40, + isRegistrationAllowed:true + }, + { + eventId:8, + eventName:"Event 8", + totalSeats:500, + remainingSeats:300, + isRegistrationAllowed:false + } + ] + constructor() { } + + public getEvents():eventDetails[]{ + return this.testData; + } +} diff --git a/src/app/services/fakeData/fakeEvents.json b/src/app/services/fakeData/fakeEvents.json new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/assets/images/conference.jpg b/src/assets/images/conference.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3fcd221baf99f83205303692a120e1f2e76a0eb7 Binary files /dev/null and b/src/assets/images/conference.jpg differ diff --git a/src/assets/images/logo.jpg b/src/assets/images/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f24e268a028a03f3e1987ccb4262705bd66dd679 Binary files /dev/null and b/src/assets/images/logo.jpg differ diff --git a/src/assets/images/register_bgimg.jpg b/src/assets/images/register_bgimg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d2918dd16a35e8b241c6551626454b2739d3ca04 Binary files /dev/null and b/src/assets/images/register_bgimg.jpg differ diff --git a/src/index.html b/src/index.html index d6198741ddefbd7e4885090b252dbc1486e0b308..fde8381a80b9eba8220fa25aa430cb86a77b242b 100644 --- a/src/index.html +++ b/src/index.html @@ -2,13 +2,23 @@ <html lang="en"> <head> <meta charset="utf-8"> - <title>ManagementPortal</title> + <title>NcpProj</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> + <link href="https://fonts.googleapis.com/css?family=Alex+Brush&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Rancho&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Pacifico&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> </head> <body> <app-root></app-root> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> </body> </html> diff --git a/src/main.ts b/src/main.ts index c7b673cf44b388e9989fe908b78d7d73cd2e1409..3b2b7d07c9506a1c897baeebbb8bdde70958b08e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,4 @@ +import 'hammerjs'; import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; diff --git a/src/styles.scss b/src/styles.scss index 90d4ee0072ce3fc41812f8af910219f9eea3c3de..7e7239a2eeea2a25f548d2e04302921d28c2a27e 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1 +1,4 @@ /* You can add global styles to this file, and also import other style files */ + +html, body { height: 100%; } +body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }