From 08aeb5b2ca822489b9884f73a31d7838560ca8e3 Mon Sep 17 00:00:00 2001 From: Guilherme Borges Bastos Date: Fri, 22 May 2020 10:31:53 -0300 Subject: [PATCH 1/2] Mobile Responsivity Adjustments. --- src/app/about/about.component.responsivity.scss | 8 ++++++++ src/app/posts/posts.component responsivity.scss | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/app/about/about.component.responsivity.scss b/src/app/about/about.component.responsivity.scss index 2f91f71d1..9f5361877 100644 --- a/src/app/about/about.component.responsivity.scss +++ b/src/app/about/about.component.responsivity.scss @@ -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 { diff --git a/src/app/posts/posts.component responsivity.scss b/src/app/posts/posts.component responsivity.scss index 151fd3642..a7e796a70 100644 --- a/src/app/posts/posts.component responsivity.scss +++ b/src/app/posts/posts.component responsivity.scss @@ -58,7 +58,7 @@ } p.synopsis { - margin-top: 2em; + margin-top: 0; } .top-container { @@ -92,4 +92,11 @@ } } } +} + +@media screen and (max-width: 360px) { + + .container p.synopsis { + display: none; + } } \ No newline at end of file From f428156f98df7ee6d5a3f70e856bc17ab440312b Mon Sep 17 00:00:00 2001 From: Guilherme Borges Bastos Date: Fri, 22 May 2020 10:33:39 -0300 Subject: [PATCH 2/2] Preloading background images avoiding 'blinking'. - Preloading the boundaries images related to the current position in order to avoid the 'blinking' of the background while navigating. --- src/app/experience/experience.component.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/app/experience/experience.component.ts b/src/app/experience/experience.component.ts index f892f34e6..d4bda6c35 100644 --- a/src/app/experience/experience.component.ts +++ b/src/app/experience/experience.component.ts @@ -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}"]`; } @@ -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 =