Skip to content

Conversation

paypur
Copy link

@paypur paypur commented Jul 16, 2025

I think I'm pretty close to being done, so here's what I have. There's definitely even more that can be done, like the tooltips we talked about, but that will have to be for later.

Preview: https://paypur.github.io/docs/books/1.20/
Tinkers' PR: SlimeKnights/TinkersConstruct#5456
Mantle PR: SlimeKnights/Mantle#231

Notes

  • Every PageContent needs to override toHTML
  • The auto-generated HTML is not very readable but I'm not sure if you care because you shouldn't manually edit it
  • Exporting HTML piggybacks off of the /mantle book export but can be split into its own command
  • Text is not exported in the images any more
  • CSS is written assuming scale = 2, but this should be easy to change
  • The old images are still there for comparing
  • Loading images needs to download quite a lot of data (the encyclopedia is at 7MB if I remove the duplicated images, but image compression should help a lot)
  • The book "chapters" feel kinda redundant now that we can just link to a specific page on an image
  • Non Tinker's books might need to be updated to work with this

Still TODOs

  • Fix ContentListings overflowing
  • Compress the .png's
  • Remove unnecessary HTML?? (like newlines)
  • Remove old images (at least for 1.20.1)
  • Add back the previous page layout for old versions
  • Fix issues on mobile
  • Rebase before we merge

paypur added 14 commits July 3, 2025 14:54
Cleaned up scss

Took 3 hours 22 minutes
Took 4 minutes
Took 2 hours 15 minutes
Took 55 minutes
Took 1 hour 2 minutes
Fixed page-material padding incorrectly applying to the title

Took 10 minutes
Took 2 hours 27 minutes
Took 15 minutes
@KnightMiner
Copy link
Member

KnightMiner commented Jul 16, 2025

Something important to note: I don't want to replace the existing picture based books with HTML ones. I would rather have both. The reason is the image ones are way more likely to be stable on the chance the HTML updater breaks in the future, and are way more likely to be accurate across devices.

You will likely want a separate home page for HTML books vs image books, with links between the two as relevant.

@paypur
Copy link
Author

paypur commented Jul 17, 2025

Would it be better for the HTML books to be the primary, and the image books to be the fallback in case of any issues?

@KnightMiner
Copy link
Member

Neither is really primary or fallback. They are just different pages. The book index can link them both:

Icon
Title
HTML / Images

Key thing is I want to have both. I find images works very nicely on mobile notably.

paypur added 3 commits July 16, 2025 19:46
Took 59 minutes
Took 5 minutes
Took 1 hour 9 minutes
paypur added 2 commits July 17, 2025 15:43
Took 31 minutes
Took 11 minutes


Took 7 minutes
@paypur paypur changed the title Replace 1.20.1 Tinkers book images with auto generated HTML pages Add auto generated HTML pages Jul 18, 2025
paypur added 6 commits July 22, 2025 15:36
Took 9 seconds
Took 1 hour 8 minutes
Took 1 hour 15 minutes
Compressed remaining images

Took 29 minutes
@paypur
Copy link
Author

paypur commented Jul 24, 2025

Ok so I put back the image books and separated the HTML book pages, theres just one more issue with fluid effects I need to fix

paypur added 3 commits July 23, 2025 20:52
Fixed resizing flashes

Took 2 hours 26 minutes
Took 1 hour 43 minutes
@paypur paypur force-pushed the master branch 2 times, most recently from 6e6ac6b to 5dcbe5f Compare July 25, 2025 05:11
Took 1 hour 33 minutes
paypur added 12 commits July 24, 2025 22:21
Moved title to books.yml
Cleaned up some css
Took 1 hour 12 minutes
Took 13 minutes
Took 1 hour 9 minutes
Reformatted js

Took 48 minutes
Took 6 minutes
Updated header

Took 13 minutes
Took 4 hours 11 minutes
Took 21 minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants