css stuff. rows and cols for main.

This commit is contained in:
iamBadgers committed 2026-10-20 17:19:48 -07:00
1 parent 2a61649fcb
commit 4e30b49c6c
5 files changed
+125 -11

No files matched your search

+7 -9
View File
@@ -1,16 +1,14 @@
@import "tailwindcss"; @import "tailwindcss";
@import "cybercore-css"; @import "cybercore-css";
@theme { .stats-and-skills {
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
html, .stats-and-skills-stats {
body { width: 150px;
@apply bg-white dark:bg-gray-950; }
@media (prefers-color-scheme: dark) { .stats-and-skills-skill-column {
color-scheme: dark; width: 400px;
}
} }
+42 -1
View File
@@ -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 >
)
}
+11 -1
View File
@@ -5,6 +5,7 @@ import { Body } from "../skills/body";
import { Control } from "../skills/control"; import { Control } from "../skills/control";
import { Education } from "../skills/education" import { Education } from "../skills/education"
import { Fighting } from "../skills/fighting" import { Fighting } from "../skills/fighting"
import { Details } from "../details/details"
export function meta({ }: Route.MetaArgs) { export function meta({ }: Route.MetaArgs) {
return [ return [
@@ -15,13 +16,22 @@ export function meta({ }: Route.MetaArgs) {
export default function Home() { export default function Home() {
return ( return (
<main> <main className="flex stats-and-skills">
<div className="flex-col">
<Details />
</div>
<div className="stats-and-skills-stats">
<Welcome /> <Welcome />
</div>
<div className="flex-col stats-and-skills-skill-column">
<Awareness /> <Awareness />
<Body /> <Body />
<Control /> <Control />
</div>
<div className="flex-col stats-and-skills-skill-column">
<Education /> <Education />
<Fighting /> <Fighting />
</div>
</main > </main >
); );
+53
View File
@@ -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>
)
}
+12
View File
@@ -0,0 +1,12 @@
{
"name": "Collateral",
"role_one": "Tech",
"role_one_rank": "6",
"role_two": "Rocker",
"role_two_rank": "4",
"role_three": "---",
"role_three_rank": "---",
"fabrication_exp": "6",
"upgrade_exp": "4",
"field_exp": "2"
}