Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermeborgesbastos committed May 22, 2020
2 parents c253776 + f428156 commit 407393a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/app/about/about.component.responsivity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@
}
}

@media screen and (max-width: 370px) {

.about-container .second-column .profile-picture {
width: 300px;
height: 300px;
}
}

@media screen and (max-width: 320px) {

.about-container {
Expand Down
16 changes: 13 additions & 3 deletions src/app/experience/experience.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,20 @@ export class ExperienceComponent implements OnInit {
this.experiencesOrdered.sort(this.sortService.sort('position', 'desc'));
this.backgroundUrl = this.retrieveBackgroundUrl();
this.updateMobileNavigationView();
this.preloadBounderyImages(experiences.map(xp => xp.backgroundUrl));
});
}

createListSelector(position: number): string {
// Preloads the boundaries images related to the current position in order to avoid the 'blinking' of the background while navigating.
private preloadBounderyImages(images: string[]) {
images.forEach(function (image, i) {
const preloadImages = new Array();
preloadImages[i] = new Image();
preloadImages[i].src = image;
});
}

private createListSelector(position: number): string {
return `li[id="${position}"]`;
}

Expand Down Expand Up @@ -116,11 +126,11 @@ export class ExperienceComponent implements OnInit {
}
}

retrieveBackgroundUrl(): string {
private retrieveBackgroundUrl(): string {
return this.experiences[this.currentPosition - 1].backgroundUrl;
}

updateMobileNavigationView() {
private updateMobileNavigationView() {
this.previousYear =
this.experiences[this.currentPosition - 2]?.startAt || this.experiences[this.currentPosition - 1].startAt;
this.currentYear =
Expand Down
9 changes: 8 additions & 1 deletion src/app/posts/posts.component responsivity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}

p.synopsis {
margin-top: 2em;
margin-top: 0;
}

.top-container {
Expand Down Expand Up @@ -92,4 +92,11 @@
}
}
}
}

@media screen and (max-width: 360px) {

.container p.synopsis {
display: none;
}
}

0 comments on commit 407393a

Please sign in to comment.