WIP
This commit is contained in:
@@ -59,7 +59,7 @@ h2 {
|
|||||||
color: #aaa;
|
color: #aaa;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
margin: 30px 0 10px 0;
|
margin: 25px 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
@@ -81,6 +81,12 @@ h2 {
|
|||||||
max-height: 95vh;
|
max-height: 95vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.double {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
column-gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.layout {
|
.layout {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 2fr 1fr;
|
grid-template-columns: 1fr 2fr 1fr;
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls__button:nth-child(5) {
|
.controls__button--last {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls__button:nth-child(1) {
|
.controls__button--first {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const Controls: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<button
|
<button
|
||||||
class="controls__button"
|
class="controls__button controls__button--first"
|
||||||
onClick={props.handlers.first}
|
onClick={props.handlers.first}
|
||||||
title="FIRST"
|
title="FIRST"
|
||||||
>
|
>
|
||||||
@@ -34,33 +34,12 @@ const Controls: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
<i class="las la-angle-right"></i>
|
<i class="las la-angle-right"></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="controls__button"
|
class="controls__button controls__button--last"
|
||||||
onClick={props.handlers.last}
|
onClick={props.handlers.last}
|
||||||
title="LAST"
|
title="LAST"
|
||||||
>
|
>
|
||||||
<i class="las la-angle-double-right"></i>
|
<i class="las la-angle-double-right"></i>
|
||||||
</button>
|
</button>
|
||||||
{/* <button
|
|
||||||
class="controls__button"
|
|
||||||
onClick={props.handlers.flip}
|
|
||||||
title="FLIP"
|
|
||||||
>
|
|
||||||
<i class="las la-sync"></i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="controls__button"
|
|
||||||
onClick={props.handlers.toggleBorder}
|
|
||||||
title="BORDER"
|
|
||||||
>
|
|
||||||
<i class="las la-expand"></i>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="controls__button"
|
|
||||||
onClick={props.handlers.toggleExtraInfo}
|
|
||||||
title="EXTRA INFO"
|
|
||||||
>
|
|
||||||
<i class="las la-info"></i>
|
|
||||||
</button> */}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.game-box {
|
.game-box {
|
||||||
grid-area: moves;
|
grid-area: moves;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
min-width: 325px;
|
min-width: 360px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const GameTabs: Component<{ moves: readonly string[]; handlers: Handlers }> = (
|
|||||||
<Controls handlers={props.handlers} />
|
<Controls handlers={props.handlers} />
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={tab() === "load"}>
|
<Match when={tab() === "load"}>
|
||||||
<Load />
|
<Load handlers={props.handlers} showMoves={() => setTab("moves")} />
|
||||||
</Match>
|
</Match>
|
||||||
</Switch>
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,6 +10,20 @@
|
|||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.load__pgn-input::-webkit-scrollbar {
|
||||||
|
width: 0.7rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load__pgn-input::-webkit-scrollbar-track {
|
||||||
|
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.load__pgn-input::-webkit-scrollbar-thumb {
|
||||||
|
background-color: rgb(0, 59, 47);
|
||||||
|
outline: 1px solid rgb(0, 59, 47);
|
||||||
|
}
|
||||||
|
|
||||||
.load__fen-btn,
|
.load__fen-btn,
|
||||||
.load__pgn-btn {
|
.load__pgn-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ import { Component, createSignal } from "solid-js";
|
|||||||
import { Handlers } from "../../types";
|
import { Handlers } from "../../types";
|
||||||
import "./Load.css";
|
import "./Load.css";
|
||||||
|
|
||||||
const Load: Component<{ handlers: Handlers }> = (props) => {
|
const Load: Component<{ handlers: Handlers; showMoves: () => void }> = (
|
||||||
|
props
|
||||||
|
) => {
|
||||||
const [fen, setFEN] = createSignal("");
|
const [fen, setFEN] = createSignal("");
|
||||||
const [pgn, setPGN] = createSignal("");
|
const [pgn, setPGN] = createSignal("");
|
||||||
|
|
||||||
@@ -19,7 +21,10 @@ const Load: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
class="load__fen-btn"
|
class="load__fen-btn"
|
||||||
onClick={() => props.handlers.loadFEN(fen())}
|
onClick={() => {
|
||||||
|
props.handlers.loadFEN(fen());
|
||||||
|
setFEN("");
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
LOAD FEN
|
LOAD FEN
|
||||||
</button>
|
</button>
|
||||||
@@ -28,8 +33,19 @@ const Load: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
name="load-pgn"
|
name="load-pgn"
|
||||||
placeholder="PASTE PGN..."
|
placeholder="PASTE PGN..."
|
||||||
spellcheck={false}
|
spellcheck={false}
|
||||||
|
value={pgn()}
|
||||||
|
onInput={(e) => setPGN(e.currentTarget.value)}
|
||||||
></textarea>
|
></textarea>
|
||||||
<button class="load__pgn-btn">LOAD PGN</button>
|
<button
|
||||||
|
class="load__pgn-btn"
|
||||||
|
onClick={() => {
|
||||||
|
props.handlers.loadPGN(pgn());
|
||||||
|
setPGN("");
|
||||||
|
props.showMoves();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
LOAD PGN
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
grid-area: setup;
|
grid-area: setup;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
min-width: 360px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.setup {
|
.setup {
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ const Share: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
return (
|
return (
|
||||||
<Scrollable class="share">
|
<Scrollable class="share">
|
||||||
<div className="share__view">
|
<div className="share__view">
|
||||||
|
<h2>View options</h2>
|
||||||
<button
|
<button
|
||||||
class="controls__button"
|
class="controls__button controls__button--first"
|
||||||
onClick={props.handlers.flip}
|
onClick={props.handlers.flip}
|
||||||
title="FLIP"
|
title="FLIP"
|
||||||
>
|
>
|
||||||
@@ -27,7 +28,8 @@ const Share: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
onClick={props.handlers.toggleExtraInfo}
|
onClick={props.handlers.toggleExtraInfo}
|
||||||
title="EXTRA INFO"
|
title="EXTRA INFO"
|
||||||
>
|
>
|
||||||
<i class="las la-info"></i>
|
{/* <i class="las la-info"></i> */}
|
||||||
|
<i class="las la-info-circle"></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="controls__button"
|
class="controls__button"
|
||||||
@@ -36,6 +38,13 @@ const Share: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
>
|
>
|
||||||
<i class="las la-heading"></i>
|
<i class="las la-heading"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="controls__button controls__button--last"
|
||||||
|
onClick={props.handlers.toggleExtraInfo}
|
||||||
|
title="ANONYMOUS"
|
||||||
|
>
|
||||||
|
<i class="las la-user-secret"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="share__fen">
|
<div className="share__fen">
|
||||||
<h2>Current position</h2>
|
<h2>Current position</h2>
|
||||||
@@ -46,16 +55,23 @@ const Share: Component<{ handlers: Handlers }> = (props) => {
|
|||||||
placeholder="Current FEN..."
|
placeholder="Current FEN..."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<button class="share__btn">Copy FEN</button>
|
<div class="double">
|
||||||
|
<button class="share__btn share__btn--left">Copy FEN</button>
|
||||||
|
<button class="share__btn share__btn--right">Copy link</button>
|
||||||
|
</div>
|
||||||
<button class="share__btn">Save as image</button>
|
<button class="share__btn">Save as image</button>
|
||||||
<button class="share__btn">Copy link</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="share__pgn">
|
<div class="share__pgn">
|
||||||
<h2>Game</h2>
|
<h2>Game</h2>
|
||||||
|
<div class="double">
|
||||||
<button class="share__btn">Copy PGN</button>
|
<button class="share__btn">Copy PGN</button>
|
||||||
<button class="share__btn">Export PGN</button>
|
|
||||||
<button class="share__btn">Copy link</button>
|
<button class="share__btn">Copy link</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="double">
|
||||||
|
<button class="share__btn">Export PGN</button>
|
||||||
|
<button class="share__btn">Copy markdown</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="share__animation">
|
<div class="share__animation">
|
||||||
<h2>Animation</h2>
|
<h2>Animation</h2>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user