generated from idea2app/Next-Bootstrap-ts
-
Notifications
You must be signed in to change notification settings - Fork 6
[add] Open Source Bounty page based on Lark BI Table views #46
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a24e9b1
Initial plan
Copilot 8194613
Add bounty page with fresh UI and navigation integration
Copilot 9ee4687
Apply prettier formatting to Bounty styles
Copilot b1ff235
Merge branch 'main' into copilot/create-open-source-bazaar-page
TechQuery 2c672b2
Address PR feedback: Use Ratio component, change leaderboard to rank,…
Copilot 2491719
[optimize] simplify JSX & LESS of Open Source Bounty page
TechQuery 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 hidden or 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
This file contains hidden or 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,104 @@ | ||
| import { observer } from 'mobx-react'; | ||
| import { FC, useContext } from 'react'; | ||
| import { Card, Col, Container, Row } from 'react-bootstrap'; | ||
|
|
||
| import { PageHead } from '../components/Layout/PageHead'; | ||
| import { I18nContext } from '../models/Translation'; | ||
| import styles from '../styles/Bounty.module.less'; | ||
|
|
||
| interface BountyViewProps { | ||
| title: string; | ||
| url: string; | ||
| icon: string; | ||
| } | ||
|
|
||
| const BountyView: FC<BountyViewProps> = ({ title, url, icon }) => ( | ||
| <Col md={6} lg={4}> | ||
| <Card className={styles.bountyCard}> | ||
| <Card.Body> | ||
| <h5 className={styles.cardTitle}> | ||
| {icon} {title} | ||
| </h5> | ||
| <div className={styles.iframeContainer}> | ||
| <iframe | ||
| src={url} | ||
| className={styles.bountyIframe} | ||
| title={title} | ||
| allow="clipboard-read; clipboard-write" | ||
| /> | ||
| </div> | ||
| </Card.Body> | ||
| </Card> | ||
| </Col> | ||
| ); | ||
|
|
||
| const BountyPage: FC = observer(() => { | ||
| const { t } = useContext(I18nContext); | ||
|
|
||
| const bountyViews: BountyViewProps[] = [ | ||
| { | ||
| title: t('bounty_dashboard'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/dashboard/shrcnt4EaAxn3zx9faRarERgEqf', | ||
| icon: '📊', | ||
| }, | ||
| { | ||
| title: t('bounty_token_leaderboard'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb', | ||
| icon: '🪙', | ||
| }, | ||
| { | ||
| title: t('bounty_task_leaderboard'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnUVgb8E73UthaB2Tk4glnSb', | ||
| icon: '📋', | ||
| }, | ||
| { | ||
| title: t('bounty_task_submission'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/form/shrcn2Ss97TSu3XgPi7mbZbrXLe', | ||
| icon: '📝', | ||
| }, | ||
TechQuery marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| title: t('bounty_achievement_leaderboard'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcne4IY9mYAfoo9a69oxyAdTb', | ||
| icon: '🏆', | ||
| }, | ||
| { | ||
| title: t('bounty_achievement_submission'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/form/shrcn7yHGIOnPNjdZck3eBaiMVc', | ||
| icon: '✅', | ||
| }, | ||
| { | ||
| title: t('bounty_hero_leaderboard'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc', | ||
| icon: '🦸', | ||
| }, | ||
| { | ||
| title: t('bounty_debt_leaderboard'), | ||
| url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd', | ||
| icon: '💳', | ||
| }, | ||
| ]; | ||
|
|
||
| return ( | ||
| <> | ||
| <PageHead title={t('bounty_page_title')} /> | ||
|
|
||
| {/* Hero Section */} | ||
| <section className={styles.hero}> | ||
| <Container> | ||
| <h1 className={`text-center ${styles.title}`}>{t('bounty_page_title')}</h1> | ||
| <p className={`text-center ${styles.description}`}>{t('bounty_page_description')}</p> | ||
| </Container> | ||
| </section> | ||
|
|
||
| <Container className="my-5"> | ||
| <Row className="g-4"> | ||
| {bountyViews.map(view => ( | ||
| <BountyView key={view.url} {...view} /> | ||
| ))} | ||
| </Row> | ||
| </Container> | ||
| </> | ||
| ); | ||
| }); | ||
|
|
||
| export default BountyPage; | ||
This file contains hidden or 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,113 @@ | ||
| // Fresh and lively bounty page styling inspired by hackathon page | ||
|
|
||
| .hero { | ||
| position: relative; | ||
| background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); | ||
| padding: 4rem 0; | ||
| overflow: hidden; | ||
| color: #fff; | ||
|
|
||
| &::before { | ||
| position: absolute; | ||
| top: -50%; | ||
| left: -50%; | ||
| animation: grid-animation 20s linear infinite; | ||
| background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px); | ||
| background-size: 50px 50px; | ||
| width: 200%; | ||
| height: 200%; | ||
| pointer-events: none; | ||
| content: ''; | ||
| } | ||
| } | ||
|
|
||
| @keyframes grid-animation { | ||
| 0% { | ||
| transform: translate(0, 0); | ||
| } | ||
| 100% { | ||
| transform: translate(50px, 50px); | ||
| } | ||
| } | ||
|
|
||
| .title { | ||
| margin-bottom: 1rem; | ||
| font-weight: 700; | ||
| font-size: 3rem; | ||
| text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); | ||
| } | ||
|
|
||
| .description { | ||
| opacity: 0.9; | ||
| margin: 0 auto; | ||
| max-width: 800px; | ||
| font-size: 1.2rem; | ||
| } | ||
|
|
||
| .bountyCard { | ||
| transition: all 0.3s ease; | ||
| box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2); | ||
| border: 2px solid transparent; | ||
| border-radius: 16px; | ||
| background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1)); | ||
| height: 100%; | ||
| overflow: hidden; | ||
|
|
||
| &:hover { | ||
| transform: translateY(-8px) scale(1.02); | ||
| box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4); | ||
| background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.15)); | ||
| } | ||
| } | ||
|
|
||
| .cardTitle { | ||
| display: inline-block; | ||
| margin-bottom: 1.5rem; | ||
| border-bottom: 3px solid; | ||
| border-image: linear-gradient(90deg, #f093fb, #f5576c, #ffd140) 1; | ||
| background: linear-gradient(90deg, #f093fb, #f5576c, #ffd140); | ||
| -webkit-background-clip: text; | ||
| padding-bottom: 0.5rem; | ||
| font-weight: 700; | ||
| font-size: 1.3rem; | ||
| -webkit-text-fill-color: transparent; | ||
| background-clip: text; | ||
| } | ||
|
|
||
| .iframeContainer { | ||
| position: relative; | ||
| border-radius: 12px; | ||
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | ||
| padding-bottom: 75%; // 4:3 aspect ratio | ||
| width: 100%; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .bountyIframe { | ||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
| border: none; | ||
| border-radius: 12px; | ||
| width: 100%; | ||
| height: 100%; | ||
| } | ||
|
|
||
| // Responsive adjustments | ||
| @media (max-width: 768px) { | ||
| .title { | ||
| font-size: 2rem; | ||
| } | ||
|
|
||
| .description { | ||
| font-size: 1rem; | ||
| } | ||
|
|
||
| .cardTitle { | ||
| font-size: 1.1rem; | ||
| } | ||
|
|
||
| .iframeContainer { | ||
| padding-bottom: 100%; // More square on mobile | ||
| } | ||
| } | ||
TechQuery marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.