Skip to content

raffazizzi/ceteicean-pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

CETEIcean Pagination Example

This example shows one possible approach to paginating TEI documents rendered with CETEIcean.

It uses document.createTreeWalker() to hide text content inside <tei:text> before the nth <tei:pb/> and after the following <tei:pb/>.

Gotchas

  • We assume the first <tei:pb/> is placed at the beginnig of the document (pb stands for 'page beginning').
  • If no <tei:pb/> is present, we show the whole document.
  • The content of text nodes is copied to a new property on the HTML text node object. This is a bit of a hack, but works for this example

Suggestions for integration

This code is mostly meant as an example rather than being capable to work in production. In particular, we would suggest using a framework to manage the navigation component and react to changes in data (e.g. which page is visible) as opposed to checking and updating global flags.

License

CC0

About

CETEIcean Pagination Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages