Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Book Cover in Tauri Docs #3159

Closed
wants to merge 1 commit into from

Conversation

Ncode-93
Copy link
Contributor

@Ncode-93 Ncode-93 commented Feb 6, 2025

Description

Adding Book Covers for in Learn Section

Included

--> Transferred the book cover image {src => public}
--> Using Inline CSS modified the current layout

Before

image

After
image

If there are any issues, please let me know and thank you for your time.

@Ncode-93 Ncode-93 requested a review from a team as a code owner February 6, 2025 18:30
Copy link

netlify bot commented Feb 6, 2025

Deploy Preview for tauri-v2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f5f790a
🔍 Latest deploy log https://app.netlify.com/sites/tauri-v2/deploys/67a4ffb21c14ac0008c143b2
😎 Deploy Preview https://deploy-preview-3159--tauri-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (🟢 up 8 from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@vasfvitor vasfvitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would have done this a "BookPreview.astro" component and have the styles in the component <styles> block, instead of having to inline. But it's ok for now

thanks for your work. You can remove the extra placeholders and leave only 1 book now.

- **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)
<div style={{ display: "flex", alignItems: "center", gap: "1.5rem", width: "100%" }}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div style={{ display: "flex", alignItems: "center", gap: "1.5rem", width: "100%" }}>
import { Image } from 'astro:assets';
import RoseRustBookfrom '@assets/learn/community/HTML_CSS_JavaScript_and_Rust_for_Beginners_A_Guide_to_Application_Development_with_Tauri.png';
<div style={{ display: "flex", alignItems: "center", gap: "1.5rem", width: "100%" }}>

Astro image component, you'd have to move the image file back to /src/assets...

Comment on lines +53 to +57
<img
src="/assets/learn/community/HTML_CSS_JavaScript_and_Rust_for_Beginners_A_Guide_to_Application_Development_with_Tauri.png"
alt="HTML, CSS, JavaScript, and Rust for Beginners Book Cover"
style={{ width: "80px", height: "100%", objectFit: "cover" }}
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<img
src="/assets/learn/community/HTML_CSS_JavaScript_and_Rust_for_Beginners_A_Guide_to_Application_Development_with_Tauri.png"
alt="HTML, CSS, JavaScript, and Rust for Beginners Book Cover"
style={{ width: "80px", height: "100%", objectFit: "cover" }}
/>
<Image style={{ height: "100%", objectFit: "cover" }}
/> src={RoseRustBook} alt="HTML, CSS, JavaScript, and Rust for Beginners Book Cover" />

using Astro image component. Removed the width, not sure it's needed.

style={{ width: "80px", height: "100%", objectFit: "cover" }}
/>
</div>
<div style={{ display: "flex", flexDirection: "column", flex: "1", gap: "0.20rem" }}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div style={{ display: "flex", flexDirection: "column", flex: "1", gap: "0.20rem" }}>
<div style={{ margin-top:0, display: "flex", flexDirection: "column", flex: "1", gap: "0.20rem" }}>

image
there will be still a tiny space that doesnt top align the image and title, but it's ok

@vasfvitor vasfvitor closed this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants