@hanzo/ui 1.0.15 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocks/components/card-block.tsx +1 -1
- package/package.json +8 -10
- package/primitives/icons/index.ts +18 -0
- package/primitives/index.ts +1 -0
- package/primitives/toggle-group.tsx +1 -1
- package/primitives/youtube-embed.tsx +1 -1
- package/style/hanzo-default-colors.css +2 -2
- package/{context-providers → style}/theme-provider.tsx +2 -2
- package/tailwind/fontFamily.tailwind.ts +7 -0
- package/tailwind/{fonts.tailwind.ts → fontSize.tailwind.ts} +1 -19
- package/tailwind/index.ts +8 -5
- package/tailwind/{tailwind.config.base.js → tailwind.config.hanzo-preset.js} +3 -2
- package/tailwind/typo-plugin/get-plugin-styles.js +42 -42
- package/tailwind/typography-test.mdx +1 -1
- package/types/index.ts +5 -15
- package/assets/lux-site-icons/android-chrome-192x192.png +0 -0
- package/assets/lux-site-icons/android-chrome-512x512.png +0 -0
- package/assets/lux-site-icons/apple-touch-icon.png +0 -0
- package/assets/lux-site-icons/favicon-16x16.png +0 -0
- package/assets/lux-site-icons/favicon-32x32.png +0 -0
- package/assets/lux-site-icons/favicon.ico +0 -0
- package/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf +0 -0
- package/assets/standard-docs/LUX-Privacy-Policy.pdf +0 -0
- package/common/chat-widget.tsx +0 -75
- package/common/contact-dialog/contact-form.tsx +0 -111
- package/common/contact-dialog/disclaimer.tsx +0 -13
- package/common/contact-dialog/index.tsx +0 -48
- package/common/copyright.tsx +0 -21
- package/common/drawer-menu.tsx +0 -54
- package/common/footer.tsx +0 -77
- package/common/head-metadata/from-next/metadata-types.ts +0 -158
- package/common/head-metadata/from-next/opengraph-types.ts +0 -267
- package/common/head-metadata/from-next/twitter-types.ts +0 -92
- package/common/head-metadata/index.tsx +0 -208
- package/common/header/index.tsx +0 -66
- package/common/header/mobile-nav.tsx +0 -72
- package/common/header/theme-toggle.tsx +0 -26
- package/common/icons/index.tsx +0 -34
- package/common/icons/lux-logo.tsx +0 -10
- package/common/icons/secure-delivery.tsx +0 -13
- package/common/icons/social-icon.tsx +0 -35
- package/common/index.ts +0 -14
- package/common/logo.tsx +0 -71
- package/common/mini-chart/index.tsx +0 -8
- package/common/mini-chart/mini-chart-props.ts +0 -44
- package/common/mini-chart/mini-chart.tsx +0 -76
- package/common/mini-chart/wrapper.tsx +0 -23
- package/context-providers/index.ts +0 -1
- package/next/README.md +0 -11
- package/next/analytics/fpixel.ts +0 -18
- package/next/analytics/pixel-analytics.tsx +0 -55
- package/next/determine-device-middleware.ts +0 -16
- package/next/fonts/DrukTextWide-Bold-Trial.otf +0 -0
- package/next/fonts/DrukTextWide-Heavy-Trial.otf +0 -0
- package/next/fonts/DrukTextWide-Medium-Trial.otf +0 -0
- package/next/fonts/DrukWide-Bold-Trial.otf +0 -0
- package/next/fonts/DrukWide-Heavy-Trial.otf +0 -0
- package/next/fonts/DrukWide-Medium-Trial.otf +0 -0
- package/next/get-app-router-font-classes.ts +0 -12
- package/next/load-and-return-lux-next-fonts-on-import.ts +0 -94
- package/next/next-font-desc.ts +0 -28
- package/next/not-found-content.mdx +0 -5
- package/next/not-found.tsx +0 -23
- package/next/pages-router-font-vars.tsx +0 -18
- package/next/root-layout.tsx +0 -62
- package/siteDef/footer/community.tsx +0 -67
- package/siteDef/footer/company.ts +0 -37
- package/siteDef/footer/ecosystem.ts +0 -37
- package/siteDef/footer/index.tsx +0 -26
- package/siteDef/footer/legal.ts +0 -28
- package/siteDef/footer/network.ts +0 -37
- package/siteDef/footer/svg/warpcast-logo.svg +0 -12
- package/siteDef/main-nav.ts +0 -35
- package/style/social-svg.css +0 -3
- package/tailwind/lux-tw-fonts.ts +0 -37
- package/types/site-def.ts +0 -36
- /package/{common → primitives}/icons/github.tsx +0 -0
- /package/{common → primitives}/icons/youtube-logo.tsx +0 -0
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react'
|
|
2
|
-
|
|
3
|
-
// https://www.typescriptlang.org/docs/handbook/enums.html#enums-at-runtime
|
|
4
|
-
const enum MiniChartDateRangesValues {
|
|
5
|
-
'1D',
|
|
6
|
-
'1M',
|
|
7
|
-
'3M',
|
|
8
|
-
'12M',
|
|
9
|
-
'60M',
|
|
10
|
-
'ALL',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type MiniChartDateRanges = keyof typeof MiniChartDateRangesValues
|
|
14
|
-
|
|
15
|
-
interface MiniChartBaseProps {
|
|
16
|
-
symbol: string
|
|
17
|
-
exchange?: string
|
|
18
|
-
dateRange: MiniChartDateRanges
|
|
19
|
-
noTimeScale?: boolean
|
|
20
|
-
width?: number | string
|
|
21
|
-
height?: number | string
|
|
22
|
-
locale?: string
|
|
23
|
-
colorTheme?: "light" | "dark"
|
|
24
|
-
// @ts-ignore // TODO
|
|
25
|
-
lineColor?: CSSProperties["color"]
|
|
26
|
-
// @ts-ignore // TODO
|
|
27
|
-
topGradientColor?: CSSProperties["color"]
|
|
28
|
-
// @ts-ignore // TODO
|
|
29
|
-
bottomGradientColor?: CSSProperties["color"]
|
|
30
|
-
isTransparent?: boolean
|
|
31
|
-
autosize?: boolean
|
|
32
|
-
chartOnly?: boolean
|
|
33
|
-
largeChartUrl?: string
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
type MiniChartProps = {
|
|
37
|
-
widgetProps: MiniChartBaseProps
|
|
38
|
-
containerStyles?: CSSProperties
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
type MiniChartProps,
|
|
43
|
-
type MiniChartDateRanges
|
|
44
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React, { useEffect, useRef } from 'react'
|
|
4
|
-
import { type MiniChartProps } from './mini-chart-props'
|
|
5
|
-
|
|
6
|
-
const MiniChart: React.FC<MiniChartProps> = ({
|
|
7
|
-
widgetProps,
|
|
8
|
-
containerStyles = {}
|
|
9
|
-
}) => {
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
symbol,
|
|
13
|
-
exchange,
|
|
14
|
-
lineColor,
|
|
15
|
-
topGradientColor,
|
|
16
|
-
bottomGradientColor,
|
|
17
|
-
width,
|
|
18
|
-
height,
|
|
19
|
-
autosize,
|
|
20
|
-
locale,
|
|
21
|
-
...rest
|
|
22
|
-
} = widgetProps
|
|
23
|
-
|
|
24
|
-
const symbolString = (exchange) ? `${exchange}:${symbol}` : symbol
|
|
25
|
-
|
|
26
|
-
const containerRef = useRef<HTMLDivElement | null>(null)
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (!containerRef.current) {
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
const script = document.createElement('script')
|
|
33
|
-
script.type = 'text/javascript'
|
|
34
|
-
script.src = 'https://s3.tradingview.com/external-embedding/embed-widget-mini-symbol-overview.js'
|
|
35
|
-
script.async = true
|
|
36
|
-
script.onload = async () => {
|
|
37
|
-
const iframe = containerRef.current?.querySelector('iframe')
|
|
38
|
-
if (iframe && iframe instanceof Element) iframe.style.colorScheme = 'normal'
|
|
39
|
-
|
|
40
|
-
const copyDiv = document.querySelector('.tradingview-widget-copyright')
|
|
41
|
-
if (copyDiv) {
|
|
42
|
-
setTimeout(() => {
|
|
43
|
-
copyDiv.classList.remove('invisible')
|
|
44
|
-
}, 1200) // from experimentation
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
const config = JSON.stringify({
|
|
48
|
-
symbol: symbolString,
|
|
49
|
-
width: autosize ? '100%' : (width || 350),
|
|
50
|
-
height: autosize ? '100%' : (height || 220),
|
|
51
|
-
locale: locale ?? 'en',
|
|
52
|
-
isTransparent: 'true',
|
|
53
|
-
trendLineColor: lineColor || 'rgba(41, 98, 255, 1)',
|
|
54
|
-
underLineColor: topGradientColor || 'rgba(41, 98, 255, 0.3)',
|
|
55
|
-
underLineBottomColor: bottomGradientColor || 'rgba(41, 98, 255, 0)',
|
|
56
|
-
...rest,
|
|
57
|
-
})
|
|
58
|
-
script.innerHTML = config
|
|
59
|
-
containerRef.current.appendChild(script)
|
|
60
|
-
return () => {
|
|
61
|
-
while (containerRef.current?.firstChild) {
|
|
62
|
-
containerRef.current.removeChild(containerRef.current.firstChild)
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, [ JSON.stringify(widgetProps) ])
|
|
66
|
-
|
|
67
|
-
return (<>
|
|
68
|
-
<div style={containerStyles} className='tradingview-widget-container h-[150px]' ref={containerRef} />
|
|
69
|
-
<div className='tradingview-widget-copyright border-t w-full invisible'>
|
|
70
|
-
<a href={`https://www.tradingview.com/symbols/${symbol}${exchange ? `/?exchange=${exchange}` : '' }`} rel="noopener" target="_blank">
|
|
71
|
-
<span className="text-[--secondary-2]">{symbol} quotes</span></a> by TradingView
|
|
72
|
-
</div>
|
|
73
|
-
</>)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export default MiniChart
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import BaseChart from './mini-chart'
|
|
4
|
-
|
|
5
|
-
const Wrapper: React.FC<{
|
|
6
|
-
symbol: string,
|
|
7
|
-
exchange?: string
|
|
8
|
-
}> = ({
|
|
9
|
-
symbol,
|
|
10
|
-
exchange
|
|
11
|
-
}) => (
|
|
12
|
-
<BaseChart widgetProps ={{
|
|
13
|
-
symbol,
|
|
14
|
-
exchange,
|
|
15
|
-
autosize: true,
|
|
16
|
-
colorTheme: 'dark',
|
|
17
|
-
lineColor: "rgb(114, 27, 228)",
|
|
18
|
-
bottomGradientColor: "rgba(255, 255, 255, 0.1)",
|
|
19
|
-
dateRange: '60M',
|
|
20
|
-
}}/>
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
export default Wrapper
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ThemeProvider } from './theme-provider'
|
package/next/README.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Next related Lux helpers
|
|
2
|
-
|
|
3
|
-
### no `index.ts` file, and `load-and-return-lux-next-fonts-on-import.ts`
|
|
4
|
-
|
|
5
|
-
Next font loading requires the fonts to be assigned to const's in module scope (ie, loaded when the module is evaluated, exactly once).
|
|
6
|
-
|
|
7
|
-
If there was an `index.ts` "barrel file", and the client code imported anything from this package, it would have resulted in evaluting all the packages imported including the that loaded the fonts. Without the index, the client code knows what modules import it and thus when it happens.
|
|
8
|
-
|
|
9
|
-
tl;dr: See [this article from Vercel](https://vercel.com/blog/how-we-optimized-package-imports-in-next-js) about this issue.
|
|
10
|
-
|
|
11
|
-
(Previously, not having this safegaurd caused a serious bug becuase the fonts were loaded far too early.)
|
package/next/analytics/fpixel.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
fbq: Function;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const FB_PIXEL_ID = process.env.NEXT_PUBLIC_FACEBOOK_PIXEL_ID
|
|
8
|
-
|
|
9
|
-
export const pageview = () => {
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
window.fbq('track', 'PageView')
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// https://developers.facebook.com/docs/facebook-pixel/advanced/
|
|
15
|
-
export const event = (name: string, options = {}) => {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
window.fbq('track', name, options)
|
|
18
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { usePathname } from 'next/navigation'
|
|
4
|
-
import Script from 'next/script'
|
|
5
|
-
import { useEffect, useState } from 'react'
|
|
6
|
-
import * as fbq from './fpixel'
|
|
7
|
-
|
|
8
|
-
const FacebookPixelHead = () => {
|
|
9
|
-
return (
|
|
10
|
-
<noscript>
|
|
11
|
-
<img
|
|
12
|
-
height='1'
|
|
13
|
-
width='1'
|
|
14
|
-
style={{ display: 'none' }}
|
|
15
|
-
src={`https://www.facebook.com/tr?id=${fbq.FB_PIXEL_ID}&ev=PageView&noscript=1`}
|
|
16
|
-
/>
|
|
17
|
-
</noscript>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const FacebookPixel = () => {
|
|
22
|
-
const [loaded, setLoaded] = useState(false)
|
|
23
|
-
const pathname = usePathname()
|
|
24
|
-
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (!loaded) return
|
|
27
|
-
|
|
28
|
-
fbq.pageview()
|
|
29
|
-
}, [pathname, loaded])
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<div>
|
|
33
|
-
<Script
|
|
34
|
-
id='fb-pixel'
|
|
35
|
-
strategy='afterInteractive'
|
|
36
|
-
onLoad={() => setLoaded(true)}
|
|
37
|
-
dangerouslySetInnerHTML={{
|
|
38
|
-
__html: `
|
|
39
|
-
!function(f,b,e,v,n,t,s)
|
|
40
|
-
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
|
41
|
-
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
|
42
|
-
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
|
43
|
-
n.queue=[];t=b.createElement(e);t.async=!0;
|
|
44
|
-
t.src=v;s=b.getElementsByTagName(e)[0];
|
|
45
|
-
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
|
46
|
-
'https://connect.facebook.net/en_US/fbevents.js');
|
|
47
|
-
fbq('init', ${fbq.FB_PIXEL_ID});
|
|
48
|
-
`,
|
|
49
|
-
}}
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export {FacebookPixelHead, FacebookPixel}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse, userAgent } from 'next/server'
|
|
2
|
-
import { getSelectorsByUserAgent } from 'react-device-detect'
|
|
3
|
-
|
|
4
|
-
// writed this way so they can be chained :)
|
|
5
|
-
const determineDeviceMiddleware = async (request: NextRequest) => {
|
|
6
|
-
|
|
7
|
-
const ua = userAgent(request)
|
|
8
|
-
const { isMobileOnly, isTablet, isDesktop } = getSelectorsByUserAgent(ua.ua)
|
|
9
|
-
const agent = isMobileOnly ? 'phone' : (isTablet ? 'tablet' : (isDesktop ? 'desktop' : 'unknown'))
|
|
10
|
-
const { nextUrl: url } = request
|
|
11
|
-
//console.log(`\n=== from ${url.href} on a *${agent && agent.toUpperCase()}* device. ===\n`)
|
|
12
|
-
url.searchParams.set('agent', agent)
|
|
13
|
-
return NextResponse.rewrite(url)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default determineDeviceMiddleware
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import nextFonts from './load-and-return-lux-next-fonts-on-import'
|
|
2
|
-
import type NextFontDesc from './next-font-desc'
|
|
3
|
-
|
|
4
|
-
// These will be injected for <body> in app router app that uses our RootLayout
|
|
5
|
-
|
|
6
|
-
// First is assumed to be mapped to the default font and is injected into <body>
|
|
7
|
-
// as a normal tw font family class.
|
|
8
|
-
export default () => (
|
|
9
|
-
nextFonts.map(
|
|
10
|
-
(desc: NextFontDesc) => (desc.nextFont!.variable)
|
|
11
|
-
).join(' ') + ` font-${nextFonts[0].twName}`
|
|
12
|
-
)
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Inter } from 'next/font/google'
|
|
2
|
-
import localFont from 'next/font/local'
|
|
3
|
-
|
|
4
|
-
import type NextFontDesc from './next-font-desc'
|
|
5
|
-
import type TwFontDesc from '../tailwind/tw-font-desc'
|
|
6
|
-
|
|
7
|
-
import twFonts from '../tailwind/lux-tw-fonts'
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
Creating NextFontDesc's and TwFontDesc's has to be seperated because they are needed
|
|
11
|
-
at different times during the next compile / build. Otherwise a nasty
|
|
12
|
-
race condition happens!
|
|
13
|
-
|
|
14
|
-
Also, requires that "Font loaders must be called and assigned to a const in the module scope"
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const drukTextWide = localFont({
|
|
19
|
-
src: [
|
|
20
|
-
{
|
|
21
|
-
path: './fonts/DrukTextWide-Medium-Trial.otf',
|
|
22
|
-
weight: '500',
|
|
23
|
-
style: 'normal'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
path: './fonts/DrukTextWide-Bold-Trial.otf',
|
|
27
|
-
weight: '700',
|
|
28
|
-
style: 'normal'
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
path: './fonts/DrukTextWide-Heavy-Trial.otf',
|
|
32
|
-
weight: '800',
|
|
33
|
-
style: 'normal',
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
display: 'swap',
|
|
37
|
-
variable: '--font-druk-text-wide' ,
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
const drukWide = localFont({
|
|
41
|
-
src: [
|
|
42
|
-
{
|
|
43
|
-
path: './fonts/DrukWide-Medium-Trial.otf',
|
|
44
|
-
weight: '500',
|
|
45
|
-
style: 'normal'
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
path: './fonts/DrukWide-Bold-Trial.otf',
|
|
49
|
-
weight: '700',
|
|
50
|
-
style: 'normal'
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
path: './fonts/DrukWide-Heavy-Trial.otf',
|
|
54
|
-
weight: '500',
|
|
55
|
-
style: 'normal',
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
display: 'swap',
|
|
59
|
-
variable: '--font-druk-wide' ,
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
const inter = Inter({
|
|
63
|
-
subsets: ["latin"],
|
|
64
|
-
variable: "--font-inter",
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
export default [
|
|
68
|
-
{
|
|
69
|
-
font: inter,
|
|
70
|
-
twName: 'sans'
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
font: drukTextWide,
|
|
74
|
-
twName: 'nav'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
font: drukWide,
|
|
78
|
-
twName: 'heading'
|
|
79
|
-
}
|
|
80
|
-
].map (
|
|
81
|
-
(el) => {
|
|
82
|
-
const twFont: TwFontDesc | undefined = twFonts.find((twf: TwFontDesc) => (el.twName === twf.twName))
|
|
83
|
-
if (!twFont) {
|
|
84
|
-
throw new Error('lux-next-fonts: Next font is not paired to a TW font!')
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return ({
|
|
88
|
-
...twFont,
|
|
89
|
-
nextFont: el.font,
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
) as NextFontDesc[]
|
|
93
|
-
|
|
94
|
-
|
package/next/next-font-desc.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type TwFontDesc from '../tailwind/tw-font-desc'
|
|
2
|
-
|
|
3
|
-
// from next repo
|
|
4
|
-
type NextFont = {
|
|
5
|
-
className: string
|
|
6
|
-
style: { fontFamily: string; fontWeight?: number; fontStyle?: string }
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// from next repo
|
|
10
|
-
type NextFontWithVariable = NextFont & {
|
|
11
|
-
variable: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/*
|
|
16
|
-
NextFontDesc and TwFontDesc have to be seperate because they are needed
|
|
17
|
-
at different times during the next compile / build. Otherwise a nasty
|
|
18
|
-
race condition happens! That's why they are in different files.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
interface NextFontDesc extends TwFontDesc {
|
|
22
|
-
nextFont: NextFontWithVariable
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
type NextFontDesc as default,
|
|
27
|
-
type NextFontWithVariable,
|
|
28
|
-
}
|
package/next/not-found.tsx
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import Main from '../primitives/main'
|
|
4
|
-
import Footer from '../common/footer'
|
|
5
|
-
import { ApplyTypography } from '../primitives'
|
|
6
|
-
|
|
7
|
-
import NotFoundMDX from './not-found-content.mdx'
|
|
8
|
-
import type { SiteDef } from '../types'
|
|
9
|
-
|
|
10
|
-
const NotFound: React.FC<{
|
|
11
|
-
siteDef: SiteDef
|
|
12
|
-
}> = ({
|
|
13
|
-
siteDef
|
|
14
|
-
}) => (<>
|
|
15
|
-
<Main className='xs:h-[100svh] xs:px-8 sm:px-10 sm:h-[700px]'>
|
|
16
|
-
<ApplyTypography className='mt-[200px] flex flex-col md:gap-8 '>
|
|
17
|
-
<NotFoundMDX />
|
|
18
|
-
</ApplyTypography>
|
|
19
|
-
</Main>
|
|
20
|
-
<Footer siteDef={siteDef}/>
|
|
21
|
-
</>)
|
|
22
|
-
|
|
23
|
-
export default NotFound
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import nextFonts from './load-and-return-lux-next-fonts-on-import'
|
|
3
|
-
import type NextFontDesc from './next-font-desc'
|
|
4
|
-
|
|
5
|
-
const PagesRouterFontVars: React.FC = () => {
|
|
6
|
-
|
|
7
|
-
const fontVars = nextFonts.map((fd: NextFontDesc) => (
|
|
8
|
-
`${fd.cssVar}: ${fd.nextFont.style.fontFamily};`
|
|
9
|
-
)).join('\n')
|
|
10
|
-
|
|
11
|
-
return <style jsx global>{`
|
|
12
|
-
html {
|
|
13
|
-
${fontVars}
|
|
14
|
-
}
|
|
15
|
-
`}</style>
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default PagesRouterFontVars
|
package/next/root-layout.tsx
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react'
|
|
2
|
-
|
|
3
|
-
import type { Viewport } from 'next'
|
|
4
|
-
|
|
5
|
-
import Header from '../common/header'
|
|
6
|
-
import type { SiteDef } from '../types'
|
|
7
|
-
import getAppRouterBodyFontClasses from './get-app-router-font-classes'
|
|
8
|
-
import { FacebookPixelHead, FacebookPixel } from './analytics/pixel-analytics'
|
|
9
|
-
import { GoogleAnalytics } from '@next/third-parties/google'
|
|
10
|
-
|
|
11
|
-
// Next 14: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#use-viewport-export
|
|
12
|
-
const viewport = {
|
|
13
|
-
themeColor: [
|
|
14
|
-
{ media: '(prefers-color-scheme: light)', color: 'white' },
|
|
15
|
-
{ media: '(prefers-color-scheme: dark)', color: 'black' },
|
|
16
|
-
],
|
|
17
|
-
} satisfies Viewport
|
|
18
|
-
|
|
19
|
-
/*
|
|
20
|
-
These '.variable' fields are actually autogenerate css classnames that *define* the actual
|
|
21
|
-
css variables ('--<ugly-name>') that one asks for in the tailwind classes.
|
|
22
|
-
They are what make them available in the global scope. So this MUST
|
|
23
|
-
be done like this for the tailwind font classes to work.
|
|
24
|
-
|
|
25
|
-
(...not to be confused with the css var itself. This field should be named something else!)
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/*
|
|
29
|
-
re body: overflow-y-hidden overflow-x-hidden, h-full
|
|
30
|
-
We cannot have these on body tag for scroll-snap to work on iOS!
|
|
31
|
-
*/
|
|
32
|
-
const bodyClasses =
|
|
33
|
-
'bg-background text-foreground flex flex-col min-h-full ' +
|
|
34
|
-
getAppRouterBodyFontClasses()
|
|
35
|
-
|
|
36
|
-
const RootLayout: React.FC<PropsWithChildren & {
|
|
37
|
-
siteDef: SiteDef
|
|
38
|
-
header?: boolean
|
|
39
|
-
}> = ({
|
|
40
|
-
header = true,
|
|
41
|
-
siteDef,
|
|
42
|
-
children,
|
|
43
|
-
}) => (
|
|
44
|
-
<html lang='en' suppressHydrationWarning className='lux-dark-theme'>
|
|
45
|
-
<head >
|
|
46
|
-
{/* https://stackoverflow.com/a/75716588/11645689 */ }
|
|
47
|
-
<base target='_blank' />
|
|
48
|
-
<FacebookPixelHead/>
|
|
49
|
-
</head>
|
|
50
|
-
<body className={bodyClasses}>
|
|
51
|
-
<FacebookPixel />
|
|
52
|
-
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID ?? ''} />
|
|
53
|
-
{header && <Header siteDef={siteDef}/>}
|
|
54
|
-
{children}
|
|
55
|
-
</body>
|
|
56
|
-
</html>
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
RootLayout as default,
|
|
61
|
-
viewport
|
|
62
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '../../types'
|
|
2
|
-
import { Icons } from '../../common'
|
|
3
|
-
|
|
4
|
-
// @ts-ignore (will build in project that has @svgr support)
|
|
5
|
-
import SVG_warp_logo from './svg/warpcast-logo.svg'
|
|
6
|
-
|
|
7
|
-
const SOC_ICON_SIZE = 18
|
|
8
|
-
|
|
9
|
-
export default [
|
|
10
|
-
{
|
|
11
|
-
title: 'Community',
|
|
12
|
-
href: '',
|
|
13
|
-
variant: 'linkFG',
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
title: 'Lux Channel',
|
|
18
|
-
href: 'https://warpcast.com/~/channel/lux',
|
|
19
|
-
icon: <SVG_warp_logo width={SOC_ICON_SIZE} height={SOC_ICON_SIZE} /> //<Icons.SocialIcon network='warpcast' size={SOC_ICON_SIZE} />
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: 'Lux Discussion',
|
|
23
|
-
href: 'https://github.com/orgs/luxdefi/discussions',
|
|
24
|
-
icon: <Icons.SocialIcon network='github' size={SOC_ICON_SIZE} />
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
/*
|
|
28
|
-
{
|
|
29
|
-
title: 'Discord',
|
|
30
|
-
href: 'https://discord.gg/luxdefi',
|
|
31
|
-
external: true,
|
|
32
|
-
icon: <Icons.SocialIcon network='discord' size={SOC_ICON_SIZE} />
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
title: 'Telegram',
|
|
36
|
-
href: 'https://t.me/luxdefi',
|
|
37
|
-
external: true,
|
|
38
|
-
icon: <Icons.SocialIcon network='telegram' size={SOC_ICON_SIZE} />
|
|
39
|
-
},
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
title: '@luxdefi',
|
|
44
|
-
href: 'https://twitter.com/luxdefi',
|
|
45
|
-
icon: <Icons.SocialIcon network='x' size={SOC_ICON_SIZE} />
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
title: '@luxdefi',
|
|
49
|
-
href: 'https://facebook.com/luxdefi',
|
|
50
|
-
icon: <Icons.SocialIcon network='facebook' size={SOC_ICON_SIZE + 2} />
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
title: '@luxdefi',
|
|
54
|
-
href: 'https://www.instagram.com/luxdefi',
|
|
55
|
-
icon: <Icons.SocialIcon network='instagram' size={SOC_ICON_SIZE + 2} />
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: '@luxdefi',
|
|
59
|
-
href: 'https://linkedin.com/company/luxdefi',
|
|
60
|
-
icon: <Icons.SocialIcon network='linkedin' size={SOC_ICON_SIZE + 2} />
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: '@luxdefi',
|
|
64
|
-
href: 'https://www.youtube.com/@luxdefi',
|
|
65
|
-
icon: <Icons.SocialIcon network='youtube' size={SOC_ICON_SIZE + 2} />
|
|
66
|
-
},
|
|
67
|
-
] satisfies LinkDef[]
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '../../types'
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
title: 'Company',
|
|
6
|
-
href: "https://lux.partners/",
|
|
7
|
-
variant: 'linkFG',
|
|
8
|
-
newTab: false,
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
title: 'About',
|
|
12
|
-
href: 'https://lux.partners',
|
|
13
|
-
newTab: false,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
title: 'Brand',
|
|
17
|
-
href: 'https://drive.google.com/drive/folders/14OJtKLVakGY6883XO9yGbiHtlFxQUUm5?usp=share_link',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: 'Careers',
|
|
21
|
-
href: 'https://docs.google.com/document/d/1SCt0Hg7EIs06TootKCA1am1xo4mcXoKF/edit#heading=h.30j0zll',
|
|
22
|
-
newTab: true,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: 'Partnerships',
|
|
26
|
-
href: 'https://apply.lux.partners/',
|
|
27
|
-
newTab: false,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: 'Press',
|
|
31
|
-
href: 'mailto:ai@lux.partners?subject=%E2%96%BC%20Press',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: 'Help',
|
|
35
|
-
href: 'mailto:ai@lux.partners?subject=%E2%96%BC%20Help',
|
|
36
|
-
},
|
|
37
|
-
] satisfies LinkDef[]
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '../../types'
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
title: 'Ecosystem',
|
|
6
|
-
href: '',
|
|
7
|
-
variant: 'linkFG'
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
title: 'Lux Silver',
|
|
11
|
-
href: 'https://lux.market/silver',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
title: 'Lux Gold',
|
|
15
|
-
href: 'https://lux.market/gold',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
title: 'Lux Credit Card',
|
|
19
|
-
href: 'https://lux.credit',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: 'Lux Exchange',
|
|
23
|
-
href: 'https://lux.exchange',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: 'Lux Finance',
|
|
27
|
-
href: 'https://lux.finance',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: 'Lux Market',
|
|
31
|
-
href: 'https://lux.market',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: 'Lux Network',
|
|
35
|
-
href: 'https://lux.network',
|
|
36
|
-
},
|
|
37
|
-
] satisfies LinkDef[]
|