This project uses Svelte as a framework. If you're not familiar with it, you might want to check its website: https://svelte.dev
The project is structured as follows:
srcmain.ts- the entry point of the appApp.svelte- the entry point of the Svelte appstores.ts- public stores of the application (see svelte/store)types.ts- typescript typesassets- static assets, like the background or the fontcomponents- reusable componentsBook.svelte- manages the page turn effectCodex.svelte- contains the visual representation of the book and its coverCodexToolbar.svelte- contains links to the table of contents and the language pickerLanguagePicker.svelte- allows the user to switch between the languagesPage.svelte- contains the contents of the pagepagesRegular.svelte- represents a regular page that can have an image, a text, or bothCredits.svelte- represents the credits pageTableOfContents.svelte- represents the table of contentsTitular.svelte- represents the very first page with the book name, and the last page with "to be continued"
content- folder with the static content of the bookcontent.ts- the contents of Baburnama itselfstatic-lang.ts- some static strings that are used in the app that are not the part of the book itselfappendix.ts- the contents of the book appendix (not implemented yet)
liblanguage.ts- contains the language detection utility functionpage.ts- contains utility class "Page" related to the pagespreload.ts- contains the utility function that preloads imagestransition.ts- contains the action "fallbackTransition" used for the browsers that do not support "transitionend" event
Page turn effect: https://codepen.io/diemoritat/pen/LKROYZ
Paper: https://codepen.io/TheMOZZARELLA/pen/pormjbw
Background: https://www.pexels.com/photo/desert-during-nighttime-847402/ by Walid Ahmad
Font: https://www.andrewmarcus.ru/projects/fonts/pehlevi/
Book effects: https://blog.avada.io/css/book-effects