Skip to content

Commit 36c9a92

Browse files
committed
presentation video changed
1 parent a4d3795 commit 36c9a92

10 files changed

+42
-73
lines changed

angular.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
"styles": [
2727
"src/styles.css"
2828
],
29-
"scripts": [
29+
"scripts": [
3030
"node_modules/vanta/vendor/three.r119.min.js",
31-
"node_modules/vanta/dist/vanta.net.min.js"
31+
"node_modules/vanta/dist/vanta.net.min.js",
32+
"node_modules/disable-scroll/src/index.js"
3233
]
3334
},
3435
"configurations": {
@@ -122,6 +123,7 @@
122123
}
123124
}
124125
}
125-
}},
126+
}
127+
},
126128
"defaultProject": "shrapsen"
127-
}
129+
}

src/app/app.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { PresentationElementComponent } from './presentation-element/presentatio
1111
import { HttpClientModule } from '@angular/common/http'
1212
import { ProjectsService } from './projects.service';
1313
import { EndingPageComponent } from './ending-page/ending-page.component'
14+
import disableScroll from 'disable-scroll';
1415

1516
@NgModule({
1617
declarations: [
Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,19 @@
1-
a {
2-
text-decoration: none;
3-
}
4-
a:hover
5-
{
6-
text-decoration:none;
7-
cursor:pointer;
8-
}
91
#Ebackground {
102
float: left;
11-
z-index: -1;
123
width: 100vw;
134
height: 100vh;
145
}
15-
#EmainPage {
16-
float: left;
17-
position: fixed;
18-
height: 92vh;
19-
width: 100vw;
20-
}
21-
#EleftSide{
22-
float: left;
23-
width: 90vw;
24-
}
25-
#ElogoContainer{
26-
margin-top: 20vh;
6+
#endContainer{
7+
float:left;
278
margin-left: 10vw;
28-
display: block;
9+
margin-top: 40vh;
2910
}
30-
#Elogo {
31-
font-family: 'lato';
32-
font-size: 130px;
33-
color: white;
34-
display: block;
35-
}
36-
37-
#ElanguagesDescription{
11+
.end{
12+
float: left;
13+
width: 100%;
14+
margin-top: 30px;
3815
color: white;
3916
font-family: 'lato';
40-
font-size: 40px;
17+
font-size: 60px;
4118
color: white;
42-
display: inline;
43-
}
44-
.ElanguageLogo {
45-
height: 120px;
46-
margin-left: 50px;
47-
float: left;
48-
}
19+
}
Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
<div appParallax [ratio]="-0.3" id="Ebackground">
2-
<div appParallax [ratio]="-0.5" id="EmainPage">
3-
<div id="EleftSide">
4-
<div id="ElogoContainer">
5-
<div id="Elogo">Shrapsen</div>
6-
</div>
7-
<div style="margin-top: 15vh; margin-left: 2vw;">
8-
<div id="ElanguagesDescription">Languages that i use:</div>
9-
<div style="clear: both;"></div>
10-
<div style="margin-top: 5vh; margin-left: -50px;">
11-
<img class="ElanguageLogo" src="../assets/images/cSharpLogo.png">
12-
<img class="ElanguageLogo" src="../assets/images/pythonLogo.png">
13-
<img class="ElanguageLogo" src="../assets/images/javaLogo.png">
14-
<img class="ElanguageLogo" src="../assets/images/cppLogo3.png">
15-
<img class="ElanguageLogo" src="../assets/images/jsLogo.png">
16-
</div>
17-
</div>
18-
</div>
1+
<div id="Ebackground">
2+
<div id="endContainer">
3+
<div class="end">Made by Sylwester Dawida</div>
4+
<div class="end">Sylwo1003@gmail.com</div>
195
</div>
206
</div>

