Skip to content

Commit

Permalink
New website (Next.js + Tailwind + MDX) (asyncapi#108)
Browse files Browse the repository at this point in the history
* Setup Next.js and Tailwind. Finish navigation and hero.

* Remove .next from repo

* Ignore .next

* Add newsletter form

* Add sponsors

* WIP

* Migrate getting-started guide

* Migrate tutorials and add highlightjs for spec

* Add links to tooling sections and warnings to old spec versions

* Add link to edit page on github

* Add TOC

* Add blog

* Add generator landing page

* Add netlify config file

* Add missing dependencies

* Extract Generator installation as a component and put tabs on top

* Move generator installation to top of page

* Configure PurgeCSS to remove unused styles

* Remove restrictions of colors on Tailwind config file

* Add Marc blogpost

* Finish generator landing

* Improve CodeBlock component and add parsers and github actions pages

* Simplify CodeBlock component

* Make highlighting through language definition instead of manually

* Remove unused content

* Fix Markdown code tag rendering

* Improve syntax highlighting

* Improve code readability

* Add metadata for pages

* Use Netlify env vars

* Improve meta images

* Move card images to social folder and renew generic one

* Add social cards to homepage and revert back parsers

* Add initial version of checkout-generator-docs action

* Test deploy via Github action

* Checkout current repo

* Rename GITHUB_TOKEN

* Copy Generator README to pages/docs/generator/index.md

* Preprend frontmatter to README.md

* Create _section.md too

* Add authoring and generator section

* Disable copying docs temporarily

* Disable deploying to Netlify temporarily and fix css purging

* Fix purge css

* Remove Generator docs and docs suffix from logo

* Remove Learn more button from Generator landing

* Remove Learn more buttons from landings

* Use relative paths on redirects where possible

* First iteration of homepage animation demo

* New concept for demo ending banner

* Add transitions to demo

* Add href and target to Hub button on demo

* Add w-2.5 and h-2.5 classes to tailwind allow list

* Adapt intro to mobile

* Fix subscribe form

* Prevent window title and code from overflowing

* Add community section

* Remove unnecessary code

* Rename upcoming events to upcoming meetings

* Improve buttons and responsiveness of calendar

* Add blog section

* Move _redirects to public

* Add headings to sponsors section and fix some typos

* Fix width of paragraphs after headings

* Fix docs and blog layout

* Remove unnecessary class names

* Remove older specs

* Make TOC look nice on mobile as well as super-wide screens

* Tweak postcss config so it doesnt strip toc styles

* Debugging failures on docs menu

* Add cache to Netlify build

* Rework DocsNavItem component

* Debugging docs menu

* Extract docs navigation components to their own files

* Simplify docs navigation code

* Debugging docs menu

* Debugging docs nav

* Debugging docs menu

* Make a shallow copy of the docs menu array

* Try a different way of creating a shallow copy

* Debugging docs menu

* Use stable sort for sorting the docs menu

* Fix docs layout on mobile and tablet

* Fix some z-index and margin issues

* Improve mobile navigation

* Remove TOC line on docs

* chore(blog): Add blog post about Hacktoberfest participation

* Add post cover image

* Resolve conflicts

* Move editorconfig and eslint out of public directory

* Remove cache plugin

* Remove duplicate cover image from blog posts

* Update asyncapiathacktoberfest.md

* Update asyncapiathacktoberfest.md

* add cover

* Remove cover from blog post text

* Tag use cases as coming soon

* Apply suggestions from code review

Co-authored-by: Fran Méndez <[email protected]>

* Update asyncapiathacktoberfest.md

* Fade out coming soon items

* Tag Hub as coming soon and rename it to Studio

* Update content/blog/asyncapiathacktoberfest.md

Co-authored-by: Fran Méndez <[email protected]>

* Replace Hub with Playground and open example in playground

* Fix latest status update blog post

* Default metastring to empty string

* Rename hacktoberfest blog post

* Stop using bitly link because CORS not allowed

* add last youtube video

* Add missing video

* Fix heading

Co-authored-by: derberg <[email protected]>
  • Loading branch information
fmvilas and derberg authored Sep 30, 2020
1 parent 73e69b5 commit 0e0af08
Show file tree
Hide file tree
Showing 962 changed files with 68,729 additions and 6,259 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEPLOY_URL=http://localhost:8080
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"React": "writable"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2019,
"sourceType": "module"
},
"plugins": [
"react",
],
"rules": {
"react/react-in-jsx-scope": "off",
"no-useless-catch": "off",
},
};
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.vscode
.DS_Store
public
resources
.idea
node_modules
.next
File renamed without changes.
29 changes: 29 additions & 0 deletions components/AsyncAPILogo.js

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

40 changes: 40 additions & 0 deletions components/Calendar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import moment from 'moment'

export default function Calendar ({ className = '' }) {
const referenceDate = moment.utc('2020-06-09T08:00:00')

function toggleMorningAfternoon(morningOrAfternoon) {
return morningOrAfternoon === 'morning' ? 'afternoon' : 'morning'
}

function upcomingEvents() {
let nextDate = referenceDate
let morningOrAfternoon = 'morning'

do {
morningOrAfternoon = toggleMorningAfternoon(morningOrAfternoon)
nextDate.add(14, 'days').hours(morningOrAfternoon === 'morning' ? 8 : 16)
} while(nextDate.isBefore())

return [
nextDate.hours(morningOrAfternoon === 'morning' ? 8 : 16),
moment(nextDate).add(14, 'days').hours(morningOrAfternoon === 'morning' ? 16 : 8),
]
}

return (
<div className={`rounded-md border border-gray-200 overflow-hidden bg-white p-4 ${className}`}>
<h3 className="text-left text-lg mb-8">Upcoming events</h3>
{
upcomingEvents().map((event, index) => (
<div className="inline-block text-center mb-4 lg:flex" key={index}>
<div className="inline-flex flex-row h-12 min-w-12 rounded-full bg-pink-500 text-white font-bold">
<span className="flex-1 text-center self-center">{event.local().format('D')}</span>
</div>
<div className="pt-3 pl-2 text-gray-700 font-medium">{event.local().format('LLLL')} UTC{event.local().format('Z')}</div>
</div>
))
}
</div>
)
}
7 changes: 7 additions & 0 deletions components/Caption.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Caption ({children}) {
return (
<p className="text-center text-xs text-gray-500 mt-2">
{children}
</p>
)
}
16 changes: 16 additions & 0 deletions components/ClickableLogo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Link from 'next/link'
import AsyncAPILogo from './AsyncAPILogo'

export default function ClickableLogo({
href = '/',
className = 'flex',
logoClassName,
}) {
return (
<Link href={href}>
<a className={className}>
<AsyncAPILogo className={logoClassName} />
</a>
</Link>
)
}
Loading

0 comments on commit 0e0af08

Please sign in to comment.