Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in contributors data at build time #9

Merged
merged 3 commits into from
Jun 20, 2017
Merged

Conversation

olizilla
Copy link
Member

  • Use hugo's getJSON function to grab contributors data at build time.
  • Simplify contributors impl

- Simplify contributors impl
@olizilla olizilla requested a review from alanshaw June 20, 2017 15:24
@alanshaw
Copy link
Member

👓

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looking good and working great

z-index: 10;
}
#contributors .hex.show:hover + .hex {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove?

link.style.background = '#333 url(' + item.photo + ') no-repeat center'
link.style.backgroundSize = 'cover'
cb(null, link)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the image fails to load you halt the animation I think. You need an onerror handler to call the callback in this case.

}, delay)
})
}
renderWithPause(0, Date.now())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like you could extract this control flow logic from the rendering and publish as a module ;)

@olizilla
Copy link
Member Author

Fixed up!

@olizilla olizilla merged commit fdaa741 into move-content Jun 20, 2017
@olizilla olizilla deleted the contributors branch June 20, 2017 17:00
@olizilla olizilla restored the contributors branch June 20, 2017 17:01
renderContributor(data[itemIndex], function (err, el) {
var nextIndex = itemIndex + 1
if (err) renderWithPause(nextIndex)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return renderWIthPause(/* ... */) here?

setTimeout(function () {
renderWithPause(itemIndex + 1, now)
renderWithPause(itemIndex + 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use nextIndex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants