mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
rudimentary buttons
This commit is contained in:
@@ -11,6 +11,7 @@ const PgnViewer = ({ gamePgn, handlePlyChange }: IProps) => {
|
||||
const containerRef = useRef<HTMLDivElement | null>(null);
|
||||
const viewerRef = useRef(null);
|
||||
|
||||
// TODO make thin, and pull functions out
|
||||
useEffect(() => {
|
||||
const element: HTMLElement | null = document.querySelector(".lpv-board");
|
||||
if (!element) return;
|
||||
|
||||
@@ -33,7 +33,7 @@ const Chessboard = () => {
|
||||
|
||||
<div className="flex gap-4">
|
||||
<button
|
||||
className="cursor-pointer"
|
||||
className="btn btn-primary"
|
||||
type="button"
|
||||
onClick={handleClearGame}
|
||||
>
|
||||
@@ -41,7 +41,7 @@ const Chessboard = () => {
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="cursor-pointer"
|
||||
className="btn btn-secondary"
|
||||
type="button"
|
||||
onClick={handleSavePgn}
|
||||
disabled={!gameState.pgn}
|
||||
@@ -50,7 +50,7 @@ const Chessboard = () => {
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="cursor-pointer"
|
||||
className="btn btn-secondary"
|
||||
type="button"
|
||||
onClick={handleSavePdf}
|
||||
disabled={!gameState.pgn || generatingPdf}
|
||||
|
||||
+1
-4
@@ -23,10 +23,7 @@ const Home = () => (
|
||||
Upload and convert your games into a book format, along with variation
|
||||
and annotations.
|
||||
</h2>
|
||||
<Link
|
||||
to="/chessboard"
|
||||
className="rounded-3xl text-xl font-bold btn btn-primary"
|
||||
>
|
||||
<Link to="/chessboard" className="btn btn-primary btn-large">
|
||||
Get Started
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@import "tailwindcss";
|
||||
@import "styles/_accordion.css";
|
||||
@import "./styles/_input.css";
|
||||
@import "./styles/_button.css";
|
||||
@import "./styles/_file-input.css";
|
||||
@import './styles/_pgn-viewer.css';
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
.btn {
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
border-radius: 0.5rem;
|
||||
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:disabled {
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-large {
|
||||
font-size: 1.25rem;
|
||||
padding: 1rem 4rem;
|
||||
border-radius: 1.5rem;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--accent);
|
||||
color: var(--bg-base);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--bg-base);
|
||||
color: var(--accent);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: var(--bg-base);
|
||||
color: var(--accent);
|
||||
border: 1px solid var(--accent);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--accent);
|
||||
color: var(--bg-base);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user