pietroppeter / nimibook

A port of mdbook to nim(ib)
https://pietroppeter.github.io/nimibook/
MIT License
77 stars 7 forks source link

feature: a show source button or similar #60

Open pietroppeter opened 1 year ago

pietroppeter commented 1 year ago
HugoGranstrom commented 1 year ago

Agreed, always nice to show the simple source code behind an impressive page :) Here are my two cents:

Both on mobile and desktop we have some space at the bottom of the screen. So we could place it like we do in ordinary nimib. Maybe we would want to center it here though. The other option I can come up with is adding a button to the header, but it gets a bit too crammed on mobile if you have a longer book title.

pietroppeter commented 1 year ago

On mobile it could be here. Definitely header is already packed

image

HugoGranstrom commented 1 year ago

Yes, that should work :+1: I looked at the HTML template and we will have to add the desktop button separately as the chapter buttons along with their parent div is hidden on desktop.

HugoGranstrom commented 1 year ago

I have given this a small try, but the CSS-part of my brain isn't collaborating... So I'll skip this in the current PR, and we'll see if I revisit this later (or if someone else does it before me).