Skip to content
This repository has been archived by the owner on Jan 17, 2021. It is now read-only.

Commit

Permalink
Merge branch 'v3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ferreiro committed Oct 17, 2017
2 parents ec113f5 + a3cdecc commit 8d9466e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 17 deletions.
8 changes: 4 additions & 4 deletions web/public/src/css/sections/about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
background-size: 100% auto;
background-position: 50% 14%;

@include opacity(0);
@include transition(2000ms);
// @include opacity(0);
// @include transition(600ms);

@include border-radius(5px);
@include flexbox_flex(0, 0, auto);
Expand Down Expand Up @@ -142,8 +142,8 @@
text-align: left;
color: rgba(0,0,0,.85);

@include transition(300ms);
@include opacity(0);
// @include transition(300ms);
// @include opacity(0);

@media all and (min-width: $tablet-screen) {
font-size: 1.125rem;
Expand Down
48 changes: 38 additions & 10 deletions web/public/src/js/commun/about.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
setupAbout()
// setupAbout()

function setupAbout() {
displayBiography()
// displayBiography()
// setupScrollEvents()
}

Expand Down Expand Up @@ -53,14 +53,20 @@ async function displayBiography () {
const photo = $('.about_bio__large__left_v2')
const texts = $('.about_bio__large__bio')

hideContent([ photo, texts ])
const content = [ photo, texts ]

var _ = await waitBeforeAnimation()
displayPhoto(photo)
hideContent(content)

var _ = await waitBeforeAnimation()
displayBiographyTexts(texts)

displayContent(content)

/*
displayPhoto(photo)
displayBiographyTexts(texts)
// var _ = await waitBeforeAnimation()
// var _ = await waitBeforeAnimation()
*/
return 0
}

Expand All @@ -70,19 +76,40 @@ function hideContent (contents) {
})
}

function displayContent (contents) {
contents.forEach(function (selector) {
selector.css({
opacity: 1
})
.addClass('animated fadeInBig')
})
}

function displayPhoto (photo) {
photo.css({
opacity: 1
})
/*
var delayTime = 200
setTimeout(function () {
photo
.css({ opacity: 1 })
.addClass('animated fadeInRight')
}, 500)
// .addClass('animated fadeInUp')
// .addClass('animated fadeInRight')
}, delayTime)
*/
}

async function displayBiographyTexts(bioTexts) {
bioTexts.css({
opacity: 1
})
/*
var lastDisplayedItem = 0
var delayTime = 200
$.each(bioTexts, function (index, textSelector) {
delayTime += 400
// delayTime += 400
setTimeout(() => {
$(textSelector)
.css({
Expand All @@ -91,12 +118,13 @@ async function displayBiographyTexts(bioTexts) {
.addClass('animated fadeInUp')
}, delayTime)
})
*/
}

function waitBeforeAnimation () {
return new Promise(resolve => {
setTimeout(function () {
resolve(true)
}, 500)
}, 1200)
})
}
6 changes: 3 additions & 3 deletions web/views/about.pug
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include ./mixins/timelineEntry
include ./mixins/subscriptionBoxLarge

block content_full
//.profileCard
//-.profileCard
.profileCard_bg
// SEO
img
Expand All @@ -21,11 +21,11 @@ block content_full
block content

// include ./includes/breadcrumb.pug
.animated.animated.fadeInUp
.animated.fadeInUp
center
h1.about_bio__large__title Jorge Ferreiro
h2.about_bio__large__subtitle Software Engineer, Product Manager & Entrepreneur

.animated.fadeInUp
.about_bio__large
.about_bio__large__left_v2(style="background-image: url(/images/about/jorge_ferreiro_entrepreneur_and_biography_photo.jpg);")
img(src="/images/about/jorge_ferreiro_entrepreneur_and_biography_photo.jpg", width="100%").about_bio__large__pic
Expand Down

0 comments on commit 8d9466e

Please sign in to comment.