- Second series gets its own guide (Resources page card, download page, admin fields) - When a series ends (scheduled or manual) its guide moves onto its Finished Book, which shows a guide button; the main series' guide is cleared unless the launch supplies a new one - Lane B launch schedule can supply the incoming series' guide - Download lookup covers second-series and finished-book guides; guide URLs are sanitized on save and on use Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39691aedb3
commit
e2150e1cd7
7 files changed
+244
-4
No files matched your search
@@ -145,6 +145,18 @@ export function register(app) {
|
||||
const customResources = Array.isArray(siteContent.customLinks)
|
||||
? siteContent.customLinks.filter(link => link?.placement === 'resources')
|
||||
: []
|
||||
// Companion study guides: the second series' guide, and guides kept on finished books
|
||||
if (id === 'guide:second') {
|
||||
const guide = siteContent.secondSeries?.guide
|
||||
const guideUrl = sanitizeUrl(guide?.downloadUrl)
|
||||
return guideUrl ? { label: guide.title, url: guideUrl } : null
|
||||
}
|
||||
if (id.startsWith('guide:book:')) {
|
||||
const bookId = id.slice('guide:book:'.length)
|
||||
const book = Array.isArray(siteContent.finishedBooks) ? siteContent.finishedBooks.find(item => item?.id === bookId) : null
|
||||
const bookGuideUrl = sanitizeUrl(book?.guide?.downloadUrl)
|
||||
return bookGuideUrl ? { label: book.guide.title, url: bookGuideUrl } : null
|
||||
}
|
||||
if (id.startsWith('custom:')) {
|
||||
const customId = id.slice('custom:'.length)
|
||||
const match = customResources.find(link => link.id === customId)
|
||||
|
||||
Reference in new issue
Block a user