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

feat: created newsroom section #749

Merged
merged 105 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
287191a
blog overview created
May 8, 2022
1d6ba8e
previous recent-blog section removed
May 8, 2022
b92e9d4
max height removed
May 8, 2022
ab18714
mobile view corrected
May 8, 2022
bdb7fbf
Merge branch 'master' into newsroom
akshatnema May 9, 2022
9b51659
blog view completed
May 9, 2022
867dd7f
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
May 9, 2022
c0f3e4a
newsview section created
May 11, 2022
285e3d1
Merge branch 'master' into newsroom
akshatnema May 11, 2022
418b385
Merge branch 'asyncapi:master' into newsroom
akshatnema May 16, 2022
4dc3dd9
Merge branch 'master' into newsroom
akshatnema May 18, 2022
bf41197
removed errors
akshatnema May 18, 2022
db8ad74
Merge branch 'master' into newsroom
akshatnema May 18, 2022
6771beb
name changed
akshatnema May 18, 2022
7ee2254
Merge branch 'master' into newsroom
akshatnema May 19, 2022
4b4a5ae
news section completed
akshatnema May 19, 2022
9df5991
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema May 19, 2022
14f5e32
Merge branch 'master' into newsroom
akshatnema May 19, 2022
75f35d9
Merge branch 'master' into newsroom
akshatnema May 20, 2022
2682274
changes according to the review
akshatnema May 20, 2022
3472103
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema May 20, 2022
6edaa6e
Merge branch 'master' into newsroom
akshatnema May 24, 2022
0761059
changes according to the review
akshatnema May 25, 2022
2105b14
updated mobile view
akshatnema May 26, 2022
599dd6f
Merge branch 'master' into newsroom
akshatnema May 26, 2022
00563ae
Merge branch 'master' into newsroom
akshatnema May 27, 2022
1d69e37
Merge branch 'master' into newsroom
akshatnema May 31, 2022
bc9e05b
spacing added
akshatnema May 31, 2022
6ca6f07
Merge branch 'master' into newsroom
akshatnema Jun 1, 2022
6727498
Youtube API added
akshatnema Jun 1, 2022
0236a83
Merge branch 'master' into newsroom
akshatnema Jun 2, 2022
ac6d1cd
corrected blog scroll
akshatnema Jun 4, 2022
a1955f4
Youtube Component added
akshatnema Jun 5, 2022
860a5d7
added spec sheet details
akshatnema Jun 5, 2022
97d6541
Merge branch 'master' into newsroom
akshatnema Jun 10, 2022
7f2fe22
normalize spacing
akshatnema Jun 11, 2022
fe9785a
netlify functions added
akshatnema Jun 11, 2022
82818b9
unnecessary file deleted
akshatnema Jun 11, 2022
0d13480
Merge branch 'master' into newsroom
akshatnema Jun 12, 2022
67825a0
added script for adding videos
akshatnema Jun 13, 2022
9a11a47
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema Jun 13, 2022
3466a96
removed videos.json
akshatnema Jun 13, 2022
d4e3185
added workflow file
akshatnema Jun 13, 2022
ed59427
Merge branch 'master' into newsroom
akshatnema Jun 15, 2022
2326b80
Merge branch 'master' into newsroom
akshatnema Jun 16, 2022
f027455
Merge branch 'master' into newsroom
akshatnema Jun 23, 2022
0314eeb
changes made
akshatnema Jun 23, 2022
e307a92
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema Jun 23, 2022
ddf00ce
changes according to the review
akshatnema Jun 24, 2022
887b2b2
breakpoints issue solved
akshatnema Jun 25, 2022
082f391
Merge branch 'master' into newsroom
akshatnema Jun 25, 2022
9508def
Merge branch 'master' into newsroom
akshatnema Jun 28, 2022
39b2805
Apply suggestions from code review
akshatnema Jun 28, 2022
de39604
Merge branch 'master' into newsroom
akshatnema Jun 29, 2022
5f67d2d
changes according to the review
akshatnema Jun 29, 2022
0f06529
Merge branch 'master' into newsroom
akshatnema Jun 30, 2022
ed4b163
Merge branch 'master' into newsroom
magicmatatjahu Jun 30, 2022
0313e79
move newsroom to the separate components
magicmatatjahu Jun 30, 2022
726fe9d
integrate swiper
magicmatatjahu Jun 30, 2022
a7bdb03
apply styles for mobile devices
magicmatatjahu Jun 30, 2022
cc7d36d
apply styles for mobile devices
magicmatatjahu Jun 30, 2022
a730324
Empty-Commit
magicmatatjahu Jun 30, 2022
7cd26ec
fix styles
magicmatatjahu Jun 30, 2022
c0b525d
Empty-Commit
magicmatatjahu Jun 30, 2022
5bed120
try with downgraded nextjs
magicmatatjahu Jun 30, 2022
adc3776
try with another version of nextjs
magicmatatjahu Jun 30, 2022
ac8e528
try with nextjs12
magicmatatjahu Jun 30, 2022
5b944d2
try with envs
magicmatatjahu Jun 30, 2022
e79585e
fix swiper indexes
magicmatatjahu Jun 30, 2022
6dec20e
new page created for newsroom
akshatnema Jun 30, 2022
97bcb7d
Merge branch 'master' into newsroom
akshatnema Jul 1, 2022
906c8e8
Reverted changes
akshatnema Jul 2, 2022
0237fd3
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema Jul 2, 2022
fb16cb5
added Newsroom on homepage
akshatnema Jul 5, 2022
1e57666
Merge branch 'master' into newsroom
akshatnema Jul 5, 2022
8e13062
updated view
akshatnema Jul 5, 2022
3cc7cf0
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema Jul 5, 2022
cde265d
Merge branch 'master' into newsroom
akshatnema Jul 6, 2022
1f9c40b
Merge branch 'master' into newsroom
akshatnema Jul 9, 2022
1bbbbcf
added link to Buttpn
akshatnema Jul 11, 2022
1f9ba5f
added newsroom in community dropdown
akshatnema Jul 14, 2022
438b67b
Merge branch 'master' into newsroom
akshatnema Jul 14, 2022
2401ba4
corrected icon
akshatnema Jul 14, 2022
5ff5e05
Merge branch 'master' into newsroom
akshatnema Jul 15, 2022
7db244b
Apply suggestions from code review
akshatnema Jul 19, 2022
3abc978
Merge branch 'master' into newsroom
akshatnema Jul 19, 2022
cf0804c
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema Jul 19, 2022
9a83128
bugs fixed
akshatnema Jul 19, 2022
852a48c
removed border
akshatnema Jul 19, 2022
bb5eee1
Apply suggestions from code review
akshatnema Jul 19, 2022
1362c20
updated newsroom videos
akshatnema Jul 20, 2022
73c8b45
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema Jul 20, 2022
c130de4
deleted workflow
akshatnema Jul 20, 2022
8f75641
Revert "deleted workflow"
akshatnema Jul 20, 2022
971928a
workflow testing
akshatnema Jul 20, 2022
d8671ff
workflow testing
akshatnema Jul 20, 2022
1e91265
combined workflow
akshatnema Jul 20, 2022
d86fcc5
combined workflow
akshatnema Jul 20, 2022
65bb3be
removed github asyncapi
akshatnema Jul 20, 2022
5ac04b4
changed file
akshatnema Jul 20, 2022
8b663f4
merged the newsroom and meetings workflow
akshatnema Jul 20, 2022
945075c
renamed the file
akshatnema Jul 20, 2022
4710532
Merge branch 'master' into newsroom
akshatnema Jul 21, 2022
46aaded
added on failure message
akshatnema Jul 25, 2022
f86deb8
Merge remote-tracking branch 'refs/remotes/origin/newsroom' into news…
akshatnema Jul 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions components/BlogView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {useEffect} from 'react'
import BlogPostItem from './navigation/BlogPostItem'
import { getAllPosts } from '../lib/api'
import ArrowRight from './icons/ArrowRight'
import ArrowLeft from './icons/ArrowLeft'

