Skip to content

Commit

Permalink
init colors and assets + choose class screen (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicon44 authored Oct 30, 2024
1 parent b00d948 commit c95dad1
Show file tree
Hide file tree
Showing 118 changed files with 252 additions and 213 deletions.
Binary file added public/beasts/ammit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/anansi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/balrog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/banshee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/basilisk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/bear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/behemoth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/berserker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/bigfoot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/chimera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/chupacabra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/colossus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/cyclops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/direwolf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/dragon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/draugr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/ent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/ettin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/fairy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/fenrir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/ghoul.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/giant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/gnome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/goblin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/golem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/beasts/gorgon.png
Binary file added public/beasts/griffin.png
Binary file added public/beasts/harpy.png
Binary file added public/beasts/hippogriff.png
Binary file added public/beasts/hydra.png
Binary file added public/beasts/jaguar.png
Binary file added public/beasts/jiangshi.png
Binary file added public/beasts/jotunn.png
Binary file added public/beasts/juggernaut.png
Binary file added public/beasts/kappa.png
Binary file added public/beasts/kelpie.png
Binary file added public/beasts/kitsune.png
Binary file added public/beasts/kraken.png
Binary file added public/beasts/leprechaun.png
Binary file added public/beasts/leviathan.png
Binary file added public/beasts/lich.png
Binary file added public/beasts/manticore.png
Binary file added public/beasts/mantis.png
Binary file added public/beasts/minotaur.png
Binary file added public/beasts/nemeanlion.png
Binary file added public/beasts/nephilim.png
Binary file added public/beasts/nue.png
Binary file added public/beasts/ogre.png
Binary file added public/beasts/oni.png
Binary file added public/beasts/orc.png
Binary file added public/beasts/pegasus.png
Binary file added public/beasts/phoenix.png
Binary file added public/beasts/pixie.png
Binary file added public/beasts/qilin.png
Binary file added public/beasts/rakshasa.png
Binary file added public/beasts/rat.png
Binary file added public/beasts/roc.png
Binary file added public/beasts/satori.png
Binary file added public/beasts/skeleton.png
Binary file added public/beasts/skinwalker.png
Binary file added public/beasts/spider.png
Binary file added public/beasts/sprite.png
Binary file added public/beasts/tarrasque.png
Binary file added public/beasts/titan.png
Binary file added public/beasts/troll.png
Binary file added public/beasts/typhon.png
Binary file added public/beasts/vampire.png
Binary file added public/beasts/warlock.png
Binary file added public/beasts/wendigo.png
Binary file added public/beasts/weretiger.png
Binary file added public/beasts/werewolf.png
Binary file added public/beasts/wolf.png
Binary file added public/beasts/wraith.png
Binary file added public/beasts/wyvern.png
Binary file added public/beasts/yeti.png
Binary file added public/bg/beast-bg.jpg
Binary file added public/bg/cave-bg.jpg
Binary file added public/bg/skulls-bg.jpg
Binary file added public/fonts/Jersey10.ttf
Binary file not shown.
Binary file added public/fonts/VT323.ttf
Binary file not shown.
Binary file added public/weapons/book.png
Binary file added public/weapons/club.png
Binary file added public/weapons/sword.png
Binary file added public/weapons/wand.png
20 changes: 6 additions & 14 deletions src/App.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
@font-face {
src: url("../public/fonts/Orbitron.ttf");
font-family: "Orbitron";
src: url("../public/fonts/Jersey10.ttf");
font-family: "Jersey";
}
@font-face {
src: url("../public/fonts/Oxanium.ttf");
font-family: "Oxanium";
}
@font-face {
src: url("../public/fonts/Sonara.otf");
font-family: "Sonara";
src: url("../public/fonts/VT323.ttf");
font-family: "VT323";
}

* {
font-family: "Oxanium";
font-family: "VT323";
}

.headline {
font-family: "Orbitron";
}

.italic {
font-family: "Sonara";
font-family: "Jersey";
}
42 changes: 2 additions & 40 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { CardAnimationsProvider } from "./providers/CardAnimationsProvider";
import { GameProvider } from "./providers/GameProvider";
import { StoreProvider } from "./providers/StoreProvider";
import customTheme from "./theme/theme";
import { ChooseClassPage } from "./pages/ChooseClassPage";

function App() {
const theme = extendTheme(customTheme);
Expand All @@ -30,46 +31,7 @@ function App() {
<AudioPlayerProvider songPath={"/music/new-track.mp3"}>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/login" element={<Login />} />
<Route path="/gameover/:gameId" element={<GameOver />} />
<Route path="/demo" element={<GamePage />} />
<Route path="/rewards" element={<RewardsPage />} />

<Route
path="/store"
element={
<StoreProvider>
<Store />
</StoreProvider>
}
/>
<Route path="/redirect/:page" element={<Redirect />} />
<Route
path="/preview/:type"
element={
<StoreProvider>
<PreviewPage />
</StoreProvider>
}
/>
<Route
path="/open-pack"
element={
<StoreProvider>
<OpenPack />
</StoreProvider>
}
/>
<Route
path="/special-cards"
element={
<StoreProvider>
<SpecialCardsPage />
</StoreProvider>
}
/>
<Route path="/play" element={<Navigate to="/" />} />
<Route path="/plays" element={<PlaysLayout />} />
<Route path="/choose-class" element={<ChooseClassPage />} />
</Routes>
</AudioPlayerProvider>
</GameProvider>
Expand Down
61 changes: 3 additions & 58 deletions src/components/Background.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Box, Text } from "@chakra-ui/react";
import { Box } from "@chakra-ui/react";
import { PropsWithChildren } from "react";
import { useResponsiveValues } from "../theme/responsiveSettings";
import CachedImage from "./CachedImage";

interface BackgroundProps extends PropsWithChildren {
type?: "game" | "store" | "home" | "white" | "rage";
type?: "game" | "store" | "home" | "white" | "rage" | "skulls" | "cave" | "beast";
dark?: boolean;
scrollOnMobile?: boolean;
bgDecoration?: boolean;
Expand Down Expand Up @@ -53,6 +53,7 @@ export const Background = ({
bottom: isSmallScreen ? 0 : "unset",
boxShadow: dark ? "inset 0 0 0 1000px rgba(0,0,0,.4)" : "none",
overflow: scrollOnMobile && isSmallScreen ? "scroll" : "unset",
py: '90px'
}}
>
{bgDecoration ? (
Expand All @@ -78,45 +79,7 @@ const BackgroundDecoration = ({ children }: PropsWithChildren) => {
top={0}
/>
)}
<Box
height="15%"
width="100%"
display="flex"
justifyContent={isSmallScreen ? "center" : "space-between"}
alignItems="center"
padding={isSmallScreen ? "0 50px" : "25px 50px 0px 50px"}
>
<CachedImage
alignSelf="center"
justifySelf="end"
src="/logos/logo-variant.svg"
alt="logo-variant"
width={"65%"}
maxW={"300px"}
ml={4}
/>
{!isSmallScreen && (
<CachedImage
alignSelf="center"
justifySelf="end"
src="/logos/joker-logo.png"
alt="/logos/joker-logo.png"
width={"25%"}
maxW={"150px"}
/>
)}
</Box>
<Box
sx={{
height: { base: "80%", sm: "60%" },
width: "100%",
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
{children}
</Box>
{!isSmallScreen && (
<>
<CachedImage
Expand All @@ -127,24 +90,6 @@ const BackgroundDecoration = ({ children }: PropsWithChildren) => {
position="fixed"
bottom={0}
/>
<Box
sx={{
position: "fixed",
bottom: 16,
left: 12,
}}
>
<Text size="m">BUILD YOUR DECK</Text>
</Box>
<Box
sx={{
position: "fixed",
bottom: 16,
right: 12,
}}
>
<Text size="m">RULE THE GAME</Text>
</Box>
</>
)}
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CashSymbol.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const CashSymbol = () => {
return <span style={{ fontFamily: "Orbitron", marginLeft: '3px' }}>¢</span>;
return <span style={{ fontFamily: "Jersey", marginLeft: '3px' }}>¢</span>;
};
4 changes: 2 additions & 2 deletions src/components/GameMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { faBars } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { GAME_ID, LOGGED_USER } from "../constants/localStorage";
import { GAME_ID, LOGGED_USER } from "../constants/localStorage.ts";
import { useAudioPlayer } from "../providers/AudioPlayerProvider.tsx";
import { useGameContext } from "../providers/GameProvider";
import { useGameContext } from "../providers/GameProvider.tsx";
import { useResponsiveValues } from "../theme/responsiveSettings.tsx";

interface GameMenuProps {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
Tr
} from "@chakra-ui/react";
import { useTranslation } from "react-i18next";
import { useGetLeaderboard } from "../queries/useGetLeaderboard";
import { useGetLeaderboard } from "../queries/useGetLeaderboard.ts";
import { VIOLET, VIOLET_LIGHT } from "../theme/colors.tsx";
import { RollingNumber } from "./RollingNumber";
import { RollingNumber } from "./RollingNumber.tsx";

const CURRENT_LEADER_STYLES = {
position: "relative",
Expand Down
2 changes: 1 addition & 1 deletion src/components/PinkBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const PinkBox = ({ children, title, button, onClick }: PinkBoxProps) => {
alignItems="center"
w="80%"
maxW="550px"
fontFamily="Orbitron"
fontFamily="Jersey"
>
<Box
w="100%"
Expand Down
2 changes: 1 addition & 1 deletion src/components/PoweredBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const PoweredBy = () => {
letterSpacing: "0.25em",
}}
>
<Text fontFamily="Orbitron">powered by Dojo and Starknet</Text>
<Text fontFamily="VT323">powered by Dojo and Starknet</Text>
</Box>
);
};
2 changes: 1 addition & 1 deletion src/components/RewardsDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Flex, Heading } from "@chakra-ui/react";
import { useTranslation } from 'react-i18next';
import { useNavigate } from "react-router-dom";
import { useRound } from "../dojo/queries/useRound.tsx";
import { VIOLET_LIGHT } from "../theme/colors";
import { VIOLET_LIGHT } from "../theme/colors.tsx";
import { RoundRewards } from "../types/RoundRewards.ts";
import { CashSymbol } from "./CashSymbol.tsx";
import { PinkBox } from "./PinkBox.tsx";
Expand Down
2 changes: 1 addition & 1 deletion src/components/SortBy.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Flex, Img, Text, Tooltip } from "@chakra-ui/react";
import { SortBy as SortByEnum } from "../enums/sortBy.ts";
import { useGameContext } from "../providers/GameProvider";
import { useGameContext } from "../providers/GameProvider.tsx";
import { useTranslation } from "react-i18next";
import { useResponsiveValues } from "../theme/responsiveSettings.tsx";
import CachedImage from "./CachedImage.tsx";
Expand Down
2 changes: 1 addition & 1 deletion src/components/SpecialCards.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, Button, Flex, Text, useTheme } from "@chakra-ui/react";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { useGame } from "../dojo/queries/useGame";
import { useGame } from "../dojo/queries/useGame.tsx";
import { useGameContext } from "../providers/GameProvider.tsx";
import { Card } from "../types/Card.ts";
import { ConfirmationModal } from "./ConfirmationModal.tsx";
Expand Down
10 changes: 5 additions & 5 deletions src/components/StorePreviewComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Box, Button, Flex, HStack, Heading, Text } from "@chakra-ui/react";
import { isMobile } from "react-device-detect";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { Background } from "../components/Background";
import CachedImage from "../components/CachedImage.tsx";
import { PositionedDiscordLink } from "../components/DiscordLink.tsx";
import { PositionedGameMenu } from "../components/GameMenu.tsx";
import { Background } from "./Background.tsx";
import CachedImage from "./CachedImage.tsx";
import { PositionedDiscordLink } from "./DiscordLink.tsx";
import { PositionedGameMenu } from "./GameMenu.tsx";
import { CARD_WIDTH } from "../constants/visualProps.ts";
import { Coins } from "../pages/store/Coins.tsx";
import theme from "../theme/theme";
import theme from "../theme/theme.ts";
import { CashSymbol } from "./CashSymbol.tsx";

const SIZE_MULTIPLIER = isMobile ? 1.3 : 2;
Expand Down
8 changes: 4 additions & 4 deletions src/components/TiltCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import {
CARD_WIDTH,
MODIFIERS_OFFSET,
TILT_OPTIONS,
} from "../constants/visualProps";
} from "../constants/visualProps.ts";

import ClockIcon from "../assets/clock.svg?component";
import { useIsSilent } from "../hooks/useIsSilent.tsx";
import { VIOLET } from "../theme/colors.tsx";
import { Card } from "../types/Card";
import { Card } from "../types/Card.ts";
import { getTemporalCardText } from "../utils/getTemporalCardText.ts";
import { getTooltip } from "../utils/getTooltip.tsx";
import { AnimatedCard } from "./AnimatedCard";
import { AnimatedCard } from "./AnimatedCard.tsx";
import CachedImage from "./CachedImage.tsx";
import { DraggableCard } from "./DraggableCard";
import { DraggableCard } from "./DraggableCard.tsx";
import { HoloEffect } from "./HoloEffect.tsx";
import { PriceBox } from "./PriceBox.tsx";

Expand Down
Loading

0 comments on commit c95dad1

Please sign in to comment.