Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Commit 13ee1de

Browse files
committed
add julius volz tweet.
1 parent a04add7 commit 13ee1de

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

src/components/index/Testimonials.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ const Testimonials: React.SFC<{}> = () => {
8080
const tweetsContainerRef = useRef<HTMLDivElement>(null)
8181
const cycles = Math.ceil(testimonials.length / 3)
8282

83+
console.log(cycles, testimonials.length)
84+
8385
useEffect(() => {
8486
const tweetsContainer = tweetsContainerRef.current
8587
const dots = document.querySelectorAll('.dot')
@@ -92,16 +94,18 @@ const Testimonials: React.SFC<{}> = () => {
9294
})
9395

9496
const switchTweets = (to: number) => {
95-
const tweetsContainer = tweetsContainerRef.current
96-
const cycleWidth = tweetsContainer?.scrollWidth / cycles
97-
tweetsContainer.scroll({ left: parseFloat(cycleWidth * to), behavior: 'smooth' })
97+
// const tweetsContainer = tweetsContainerRef.current
98+
// const cycleWidth = tweetsContainer?.scrollWidth / cycles
99+
// tweetsContainer.scroll({ left: parseFloat(cycleWidth * to), behavior: 'smooth' })
98100

99101
// Older method which regards the actuals tweets and the space between them and not the width of .tweets
100102

101-
// const tweets = tweetsRef.current
102-
// const firstTweet = tweets?.firstChild
103-
// const spacing = getComputedStyle(firstTweet)['margin-right']
104-
// const transform = firstTweet.offsetWidth * 3 + parseFloat(spacing.substring(0, spacing.length - 2)) * 2.8
103+
const tweetsContainer = tweetsContainerRef.current
104+
const tweets = tweetsRef.current
105+
const firstTweet = tweets?.firstChild
106+
const spacing = getComputedStyle(firstTweet)['margin-right']
107+
const scrollBy = firstTweet.offsetWidth * 3 + parseFloat(spacing.substring(0, spacing.length - 2)) * 2.8
108+
tweetsContainer.scroll({ left: parseFloat(scrollBy * to), behavior: 'smooth' })
105109
}
106110

107111
return (

src/contents/index.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import Yo from '../resources/yo.jpg'
2222
import K33g from '../resources/k33g.jpg'
2323
import Michael from '../resources/michael.jpg'
2424
import Roku from '../resources/roku.jpg'
25+
import Julius from '../resources/julius.jpg'
2526
import { TestimonialProps } from '../components/index/Testimonial'
2627

2728
import { Link } from 'gatsby'
@@ -156,6 +157,21 @@ export const testimonials: TestimonialProps[] = [
156157
twitterHandle: 'dnsmichi',
157158
tweetId: '1311560585717460992'
158159
},
160+
{
161+
name: 'Julius Volz',
162+
avatar: Julius,
163+
org: <a href="https://twitter.com/PrometheusIO" target="_blank">@PrometheusIO</a>,
164+
role: 'Creator',
165+
text: (
166+
<>
167+
<p>
168+
Look at any PR (pull request) in a full coding environment where you can edit, build, and test the PR code, by just prepending "<a href="https://gitpod.io" target="_blank">gitpod.io#</a>" to the PR URL. Super useful for reviewing/testing stuff without having to check it out locally!
169+
</p>
170+
</>
171+
),
172+
twitterHandle: 'juliusvolz',
173+
tweetId: '1298972181708275717'
174+
},
159175
{
160176
name: 'David Ressler',
161177
avatar: DavidRessler,

src/resources/julius.jpg

36.5 KB
Loading

0 commit comments

Comments
 (0)