export default function BlogView() {
akshatnema marked this conversation as resolved.
Show resolved Hide resolved
const posts = getAllPosts()
.filter(p => p.slug.startsWith('/blog/'))
.sort((i1, i2) => {
const i1Date = new Date(i1.date)
const i2Date = new Date(i2.date)

if (i1.featured && !i2.featured) return -1
if (!i1.featured && i2.featured) return 1
return i2Date - i1Date
akshatnema marked this conversation as resolved.
Show resolved Hide resolved
})
.slice(0, 5)
let blogContainer
useEffect(() => {
blogContainer = document.getElementById('blog-container')
}, [])
akshatnema marked this conversation as resolved.
Show resolved Hide resolved

const shiftLeft = (e) =>{
e.preventDefault()
blogContainer.scrollLeft-=350
}
const shiftRight = (e) =>{
e.preventDefault()
blogContainer.scrollLeft+=350
}
akshatnema marked this conversation as resolved.
Show resolved Hide resolved
return (
<div className="flex-col lg:flex lg:w-4/5 p-4 overflow-auto">
<div className="flex snap-x gap-6 overflow-x-auto scroll-none" id="blog-container">
{
posts.map((post, index) => (
<BlogPostItem className='snap-start scroll-ml-6' post={post} key={index} />
))
}
</div>
<div className="flex flex-row mt-4">
<div className="border-2 py-4 px-8 shadow-md rounded border-gray-100 text-gray-400 hover:border-secondary-500 hover:text-secondary-500 hover:bg-secondary-100 mx-2" onClick={shiftLeft}>
<ArrowLeft className="w-5" />
</div>
<div className="border-2 py-2 px-6 shadow-md rounded border-gray-100 text-gray-400 hover:border-secondary-500 hover:text-secondary-500 hover:bg-secondary-100 mx-2" onClick={shiftRight}>
<ArrowRight className="w-8" />
</div>
akshatnema marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
)
}
7 changes: 7 additions & 0 deletions components/icons/ArrowLeft.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/navigation/BlogPostItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function BlogPostItem({ post, className = '' }) {

return (
<Link href={post.slug} passHref>
<a className={`flex flex-col border border-gray-200 rounded-lg shadow-md divide-y divide-gray-200 transition-all duration-300 ease-in-out hover:shadow-lg overflow-hidden cursor-pointer ${className}`}>
<a className={`flex flex-col border border-gray-200 rounded-lg shadow-md divide-y divide-gray-200 transition-all duration-300 ease-in-out hover:shadow-lg overflow-hidden cursor-pointer ${className}`} style={{minWidth:"22rem"}}>
akshatnema marked this conversation as resolved.
Show resolved Hide resolved
<img className="h-48 w-full object-cover" src={post.cover} alt="" />
<div className="flex-1 bg-white p-6 flex flex-col justify-between">
<div className="flex-1">
Expand Down
7 changes: 5 additions & 2 deletions components/typography/TextLink.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Link from 'next/link'

export default function TextLink({
href,
Expand All @@ -11,9 +12,11 @@ export default function TextLink({
return(
<>
{' '}
<a href={href} target={target} rel="noreferrer noopener" className={classNames}>
<Link href={href} passHref>
akshatnema marked this conversation as resolved.
Show resolved Hide resolved
<a target={target} rel="noreferrer noopener" className={classNames}>
{children}
</a>
</a>
</Link>
</>
)

Expand Down
1 change: 1 addition & 0 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
html, body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
scroll-behavior: smooth;
akshatnema marked this conversation as resolved.
Show resolved Hide resolved
}

li > p {
Expand Down
63 changes: 43 additions & 20 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import NewsletterSubscribe from '../components/NewsletterSubscribe'
import Sponsors from '../components/Sponsors'
import Head from '../components/Head'
import Slack from '../components/slack'
import ArrowRight from '../components/icons/ArrowRight'
import Button from '../components/buttons/Button'
import Calendar from '../components/Calendar'
import AdidasLogo from '../components/logos/Adidas'
Expand All @@ -15,6 +16,7 @@ import SalesforceLogo from '../components/logos/Salesforce'
import SapLogo from '../components/logos/SAP'
import Testimonial from '../components/Testimonial'
import BlogPostItem from '../components/navigation/BlogPostItem'
import BlogView from '../components/BlogView'
import Heading from '../components/typography/Heading'
import Paragraph from '../components/typography/Paragraph'
import TextLink from '../components/typography/TextLink'
Expand Down Expand Up @@ -43,11 +45,11 @@ function HomePage() {
<>
<Head />
<StickyNavbar>
<NavBar className="max-w-screen-xl block px-4 sm:px-6 lg:px-8 mx-auto" />
<NavBar className="max-w-screen-xl block px-4 sm:px-6 lg:px-8 mx-auto" />
</StickyNavbar>

<Container wide>
<Hero className="mb-24" />
<Hero className="mb-24" />
</Container>

<Container className="text-center pb-12" wide>
Expand Down Expand Up @@ -123,7 +125,7 @@ function HomePage() {

<div className="mt-12 lg:flex lg:flex-row-reverse">
<div className="mt-10 lg:mt-0 lg:flex-1">
<Calendar size="2" className="float-left"/>
<Calendar size="2" className="float-left" />
</div>
<div className="lg:text-left lg:max-w-xl lg:mr-12">
<div className="mt-5">
Expand Down Expand Up @@ -183,7 +185,7 @@ function HomePage() {
typeStyle="heading-md-semibold"
className="mb-4"
>
Want to Sponsor Us?
Want to Sponsor Us?
</Heading>
<Paragraph className="mt-2 md:w-1/2 md:mx-auto">
These great organizations are already supporting AsyncAPI. Want to become a sponsor?
Expand Down Expand Up @@ -234,7 +236,7 @@ function HomePage() {
<Paragraph className="mt-3 max-w-2xl mx-auto sm:mt-4 pb-4">
The following companies support us by letting us use their products for free. Interested in supporting us too?
<TextLink href="mailto:[email protected]" target="_blank">
Email us
Email us
</TextLink> for more info.
</Paragraph>
<SupportUs className="mt-4" showSupportBanner={false} />
Expand All @@ -245,29 +247,50 @@ function HomePage() {
level="h2"
typeStyle="heading-lg"
>
Latest stories from our blog
Latest Updates
</Heading>
<Paragraph className="mt-3 max-w-2xl mx-auto sm:mt-4">
Find the latest and greatest stories from our community.
</Paragraph>
<Paragraph typeStyle="body-md" className="max-w-2xl mx-auto">
Want to publish a blog post? We love community stories.
<Paragraph typeStyle="body-md" className="max-w-2xl mx-auto mt-3">
Get a glimpse of latest news, events, and blog posts. Want to publish a blog post? We love community stories.
<TextLink href="https://github.com/asyncapi/website/issues/new?template=blog.md" target="_blank">
Submit yours!
</TextLink>
</Paragraph>
</div>
<div className="mt-12 mx-auto md:grid md:gap-5 md:grid-cols-2 lg:grid-cols-3 lg:max-w-none lg:px-8">
{
posts.map((post, index) => (
<BlogPostItem className="mb-8 md:mb-0" key={index} post={post} />
))
}
<div className="lg:flex flex-row mt-4">
<div className="text-center lg:text-left lg:w-1/5 pt-4">
<Heading level="h4" typeStyle="heading-md-semibold">
From the blog
</Heading>
<Paragraph typeStyle="body-md" className="mt-4">
Check out these articles written by community members
</Paragraph>
<div className="mt-4">
<TextLink href="/blog" className="mt-4">
Read all blog posts
<ArrowRight className="inline w-6" />
</TextLink>
</div>
</div>
<BlogView />
</div>
<div className="my-10 text-center">
<Button bgClassName="bg-none border border-gray-200 text-gray-800 hover:text-gray-700 shadow-none" href="/blog" text="View more blog posts" />
<div className="lg:flex flex-row mt-4">
<div className="text-center lg:text-left lg:w-1/5 pt-4">
<Heading level="h4" typeStyle="heading-md-semibold">
Latest News
</Heading>
<Paragraph typeStyle="body-md" className="mt-4">
Read about what people are saying about AsyncAPI
</Paragraph>
<div className="mt-4">
<TextLink href="https://twitter.com/AsyncAPISpec" className="mt-4" target="_blank">
Follow us on Twitter
<ArrowRight className="inline w-6" />
</TextLink>
</div>
</div>
</div>
</Container>
</Container>

</>
)
}
Expand Down
8 changes: 8 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ module.exports = {
'.font-ligatures-contextual': {
'font-variant-ligatures': 'contextual',
},
'.scroll-none':{
'scrollbar-width': 'none',
'-ms-overflow-style': 'none',
},
'.scroll-none::-webkit-scrollbar':{
'display':'none',
'scroll-behavior':'smooth',
}
})
})
],
Expand Down