css stuff. rows and cols for main.
This commit is contained in:
1 parent
2a61649fcb
commit
4e30b49c6c
5 files changed
+132
-18
No files matched your search
+7
-9
@@ -1,16 +1,14 @@
|
||||
@import "tailwindcss";
|
||||
@import "cybercore-css";
|
||||
|
||||
@theme {
|
||||
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif,
|
||||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
.stats-and-skills {
|
||||
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
@apply bg-white dark:bg-gray-950;
|
||||
.stats-and-skills-stats {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
color-scheme: dark;
|
||||
}
|
||||
.stats-and-skills-skill-column {
|
||||
width: 400px;
|
||||
}
|
||||
+42
-1
@@ -1,3 +1,44 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
const baseUrl = typeof window !== 'undefined'
|
||||
? window.location.origin
|
||||
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env
|
||||
|
||||
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`)
|
||||
.then(r => r.json());
|
||||
|
||||
const sk = await
|
||||
fetch(`${baseUrl}/characters/collateral/skills.json`)
|
||||
.then(r => r.json());
|
||||
|
||||
const dt = await
|
||||
fetch(`${baseUrl}/characters/collateral/details.json`)
|
||||
.then(r => r.json());
|
||||
|
||||
export function Details() {
|
||||
return (
|
||||
<main>
|
||||
<div className="cyber-card">
|
||||
<div className="cyber-card__body flex flex-col">
|
||||
<h4 className="cyber-h5">{dt.name}</h4>
|
||||
<div className="flex">
|
||||
<img style={{ height: "100px" }} src={`${baseUrl}/characters/collateral/portrait.jpg`}></img>
|
||||
<div className="flex-col">
|
||||
<h5>{dt.role_one} {dt.role_one_rank}</h5>
|
||||
<h5>{dt.role_two} {dt.role_two_rank}</h5>
|
||||
<h5>{dt.role_three} {dt.role_three_rank}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="cyber-card">
|
||||
<div className="cyber-card__body">
|
||||
<h4 className="cyber-h5">Notes</h4>
|
||||
<div className="flex flex-col">
|
||||
<span>Fabrication Expertiese: {dt.fabrication_exp}</span>
|
||||
<span>Upgrade Expertiese: {dt.upgrade_exp}</span>
|
||||
<span>Field Expertiese: {dt.field_exp}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main >
|
||||
)
|
||||
}
|
||||
+18
-8
@@ -5,6 +5,7 @@ import { Body } from "../skills/body";
|
||||
import { Control } from "../skills/control";
|
||||
import { Education } from "../skills/education"
|
||||
import { Fighting } from "../skills/fighting"
|
||||
import { Details } from "../details/details"
|
||||
|
||||
export function meta({ }: Route.MetaArgs) {
|
||||
return [
|
||||
@@ -15,14 +16,23 @@ export function meta({ }: Route.MetaArgs) {
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main>
|
||||
<Welcome />
|
||||
<Awareness />
|
||||
<Body />
|
||||
<Control />
|
||||
<Education />
|
||||
<Fighting />
|
||||
</main>
|
||||
<main className="flex stats-and-skills">
|
||||
<div className="flex-col">
|
||||
<Details />
|
||||
</div>
|
||||
<div className="stats-and-skills-stats">
|
||||
<Welcome />
|
||||
</div>
|
||||
<div className="flex-col stats-and-skills-skill-column">
|
||||
<Awareness />
|
||||
<Body />
|
||||
<Control />
|
||||
</div>
|
||||
<div className="flex-col stats-and-skills-skill-column">
|
||||
<Education />
|
||||
<Fighting />
|
||||
</div>
|
||||
</main >
|
||||
);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
|
||||
const baseUrl = typeof window !== 'undefined'
|
||||
? window.location.origin
|
||||
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env
|
||||
|
||||
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`)
|
||||
.then(r => r.json());
|
||||
|
||||
const sk = await
|
||||
fetch(`${baseUrl}/characters/collateral/skills.json`)
|
||||
.then(r => r.json());
|
||||
|
||||
export function Fighting() {
|
||||
|
||||
const [stats, setStats] = useState(st)
|
||||
const [skills, setSkills] = useState(sk)
|
||||
|
||||
return (
|
||||
<main>
|
||||
<table className="cyber-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{ width: "70%" }}>FIGHTING SKILLS</th>
|
||||
<th style={{ width: "10%" }}>RANKS</th>
|
||||
<th style={{ width: "10%" }}>STAT</th>
|
||||
<th style={{ width: "10%" }}>BASE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>BRAWLING</td>
|
||||
<td>{skills.brawling}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.brawling}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EVASION</td>
|
||||
<td>{skills.evasion}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.evasion}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MELEE WEAPONS</td>
|
||||
<td>{skills.meleeweapons}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.meleeweapons}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user