src/app/ending-page/ending-page.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class EndingPageComponent implements OnInit {
1414
ngOnInit(): void {
1515

1616
VANTA.NET({
17-
el: "#background",
17+
el: "#Ebackground",
1818
mouseControls: true,
1919
touchControls: true,
2020
gyroControls: false,

src/app/parallax.directive.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ import { Directive, Input, ElementRef, HostListener } from '@angular/core';
55
})
66
export class ParallaxDirective {
77

8-
@Input('ratio') parallaxRatio : number = 1;
9-
initialTop :number = 0;
8+
@Input('ratio') parallaxRatio: number = 1;
9+
initialTop: number = 0;
1010

11-
constructor(private eleRef : ElementRef) {
11+
constructor(private eleRef: ElementRef) {
1212
this.initialTop = this.eleRef.nativeElement.getBoundingClientRect().top
1313
}
1414

1515
@HostListener("window:scroll", ["$event"])
16-
onWindowScroll(event){
16+
onWindowScroll(event) {
1717
const componentPosition = this.eleRef.nativeElement.offsetTop + window.innerHeight
1818
const scrollPosition = window.pageYOffset
19-
console.log(componentPosition + " " + this.initialTop)
20-
if(scrollPosition > this.initialTop){
19+
if (scrollPosition > this.initialTop) {
2120
this.eleRef.nativeElement.style.top = (this.initialTop - (window.scrollY * this.parallaxRatio)) + 'px'
2221
}
2322
}

src/app/presentation-element/presentation-element.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
#presentationImg{
2121
float: left;
22-
width: auto;
22+
width: 40vw;
2323
height: 50vh;
2424
margin-top: 10vh;
2525
}

src/app/presentation-element/presentation-element.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
<div [@backgroundIn]="animatePage ? 'show' : '*'" id="elBacgroundBar">
33
</div>
44
<div id="element">
5-
<img [@imageIn]="animatePage ? 'show' : '*'" id="presentationImg" [src]='imageLink'>
6-
<div [@textIn]="animatePage ? 'show' : '*'" id="description">
5+
<div [@imageIn]="animatePage ? 'show' : '*'" id="presentationImg">
6+
<iframe [@imageIn]="animatePage ? 'show' : '*'" width="100%" height="100%"
7+
src="https://www.youtube.com/embed/veHqJSC-9Lo" frameborder="0"
8+
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
9+
allowfullscreen></iframe>
10+
</div>
11+
<!---<img [@imageIn]="animatePage ? 'show' : '*'" id="presentationImg" [src]='imageLink'>--->
12+
<div [@textIn]="animatePage ? 'show' : '*'" id="description">
713
<div id="title">
814
{{title}}
915
</div>

src/app/presentation-element/presentation-element.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Component, OnInit, Input, HostBinding, HostListener, ElementRef } from '@angular/core';
22
import { trigger, state, style, transition, animate, query, stagger, sequence } from '@angular/animations';
3+
import disableScroll from 'disable-scroll';
34

45
@Component({
56
selector: 'app-presentation-element',
@@ -51,15 +52,18 @@ export class PresentationElementComponent implements OnInit {
5152

5253
constructor(public el: ElementRef) { }
5354

55+
animationDone($event) {
56+
disableScroll.off();
57+
}
58+
5459
@HostListener('window:scroll', ['$event'])
5560
checkScroll() {
5661
if (!this.animatePage) {
57-
const componentPosition = this.el.nativeElement.offsetTop + window.innerHeight * (this.index + 1.9)
62+
const componentPosition = this.el.nativeElement.offsetTop + window.innerHeight * 0.7 //* (this.index + 1.9)
5863
const scrollPosition = window.pageYOffset
5964

6065
if (scrollPosition >= componentPosition) {
6166
this.animatePage = true;
62-
console.log(componentPosition)
6367
}
6468
}
6569
}

src/app/presentation/presentation.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div id="presentationBck">
22
<div style="float: left; height: 100vh; width: 100vw; min-width: 500px;">
33
<div [@flyInOut]="show ? 'show' : '*'" id="myProjectsContainer">
4-
<div id="myProjects">my projects</div>
4+
<div id="myProjects">My projects</div>
55
</div>
66
</div>
77
<div *ngFor="let project of projects; index as i" style="float: left;">

0 commit comments

Comments
 (0)