diff --git a/src/components/CustomHeaders.tsx b/src/components/CustomHeaders.tsx new file mode 100644 index 0000000..822c903 --- /dev/null +++ b/src/components/CustomHeaders.tsx @@ -0,0 +1,27 @@ +import FormField from "#/components/FormField.tsx"; + +const CustomHeaders = () => { + return ( +
+
+ + Custom Headers (PDF) +

+ Text in these fields will overwrite the PGN headers in the generated + PDF +

+
+
+
+ + + + + +
+
+
+ ); +}; + +export default CustomHeaders; diff --git a/src/components/FormField.tsx b/src/components/FormField.tsx new file mode 100644 index 0000000..8ec4c31 --- /dev/null +++ b/src/components/FormField.tsx @@ -0,0 +1,22 @@ +export interface IFormField { + fieldName: string; + type: string; +} + +const FormField = ({ fieldName, type }: IFormField) => { + return ( +
+ + +
+ ); +}; + +export default FormField; diff --git a/src/components/HeaderFields.tsx b/src/components/HeaderFields.tsx new file mode 100644 index 0000000..843f012 --- /dev/null +++ b/src/components/HeaderFields.tsx @@ -0,0 +1,33 @@ +import FormField from "#/components/FormField.tsx"; + +const HeaderFields = () => { + return ( +
+
+ + Headers +

Edit the game PGN headers

+
+
+
+ + + + + + + + + + + + + + +
+
+
+ ); +}; + +export default HeaderFields; diff --git a/src/pages/Chessboard.tsx b/src/pages/Chessboard.tsx index 6fc0396..ec77d95 100644 --- a/src/pages/Chessboard.tsx +++ b/src/pages/Chessboard.tsx @@ -1,3 +1,5 @@ +import CustomHeaders from "#/components/CustomHeaders.tsx"; +import HeaderFields from "#/components/HeaderFields.tsx"; import LichessButton from "#/components/LichessButton.tsx"; import PgnViewer from "#/components/PgnViewer.tsx"; import Section from "#/components/Section.tsx"; @@ -78,32 +80,29 @@ const Chessboard = () => { -
- {/**/} - {/* Clear Game*/} - {/**/} +
+
+ - + +
- + +
diff --git a/src/styles/_input.css b/src/styles/_input.css index 9a13b90..39f978a 100644 --- a/src/styles/_input.css +++ b/src/styles/_input.css @@ -1,9 +1,23 @@ +/* Headers */ +.headers__input { + height: 3rem; + padding: 0 1rem; + line-height: 1.5rem; + border-radius: 0.5rem; + border: 1px solid var(--neutral-content); + + &:focus { + outline: none; + border-color: var(--accent); + } +} + /* Checkbox */ .checkbox-accent { - accent-color: var(--accent); - width: 18px; - height: 18px; - cursor: pointer; + accent-color: var(--accent); + width: 18px; + height: 18px; + cursor: pointer; } /* Toggle */