Skip to content

Commit

Permalink
Add missing files, whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Jul 12, 2023
1 parent 0759fce commit 2cf9930
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/greenbox-data/data/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ export default [
maxPoints: 11,
},
{
id: 46,
id: 48,
name: "Legacy of Loathing",
image: "itemimages/xx.gif",
items: [Thwaitgold.SplendorBeetle],
Expand Down
1 change: 1 addition & 0 deletions packages/greenbox-data/lib/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const expandPaths = (s = "") => {
path.items.length + path.equipment.length + path.tattoos.length,
"0",
);

const level = parseInt(part.substring(0, 1), pointsRadix);
part = part.substring(1);
const items = part
Expand Down
Binary file added packages/greenbox-web/public/moon.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 packages/greenbox-web/public/star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions packages/greenbox-web/src/components/SwitchButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Button, IconButton, Image, useColorMode, useColorModeValue } from "@chakra-ui/react";

export default function SwitchButton() {
const { toggleColorMode } = useColorMode();
const next = useColorModeValue("dark", "light");
const colorIcon = useColorModeValue("moon", "star");
const label = `Switch to ${next} mode`;

return (
<IconButton
size="xs"
onClick={toggleColorMode}
aria-label={label}
title={label}
icon={<Image height="60%" src={`/${colorIcon}.png`} />}
/>
);
}
28 changes: 28 additions & 0 deletions packages/greenbox-web/src/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { StyleFunctionProps, extendTheme } from "@chakra-ui/react";

export const theme = extendTheme({
config: {
initialColorMode: "system",
useSystemColorMode: true,
},
semanticTokens: {
colors: {
"chakra-body-bg": {
_light: "#f6f8fa",
_dark: "#010409",
},
accent: {
default: "#ffffff",
_dark: "#161b22",
},
complete: {
default: "#afa",
_dark: "green.800",
},
partial: {
default: "#eea",
_dark: "yellow.800",
}
}
},
});

0 comments on commit 2cf9930

Please sign in to comment.