From 9776c524613567851606a17c33323f849181a341 Mon Sep 17 00:00:00 2001 From: Zwifi Date: Sat, 6 Jan 2024 21:23:45 +0100 Subject: [PATCH 1/9] Make table border round --- src/components/Booklist.module.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Booklist.module.css b/src/components/Booklist.module.css index 9f01b17..49783fc 100644 --- a/src/components/Booklist.module.css +++ b/src/components/Booklist.module.css @@ -6,7 +6,14 @@ .bookTable { border: solid black 1px ; margin: 1rem; - border-collapse: collapse; + border-spacing: 0; + /* Setting border-collapse to collapse prevents rounded corners. + * Setting border-spacing to 0 gets a similar result instead. + */ + /* border-collapse: collapse; */ + border-collapse: separate; + border-radius: 15px; + overflow: hidden; } .bookTable thead th { From 12b9fcc30ed55387aff734543727047bc40e9630 Mon Sep 17 00:00:00 2001 From: Zwifi Date: Sat, 6 Jan 2024 21:29:07 +0100 Subject: [PATCH 2/9] Refactor book addition page --- src/pages/AddPage.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/pages/AddPage.tsx b/src/pages/AddPage.tsx index 05b2d22..5df4d58 100644 --- a/src/pages/AddPage.tsx +++ b/src/pages/AddPage.tsx @@ -10,16 +10,12 @@ export default function AddPage() { const {library } = useContext(LibraryContext); if (!session.info.isLoggedIn) { - return
Please log in to add a book to your library.
+ return

Please log in to add a book to your library.

; } - return ( -
-

Add a book to your library, {session.info.webId}

- { library !== undefined - ? - :

To be add books to your library, please define a library root first.

- } -
- ) + if (library === undefined) { + return

To be add books to your library, please define a library root first.

; + } + + return ; } From a7234f5579461fdb5840186ac973bd1ecdd6e3b9 Mon Sep 17 00:00:00 2001 From: Zwifi Date: Sat, 6 Jan 2024 21:47:10 +0100 Subject: [PATCH 3/9] Add book form border --- src/components/AddBookForm.module.css | 11 +++++++++++ src/components/AddBookForm.tsx | 8 +++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 src/components/AddBookForm.module.css diff --git a/src/components/AddBookForm.module.css b/src/components/AddBookForm.module.css new file mode 100644 index 0000000..5d10a30 --- /dev/null +++ b/src/components/AddBookForm.module.css @@ -0,0 +1,11 @@ +.addBookFormContainer { + display: flex; + justify-content: center; +} + +.addBookForm { + border: black solid 1px; + border-radius: 1em; + padding: 1em; + margin: 1em; +} \ No newline at end of file diff --git a/src/components/AddBookForm.tsx b/src/components/AddBookForm.tsx index 75519af..c03ca9e 100644 --- a/src/components/AddBookForm.tsx +++ b/src/components/AddBookForm.tsx @@ -9,6 +9,8 @@ import { getSourceIri, getThingAll, setThing } from "@inrupt/solid-client"; import { LibraryContext } from "../contexts/libraryContext"; import BarcodeReader from "./barcode"; +import style from "./AddBookForm.module.css"; + const BookTitleField = ({ handleChange, title @@ -39,7 +41,7 @@ const LangTagField = ({ }) => { return (