-
Notifications
You must be signed in to change notification settings - Fork 122
Added static home pages for cratespro. #1213
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 all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
315a579
Added static home pages for cratespro.
martinwq997 0b04c83
Merge branch 'main' of github.com:martinwq997/mega
martinwq997 1c44360
debug in cratespro page
martinwq997 f6a1ff1
solve lint bug
martinwq997 71e72b8
Merge branch 'main' into main
martinwq997 729283b
Update moon/apps/web/pages/[org]/cratespro/index.tsx
martinwq997 36b2d23
Delete moon/tsup
martinwq997 b94cb2c
Delete moon/next
martinwq997 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| [{"title":"2024 Park Plan","description_html":"<p>Welcome to the collaborative document for the <strong>2024 Park Plan!</strong> This document is intended to outline\n our strategies, initiatives, and milestones for the upcoming year.</p>\n<h1>Table of Contents</h1>\n<ol>\n <li>\n <p>Introduction</p>\n </li>\n <li>\n <p>Key Objectives</p>\n </li>\n <li>\n <p>Project Proposals</p>\n </li>\n <li>\n <p>Budget Overview</p>\n </li>\n <li>\n <p>Timeline</p>\n </li>\n</ol>\n<div data-hr-wrapper>\n <hr>\n</div>\n<h2>Introduction</h2>\n<p>Frontier Park is dedicated to <em>preserving natural beauty and providing an exceptional experience to all\n visitors</em>. As we move into 2024, we must focus on sustainability and innovation.</p>\n<h3>Our Mission</h3>\n<blockquote>\n <p>To protect the park's natural resources while fostering an environment that allows visitors to enjoy and learn\n from the wilderness.</p>\n</blockquote>\n<h3>Vision for 2024</h3>\n<p>Our vision is to make Frontier Park a model for conservation and visitor engagement, setting a benchmark for parks\n nationwide.</p>\n<h2>Key Objectives</h2>\n<ul>\n <li>\n <p><strong>Sustainability</strong>: Implement eco-friendly practices park-wide.</p>\n </li>\n <li>\n <p><strong>Education</strong>: Enhance visitor knowledge and appreciation of the natural world.</p>\n </li>\n <li>\n <p><strong>Community Engagement</strong>: Strengthen relationships with local communities and stakeholders.</p>\n </li>\n <li>\n <p><strong>Safety & Infrastructure</strong>: Ensure a safe and accessible environment for all.</p>\n </li>\n</ul>\n<h2>Project Proposals</h2>\n<ul>\n <li>\n <p>Eco-Lodges: Sustainable accommodation for visitors.</p>\n <ul>\n <li>\n <p>Restrooms</p>\n </li>\n <li>\n <p><a class=\"prose-link\" target=\"_blank\" href=\"https://campsite.com\"><span>Campsites</span></a></p>\n </li>\n <li>\n <p>Overnight accommodations</p>\n </li>\n </ul>\n </li>\n <li>\n <p>Interactive Exhibits: Using technology to educate visitors about wildlife.</p>\n </li>\n</ul>\n<h2>Budget Overview</h2>\n<p>Here is a brief overview of the proposed budget:</p>\n<ul>\n <li>\n <p><strong>Operations</strong>: $500,000</p>\n </li>\n <li>\n <p><strong>Conservation Projects</strong>: $350,000</p>\n </li>\n <li>\n <p><strong>Marketing & Outreach</strong>: $150,000</p>\n </li>\n <li>\n <p><strong>Facility Upgrades</strong>: <s>$200,000</s> $100,000</p>\n </li>\n</ul>\n<h2>Timeline</h2>\n<details class=\"details\">\n <summary>Q1: Research and Development</summary>\n <div data-type=\"detailsContent\">\n <p>In the first quarter of the year, the focus will be on conducting surveys to gather visitor feedback, analyzing\n biodiversity data, and exploring innovative ways to enhance visitor experiences. Additionally, research will be\n carried out to identify potential conservation initiatives and sustainability projects for the park.</p>\n </div>\n</details>\n<details class=\"details\">\n <summary>Q2: Implementation of Pilot Programs</summary>\n <div data-type=\"detailsContent\">\n <p>During the second quarter, pilot programs will be implemented to test new visitor engagement activities,\n conservation practices, and sustainable infrastructure initiatives within the park.</p>\n <p>These pilot programs aim to assess their feasibility, effectiveness, and impact on enhancing the overall visitor\n experience and environmental conservation efforts.</p>\n </div>\n</details>\n<details class=\"details\">\n <summary>Q3: Review & Adjustments</summary>\n <div data-type=\"detailsContent\">\n <p>In the third quarter, a comprehensive review of the pilot programs will be conducted to" evaluate their\n outcomes, gather stakeholder feedback, and assess any necessary adjustments for optimization.</p>\n <p>This phase involves:</p>\n <ul>\n <li>\n <p>Analyzing data</p>\n </li>\n <li>\n <p>Identifying strengths and areas for improvement</p>\n </li>\n <li>\n <p>Making strategic adjustments to ensure the success and sustainability of the initiatives.</p>\n </li>\n </ul>\n </div>\n</details>\n<details class=\"details\">\n <summary>Q4: Full-Scale Rollout</summary>\n <div data-type=\"detailsContent\">\n <p>During the fourth quarter, the full-scale rollout of successful pilot programs and initiatives will take place\n across the park. This phase involves expanding and implementing the refined strategies, integrating feedback from\n the review phase, and ensuring seamless execution of planned activities to maximize visitor engagement,\n conservation efforts, and sustainable practices park-wide.</p>\n </div>\n</details>\n<h2>Communication Guidelines</h2>\n<p>Please adhere to the following when posting in our <strong>Frontier Park Spaces</strong>:</p>\n<ul>\n <li>\n <p><strong>Be respectful and constructive.</strong></p>\n </li>\n <li>\n <p>Use proper grammar and punctuation.</p>\n </li>\n <li>\n <p><em>Stay on topic in each Space.</em></p>\n </li>\n</ul>\n<h3>Updates & Progress</h3>\n<ul>\n <li>\n <p><strong>Visitor Center Renovation</strong>: In progress, on track for Q2 completion.</p>\n </li>\n <li>\n <p><em>New Trails Campaign</em>: <s>Starting in April</s> <strong>Now starting in May</strong>.</p>\n </li>\n</ul>\n<h3>Technical Notes</h3>\n<p>For those working on the new mobile app, here's a snippet of the code to integrate the park map:</p>\n<pre><code class=\"language-javascript\">const mapOptions = {\\n center: { lat: 44.58, lng: -110.5 },\\n zoom: 8,\\n};\\n\\nfunction initMap() {\\n const parkMap = new google.maps.Map(document.getElementById('map'), mapOptions);\\n}</code></pre>\n<p>This code block initializes the map with predefined <code>mapOptions</code>.</p>\n<div data-hr-wrapper>\n <hr>\n</div>\n<p>Let's work together to make 2024 a milestone year for Frontier Park! 🌲</p>","public_visibility":false,"project":"General","project_permission":"view","member":"Ranger Rick","description_schema_version":4}] | ||
| [{"title":"2024 Park Plan","description_html":"<p>Welcome to the collaborative document for the <strong>2024 Park Plan!</strong> This document is intended to outline\r\n our strategies, initiatives, and milestones for the upcoming year.</p>\r\n<h1>Table of Contents</h1>\r\n<ol>\r\n <li>\r\n <p>Introduction</p>\r\n </li>\r\n <li>\r\n <p>Key Objectives</p>\r\n </li>\r\n <li>\r\n <p>Project Proposals</p>\r\n </li>\r\n <li>\r\n <p>Budget Overview</p>\r\n </li>\r\n <li>\r\n <p>Timeline</p>\r\n </li>\r\n</ol>\r\n<div data-hr-wrapper>\r\n <hr>\r\n</div>\r\n<h2>Introduction</h2>\r\n<p>Frontier Park is dedicated to <em>preserving natural beauty and providing an exceptional experience to all\r\n visitors</em>. As we move into 2024, we must focus on sustainability and innovation.</p>\r\n<h3>Our Mission</h3>\r\n<blockquote>\r\n <p>To protect the park's natural resources while fostering an environment that allows visitors to enjoy and learn\r\n from the wilderness.</p>\r\n</blockquote>\r\n<h3>Vision for 2024</h3>\r\n<p>Our vision is to make Frontier Park a model for conservation and visitor engagement, setting a benchmark for parks\r\n nationwide.</p>\r\n<h2>Key Objectives</h2>\r\n<ul>\r\n <li>\r\n <p><strong>Sustainability</strong>: Implement eco-friendly practices park-wide.</p>\r\n </li>\r\n <li>\r\n <p><strong>Education</strong>: Enhance visitor knowledge and appreciation of the natural world.</p>\r\n </li>\r\n <li>\r\n <p><strong>Community Engagement</strong>: Strengthen relationships with local communities and stakeholders.</p>\r\n </li>\r\n <li>\r\n <p><strong>Safety & Infrastructure</strong>: Ensure a safe and accessible environment for all.</p>\r\n </li>\r\n</ul>\r\n<h2>Project Proposals</h2>\r\n<ul>\r\n <li>\r\n <p>Eco-Lodges: Sustainable accommodation for visitors.</p>\r\n <ul>\r\n <li>\r\n <p>Restrooms</p>\r\n </li>\r\n <li>\r\n <p><a class=\"prose-link\" target=\"_blank\" href=\"https://campsite.com\"><span>Campsites</span></a></p>\r\n </li>\r\n <li>\r\n <p>Overnight accommodations</p>\r\n </li>\r\n </ul>\r\n </li>\r\n <li>\r\n <p>Interactive Exhibits: Using technology to educate visitors about wildlife.</p>\r\n </li>\r\n</ul>\r\n<h2>Budget Overview</h2>\r\n<p>Here is a brief overview of the proposed budget:</p>\r\n<ul>\r\n <li>\r\n <p><strong>Operations</strong>: $500,000</p>\r\n </li>\r\n <li>\r\n <p><strong>Conservation Projects</strong>: $350,000</p>\r\n </li>\r\n <li>\r\n <p><strong>Marketing & Outreach</strong>: $150,000</p>\r\n </li>\r\n <li>\r\n <p><strong>Facility Upgrades</strong>: <s>$200,000</s> $100,000</p>\r\n </li>\r\n</ul>\r\n<h2>Timeline</h2>\r\n<details class=\"details\">\r\n <summary>Q1: Research and Development</summary>\r\n <div data-type=\"detailsContent\">\r\n <p>In the first quarter of the year, the focus will be on conducting surveys to gather visitor feedback, analyzing\r\n biodiversity data, and exploring innovative ways to enhance visitor experiences. Additionally, research will be\r\n carried out to identify potential conservation initiatives and sustainability projects for the park.</p>\r\n </div>\r\n</details>\r\n<details class=\"details\">\r\n <summary>Q2: Implementation of Pilot Programs</summary>\r\n <div data-type=\"detailsContent\">\r\n <p>During the second quarter, pilot programs will be implemented to test new visitor engagement activities,\r\n conservation practices, and sustainable infrastructure initiatives within the park.</p>\r\n <p>These pilot programs aim to assess their feasibility, effectiveness, and impact on enhancing the overall visitor\r\n experience and environmental conservation efforts.</p>\r\n </div>\r\n</details>\r\n<details class=\"details\">\r\n <summary>Q3: Review & Adjustments</summary>\r\n <div data-type=\"detailsContent\">\r\n <p>In the third quarter, a comprehensive review of the pilot programs will be conducted to" evaluate their\r\n outcomes, gather stakeholder feedback, and assess any necessary adjustments for optimization.</p>\r\n <p>This phase involves:</p>\r\n <ul>\r\n <li>\r\n <p>Analyzing data</p>\r\n </li>\r\n <li>\r\n <p>Identifying strengths and areas for improvement</p>\r\n </li>\r\n <li>\r\n <p>Making strategic adjustments to ensure the success and sustainability of the initiatives.</p>\r\n </li>\r\n </ul>\r\n </div>\r\n</details>\r\n<details class=\"details\">\r\n <summary>Q4: Full-Scale Rollout</summary>\r\n <div data-type=\"detailsContent\">\r\n <p>During the fourth quarter, the full-scale rollout of successful pilot programs and initiatives will take place\r\n across the park. This phase involves expanding and implementing the refined strategies, integrating feedback from\r\n the review phase, and ensuring seamless execution of planned activities to maximize visitor engagement,\r\n conservation efforts, and sustainable practices park-wide.</p>\r\n </div>\r\n</details>\r\n<h2>Communication Guidelines</h2>\r\n<p>Please adhere to the following when posting in our <strong>Frontier Park Spaces</strong>:</p>\r\n<ul>\r\n <li>\r\n <p><strong>Be respectful and constructive.</strong></p>\r\n </li>\r\n <li>\r\n <p>Use proper grammar and punctuation.</p>\r\n </li>\r\n <li>\r\n <p><em>Stay on topic in each Space.</em></p>\r\n </li>\r\n</ul>\r\n<h3>Updates & Progress</h3>\r\n<ul>\r\n <li>\r\n <p><strong>Visitor Center Renovation</strong>: In progress, on track for Q2 completion.</p>\r\n </li>\r\n <li>\r\n <p><em>New Trails Campaign</em>: <s>Starting in April</s> <strong>Now starting in May</strong>.</p>\r\n </li>\r\n</ul>\r\n<h3>Technical Notes</h3>\r\n<p>For those working on the new mobile app, here's a snippet of the code to integrate the park map:</p>\r\n<pre><code class=\"language-javascript\">const mapOptions = {\\n center: { lat: 44.58, lng: -110.5 },\\n zoom: 8,\\n};\\n\\nfunction initMap() {\\n const parkMap = new google.maps.Map(document.getElementById('map'), mapOptions);\\n}</code></pre>\r\n<p>This code block initializes the map with predefined <code>mapOptions</code>.</p>\r\n<div data-hr-wrapper>\r\n <hr>\r\n</div>\r\n<p>Let's work together to make 2024 a milestone year for Frontier Park! 🌲</p>","public_visibility":false,"project":"General","project_permission":"view","member":"Ranger Rick","description_schema_version":4}] |
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,19 @@ | ||
| import { ChatBubblePlusIcon } from '@gitmono/ui/Icons' | ||
| import { useRouter } from 'next/router' | ||
| import { useScope } from '@/contexts/scope' | ||
| import { SidebarLink } from './SidebarLink' | ||
|
|
||
| export function SidebarCratespro() { | ||
| const { scope } = useScope() | ||
| const router = useRouter() | ||
|
|
||
| return ( | ||
| <SidebarLink | ||
| id='cratespro' | ||
| label='Cratespro' | ||
| href={`/${scope}/cratespro`} | ||
| active={router.pathname === '/[org]/cratespro'} | ||
| leadingAccessory={<ChatBubblePlusIcon />} | ||
| /> | ||
| ) | ||
| } | ||
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,114 @@ | ||
| import Head from 'next/head' | ||
| import { useRouter } from 'next/router' | ||
| import { ChatBubblePlusIcon } from '@gitmono/ui/Icons' | ||
|
|
||
| import { AppLayout } from '@/components/Layout/AppLayout' | ||
| import AuthAppProviders from '@/components/Providers/AuthAppProviders' | ||
| import { PageWithLayout } from '@/utils/types' | ||
|
|
||
| const Logo = () => ( | ||
| <div className="flex items-center"> | ||
| <ChatBubblePlusIcon className="h-8 w-8 mr-2 text-orange-500" /> | ||
| <span className="text-xl font-bold">Rust</span> | ||
| </div> | ||
| ) | ||
|
|
||
| const MagnifierIcon = () => ( | ||
| <svg className="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" strokeWidth="2" viewBox="0 0 24 24"><circle cx="11" cy="11" r="7" /><line x1="21" y1="21" x2="16.65" y2="16.65" /></svg> | ||
| ) | ||
|
|
||
| const cardList = [ | ||
| { | ||
| key: 'distribute', | ||
| title: 'Rust Distribute', | ||
| icon: ( | ||
| <svg width="48" height="48" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke="#222" strokeWidth="2" /><circle cx="12" cy="12" r="2" fill="#222" /><circle cx="5" cy="5" r="1.5" fill="#222" /><circle cx="19" cy="5" r="1.5" fill="#222" /><circle cx="5" cy="19" r="1.5" fill="#222" /><circle cx="19" cy="19" r="1.5" fill="#222" /><line x1="12" y1="12" x2="5" y2="5" stroke="#222" strokeWidth="1.5" /><line x1="12" y1="12" x2="19" y2="5" stroke="#222" strokeWidth="1.5" /><line x1="12" y1="12" x2="5" y2="19" stroke="#222" strokeWidth="1.5" /><line x1="12" y1="12" x2="19" y2="19" stroke="#222" strokeWidth="1.5" /></svg> | ||
| ), | ||
| bg: 'from-pink-50 to-white', | ||
| }, | ||
| { | ||
| key: 'ecosystem', | ||
| title: 'Crate Ecosystem', | ||
| icon: ( | ||
| <svg width="48" height="48" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke="#222" strokeWidth="2" /><path d="M8 15l4-4 4 4" stroke="#222" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /><path d="M12 11V7" stroke="#222" strokeWidth="1.5" strokeLinecap="round" /></svg> | ||
| ), | ||
| bg: 'from-yellow-50 to-white', | ||
| }, | ||
| { | ||
| key: 'tour', | ||
| title: 'Rust Tour & Doc', | ||
| icon: ( | ||
| <svg width="48" height="48" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke="#222" strokeWidth="2" /><path d="M8 16l4-8 4 8" stroke="#222" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /></svg> | ||
| ), | ||
| bg: 'from-pink-50 to-white', | ||
| }, | ||
| { | ||
| key: 'news', | ||
| title: 'Rust News', | ||
| icon: ( | ||
| <svg width="48" height="48" fill="none" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" stroke="#222" strokeWidth="2" /><rect x="7" y="7" width="5" height="3" rx="1" fill="#222" /><rect x="7" y="12" width="10" height="2" rx="1" fill="#222" /><rect x="7" y="16" width="7" height="1.5" rx="0.75" fill="#222" /></svg> | ||
| ), | ||
| bg: 'from-blue-50 to-white', | ||
| }, | ||
| ] | ||
|
|
||
| const CratesproPage: PageWithLayout<any> = () => { | ||
| const router = useRouter() | ||
|
|
||
| const handleCardClick = (key: string) => { | ||
| // 这里可以根据key跳转到不同页面 | ||
| router.push(`/cratespro/${key}`) | ||
| alert(`点击了 ${key}`) | ||
|
martinwq997 marked this conversation as resolved.
martinwq997 marked this conversation as resolved.
|
||
| } | ||
|
|
||
| return ( | ||
| <> | ||
| <Head> | ||
| <title>Cratespro</title> | ||
| </Head> | ||
| <div className="flex flex-col min-h-screen w-full bg-transparent"> | ||
| {/* 顶部栏,参考 issue 主页样式 */} | ||
| <div className="w-full flex flex-col"> | ||
| <div className="flex items-center gap-4 px-8 pt-8 pb-4 w-full"> | ||
| <Logo /> | ||
| <div className="relative flex-1 max-w-xl"> | ||
| <span className="absolute inset-y-0 left-3 flex items-center pointer-events-none"> | ||
| <MagnifierIcon /> | ||
| </span> | ||
| <input | ||
| type="text" | ||
| placeholder="Search..." | ||
| className="pl-10 pr-4 py-2 w-full rounded-full border border-gray-200 text-base focus:outline-none focus:ring-2 focus:ring-blue-200 bg-white shadow-sm" | ||
| style={{ minWidth: 200 }} | ||
| /> | ||
| </div> | ||
| </div> | ||
| <div className="border-b border-gray-200 w-full" /> | ||
| </div> | ||
|
|
||
| <div className="grid grid-cols-1 md:grid-cols-2 gap-10 w-full max-w-5xl mx-auto mt-36"> | ||
| {cardList.map(card => ( | ||
| <button | ||
| key={card.key} | ||
| onClick={() => handleCardClick(card.key)} | ||
| className={`flex flex-col items-start justify-center h-64 rounded-xl border bg-gradient-to-br ${card.bg} shadow-md p-8 transition hover:scale-105 hover:shadow-lg focus:outline-none`} | ||
| > | ||
| <div className="mb-6">{card.icon}</div> | ||
| <span className="text-3xl font-display font-medium text-gray-800">{card.title}</span> | ||
| </button> | ||
| ))} | ||
| </div> | ||
| </div> | ||
| </> | ||
| ) | ||
|
martinwq997 marked this conversation as resolved.
|
||
| } | ||
|
|
||
| CratesproPage.getProviders = (page, pageProps) => { | ||
| return ( | ||
| <AuthAppProviders {...pageProps}> | ||
| <AppLayout {...pageProps}>{page}</AppLayout> | ||
| </AuthAppProviders> | ||
| ) | ||
| } | ||
|
|
||
| export default CratesproPage | ||
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.