-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output html page width #25
Comments
Thanks for the suggestion! I will look into this later this evening, but it sounds like a very good idea so far. |
I think that this would go very well with adding an option to automate this little customization suggested in the README. I am questioning whether it would be possible to add an option that handles both at once - I think an option for the thing mentioned in the README would also passively be an option for the thing you suggested, but somewhat better since modifying the margin on the left and right side of the text makes the resulting html more responsive to size changes than madifying the width in which the text is displayed? It will take some days until I find time to implement this, though, since time is currently somewhat sparse for me. |
Yeah it could be probably a good way to implement the feature in such way that
What kind of CSS you think would be good? I like the idea of modifying the prototype.html automatically. |
Just to be sure we are both talking about the same thing, what kind of centering are we talking about here? Is it about centering the box in which the text is displayed (the thing between the red lines in the following image): or is it about centering the text within that box: Because I think the former one would probably work best by specifying a width (and centering the whole box on the page), whilst the second one (which is the thing I mentioned in the README) would work best by specifying a margin to be added to the left and rigth side of the page. I originally thought we where both talking about the second one, but it appears to me that you're actually referring to the former one (which is good, since it means we don't actually have a disagreement on whether to use About your suggestions:
I don't really think that this is a good way to go, since it would change the way the pages are displayed by default. Many people (at least around 10, by my estimates) use this tool already, some of them in automated tools and pipelines, like me (who uses it in a website builder), and
I'm not sure if that would work out well, since grouping arguments together in the Python API would introduce differences between the Python API and the command line interface, which would be counter-intuitive and require additional documentation to read (for the user) and to maintain (for me).
As long as the inline-CSS added by
Me too; I try to keep as much as I can within the generated HTML rather than moving it to extra files. But overall, apart from the two small details I outlined above, I agree with you that adding an option for |
Oh yeah good point! Then putting the
This would be my first guess, too. So just inserting the additional, auto-generated css to the top of the html would satisfy the requirements well.
I think I'm talking about the first one. To be explicit, created the html from the README file, first without any custom CSS: and then with the proposed changes: These are both recorded with a maximized browser window. The second one looks more natural and is easier to read, as optimal line length for reading is 45-80 characters. Since GitHub itself embeds the bordered region, the line length is naturally smaller: It probably does not matter a lot if the space is inside or outside the box/border, but imo the border looks kinda nice around the text :) |
Oh wow, that's pretty interesting; I never knew there was so much to it!
These GIFs put things a little more into perspective for me; I see how you meant it, now.
Full agreement :) I will implement this, then (unless you want to make a pull request for that yourself, of course) 👍 |
Fun fact: Someone appears to have written an entire wrapper around So yeah, customizing Edit: I learned there is a lot more to said wrapper; it's very cool, actually. |
@np-8 This is implemented now; you can update to |
Just an idea: Would it be nice to have an option for having some maximum page width for the output html? I mean, now it is possible through by adding extra css:
and
I guess this is something people would like to have very commonly. As this package aims to remove the hassle (with alternatives like pandoc), there could be a reasonable default page width. The default (max) page width could be or example
800px
and it could be always centered. I'm thinking something like thisto control the page width and
page_width=None
would remove max width altogether.The text was updated successfully, but these errors were encountered: