Add optional Apple Books button to downloads and book cards; v1.1.42
Publish Container / docker (push) Successful in 15m16s
Publish Container / docker (push) Successful in 15m16s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1097cb425c
commit
1db0a919c2
5 files changed
+56
-2
No files matched your search
+16
@@ -267,6 +267,8 @@ interface DownloadPageResource {
|
||||
resourceId: string
|
||||
amazonUrl?: string
|
||||
amazonLabel?: string
|
||||
appleBooksUrl?: string
|
||||
appleBooksLabel?: string
|
||||
isPrimaryGuide?: boolean
|
||||
}
|
||||
|
||||
@@ -284,6 +286,8 @@ function resolveDownloadPageResource(content: SiteContent, pageId: string | unde
|
||||
resourceId: 'primary-guide',
|
||||
amazonUrl: content.studyGuideUrl,
|
||||
amazonLabel: content.studyGuideAmazonButtonLabel,
|
||||
appleBooksUrl: content.studyGuideAppleBooksUrl,
|
||||
appleBooksLabel: content.studyGuideAppleBooksLabel,
|
||||
isPrimaryGuide: true,
|
||||
}
|
||||
}
|
||||
@@ -303,6 +307,8 @@ function resolveDownloadPageResource(content: SiteContent, pageId: string | unde
|
||||
resourceId: buildCustomResourceDownloadId(resource.id),
|
||||
amazonUrl: resource.amazonUrl,
|
||||
amazonLabel: resource.amazonLabel,
|
||||
appleBooksUrl: resource.appleBooksUrl,
|
||||
appleBooksLabel: resource.appleBooksLabel,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -854,6 +860,11 @@ function DownloadDetailPage({ content }: { content: SiteContent }) {
|
||||
{resource.amazonLabel || 'Get it on Amazon'}
|
||||
</a>
|
||||
)}
|
||||
{resource.appleBooksUrl && (
|
||||
<a href={resource.appleBooksUrl} target="_blank" rel="noreferrer" className="btn-secondary">
|
||||
{resource.appleBooksLabel || 'Get it on Apple Books'}
|
||||
</a>
|
||||
)}
|
||||
<Link to="/resources" className="btn-secondary">Back to Downloads</Link>
|
||||
</div>
|
||||
|
||||
@@ -1804,6 +1815,11 @@ function BooksAndResourcesSection({ content }: { content: SiteContent }) {
|
||||
{book.amazonUrl ? (book.amazonLabel || 'View on Amazon') : (book.amazonLabel || 'Learn More')}
|
||||
</a>
|
||||
)}
|
||||
{book.appleBooksUrl && (
|
||||
<a href={book.appleBooksUrl} target="_blank" rel="noopener noreferrer" className="btn-secondary book-card-btn">
|
||||
{book.appleBooksLabel || 'Get it on Apple Books'}
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user