Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix for footer and bots #305

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend-typescript/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const App: FC = () => {

return (
<div
className={`w-screen h-screen flex flex-col ${darkMode ? 'dark' : ''}`}
className={`w-screen min-h-screen flex flex-col ${
darkMode ? 'dark' : ''
}`}
>
<BrowserRouter>
<Header darkMode={darkMode} toggleDarkMode={toggleDarkMode} />
Expand Down
8 changes: 8 additions & 0 deletions frontend-typescript/src/components/Board/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ const getGameCharacter = (gameObject: IGameObject) => {
DummyBotGameObject: robot,
BaseGameObject: base,
BotGameObjectBaseGameObject: botBase,
DummyBotGameObjectBaseGameObject: botBase,
BaseGameObjectBotGameObject: botBase,
BaseGameObjectDummyBotGameObject: botBase,
DiamondGameObjectBotGameObject: botDiamond,
DiamondGameObjectDummyBotGameObject: botDiamond,
BotGameObjectDiamondGameObject: botDiamond,
DummyBotGameObjectDiamondGameObject: botDiamond,
TeleportGameObject: teleporter,
BotGameObjectTeleportGameObject: teleporter,
DummyBotGameObjectTeleportGameObject: teleporter,
TeleportGameObjectBotGameObject: teleporter,
TeleportGameObjectDummyBotGameObject: teleporter,
};

if (
Expand Down
7 changes: 5 additions & 2 deletions frontend-typescript/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Link } from 'react-router-dom';
import etimoLogo from '../assets/etimoLogo.png';

export const Footer = () => {
return (
<div className="dark:bg-gray-800 pt-[3rem] lg:pt-[10rem] pb-8 w-full flex justify-center items-center">
<div className="dark:bg-gray-800 pt-[2rem] 2xl:pt-[3rem] pb-8 w-full flex justify-center items-center sticky top-[100vh]">
<h1>Powered by</h1>
<div className="w-[100px] ml-5">
<img src={etimoLogo} alt="etimo-logo" />
<Link to="https://etimo.se/" target="_blank">
<img src={etimoLogo} alt="etimo-logo" />
</Link>
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions frontend-typescript/src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const Home = () => {
setBoardId(parseInt(event.target.value));
};
return (
<div className="bg-gray-50 dark:bg-gray-800 w-screen h-screen flex flex-col mt-5">
<div className="flex-1 grid grid-cols-1 lg:grid-cols-[1fr_30%] mx-4 gap-4 lg:mx-14 lg:p-0">
<div className="bg-gray-50 dark:bg-gray-800 w-screen min-h-[70vh] flex flex-col my-5">
<div className="flex-1 grid grid-cols lg:grid-cols-[1fr_30%] mx-4 gap-4 lg:mx-14 lg:p-0">
<Board board={board} />

<SideMenu bots={bots} boardId={boardId} onBoardChange={onBoardChange} />
Expand Down
4 changes: 2 additions & 2 deletions frontend-typescript/src/components/images/botBase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions frontend-typescript/src/components/images/botDiamond.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion frontend-typescript/src/hooks/useBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,18 @@ export type GameObjectType =
| 'DummyBotGameObject'
| 'BaseGameObject'
| 'BotGameObjectBaseGameObject'
| 'DummyBotGameObjectBaseGameObject'
| 'BaseGameObjectBotGameObject'
| 'BaseGameObjectDummyBotGameObject'
| 'DiamondGameObjectBotGameObject'
| 'DiamondGameObjectDummyBotGameObject'
| 'BotGameObjectDiamondGameObject'
| 'TeleportGameObject';
| 'DummyBotGameObjectDiamondGameObject'
| 'TeleportGameObject'
| 'TeleportGameObjectBotGameObject'
| 'TeleportGameObjectDummyBotGameObject'
| 'DummyBotGameObjectTeleportGameObject'
| 'BotGameObjectTeleportGameObject';

export interface IDiamond {
points: number;
Expand Down
Loading