feat: add support for foreword/preface pages (Closes #1)
Add ForewordConfig to BookConfig, Foreword model type, ForewordParser for text files (quote/paragraphs/signatures), ForewordPage in PageContent, pipeline integration to insert foreword after TOC, and PDF rendering with styled quote, horizontal rule separator, word-wrapped paragraphs, and right-aligned signatures. Also adds Gradle wrapper and adjusts build toolchain for JDK 25 compat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit was merged in pull request #8.
This commit is contained in:
@@ -7,7 +7,12 @@ data class BookConfig(
|
||||
val layout: LayoutConfig = LayoutConfig(),
|
||||
val images: ImagesConfig = ImagesConfig(),
|
||||
val referenceBooks: List<ReferenceBook> = emptyList(),
|
||||
val output: OutputConfig = OutputConfig()
|
||||
val output: OutputConfig = OutputConfig(),
|
||||
val foreword: ForewordConfig? = null
|
||||
)
|
||||
|
||||
data class ForewordConfig(
|
||||
val file: String = "./foreword.txt"
|
||||
)
|
||||
|
||||
data class BookMeta(
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package de.pfadfinder.songbook.model
|
||||
|
||||
data class Foreword(
|
||||
val quote: String? = null,
|
||||
val paragraphs: List<String> = emptyList(),
|
||||
val signatures: List<String> = emptyList()
|
||||
)
|
||||
@@ -10,6 +10,7 @@ sealed class PageContent {
|
||||
data class SongPage(val song: Song, val pageIndex: Int) : PageContent() // pageIndex 0 or 1 for 2-page songs
|
||||
data class FillerImage(val imagePath: String) : PageContent()
|
||||
data object BlankPage : PageContent()
|
||||
data class ForewordPage(val foreword: Foreword, val pageIndex: Int) : PageContent() // pageIndex 0 or 1 for multi-page forewords
|
||||
}
|
||||
|
||||
data class LayoutResult(
|
||||
|
||||
Reference in New Issue
Block a user