feat: moved to astro

This commit is contained in:
TrèsAbhi committed 2024-09-14 18:32:36 -05:00
1 parent 292df5f5d9
commit a1721eb05e
150 files changed
+386 -363

No files matched your search

BIN
View File
Binary file not shown.
+1 -1
View File
@@ -4,7 +4,7 @@ export * from './blitzkit';
// export * from './databases'; // export * from './databases';
export * from './imgur'; export * from './imgur';
// export * from './math'; // export * from './math';
// export * from './patreon'; export * from './patreon';
// export * from './protobuf'; // export * from './protobuf';
// export * from './statistics'; // export * from './statistics';
// export * from './streams'; // export * from './streams';
@@ -1,69 +0,0 @@
import { imgur } from '@blitzkit/core';
import { Code, Flex, Heading, Text } from '@radix-ui/themes';
import { BRANCH_NAMES } from './constants';
export function Hero() {
const isBranchNamed =
process.env.NEXT_PUBLIC_ASSET_BRANCH &&
BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH];
return (
<Flex
align="center"
justify="center"
style={{
position: 'relative',
background: `url(${imgur('rUPie9G', { format: 'jpeg' })})`,
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
}}
px="4"
py="9"
>
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(var(--color-panel-translucent), var(--color-background))',
}}
/>
<Flex
direction="column"
gap="6"
align="center"
justify="center"
position="relative"
width="100%"
>
<Flex direction="column" align="center" gap="1">
<Heading size="9" weight="bold" align="center">
<Flex
align="center"
gap={{ initial: '1', xs: '4' }}
direction={{ initial: 'column', xs: 'row' }}
>
BlitzKit
{isBranchNamed && (
<Code size="8" color="gray" highContrast variant="outline">
{BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH!]}
</Code>
)}
</Flex>
</Heading>
{!isBranchNamed && (
<Text color="gray" align="center" size="4">
Everything World of Tanks Blitz
</Text>
)}
</Flex>
</Flex>
</Flex>
);
}
+70 -70
View File
@@ -1,7 +1,8 @@
'use client'; 'use client';
import { Flex, Heading } from '@radix-ui/themes'; import { Flex, Heading } from '@radix-ui/themes';
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive'; import { Hero } from '../../../website/src/components/Hero';
import { ToolCard } from '../../../website/src/components/ToolCard';
import { import {
compareTool, compareTool,
discordTool, discordTool,
@@ -11,96 +12,95 @@ import {
tankopediaTool, tankopediaTool,
tankPerformanceTool, tankPerformanceTool,
} from '../../../website/src/constants/tools'; } from '../../../website/src/constants/tools';
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive';
import { useAdExempt } from '../hooks/useAdExempt'; import { useAdExempt } from '../hooks/useAdExempt';
import { Hero } from './components/Hero'; import { Plugs } from '../../../website/src/components/Plugs';
import { Plugs } from './components/Plugs';
import { ToolCard } from '../../../website/src/components/ToolCard';
export default function Page() { export default function Page() {
const exempt = useAdExempt(); const exempt = useAdExempt();
return ( return (
<> <>
<Hero /> <Hero />
<Plugs /> <Plugs />
<Flex p="4" justify="center" gap="4"> <Flex p="4" justify="center" gap="4">
<Flex maxWidth="1024px" flexGrow="1" gap="4" direction="column"> <Flex maxWidth="1024px" flexGrow="1" gap="4" direction="column">
<ToolCard tool={tankopediaTool} /> <ToolCard tool={tankopediaTool} />
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}> <Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
{/* <ToolCard tool={playerStatsTool} /> */} {/* <ToolCard tool={playerStatsTool} /> */}
<ToolCard tool={compareTool} /> <ToolCard tool={compareTool} />
<ToolCard tool={tankPerformanceTool} /> <ToolCard tool={tankPerformanceTool} />
</Flex>
{!exempt && (
<Flex justify="center">
<AdMidSectionResponsive />
</Flex> </Flex>
)}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}> {!exempt && (
<ToolCard tool={sessionTool} /> <Flex justify="center">
{/* <ToolCard tool={embedTool} /> */} <AdMidSectionResponsive />
<ToolCard tool={ratingTool} /> </Flex>
</Flex> )}
{!exempt && ( <Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<Flex <ToolCard tool={sessionTool} />
justify="center" {/* <ToolCard tool={embedTool} /> */}
display={{ <ToolCard tool={ratingTool} />
initial: 'flex',
md: 'none',
}}
>
<AdMidSectionResponsive />
</Flex> </Flex>
)}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}> {!exempt && (
<ToolCard tool={discordTool} /> <Flex
<ToolCard tool={moreTool} /> justify="center"
</Flex> display={{
initial: 'flex',
md: 'none',
}}
>
<AdMidSectionResponsive />
</Flex>
)}
{!exempt && <AdMidSectionResponsive />} <Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard tool={discordTool} />
<ToolCard tool={moreTool} />
</Flex>
<Heading>Other cool projects</Heading> {!exempt && <AdMidSectionResponsive />}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}> <Heading>Other cool projects</Heading>
<ToolCard
tool={{ <Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
button: { <ToolCard
text: 'Analyze', tool={{
color: 'blue', button: {
}, text: 'Analyze',
description: 'Rich historic average stats', color: 'blue',
id: 'blitz-analysis', },
image: 'j76YXGl', description: 'Rich historic average stats',
title: 'BlitzAnalysis[]', id: 'blitz-analysis',
href: 'https://blitzanalysiz.com/', image: 'j76YXGl',
}} title: 'BlitzAnalysis[]',
/> href: 'https://blitzanalysiz.com/',
<ToolCard }}
tool={{ />
button: { <ToolCard
color: 'purple', tool={{
text: 'Install', button: {
highContrast: true, color: 'purple',
}, text: 'Install',
image: 'zYrrYbR', highContrast: true,
description: 'In-game session stats', },
id: 'blitz-insider', image: 'zYrrYbR',
title: 'Blitz Insider', description: 'In-game session stats',
href: 'https://discord.gg/UjWf9eGgtR', id: 'blitz-insider',
}} title: 'Blitz Insider',
/> href: 'https://discord.gg/UjWf9eGgtR',
}}
/>
</Flex>
</Flex> </Flex>
</Flex> </Flex>
</Flex>
<div style={{ flex: 1 }} /> <div style={{ flex: 1 }} />
</> </>
); );
} }
@@ -1,6 +1,6 @@
import { Box } from '@radix-ui/themes'; import { Box } from '@radix-ui/themes';
import { useEffect, useRef } from 'react'; import { useEffect, useRef } from 'react';
import { previews } from '../../../../../../constants/embeds'; import { previews } from '../../../../../../../../website/src/constants/embeds';
import { useEmbedStateCurry } from '../../../../../../stores/embedState/utilities'; import { useEmbedStateCurry } from '../../../../../../stores/embedState/utilities';
import * as styles from './index.css'; import * as styles from './index.css';
@@ -7,7 +7,7 @@ import { PageWrapper } from '../../../../../components/PageWrapper';
import { import {
configurations, configurations,
extractEmbedConfigDefaults, extractEmbedConfigDefaults,
} from '../../../../../constants/embeds'; } from '../../../../../../../website/src/constants/embeds';
import * as EmbedState from '../../../../../stores/embedState'; import * as EmbedState from '../../../../../stores/embedState';
export interface EmbedPreviewControllerProps { export interface EmbedPreviewControllerProps {
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
import { import {
configurations, configurations,
extractEmbedConfigDefaults, extractEmbedConfigDefaults,
} from '../../../../constants/embeds'; } from '../../../../../../website/src/constants/embeds';
import * as EmbedState from '../../../../stores/embedState'; import * as EmbedState from '../../../../stores/embedState';
export function generateStaticParams() { export function generateStaticParams() {
@@ -16,7 +16,7 @@ import { ReactNode, useEffect, useRef, useState } from 'react';
import { stringify } from 'urlon'; import { stringify } from 'urlon';
import { CopyButton } from '../../../../components/CopyButton'; import { CopyButton } from '../../../../components/CopyButton';
import { PageWrapper } from '../../../../components/PageWrapper'; import { PageWrapper } from '../../../../components/PageWrapper';
import { configurations } from '../../../../constants/embeds'; import { configurations } from '../../../../../../website/src/constants/embeds';
import * as App from '../../../../stores/app'; import * as App from '../../../../stores/app';
import * as EmbedState from '../../../../stores/embedState'; import * as EmbedState from '../../../../stores/embedState';
import { EmbedConfig } from '../../../../stores/embedState'; import { EmbedConfig } from '../../../../stores/embedState';
@@ -5,7 +5,7 @@ import {
BreakdownEmbedCard, BreakdownEmbedCard,
BreakdownEmbedWrapper, BreakdownEmbedWrapper,
} from '../../../../components/TanksEmbed'; } from '../../../../components/TanksEmbed';
import { breakdownConfig } from '../../../../constants/embeds'; import { breakdownConfig } from '../../../../../../website/src/constants/embeds';
import { useEmbedStateCurry } from '../../../../stores/embedState/utilities'; import { useEmbedStateCurry } from '../../../../stores/embedState/utilities';
export const compositeStatsKeysOptions = compositeStatsKeys.map((value) => ({ export const compositeStatsKeysOptions = compositeStatsKeys.map((value) => ({
+7 -2
View File
@@ -11,6 +11,11 @@
"src/**/*", "src/**/*",
".next/types/**/*.ts", ".next/types/**/*.ts",
"../../dist/website/types/**/*.ts", "../../dist/website/types/**/*.ts",
"dist/website/types/**/*.ts" "dist/website/types/**/*.ts",
, "../website/src/components/ToolCard.tsx", "../website/src/constants/tools.tsx" ] "../website/src/components/ToolCard.tsx",
"../website/src/constants/tools.tsx",
"../website/src/components/Plugs.tsx",
"../website/src/constants/embeds.ts",
"../website/src/types"
]
} }
+1
View File
@@ -17,6 +17,7 @@
"@vanilla-extract/css": "^1.15.5", "@vanilla-extract/css": "^1.15.5",
"astro": "^4.15.6", "astro": "^4.15.6",
"astro-purgecss": "^4.6.0", "astro-purgecss": "^4.6.0",
"nanostores": "^0.11.3",
"purgecss": "^6.0.0", "purgecss": "^6.0.0",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1" "react-dom": "^18.3.1"
@@ -10,10 +10,10 @@ import {
import { Html } from '@react-three/drei'; import { Html } from '@react-three/drei';
import { useRef } from 'react'; import { useRef } from 'react';
import { radToDeg } from 'three/src/math/MathUtils'; import { radToDeg } from 'three/src/math/MathUtils';
import { resolveArmorIndex } from '../../../core/blitzkit/resolveArmorIndex'; import { resolveArmorIndex } from '../../../../../website-legacy/src/core/blitzkit/resolveArmorIndex';
import * as App from '../../../stores/app'; import * as App from '../../../../../website-legacy/src/stores/app';
import * as Duel from '../../../stores/duel'; import * as Duel from '../../../../../website-legacy/src/stores/duel';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral'; import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { layerTypeNames } from './ShotDisplayCard'; import { layerTypeNames } from './ShotDisplayCard';
import { ArmorType } from './SpacedArmorScene'; import { ArmorType } from './SpacedArmorScene';
@@ -1,12 +1,12 @@
import { memo, useRef } from 'react'; import { memo, useRef } from 'react';
import { Group } from 'three'; import { Group } from 'three';
import { correctZYTuple } from '../../../core/blitz/correctZYTuple'; import { correctZYTuple } from '../../../../../website-legacy/src/core/blitz/correctZYTuple';
import { nameToArmorId } from '../../../core/blitzkit/nameToArmorId'; import { nameToArmorId } from '../../../../../website-legacy/src/core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../core/blitzkit/resolveThickness'; import { resolveArmor } from '../../../../../website-legacy/src/core/blitzkit/resolveThickness';
import { useArmor } from '../../../hooks/useArmor'; import { useArmor } from '../../../../../website-legacy/src/hooks/useArmor';
import { useTankModelDefinition } from '../../../hooks/useTankModelDefinition'; import { useTankModelDefinition } from '../../../../../website-legacy/src/hooks/useTankModelDefinition';
import { useTankTransform } from '../../../hooks/useTankTransform'; import { useTankTransform } from '../../../../../website-legacy/src/hooks/useTankTransform';
import * as Duel from '../../../stores/duel'; import * as Duel from '../../../../../website-legacy/src/stores/duel';
import { ModelTankWrapper } from './ModelTankWrapper'; import { ModelTankWrapper } from './ModelTankWrapper';
import { PrimaryArmorSceneComponent } from './PrimaryArmorSceneComponent'; import { PrimaryArmorSceneComponent } from './PrimaryArmorSceneComponent';
@@ -9,10 +9,10 @@ import { useFrame } from '@react-three/fiber';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { MeshBasicMaterial, Object3D, ShaderMaterial, Vector2 } from 'three'; import { MeshBasicMaterial, Object3D, ShaderMaterial, Vector2 } from 'three';
import { degToRad } from 'three/src/math/MathUtils'; import { degToRad } from 'three/src/math/MathUtils';
import { hasEquipment } from '../../../../core/blitzkit/hasEquipment'; import { hasEquipment } from '../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../core/blitzkit/jsxTree'; import { jsxTree } from '../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import * as Duel from '../../../../stores/duel'; import * as Duel from '../../../../../../website-legacy/src/stores/duel';
import * as TankopediaPersistent from '../../../../stores/tankopediaPersistent'; import * as TankopediaPersistent from '../../../../../../website-legacy/src/stores/tankopediaPersistent';
import fragmentShader from './shaders/fragment.glsl'; import fragmentShader from './shaders/fragment.glsl';
import vertexShader from './shaders/vertex.glsl'; import vertexShader from './shaders/vertex.glsl';
import { spacedArmorRenderTarget } from './target'; import { spacedArmorRenderTarget } from './target';
@@ -16,8 +16,8 @@ import {
Path, Path,
Quaternion, Quaternion,
} from 'three'; } from 'three';
import { useFullScreen } from '../../../hooks/useFullScreen'; import { useFullScreen } from '../../../../../website-legacy/src/hooks/useFullScreen';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral'; import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { ShotDisplayCard } from './ShotDisplayCard'; import { ShotDisplayCard } from './ShotDisplayCard';
export const shotStatusColors: Record< export const shotStatusColors: Record<
@@ -8,7 +8,7 @@ import {
} from '@radix-ui/themes'; } from '@radix-ui/themes';
import { ComponentProps } from 'react'; import { ComponentProps } from 'react';
import { radToDeg } from 'three/src/math/MathUtils'; import { radToDeg } from 'three/src/math/MathUtils';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral'; import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { shotStatusColors } from './ShotDisplay'; import { shotStatusColors } from './ShotDisplay';
import { ArmorType } from './SpacedArmorScene'; import { ArmorType } from './SpacedArmorScene';
import { ExternalModuleVariant } from './SpacedArmorSceneComponent'; import { ExternalModuleVariant } from './SpacedArmorSceneComponent';
@@ -1,13 +1,13 @@
import { memo, useRef } from 'react'; import { memo, useRef } from 'react';
import { Group, Plane, Scene, Vector3 } from 'three'; import { Group, Plane, Scene, Vector3 } from 'three';
import { correctZYTuple } from '../../../core/blitz/correctZYTuple'; import { correctZYTuple } from '../../../../../website-legacy/src/core/blitz/correctZYTuple';
import { nameToArmorId } from '../../../core/blitzkit/nameToArmorId'; import { nameToArmorId } from '../../../../../website-legacy/src/core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../core/blitzkit/resolveThickness'; import { resolveArmor } from '../../../../../website-legacy/src/core/blitzkit/resolveThickness';
import { useArmor } from '../../../hooks/useArmor'; import { useArmor } from '../../../../../website-legacy/src/hooks/useArmor';
import { useModel } from '../../../hooks/useModel'; import { useModel } from '../../../../../website-legacy/src/hooks/useModel';
import { useTankModelDefinition } from '../../../hooks/useTankModelDefinition'; import { useTankModelDefinition } from '../../../../../website-legacy/src/hooks/useTankModelDefinition';
import { useTankTransform } from '../../../hooks/useTankTransform'; import { useTankTransform } from '../../../../../website-legacy/src/hooks/useTankTransform';
import * as Duel from '../../../stores/duel'; import * as Duel from '../../../../../website-legacy/src/stores/duel';
import { ModelTankWrapper } from './ModelTankWrapper'; import { ModelTankWrapper } from './ModelTankWrapper';
import { SpacedArmorSceneComponent } from './SpacedArmorSceneComponent'; import { SpacedArmorSceneComponent } from './SpacedArmorSceneComponent';
@@ -12,9 +12,9 @@ import {
ShaderMaterial, ShaderMaterial,
} from 'three'; } from 'three';
import { ArmorUserData, ExternalModuleVariant } from '../..'; import { ArmorUserData, ExternalModuleVariant } from '../..';
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment'; import { hasEquipment } from '../../../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../core/blitzkit/jsxTree'; import { jsxTree } from '../../../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import * as Duel from '../../../../../../stores/duel'; import * as Duel from '../../../../../../../../website-legacy/src/stores/duel';
import { ArmorType } from '../../../SpacedArmorScene'; import { ArmorType } from '../../../SpacedArmorScene';
import fragmentShader from './shaders/fragment.glsl'; import fragmentShader from './shaders/fragment.glsl';
import vertexShader from './shaders/vertex.glsl'; import vertexShader from './shaders/vertex.glsl';
@@ -13,9 +13,9 @@ import {
} from 'three'; } from 'three';
import { degToRad } from 'three/src/math/MathUtils'; import { degToRad } from 'three/src/math/MathUtils';
import { ArmorUserData } from '../..'; import { ArmorUserData } from '../..';
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment'; import { hasEquipment } from '../../../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../core/blitzkit/jsxTree'; import { jsxTree } from '../../../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import * as Duel from '../../../../../../stores/duel'; import * as Duel from '../../../../../../../../website-legacy/src/stores/duel';
import { ArmorType } from '../../../SpacedArmorScene'; import { ArmorType } from '../../../SpacedArmorScene';
import fragmentShader from './shaders/fragment.glsl'; import fragmentShader from './shaders/fragment.glsl';
import vertexShader from './shaders/vertex.glsl'; import vertexShader from './shaders/vertex.glsl';
@@ -17,11 +17,11 @@ import {
Vector3, Vector3,
} from 'three'; } from 'three';
import { degToRad } from 'three/src/math/MathUtils'; import { degToRad } from 'three/src/math/MathUtils';
import { hasEquipment } from '../../../../core/blitzkit/hasEquipment'; import { hasEquipment } from '../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../core/blitzkit/jsxTree'; import { jsxTree } from '../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import { discardClippingPlane } from '../../../../core/three/discardClippingPlane'; import { discardClippingPlane } from '../../../../../../website-legacy/src/core/three/discardClippingPlane';
import * as Duel from '../../../../stores/duel'; import * as Duel from '../../../../../../website-legacy/src/stores/duel';
import * as TankopediaEphemeral from '../../../../stores/tankopediaEphemeral'; import * as TankopediaEphemeral from '../../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { ArmorType } from '../SpacedArmorScene'; import { ArmorType } from '../SpacedArmorScene';
import { SpacedArmorSubExternal } from './components/SpacedArmorSubExternal'; import { SpacedArmorSubExternal } from './components/SpacedArmorSubExternal';
import { SpacedArmorSubSpaced } from './components/SpacedArmorSubSpaced'; import { SpacedArmorSubSpaced } from './components/SpacedArmorSubSpaced';
@@ -2,19 +2,19 @@ import { normalizeAngleRad } from '@blitzkit/core';
import { ThreeEvent, useThree } from '@react-three/fiber'; import { ThreeEvent, useThree } from '@react-three/fiber';
import { memo, useRef } from 'react'; import { memo, useRef } from 'react';
import { Group, Plane, Vector2, Vector3 } from 'three'; import { Group, Plane, Vector2, Vector3 } from 'three';
import { applyPitchYawLimits } from '../../../core/blitz/applyPitchYawLimits'; import { applyPitchYawLimits } from '../../../../../website-legacy/src/core/blitz/applyPitchYawLimits';
import { correctZYTuple } from '../../../core/blitz/correctZYTuple'; import { correctZYTuple } from '../../../../../website-legacy/src/core/blitz/correctZYTuple';
import { hasEquipment } from '../../../core/blitzkit/hasEquipment'; import { hasEquipment } from '../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { modelTransformEvent } from '../../../core/blitzkit/modelTransform'; import { modelTransformEvent } from '../../../../../website-legacy/src/core/blitzkit/modelTransform';
import { nameToArmorId } from '../../../core/blitzkit/nameToArmorId'; import { nameToArmorId } from '../../../../../website-legacy/src/core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../core/blitzkit/resolveThickness'; import { resolveArmor } from '../../../../../website-legacy/src/core/blitzkit/resolveThickness';
import { useArmor } from '../../../hooks/useArmor'; import { useArmor } from '../../../../../website-legacy/src/hooks/useArmor';
import { useModel } from '../../../hooks/useModel'; import { useModel } from '../../../../../website-legacy/src/hooks/useModel';
import { useTankModelDefinition } from '../../../hooks/useTankModelDefinition'; import { useTankModelDefinition } from '../../../../../website-legacy/src/hooks/useTankModelDefinition';
import { useTankTransform } from '../../../hooks/useTankTransform'; import { useTankTransform } from '../../../../../website-legacy/src/hooks/useTankTransform';
import * as Duel from '../../../stores/duel'; import * as Duel from '../../../../../website-legacy/src/stores/duel';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral'; import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import * as TankopediaPersistent from '../../../stores/tankopediaPersistent'; import * as TankopediaPersistent from '../../../../../website-legacy/src/stores/tankopediaPersistent';
import { ModelTankWrapper } from './ModelTankWrapper'; import { ModelTankWrapper } from './ModelTankWrapper';
import { ArmorType } from './SpacedArmorScene'; import { ArmorType } from './SpacedArmorScene';
import { StaticArmorSceneComponent } from './StaticArmorSceneComponent'; import { StaticArmorSceneComponent } from './StaticArmorSceneComponent';
@@ -15,14 +15,14 @@ import {
Quaternion, Quaternion,
Vector3, Vector3,
} from 'three'; } from 'three';
import { unrotateDavaVector } from '../../../core/blitz/unrotateDavaVector'; import { unrotateDavaVector } from '../../../../../website-legacy/src/core/blitz/unrotateDavaVector';
import { jsxTree } from '../../../core/blitzkit/jsxTree'; import { jsxTree } from '../../../../../website-legacy/src/core/blitzkit/jsxTree';
import { import {
ModelTransformEventData, ModelTransformEventData,
modelTransformEvent, modelTransformEvent,
} from '../../../core/blitzkit/modelTransform'; } from '../../../../../website-legacy/src/core/blitzkit/modelTransform';
import { discardClippingPlane } from '../../../core/three/discardClippingPlane'; import { discardClippingPlane } from '../../../../../website-legacy/src/core/three/discardClippingPlane';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral'; import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { ArmorType } from './SpacedArmorScene'; import { ArmorType } from './SpacedArmorScene';
import { import {
ArmorUserData, ArmorUserData,
@@ -1,7 +1,7 @@
import { EquipmentPreset } from '@blitzkit/core'; import { EquipmentPreset } from '@blitzkit/core';
import { Flex } from '@radix-ui/themes'; import { Flex } from '@radix-ui/themes';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import { EquipmentMatrix } from '../stores/duel'; import { EquipmentMatrix } from '../../../website-legacy/src/stores/duel';
import { EquipmentButton } from './ModuleButtons/EquipmentButton'; import { EquipmentButton } from './ModuleButtons/EquipmentButton';
interface EquipmentManagerProps { interface EquipmentManagerProps {
@@ -0,0 +1,77 @@
---
import { imgur } from '@blitzkit/core';
import { Code, Flex, Heading, Text } from '@radix-ui/themes';
import { BRANCH_NAMES } from '../constants/branches';
const isBranchNamed =
process.env.NEXT_PUBLIC_ASSET_BRANCH &&
BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH];
---
<style>
.container {
background: var(--backgroundImage);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
</style>
<Flex
className="container"
style={{ backgroundImage: `url(${imgur('rUPie9G', { format: 'jpeg' })})` }}
align="center"
justify="center"
position="relative"
px="4"
py="9"
>
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(var(--color-panel-translucent), var(--color-background))',
}}
>
</div>
<Flex
direction="column"
gap="6"
align="center"
justify="center"
position="relative"
width="100%"
>
<Flex direction="column" align="center" gap="1">
<Heading size="9" weight="bold" align="center">
<Flex
align="center"
gap={{ initial: '1', xs: '4' }}
direction={{ initial: 'column', xs: 'row' }}
>
BlitzKit
{
isBranchNamed && (
<Code size="8" color="gray" highContrast variant="outline">
{BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH!]}
</Code>
)
}
</Flex>
</Heading>
{
!isBranchNamed && (
<Text color="gray" align="center" size="4">
Everything World of Tanks Blitz
</Text>
)
}
</Flex>
</Flex>
</Flex>
@@ -2,7 +2,7 @@ import { asset, consumableDefinitions } from '@blitzkit/core';
import { ClockIcon, ReloadIcon } from '@radix-ui/react-icons'; import { ClockIcon, ReloadIcon } from '@radix-ui/react-icons';
import { Flex, Text } from '@radix-ui/themes'; import { Flex, Text } from '@radix-ui/themes';
import { use } from 'react'; import { use } from 'react';
import { useDelta } from '../../hooks/useDelta'; import { useDelta } from '../../../../website-legacy/src/hooks/useDelta';
import { GenericTankComponentButton } from './GenericTankComponentButton'; import { GenericTankComponentButton } from './GenericTankComponentButton';
import { TankComponentButtonProps } from './TankComponentButton'; import { TankComponentButtonProps } from './TankComponentButton';
@@ -1,7 +1,7 @@
import { getAccountInfo, idToRegion } from '@blitzkit/core'; import { getAccountInfo, idToRegion } from '@blitzkit/core';
import { Text } from '@radix-ui/themes'; import { Text } from '@radix-ui/themes';
import { use, useMemo } from 'react'; import { use, useMemo } from 'react';
import * as App from '../../../stores/app'; import * as App from '../../../../../website-legacy/src/stores/app';
export function WargamingAccountName() { export function WargamingAccountName() {
const wargaming = App.use((state) => state.logins.wargaming!); const wargaming = App.use((state) => state.logins.wargaming!);
@@ -29,9 +29,9 @@ import {
} from '@radix-ui/themes'; } from '@radix-ui/themes';
import { usePathname } from 'next/navigation'; import { usePathname } from 'next/navigation';
import { Fragment, Suspense, useState } from 'react'; import { Fragment, Suspense, useState } from 'react';
import { BRANCH_NAMES } from '../../app/components/Hero/constants'; import * as App from '../../../../website-legacy/src/stores/app';
import { homeTool, TOOLS } from '../../../../website/src/constants/tools'; import { BRANCH_NAMES } from '../../../../website/src/components/Hero/constants';
import * as App from '../../stores/app'; import { homeTool, TOOLS } from '../../constants/tools';
import { Link } from '../Link'; import { Link } from '../Link';
import { PatreonIcon } from '../PatreonIcon'; import { PatreonIcon } from '../PatreonIcon';
import { WargamingIcon } from '../WargamingIcon'; import { WargamingIcon } from '../WargamingIcon';
@@ -1,6 +1,6 @@
import { Flex, FlexProps, Theme } from '@radix-ui/themes'; import { Flex, FlexProps, Theme } from '@radix-ui/themes';
import { ComponentProps } from 'react'; import { ComponentProps } from 'react';
import { RadixSize } from '../stores/embedState'; import { RadixSize } from '../../../website-legacy/src/stores/embedState';
type PageWrapperProps = FlexProps & { type PageWrapperProps = FlexProps & {
color?: ComponentProps<typeof Theme>['accentColor']; color?: ComponentProps<typeof Theme>['accentColor'];
@@ -12,9 +12,9 @@ import {
Text, Text,
} from '@radix-ui/themes'; } from '@radix-ui/themes';
import { useLayoutEffect, useState } from 'react'; import { useLayoutEffect, useState } from 'react';
import { PatreonIcon } from '../../components/PatreonIcon'; import { useAdExempt } from '../hooks/useAdExempt';
import { useAdExempt } from '../../hooks/useAdExempt'; import * as App from '../stores/app';
import * as App from '../../stores/app'; import { PatreonIcon } from './PatreonIcon';
export function Plugs() { export function Plugs() {
const [hasPatreon, setHasPatreon] = useState(false); const [hasPatreon, setHasPatreon] = useState(false);
@@ -8,9 +8,9 @@ import { amberDark, blueDark } from '@radix-ui/colors';
import { Flex, Text } from '@radix-ui/themes'; import { Flex, Text } from '@radix-ui/themes';
import { times } from 'lodash'; import { times } from 'lodash';
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import { toRadiusVar } from '../../../website-legacy/src/core/radix/utils';
import { useEmbedStateCurry } from '../../../website-legacy/src/stores/embedState/utilities';
import { breakdownConfig } from '../constants/embeds'; import { breakdownConfig } from '../constants/embeds';
import { toRadiusVar } from '../core/radix/utils';
import { useEmbedStateCurry } from '../stores/embedState/utilities';
import { ClassHeavy } from './ClassIcon/components/ClassHeavy'; import { ClassHeavy } from './ClassIcon/components/ClassHeavy';
import { ClassLight } from './ClassIcon/components/ClassLight'; import { ClassLight } from './ClassIcon/components/ClassLight';
import { ClassMedium } from './ClassIcon/components/ClassMedium'; import { ClassMedium } from './ClassIcon/components/ClassMedium';
@@ -12,6 +12,8 @@ const { tool } = Astro.props;
const disabled = tool.branches?.every( const disabled = tool.branches?.every(
(branch) => branch !== assertSecret(process.env.PUBLIC_ASSET_BRANCH), (branch) => branch !== assertSecret(process.env.PUBLIC_ASSET_BRANCH),
); );
console.log(process.env);
--- ---
<style> <style>
@@ -40,11 +42,6 @@ const disabled = tool.branches?.every(
</style> </style>
<Flex <Flex
data-disabled={disabled}
data-significant={tool.significant}
className="container"
position="relative"
overflow="hidden"
style={{ style={{
backgroundImage: `url(${imgur(tool.image, { backgroundImage: `url(${imgur(tool.image, {
format: 'jpeg', format: 'jpeg',
@@ -53,6 +50,11 @@ const disabled = tool.branches?.every(
: ImgurSize.LargeThumbnail, : ImgurSize.LargeThumbnail,
})})`, })})`,
}} }}
data-disabled={disabled}
data-significant={tool.significant}
className="container"
position="relative"
overflow="hidden"
flexGrow={tool.significant ? undefined : '1'} flexGrow={tool.significant ? undefined : '1'}
flexBasis={tool.significant ? undefined : { initial: undefined, sm: '0' }} flexBasis={tool.significant ? undefined : { initial: undefined, sm: '0' }}
> >
@@ -65,7 +67,7 @@ const disabled = tool.branches?.every(
<Box <Box
flexGrow="1" flexGrow="1"
style={{ style={{
// backgroundImage: `url(${imgur(tool.image, { format: 'jpeg', size })})`, backgroundImage: `url(${imgur(tool.image, { format: 'jpeg' })})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center', backgroundPosition: 'center',
}} }}
@@ -4,9 +4,9 @@ import { ReactNode } from 'react';
import { import {
BreakdownPreview, BreakdownPreview,
compositeStatsKeysOptions, compositeStatsKeysOptions,
} from '../app/tools/embed/configurations/breakdown'; } from '../../../website-legacy/src/app/tools/embed/configurations/breakdown';
import { EmbedConfig, ExtractEmbedConfigTypes } from '../stores/embedState'; import { EmbedConfig, ExtractEmbedConfigTypes } from '../../../website-legacy/src/stores/embedState';
import { EmbedItemType } from '../stores/embedState/constants'; import { EmbedItemType } from '../../../website-legacy/src/stores/embedState/constants';
export const breakdownConfig = { export const breakdownConfig = {
width: { type: EmbedItemType.Slider, default: 320, min: 128, max: 640 }, width: { type: EmbedItemType.Slider, default: 320, min: 128, max: 640 },
Loaded 100 of 150 files, more files were not shown because too many files have changed in this diff. Show more