Skip to content

Commit

Permalink
Merge pull request #8 from casrpg/cca/use-lcars-css-style
Browse files Browse the repository at this point in the history
Modify look and feel to use TheLCARS.com style
  • Loading branch information
carloscasalar authored Oct 20, 2024
2 parents 88b74fa + 2f6fcdd commit 854b71c
Show file tree
Hide file tree
Showing 42 changed files with 3,971 additions and 2,762 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4.2.1
- uses: actions/setup-node@v4.0.4
with:
node-version: 20
node-version: 20.18.0
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ dist-ssr
/test-results/
/playwright-report/
/playwright/.cache/
.examples/*
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ Put this into the `.vscode/settings.json` file:
]
}
```

## LCARS template

Look and feel took from LCARS Inspired Website Template by www.TheLCARS.com and modified.
34 changes: 0 additions & 34 deletions app/.eslintrc.cjs

This file was deleted.

31 changes: 31 additions & 0 deletions app/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import globals from "globals"
import pluginJs from "@eslint/js"
import tseslint from "typescript-eslint"
import pluginReact from "eslint-plugin-react"
import love from 'eslint-config-love'


export default [
{files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"]},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
...love,
files: ['**/*.js', '**/*.ts'],
},
{
settings: {
react: {
version: 'detect'
}
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/promise-function-async': 'off',
'react/react-in-jsx-scope': 'off'
}
}
];
9 changes: 8 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Traveller RPG Generator</title>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Traveller RPG Generator</title>
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="date=no">
<style type="text/css">
html {
scroll-behavior: smooth;
}
</style>
</head>
<body class="bg-starfield">
<div id="root"></div>
Expand Down
17 changes: 7 additions & 10 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,23 @@
"lint:fix": "eslint --fix ./src/**/*.{ts,tsx}"
},
"dependencies": {
"lucide-react": "^0.284.0",
"classnames": "2.5.1",
"react": "18.3.1",
"react-dom": "18.2.0",
"react-router-dom": "6.26.2"
},
"devDependencies": {
"@eslint/js": "9.13.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.2.17",
"@typescript-eslint/eslint-plugin": "7.8.0",
"@vitejs/plugin-react-swc": "3.7.1",
"eslint": "8.57.0",
"eslint-config-standard-with-typescript": "43.0.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-n": "17.11.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.37.1",
"autoprefixer": "10.4.14",
"postcss": "^8.4.24",
"tailwindcss": "3.3.2",
"eslint": "9.13.0",
"eslint-config-love": "89.0.1",
"eslint-plugin-react": "7.37.1",
"globals": "15.11.0",
"typescript": "5.4.5",
"typescript-eslint": "8.10.0",
"vite": "5.4.8"
}
}
7 changes: 0 additions & 7 deletions app/postcss.config.js

This file was deleted.

Binary file added app/public/Antonio-Bold.woff
Binary file not shown.
Binary file added app/public/Antonio-Bold.woff2
Binary file not shown.
Binary file added app/public/Antonio-Regular.woff
Binary file not shown.
Binary file added app/public/Antonio-Regular.woff2
Binary file not shown.
Binary file added app/public/sfcmd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 2 additions & 41 deletions app/src/App.css
Original file line number Diff line number Diff line change
@@ -1,42 +1,3 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}

.card {
padding: 2em;
}

.read-the-docs {
color: #888;
.content-panel--main-area {
min-width: 60vw;
}
87 changes: 50 additions & 37 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,62 @@
import React from 'react'
import { BrowserRouter as Router, Route, Routes, Link } from 'react-router-dom'
import { Rocket, Users } from 'lucide-react'
import { NPCGenerator } from './components/NPCGenerator'
import { PlanetDecoder } from './components/PlanetDecoder'
import { NPCGenerator } from './features/NPCGenerator'
import { PlanetDecoder } from './features/PlanetDecoder'
import { BarRunner } from './lcars/BarRunner'
import { Spacer } from './lcars/Spacer'
import { Panel } from './lcars/Panel'
import { CollapsibleLabel } from './lcars/CollapsibleLabel'
import { Home } from './features/Home'
import './App.css'

const App: React.FC = () => {
const nav = (
<nav id="secondary-nav">
<Link to="/">Tool Index</Link>
<Link to="/planet-decoder">Planet Decoder</Link>
<Link to="/npc-generator">NPC generator</Link>
</nav>
)

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const routes = (
<Routes>
<Route path="/npc-generator" element={<NPCGenerator />} />
<Route path="/planet-decoder" element={<PlanetDecoder />} />
<Route path="/" element={<Home />} />
</Routes>
)

return (
<Router>
<div className="min-h-screen bg-black text-[#ff9900]">
<header className="bg-[#000033] p-4">
<nav className="container mx-auto flex justify-between items-center">
<h1 className="text-2xl font-bold text-[#ff9900]">Traveller RPG Tools</h1>
<ul className="flex space-x-4">
<li>
<Link to="/npc-generator" className="lcars-button">
<Users className="inline-block mr-2" />
NPC Generator
</Link>
</li>
<li>
<Link to="/planet-decoder" className="lcars-button">
<Rocket className="inline-block mr-2" />
Planet Decoder
</Link>
</li>
</ul>
</nav>
</header>
<main className="container mx-auto p-4">
<Routes>
<Route path="/npc-generator" element={<NPCGenerator />} />
<Route path="/planet-decoder" element={<PlanetDecoder />} />
<Route path="/" element={<Home />} />
</Routes>
</main>
<div className="wrap-everything">
<div className="wrap" id="column-3">
<div className="left-frame" data-id-test="menu-container">
<div>
<Panel kind="3">Traveller RPG <span className="hop">Tools</span></Panel>
{nav}
</div>
<Panel kind="4">04<CollapsibleLabel>-41969</CollapsibleLabel></Panel>
<Panel kind="5">05<CollapsibleLabel>-1701D</CollapsibleLabel></Panel>
<Panel kind="6">06<CollapsibleLabel>-071984</CollapsibleLabel></Panel>
<Panel kind="7">07<CollapsibleLabel>-47148</CollapsibleLabel></Panel>
<div className="panel-wrapper">
<Panel kind="8">08<span className="hop">-091966</span></Panel>
</div>
</div>
<div className="right-frame">
<BarRunner bars={[1, 2, 3, 4, 5]} />
<Spacer spacers={[1, 2, 3, 4]}/>

<main className="content-panel--main-area">
{routes}
</main>

</div>
</div>
</div>
</Router>
)
}

const Home: React.FC = () => (
<div className="text-center lcars-panel">
<h2 className="text-4xl font-bold mb-4 lcars-header">Welcome to Traveller RPG Tools</h2>
<p className="mb-4 lcars-content">Select a tool from the navigation menu to get started.</p>
</div>
)

export default App
64 changes: 0 additions & 64 deletions app/src/components/PlanetDecoder.tsx

This file was deleted.

12 changes: 12 additions & 0 deletions app/src/features/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { FC } from 'react'
import { Panel } from '../lcars/Panel'

export const Home: FC = () => (
<Panel kind="1">
<img src="/sfcmd.png" className="sfc" />
<div className="lcars-heading">Traveller RPG Tools</div>
<div className="lcars-access">
user authorization code <span className="blink medium-dark-blue">accepted</span>
</div>
</Panel>
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
import React, { useState } from 'react'
interface NPC {
name: string
Expand Down
Loading

0 comments on commit 854b71c

Please sign in to comment.