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

docs: improve how-to-play section #85

Merged
merged 1 commit into from
Nov 1, 2024
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
5 changes: 5 additions & 0 deletions frontend/mdx.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module "*.mdx" {
import type { ComponentProps, ComponentType } from "react";
const component: ComponentType;
export default component;
}
Binary file removed frontend/public/images/consumeAsteria.png
Binary file not shown.
Binary file removed frontend/public/images/consumePellet.png
Binary file not shown.
Binary file removed frontend/public/images/createAsteria.png
Binary file not shown.
Binary file removed frontend/public/images/createPellet.png
Binary file not shown.
File renamed without changes
78 changes: 53 additions & 25 deletions frontend/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,55 @@
'use client';

import React from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';

const Sidebar: React.FunctionComponent = () => (

<div className="flex-initial basis-1/4 p-4">

<div className="h-full rounded-xl p-8 bg-[#1B1A1A]">

<p className="font-dmsans-regular text-sm text-[#757575] mb-4">
DOCS
</p>

<button className="w-full py-3 px-4 rounded-lg text-lg text-left font-dmsans-regular text-black bg-[#07F3E6]">
How to play
</button>

"use client";

import React from "react";
import Link from "next/link";
import { usePathname } from "next/navigation";

const Item = ({
href,
children,
}: {
href: string;
children: React.ReactNode;
}) => {
const pathname = usePathname();

const active = pathname === href;

return (
<Link
href={href}
className={`block w-full py-3 px-4 rounded-lg text-lg text-left font-dmsans-regular ${
active ? "bg-[#07F3E6] text-black" : "text-gray-400"
}`}
>
{children}
</Link>
);
};

const Sidebar: React.FunctionComponent = () => {
return (
<div className="flex-initial basis-1/4 p-4">
<div className="h-full rounded-xl p-8 bg-[#1B1A1A]">
<p className="font-dmsans-regular text-sm text-[#757575] mb-3">
INTRODUCTION
</p>

<Item href="/how-to-play">Introduction</Item>
<Item href="/how-to-play/gameplay">Gameplay</Item>
<Item href="/how-to-play/glossary">Glossary</Item>

<p className="font-dmsans-regular text-sm text-[#757575] mb-3 mt-8">
GUIDES
</p>

<Item href="/how-to-play/build-ship">Build Ship</Item>
<Item href="/how-to-play/move-ship">Move Ship</Item>
<Item href="/how-to-play/gather-fuel">Gather Fuel</Item>
<Item href="/how-to-play/mine-asteria">Mine Asteria</Item>
</div>
</div>
);
};

</div>

);

export default Sidebar;
export default Sidebar;
265 changes: 0 additions & 265 deletions frontend/src/documentation/design.md

This file was deleted.

Loading
Loading