1
0
Fork 0

Removed Tailwind css, moved api to v1 dir

This commit is contained in:
Neshura 2023-06-08 21:21:34 +02:00
parent c8f96eb694
commit c9fba4666e
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
18 changed files with 195 additions and 453 deletions

13
app/admin/page.tsx Normal file
View file

@ -0,0 +1,13 @@
'use client';
import '@/app/globals.css';
import Link from 'next/link';
export default function Home() {
return (
<main>
<div>
<p>Admin Menu goes here at some point</p>
</div>
</main>
)
}

View file

@ -1,7 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--foreground: #000000;
--background-start: #D6DBDC;
@ -11,17 +7,79 @@
@media (prefers-color-scheme: dark) {
:root {
--foreground: #ffffff;
--background-start: #1a1a1a;
--background-end: #1a1a1a;
--background: #1a1a1a;
--highlight-1: #2266ee;
}
}
body {
display: flex;
flex-direction: column;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
color: var(--foreground);
background: linear-gradient(
to bottom,
transparent,
var(--background-end)
)
var(--background-start);
background: var(--background);
min-height: 100vh;
padding: 0;
margin: 0;
}
.navbar {
display: flex;
flex-direction: row;
justify-content: center;
color: var(--highlight-1);
}
.navbar a {
color: var(--foreground);
text-decoration-line: none;
padding-left: 4px;
padding-right: 4px;
height: 30px;
}
.active {
color: var(--highlight-1) !important;
}
main {
display: flex;
flex: 1;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
width: 100%;
}
.charts {
flex-direction: row !important;
max-height: calc(100% - 30px);
max-width: 100%;
}
.chart-container {
display: flex;
flex: 1;
max-width: 100%;
max-height: 100%;
aspect-ratio: 1/1;
padding: 2px;
align-items: center;
justify-content: center;
}
.chart {
height: 100%;
width: 100%;
}
.column {
display: flex;
flex: 1;
flex-direction: column !important;
justify-content: center;
align-items: center;
height: calc(100vh - 30px);
max-height: 100%;
}

25
app/graphs/page.tsx Normal file
View file

@ -0,0 +1,25 @@
'use client';
import '@/app/globals.css';
import { useState } from 'react';
import { RadarChart } from '../../components/charts/radar'
import { EmpireStats } from '../../components/tables/empires'
import { Checkbox } from '@nextui-org/react';
import { PopChart } from '@/components/charts/pops';
import { EthicsBar } from '../../components/charts/ethicsBar';
export default function Graphs() {
const [weighted, setWeighted] = useState(true);
return (
<main className='charts'>
<div className='column'>
<RadarChart weighted={weighted} />
<Checkbox labelColor="primary" defaultSelected={weighted} onChange={() => setWeighted(!weighted)}>Weighted Ethics</Checkbox>
</div>
<EmpireStats />
<div className='column'>
<PopChart></PopChart>
<EthicsBar></EthicsBar>
</div>
</main>
)
}

View file

@ -1,7 +1,5 @@
import './globals.css'
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'] })
import { PageNavbar } from '@/components/navbar'
export const metadata = {
title: 'Stellaris Ethics Compass',
@ -15,7 +13,10 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body>
<PageNavbar />
{children}
</body>
</html>
)
}

View file

@ -1,28 +1,12 @@
'use client';
import { useState } from 'react';
import {RadarChart} from '../components/charts/radar'
import {EmpireStats} from '../components/tables/empires'
import { Checkbox } from '@nextui-org/react';
import { PopChart } from '@/components/charts/pops';
import { EthicsBar } from '../components/charts/ethicsBar';
import '@/app/globals.css';
export default function Home() {
const [weighted, setWeighted] = useState(true);
return (
<main className="flex min-h-screen flex-row items-center">
<div className='flex flex-row h-screen'>
<RadarChart weighted={weighted}/>
<div className='flex flex-col justify-around'>
<EmpireStats />
<Checkbox labelColor="primary" defaultSelected={weighted} onChange={() => setWeighted(!weighted)}>Weighted Ethics</Checkbox>
</div>
<div className='flex flex-col justify-around h-full'>
<PopChart></PopChart>
<EthicsBar></EthicsBar>
</div>
<main>
<div>
<p>Empire Overview goes here evenutally</p>
</div>
</main>
)
}