From 1fd6c14b623481ddf17cc229f7ab1c952cf6fddf Mon Sep 17 00:00:00 2001 From: ShyProton Date: Mon, 29 Jan 2024 01:58:17 -0500 Subject: [PATCH] feat: adds basic book layout --- src/routes/+page.svelte | 18 ++- src/routes/Book.svelte | 107 +++++++++++++++--- src/routes/Header/Header.svelte | 2 + src/variables.css | 10 ++ ...riweatherSans-Italic-VariableFont_wght.ttf | Bin 0 -> 232696 bytes .../MerriweatherSans-VariableFont_wght.ttf | Bin 0 -> 267396 bytes static/fonts/Merriweather_Sans/OFL.txt | 96 ++++++++++++++++ static/fonts/Merriweather_Sans/README.txt | 75 ++++++++++++ .../static/MerriweatherSans-Bold.ttf | Bin 0 -> 139544 bytes .../static/MerriweatherSans-BoldItalic.ttf | Bin 0 -> 122008 bytes .../static/MerriweatherSans-ExtraBold.ttf | Bin 0 -> 139500 bytes .../MerriweatherSans-ExtraBoldItalic.ttf | Bin 0 -> 122068 bytes .../static/MerriweatherSans-Italic.ttf | Bin 0 -> 121784 bytes .../static/MerriweatherSans-Light.ttf | Bin 0 -> 139372 bytes .../static/MerriweatherSans-LightItalic.ttf | Bin 0 -> 121816 bytes .../static/MerriweatherSans-Medium.ttf | Bin 0 -> 139508 bytes .../static/MerriweatherSans-MediumItalic.ttf | Bin 0 -> 121964 bytes .../static/MerriweatherSans-Regular.ttf | Bin 0 -> 139372 bytes .../static/MerriweatherSans-SemiBold.ttf | Bin 0 -> 139624 bytes .../MerriweatherSans-SemiBoldItalic.ttf | Bin 0 -> 122052 bytes static/fonts/Rubik_Mono_One/OFL.txt | 93 +++++++++++++++ .../Rubik_Mono_One/RubikMonoOne-Regular.ttf | Bin 0 -> 117132 bytes 22 files changed, 383 insertions(+), 18 deletions(-) create mode 100644 static/fonts/Merriweather_Sans/MerriweatherSans-Italic-VariableFont_wght.ttf create mode 100644 static/fonts/Merriweather_Sans/MerriweatherSans-VariableFont_wght.ttf create mode 100644 static/fonts/Merriweather_Sans/OFL.txt create mode 100644 static/fonts/Merriweather_Sans/README.txt create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-Bold.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-BoldItalic.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-ExtraBold.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-ExtraBoldItalic.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-Italic.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-Light.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-LightItalic.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-Medium.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-MediumItalic.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-Regular.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-SemiBold.ttf create mode 100644 static/fonts/Merriweather_Sans/static/MerriweatherSans-SemiBoldItalic.ttf create mode 100644 static/fonts/Rubik_Mono_One/OFL.txt create mode 100644 static/fonts/Rubik_Mono_One/RubikMonoOne-Regular.ttf diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 94202c9..21a347d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -12,6 +12,7 @@ "authors": "Scott Cawthon, Kira Breed-Wrisley, Kira Breed-Wrisley, Kira Breed-Wrisley Scott Cawthon, Suzanne Elise Freeman, Kira Breed-Wrisley", "imageurl": "https://covers.openlibrary.org/b/id/8075533-L.jpg", "publication_year": "2001", + "progress": "312", "page_length": "400" }, { @@ -21,6 +22,7 @@ "authors": "Scott Cawthon", "imageurl": "https://covers.openlibrary.org/b/id/12405670-L.jpg", "publication_year": "2021", + "progress": "12", "page_length": "96" }, { @@ -30,6 +32,7 @@ "authors": "Scott Cawthon", "imageurl": "https://covers.openlibrary.org/b/id/10502812-L.jpg", "publication_year": "2018", + "progress": "0", "page_length": "166" }, { @@ -38,8 +41,19 @@ "title": "Freddy Files", "authors": "Scott Cawthon", "imageurl": "https://covers.openlibrary.org/b/id/14432108-L.jpg", - "year of publication": "2019", - "page length": "256" + "publication_year": "2019", + "progress": "256", + "page_length": "256" + }, + { + "id": "5", + "isbn": "9781419747496", + "title": "The Art of The Mitchells vs. The Machines", + "authors": "Ramin Zahed", + "imageurl": "https://covers.openlibrary.org/b/id/13771830-L.jpg", + "publication_year": "2020", + "progress": "128", + "page_length": "224" } ]}`).books; diff --git a/src/routes/Book.svelte b/src/routes/Book.svelte index 5f33cce..5a6f1a1 100644 --- a/src/routes/Book.svelte +++ b/src/routes/Book.svelte @@ -6,6 +6,7 @@ authors: string; imageurl: string; publication_year: number; + progress: number; page_length: number; } @@ -15,32 +16,106 @@
-
-
+ {#if entry.progress == 0} +

UNREAD

+ {:else if entry.progress < entry.page_length} +

{entry.progress}/{entry.page_length}

+ {:else if entry.progress == entry.page_length} +

COMPLETE

+ {:else} +

N/A

+ {/if} +
+
+ Book Cover +
+
+

{entry.authors}

+

{entry.title}

+
+
diff --git a/src/routes/Header/Header.svelte b/src/routes/Header/Header.svelte index 0e3d053..4fefffb 100644 --- a/src/routes/Header/Header.svelte +++ b/src/routes/Header/Header.svelte @@ -18,6 +18,8 @@