Includes all Phase 1 features: - Search-first navigation with auto-complete - Responsive reading interface (desktop/tablet/mobile) - 4 customization presets + full fine-tuning controls - Layered details panel with notes, bookmarks, highlights - Smart offline caching with IndexedDB and auto-sync - Full accessibility (WCAG 2.1 AA) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
64 lines
1.4 KiB
TypeScript
64 lines
1.4 KiB
TypeScript
import { CollectionConfig } from 'payload';
|
|
|
|
export const BibleBooks: CollectionConfig = {
|
|
slug: 'bible-books',
|
|
admin: {
|
|
useAsTitle: 'name',
|
|
defaultColumns: ['name', 'abbreviation', 'testament', 'chapterCount', 'order'],
|
|
group: 'Bible Content',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'bookId',
|
|
type: 'number',
|
|
required: true,
|
|
unique: true,
|
|
index: true,
|
|
},
|
|
{
|
|
name: 'name',
|
|
type: 'text',
|
|
required: true,
|
|
localized: true,
|
|
index: true,
|
|
},
|
|
{
|
|
name: 'abbreviation',
|
|
type: 'text',
|
|
required: true,
|
|
index: true,
|
|
},
|
|
{
|
|
name: 'testament',
|
|
type: 'select',
|
|
options: [
|
|
{ label: 'Old Testament', value: 'OT' },
|
|
{ label: 'New Testament', value: 'NT' },
|
|
],
|
|
required: true,
|
|
index: true,
|
|
},
|
|
{
|
|
name: 'chapterCount',
|
|
type: 'number',
|
|
required: true,
|
|
min: 1,
|
|
},
|
|
{
|
|
name: 'order',
|
|
type: 'number',
|
|
required: true,
|
|
index: true,
|
|
admin: {
|
|
description: 'Display order in Bible',
|
|
},
|
|
},
|
|
],
|
|
access: {
|
|
read: () => true,
|
|
create: ({ req }) => req.user?.role === 'admin' || req.user?.role === 'super-admin',
|
|
update: ({ req }) => req.user?.role === 'admin' || req.user?.role === 'super-admin',
|
|
delete: ({ req }) => req.user?.role === 'super-admin',
|
|
},
|
|
};
|