-
Notifications
You must be signed in to change notification settings - Fork 16
Feature/html formatting #22
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
Conversation
|
Ah, also should have looked beforehand, didn't realise this PR existed: #19, apologies @MarcosMeli |
|
Thank you! I'm glad you find it useful. I'm also wondering if I should find a way for people to define their own stylesheet and override styles. I could just reference a stylesheet, and people can add the stylesheet if they desire, and if it's not there, it just falls back to the header-defined ones? |
| { | ||
| isEmpty = false; | ||
| sw.Write("<br/>Implements "); | ||
| sw.Write("<br/>Implements <span class='code'>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather we don't monospace it all.
| if (icon == "") | ||
| return content; | ||
| return $"<li class='{icon}'>{content}</li>"; | ||
| return $"<li class='{icon} code'>{content}</li>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good idea to create a style users can easily override, but not sure this should be the style name, or that it should default to a mono-space font.
| .objectBox > .header.noMembers { border-radius: 10px; } | ||
| .objectBox > .header > span { font-size:20px; } | ||
| .objectBox > .header > span:not(.code) { font-size:20px; } | ||
| .code { font-family: "Consolas", "Courier New", "Courier", monospace; font-size: 14px; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer a sans-serif style font here as default
| .static { background-image: url(data:image/gif;base64,R0lGODlhDQAKAPcPAOhfF/nXxfbDqOx9Q/GbbvOvi/Klffvh0+6HUe+RYOlpJutzNPjNtvzr4v718AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAA8ALAAAAAANAAoAAAhMAB8IDJBAAYCDBxccEGgAocODAQQ+LBCAQYEBER88RCDAgcCPBB4e5PjxgYABIgEQELjwQYOTDyUOMCAgQEiHElMeLCCw4MMFBCIGBAA7); background-repeat: no-repeat; background-position: left 3px; margin-left:-35px; padding-left:35px; } | ||
|
|
||
| .members li { background-repeat: no-repeat; padding-left:20px; background-position: left center; } | ||
| .members li { background-repeat: no-repeat; padding-left:20px; background-position: left 2px; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch on the vertical alignment! 👍
|
Amazing, will review these tomorrow and make some tweaks. In terms of custom CSS, could be a command line arg that accepts a path to a stylesheet that is merged? We use BEM notation a lot in our CSS stuff, could be a good way to layout your component styles that people can easily override? |
One thing to consider is that there are multiple formats - HTML is just one (and I hope to make it extensible in the future). So we'd need some sort of generator-specific way to send parameters if that's the way we want to go. |
Hi,
Really digging this project, I've been using it the last couple of days for some internal project documentation. One thing I've found is that the HTML output can be a little hard to read, so for your consideration, I've built some tweaks that introduce a couple of changes:
Before:

After:

If this works, happy to have contributed, or if you're planning to do this at some point yourself, no worries, just thought it would be useful 👍