-
-
Notifications
You must be signed in to change notification settings - Fork 758
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: implement redesign of the home page #3600
Open
vishvamsinh28
wants to merge
19
commits into
asyncapi:master
Choose a base branch
from
vishvamsinh28:HomePageRedesign
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
819eed4
part of lf added
vishvamsinh28 5b6f3e8
button updates
vishvamsinh28 dacfb0e
diamond sponsors
vishvamsinh28 ac7ba66
code animation updated
vishvamsinh28 3ca81ae
features updated
vishvamsinh28 b7af448
slack button update
vishvamsinh28 9f7a7ba
calender done
vishvamsinh28 51532c0
design implementation completed
vishvamsinh28 77cfdaa
added JSDocs
vishvamsinh28 085eebf
Merge branch 'master' into HomePageRedesign
vishvamsinh28 d13efa6
translation update
vishvamsinh28 d4c788d
lint fix
vishvamsinh28 06c159f
lint fix
vishvamsinh28 230e73e
lint fix again
vishvamsinh28 1828f53
apply coderabbit suggestions
vishvamsinh28 71399a6
lint fix
vishvamsinh28 d069e29
lighthouse fix
vishvamsinh28 6945b80
Merge branch 'master' into HomePageRedesign
vishvamsinh28 4f2980e
Merge branch 'master' into HomePageRedesign
vishvamsinh28 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* @description Renders the content related to AsyncAPI in a styled div container. | ||
* This is used as the default content for the "AsyncAPI Document" tab in the DemoAnimation component. | ||
*/ | ||
export default function renderAsyncAPIContent() { | ||
return <div className='font-mono text-sm leading-relaxed text-[#98c379]'>content here</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @description Renders the content related to code generation in a styled div container. | ||
* This is used as the content for the "Code Generation" tab in the DemoAnimation component. | ||
*/ | ||
export default function renderCodeGeneration() { | ||
return ( | ||
<div className='font-mono text-sm leading-relaxed'> | ||
<h1 className='text-[#98c379]'>content here</h1> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import Container from '../layout/Container'; | ||
import renderAsyncAPIContent from './AsyncAPIcontent'; | ||
import renderCodeGeneration from './CodeGeneration'; | ||
import renderDocumentation from './Documentation'; | ||
|
||
/** | ||
* @description A React component that displays a demo animation interface with three tabs: | ||
* "AsyncAPI Document," "Code Generation," and "Documentation." The content of each tab | ||
* dynamically updates based on the active tab selected by the user. | ||
* | ||
*/ | ||
export default function DemoAnimation() { | ||
const [activeTab, setActiveTab] = useState('AsyncAPI Document'); | ||
const tabs = ['AsyncAPI Document', 'Code Generation', 'Documentation']; | ||
|
||
/** | ||
* @description Determines and renders the content for the currently active tab. | ||
*/ | ||
const renderContent = () => { | ||
switch (activeTab) { | ||
case 'Code Generation': | ||
return renderCodeGeneration() || <p>No content available</p>; | ||
case 'Documentation': | ||
return renderDocumentation() || <p>No content available</p>; | ||
default: | ||
return renderAsyncAPIContent() || <p>No content available</p>; | ||
} | ||
}; | ||
|
||
return ( | ||
<div className='relative inset-x-1/2 mx-[-50vw] w-screen bg-blue-100 p-6 font-sans'> | ||
<Container> | ||
<h1 className='mb-2 text-center text-2xl font-medium'>Sneak Peek Into The Real Process</h1> | ||
<p className='mb-6 text-center text-sm text-gray-600'> | ||
One of our main goals is to improve the current state of Event | ||
<br /> | ||
Driven Architecture (EDA!) | ||
</p> | ||
|
||
<div className='mb-4 flex flex-wrap overflow-hidden rounded-lg bg-black'> | ||
{tabs.map((tab) => ( | ||
<button | ||
key={tab} | ||
className={`m-2 flex-1 rounded px-4 py-2 text-center text-sm transition-colors duration-200 ${ | ||
activeTab === tab ? 'bg-white text-black' : 'bg-gray-700 text-gray-300 hover:bg-gray-800' | ||
}`} | ||
onClick={() => setActiveTab(tab)} | ||
aria-selected={activeTab === tab} | ||
role='tab' | ||
> | ||
{tab} | ||
</button> | ||
))} | ||
</div> | ||
|
||
<div | ||
className='min-h-[400px] rounded-lg bg-[#1a1b26] p-6 transition-all duration-200' | ||
role='tabpanel' | ||
aria-labelledby={`tab-${activeTab}`} | ||
> | ||
<div className='max-w-full overflow-auto'> | ||
<div className='overflow-x-auto whitespace-pre-wrap'>{renderContent()}</div> | ||
</div> | ||
</div> | ||
</Container> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @description Renders the documentation content in a styled container. | ||
* This is used as the content for the "Documentation" tab in the DemoAnimation component. | ||
*/ | ||
export default function renderDocumentation() { | ||
return ( | ||
<div className='font-sans text-white'> | ||
<h1 className='mb-4 text-xl font-semibold'>Documentation</h1> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error boundaries for render functions.
The render functions should be wrapped in error boundaries to gracefully handle rendering failures.
📝 Committable suggestion