Skip to content

Commit

Permalink
feat: created newsroom section (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatnema authored Jul 26, 2022
1 parent eb59d5d commit 1373fe8
Show file tree
Hide file tree
Showing 27 changed files with 1,262 additions and 3,253 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/regenerate-meetings-and-videos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: List everyday latest list of AsyncAPI Meetings and Newsroom Videos

on:
workflow_dispatch:
schedule:
#every day at midnight
- cron: "10 0 * * *"

jobs:
meetings:
if: github.repository == 'asyncapi/website'
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
YOUTUBE_TOKEN: ${{ secrets.YOUTUBE_TOKEN }}
name: Regenerate meetings.json
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Regenerate
run: npm run generate:meetings && npm run generate:videos
- name: Create Pull Request with new meetings.json and newsroom-videos.json version
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: update meetings.json and newsrooom_videos.json'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update meetings.json and newsrooom_videos.json'
branch: update-meetings/${{ github.job }}
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI Meetings and Videos workflow failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
32 changes: 0 additions & 32 deletions .github/workflows/regenerate-meetings.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.idea
node_modules
.next
.swc
out
config/posts.json
public/rss.xml
Expand Down
48 changes: 24 additions & 24 deletions components/AsyncAPILogoLight.js

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

29 changes: 16 additions & 13 deletions components/buttons/Button.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Link from 'next/link'
export default function Button({
text,
href,
Expand Down Expand Up @@ -34,19 +35,21 @@ export default function Button({
}

return (
<a {...props} href={href} target={target} rel="noopener noreferrer" className={buttonSize === 'small' ? smallButtonClasses : classNames}>
{
icon && iconPosition === 'left' && (
<span className="inline-block mr-2">{icon}</span>
)
}
<span className="inline-block">{text}</span>
{
icon && iconPosition === 'right' && (
<span className="inline-block ml-2">{icon}</span>
)
}
</a>
<Link href={href} passHref>
<a {...props} target={target} rel="noopener noreferrer" className={buttonSize === 'small' ? smallButtonClasses : classNames}>
{
icon && iconPosition === 'left' && (
<span className="inline-block mr-2">{icon}</span>
)
}
<span className="inline-block">{text}</span>
{
icon && iconPosition === 'right' && (
<span className="inline-block ml-2">{icon}</span>
)
}
</a>
</Link>
)
}

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.

9 changes: 9 additions & 0 deletions components/icons/Newsroom.js

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

9 changes: 5 additions & 4 deletions components/navigation/BlogPostItem.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import moment from 'moment'
import { forwardRef } from 'react'
import TextTruncate from 'react-text-truncate'
import AuthorAvatars from '../AuthorAvatars'
import Heading from '../typography/Heading'
import Paragraph from '../typography/Paragraph'
import Link from 'next/link'

export default function BlogPostItem({ post, className = '' }) {
export default forwardRef(function BlogPostItem({ post, className = '', id=''}, ref) {
let typeColors = ['bg-indigo-100', 'text-indigo-800']

switch (post.type.toLowerCase()) {
Expand All @@ -24,10 +25,10 @@ export default function BlogPostItem({ post, className = '' }) {
}

return (
<li className='rounded-lg'>
<li className={`rounded-lg ${className}`} ref={ref} id={id}>
<article className='h-full rounded-lg'>
<Link href={post.slug} passHref>
<a className={`h-full 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={`h-full 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`}>
<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 Expand Up @@ -76,4 +77,4 @@ export default function BlogPostItem({ post, className = '' }) {
</article>
</li>
)
}
})
4 changes: 3 additions & 1 deletion components/navigation/communityItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import IconSlack from '../icons/Slack'
import IconContributing from '../icons/Contributing'
import IconTSC from '../icons/TSC'
import IconMeetings from '../icons/Meetings'
import IconNewsroom from '../icons/Newsroom'


export default [
Expand All @@ -12,5 +13,6 @@ export default [
{ icon: IconSlack, title: 'Slack Workspace', href: 'https://asyncapi.com/slack-invite', target: '_blank', description: `Need help? Want to share something? Join our Slack workspace. We're nice people :)` },
{ icon: IconContributing, title: 'Contributing', href: 'https://github.com/asyncapi?type=source#-contribute-to-asyncapi', target: '_blank', description: `We are always welcoming and looking for contributions. If you are interested check out our contribution guide.` },
{ icon: IconTSC, title: 'Technical Steering Committee', href: '/community/tsc', description: 'Get to know what is a TSC member, how you can become one, and meet our current TSC members.' },
{ icon: IconMeetings, title: 'Meetings', href: '/community/meetings', description: 'See what meetings are organized under AsyncAPI umbrella and join one of them.' }
{ icon: IconMeetings, title: 'Meetings', href: '/community/meetings', description: 'See what meetings are organized under AsyncAPI umbrella and join one of them.' },
{ icon: IconNewsroom, title: 'Newsroom', href: '/community/newsroom', description: 'Get upto date with the recent activity in the initiative.' }
]
Loading

0 comments on commit 1373fe8

Please sign in to comment.