-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from DominikNoga/Feature/register-page
Feature/register page
- Loading branch information
Showing
26 changed files
with
487 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...src/app/components/pagesHelperComponents/Register-page/addbutton/addbutton.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<div class="wraper"> | ||
<button class="btn fourth">Add to card</button> | ||
<p>Contact us to finalize the purchase at mail@pg.edu.pl</p> | ||
<!-- <button class="btn fourth">Add to card</button> --> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,12 @@ $turquoise: #1abc9c; | |
|
||
.wrapper { | ||
text-align: center; | ||
|
||
} | ||
p | ||
{ | ||
color: #fff; | ||
|
||
} | ||
|
||
h1 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...-web-app-frontend/src/app/components/pagesHelperComponents/keynote/keynote.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<div class="person" [ngClass]="{'additional-info-visible': additionalInfoVisible}"> | ||
<div class="items-container"> | ||
<div class="left"> | ||
|
||
<img src="assets/mock_chair_img/{{person.image}}" alt="Person Image"> | ||
|
||
<!-- {{this.toggleCountService.getNumberOfToggles()}} --> | ||
<!-- {{this.toggleCountService.getNumberOfToggles()}} --> | ||
<div class="speaker">{{person.name}}</div> | ||
<div class="from">{{person.from}}</div> | ||
<div class="title2">{{person.title}}</div> | ||
<button class="show-info-btn" (click)="toggleAdditionalInfo()">More Info</button> | ||
</div> | ||
<div class="right" *ngIf="additionalInfoVisible"> | ||
<div class="abstract"><b>Abstract:</b> {{person.abstract}}</div> | ||
<br> | ||
<div class="about"><b>About the Speaker: </b>{{person.about}}</div> | ||
</div> | ||
</div> | ||
</div> |
91 changes: 91 additions & 0 deletions
91
...-web-app-frontend/src/app/components/pagesHelperComponents/keynote/keynote.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
@import '../../../styles/isd-variables.scss'; | ||
@import '../../../styles/isd-mixins.scss'; | ||
@import '../../../pages/keynotes-page/keynotes-page.component.scss'; | ||
|
||
.person { | ||
max-width: $max-content-width; | ||
padding-top: 2em; | ||
padding-bottom: 2em; | ||
text-align: center; | ||
min-width: 300px; | ||
height: 500px; | ||
// border: 5px solid black; | ||
} | ||
.left { | ||
width: 300px | ||
} | ||
.right { | ||
text-align: left; | ||
flex: 1; | ||
} | ||
|
||
.items-container { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
width: 94%; // Dodaj to, aby kontener odpowiednio reagował na zmiany szerokościa | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
@media screen and (max-width: 1000px) { | ||
.items-container { | ||
flex-direction: column; | ||
|
||
} | ||
.right { | ||
margin-top: 4rem; | ||
margin-left: minmax(20px,3%); | ||
} | ||
} | ||
|
||
.additional-info { | ||
max-width: $max-content-width; | ||
} | ||
|
||
.person img { | ||
max-width: auto; | ||
max-height: 200px; | ||
border-radius: 10%; | ||
} | ||
|
||
.show-info-btn { | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
padding: 5px 10px; | ||
background-color: #ff002b; | ||
color: #fff; | ||
border: none; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
} | ||
|
||
.additional-info { | ||
margin-top: 10px; | ||
} | ||
|
||
.speaker { | ||
display: block; | ||
font-size: 2em; | ||
margin-top: 0.5em; | ||
margin-left: 0; | ||
margin-right: 0; | ||
font-weight: 400; | ||
font-family: veneer-three; | ||
height: 40px; | ||
} | ||
|
||
.from { | ||
font-size: 1em; | ||
margin-bottom: 0.5em; | ||
height: 30px; | ||
} | ||
|
||
.title2 { | ||
font-family: veneer-two; | ||
font-size: 1.5em; | ||
font-weight: 500; | ||
max-height: 100px; | ||
min-height: 80px; | ||
} |
23 changes: 23 additions & 0 deletions
23
...b-app-frontend/src/app/components/pagesHelperComponents/keynote/keynote.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { KeynoteComponent } from './keynote.component'; | ||
|
||
describe('KeynoteComponent', () => { | ||
let component: KeynoteComponent; | ||
let fixture: ComponentFixture<KeynoteComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ KeynoteComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(KeynoteComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
61 changes: 61 additions & 0 deletions
61
...ce-web-app-frontend/src/app/components/pagesHelperComponents/keynote/keynote.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Component, OnInit, Input, ElementRef, Renderer2 } from '@angular/core'; | ||
import { ToggleCountService } from './toggle-count.service.service'; | ||
import { keynote } from 'src/app/interfaces/keynote'; | ||
|
||
@Component({ | ||
selector: 'isd-keynote', | ||
templateUrl: './keynote.component.html', | ||
styleUrls: ['./keynote.component.scss'] | ||
}) | ||
export class KeynoteComponent implements OnInit { | ||
public additionalInfoVisible = false; | ||
@Input() person!: keynote; | ||
|
||
temporder!: number; | ||
|
||
constructor( | ||
private elementRef: ElementRef, | ||
private renderer: Renderer2, | ||
public toggleCountService: ToggleCountService | ||
) { } | ||
|
||
ngOnInit(): void { | ||
this.temporder = this.person.order; | ||
} | ||
|
||
toggleAdditionalInfo(): void { | ||
const hostElement = this.elementRef.nativeElement; | ||
const parentElement = hostElement.parentNode as HTMLElement; | ||
const order = this.person.order; | ||
|
||
if (window.innerWidth > 1000) { | ||
if (!this.additionalInfoVisible) { | ||
this.renderer.setStyle(hostElement, 'grid-column', '1 / -1'); | ||
|
||
if (order % 3 === 2 || order % 3 === 1) { | ||
// Naprawić buda przy więcej niż 3 otwartych dodatkowych informacji | ||
parentElement.insertBefore(hostElement, parentElement.children[this.closestdevideby3(this.temporder) + this.toggleCountService.getNumberOfToggles()] ); | ||
} | ||
this.toggleCountService.incrementToggleCount(); | ||
} else { | ||
this.toggleCountService.decrementToggleCount(); | ||
parentElement.insertBefore(hostElement, parentElement.children[order + 1]); | ||
this.renderer.removeStyle(hostElement, 'grid-column'); | ||
} | ||
console.log("current order: " + order); | ||
} | ||
|
||
this.additionalInfoVisible = !this.additionalInfoVisible; | ||
} | ||
|
||
closestdevideby3(n: number): number { | ||
const reszta = n % 3; | ||
if (reszta === 0) { | ||
return n; | ||
} else if (reszta === 1) { | ||
return n - 1; | ||
} else { | ||
return n - 2; | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...end/src/app/components/pagesHelperComponents/keynote/toggle-count.service.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { ToggleCountService} from './toggle-count.service.service'; | ||
|
||
describe('ToggleCount.ServiceService', () => { | ||
let service: ToggleCountService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(ToggleCountService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
...frontend/src/app/components/pagesHelperComponents/keynote/toggle-count.service.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Injectable } from '@angular/core'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class ToggleCountService { | ||
private numberOfToggles = 0; | ||
|
||
constructor() { } | ||
|
||
getNumberOfToggles(): number { | ||
return this.numberOfToggles; | ||
} | ||
|
||
incrementToggleCount(): void { | ||
this.numberOfToggles++; | ||
} | ||
|
||
decrementToggleCount(): void { | ||
this.numberOfToggles--; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
ISD-conference-web-app-frontend/src/app/interfaces/keynote.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface keynote { | ||
order: number; | ||
name: string; | ||
image: string; | ||
from: string; | ||
title: string; | ||
abstract: string; | ||
about: string; | ||
} |
6 changes: 6 additions & 0 deletions
6
ISD-conference-web-app-frontend/src/app/pages/keynotes-page/keynotes-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<span class="custom-header">ISD Keynotes</span> | ||
<div class="container"> | ||
<isd-keynote *ngFor="let keynote of keynotes" [person]="keynote"></isd-keynote> | ||
</div> | ||
|
||
|
Oops, something went wrong.