From cf0b30464b47784861d8983d7573ea0f7088db2f Mon Sep 17 00:00:00 2001 From: nCode <91209834+Ncode-93@users.noreply.github.com> Date: Mon, 10 Feb 2025 03:04:27 +0530 Subject: [PATCH] Add book cover image (#3161) Co-authored-by: Nimish Co-authored-by: Ayres Vitor --- src/components/BookItem.astro | 81 ++++++++++++++++++++++++++++++++ src/content/docs/learn/index.mdx | 23 +++++++-- 2 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 src/components/BookItem.astro diff --git a/src/components/BookItem.astro b/src/components/BookItem.astro new file mode 100644 index 0000000000..85c788082a --- /dev/null +++ b/src/components/BookItem.astro @@ -0,0 +1,81 @@ +--- +import { Image } from 'astro:assets'; + +const { image, alt = 'Book Cover', title, author, links = [] } = Astro.props; + +interface Props { + image: ImageMetadata; + alt?: string; + title: string; + author: string; + links?: Array<{ + preText: string; + url: string; + text: string; + }>; +} +--- + +
+
+
+ {alt} +
+
+

{title}

+

by {author}

+ +
+
+
+ + diff --git a/src/content/docs/learn/index.mdx b/src/content/docs/learn/index.mdx index 5268409d7f..cfe0444ffc 100644 --- a/src/content/docs/learn/index.mdx +++ b/src/content/docs/learn/index.mdx @@ -7,6 +7,8 @@ sidebar: import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components'; import AwesomeTauri from '@components/AwesomeTauri.astro'; +import BookItem from '@components/BookItem.astro'; +import RoseRustBook from '@assets/learn/community/HTML_CSS_JavaScript_and_Rust_for_Beginners_A_Guide_to_Application_Development_with_Tauri.png'; The Learning category is intended to provide end-to-end learning experiences on a Tauri related topic. @@ -48,9 +50,24 @@ This section contains learning resources created by the Community that are not h ### Books -- **HTML, CSS, JavaScript, and Rust for Beginners: A Guide to Application Development with Tauri** by James Alexander Rose - - Paperback on Amazon: https://www.amazon.com/dp/B0DR6KZVVW - - Free PDF version: [direct download](/assets/learn/community/HTML_CSS_JavaScript_and_Rust_for_Beginners_A_Guide_to_Application_Development_with_Tauri.pdf) (PDF 4MB) + ### Guides & Tutorials