forked from onejs/one
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
39 additions
and
216 deletions.
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 |
---|---|---|
@@ -1,127 +1,23 @@ | ||
import { getCompilationExamples } from '@tamagui/mdx' | ||
import { YStack } from 'tamagui' | ||
import { H1 } from 'tamagui' | ||
import { useLoader } from 'vxs' | ||
import { HeadInfo } from '~/components/HeadInfo' | ||
import { HomeAnimations } from '~/features/site/home/HomeAnimations' | ||
import { HomeCommunity } from '~/features/site/home/HomeCommunity' | ||
import { HomeExampleProps } from '~/features/site/home/HomeExampleProps' | ||
import { HomeExamples } from '~/features/site/home/HomeExamples' | ||
import { HomeFeaturesGrid } from '~/features/site/home/HomeFeaturesGrid' | ||
import { HomeGlow } from '~/features/site/home/HomeGlow' | ||
import { Hero } from '~/features/site/home/HomeHero' | ||
import { HomeHeroBelow } from '~/features/site/home/HomeHeroBelow' | ||
import { HomePerformance } from '~/features/site/home/HomePerformance' | ||
import { HomeResponsive } from '~/features/site/home/HomeResponsive' | ||
import { HomeThemes } from '~/features/site/home/HomeThemes' | ||
import { HomeTypography } from '~/features/site/home/HomeTypography' | ||
import { HomeSection, SectionTinted, TintSection } from '~/features/site/home/TintSection' | ||
import { ThemeNameEffect } from '~/features/site/theme/ThemeNameEffect' | ||
|
||
export async function loader() { | ||
return getCompilationExamples() | ||
return { | ||
hello: 'world', | ||
} | ||
} | ||
|
||
export default function TamaguiHomePage() { | ||
const { compilationExamples, animationCode } = useLoader(loader) | ||
|
||
if (!compilationExamples) { | ||
return null | ||
} | ||
const { hello } = useLoader(loader) | ||
|
||
return ( | ||
<> | ||
<HeadInfo | ||
title="Tamagui" | ||
description="React style library and UI kit that unifies React Native and React web" | ||
/> | ||
<ThemeNameEffect colorKey="$color2" /> | ||
<HomeGlow /> | ||
<YStack | ||
fullscreen | ||
className="grain" | ||
o={0.2} | ||
style={{ | ||
maskImage: `linear-gradient(transparent, rgba(0, 0, 0, 1) 100px)`, | ||
}} | ||
/> | ||
<TintSection index={0} p={0}> | ||
<Hero /> | ||
</TintSection> | ||
<HomeHeroBelow /> | ||
<TintSection index={2} contain="paint layout" zi={1000}> | ||
<YStack | ||
pe="none" | ||
zi={0} | ||
fullscreen | ||
className="bg-dot-grid" | ||
style={{ | ||
maskImage: `linear-gradient(transparent, #000, transparent)`, | ||
}} | ||
/> | ||
<HomeExamples examples={compilationExamples} /> | ||
</TintSection> | ||
<TintSection my={-50} index={3} contain="paint layout" pos="relative" zi={100}> | ||
<YStack | ||
pe="none" | ||
zi={0} | ||
fullscreen | ||
className="bg-dot-grid" | ||
style={{ | ||
maskImage: `linear-gradient(transparent, #000, transparent)`, | ||
}} | ||
/> | ||
<HomeThemes /> | ||
</TintSection> | ||
<TintSection index={4} mb={-120} zIndex={10000}> | ||
<HomeResponsive /> | ||
</TintSection> | ||
<TintSection index={5} p={0} zIndex={0}> | ||
<SectionTinted gradient bubble> | ||
<HomePerformance /> | ||
</SectionTinted> | ||
</TintSection> | ||
<TintSection index={6} zi={100}> | ||
<YStack | ||
fullscreen | ||
className="bg-grid" | ||
style={{ | ||
maskImage: `linear-gradient(transparent, #000, transparent)`, | ||
}} | ||
/> | ||
<HomeAnimations animationCode={animationCode} /> | ||
</TintSection> | ||
<TintSection index={7} zi={1}> | ||
<HomeFeaturesGrid /> | ||
<YStack | ||
pe="none" | ||
zi={2} | ||
fullscreen | ||
className="bg-dot-grid" | ||
style={{ | ||
maskImage: `linear-gradient(transparent, #000, transparent)`, | ||
}} | ||
/> | ||
</TintSection> | ||
<TintSection index={8} my="$-4" p={0} zIndex={100}> | ||
<SectionTinted zi={1000} bubble gradient> | ||
<HomeTypography /> | ||
</SectionTinted> | ||
</TintSection> | ||
<HomeSection zi={10}> | ||
<YStack | ||
pe="none" | ||
zi={0} | ||
fullscreen | ||
className="bg-dot-grid" | ||
style={{ | ||
maskImage: `linear-gradient(transparent, #000, transparent)`, | ||
}} | ||
/> | ||
<HomeExampleProps /> | ||
</HomeSection> | ||
<HomeSection zi={0}> | ||
<HomeCommunity /> | ||
</HomeSection> | ||
<H1>Hello {hello}</H1> | ||
</> | ||
) | ||
} |
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
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
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
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,6 @@ | ||
const url = `${process.env.URL || process.env.VITE_PUBLIC_URL || 'http://127.0.0.1:8081'}` | ||
const urlWithProtocol = url.startsWith('http') ? url : `https://${url}` | ||
|
||
export const getURL = () => { | ||
return urlWithProtocol | ||
} |
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
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
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 |
---|---|---|
@@ -1,61 +1,20 @@ | ||
{ | ||
"files": [], | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"rootDir": ".", | ||
"paths": { | ||
"vxrn": [ | ||
"packages/vxrn" | ||
], | ||
"@vxrn/*": [ | ||
"packages/*" | ||
] | ||
}, | ||
"importHelpers": true, | ||
"allowJs": false, | ||
"resolveJsonModule": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"declaration": true, | ||
"downlevelIteration": true, | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"inlineSourceMap": true, | ||
"preserveSymlinks": true, | ||
"jsx": "react-jsx", | ||
"module": "Preserve", | ||
"moduleResolution": "Bundler", | ||
"noEmit": false, | ||
"noEmitOnError": false, | ||
"noImplicitAny": false, | ||
"noImplicitReturns": false, | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"preserveConstEnums": true, | ||
"removeComments": false, | ||
"typeRoots": ["node_modules/@types"], | ||
"skipDefaultLibCheck": true, | ||
"skipLibCheck": true, | ||
"sourceMap": false, | ||
"strictNullChecks": true, | ||
"target": "es2020", | ||
"types": [ | ||
"vite/client", | ||
"node", | ||
"react" | ||
], | ||
"lib": [ | ||
"dom", | ||
"esnext" | ||
] | ||
"noEmit": true | ||
}, | ||
"include": [ | ||
"packages/**/*" | ||
], | ||
"exclude": [ | ||
"**/test", | ||
"**/dist", | ||
"**/types", | ||
"**/__tests__" | ||
], | ||
"typeAcquisition": { | ||
"enable": true | ||
} | ||
"references": [ | ||
{ | ||
"path": "examples/fullstack" | ||
}, | ||
{ | ||
"path": "examples/vxs" | ||
}, | ||
{ | ||
"path": "examples/bare" | ||
} | ||
] | ||
} |