First of all, great work! Thank you for pushing this forward.
While browsing through discourse, there were a few low priority things I have noticed that you might want to improve. It’s really nit picky stuff, but here it goes. I’ll add more things if and when I encounter them.
See Images (as a new user I can add only one picture per post )
Thanks for the feedback. Made all these improvements except for the one where the topic text is clickable, will need to investigate that one more to see if it’s possible to change from the web interface (only allows adding CSS and html before/after <body>).
Cool, thanks for the quick reaction. In my opinion it looks neater now!
I’ll just continue being nit-picky. Feel free to ignore my remarks
Increase the padding between “A”-DAML Logo and the title of the topic you’re in. It is still very small. See the top left corner of the second image with feedback above.
Make the initial header height when you enter a thread larger. Otherwise, when you scrolling down, and the transition to the smaller “A”-DAML Logo+Topic title happens, the header jumps in size.
I suggest removing the part of the description of the General category where it says “Introduce yourself, …”. This clashes with the Introduce yourself category.
Added, misunderstood what you meant by padding (see point 2). Added more space between the A and the title.
I intentionally made the navbar larger when scrolling because it made the tags feel less crowded. I actually like the smaller navbar when it’s not needed and the larger one when scrolling so I’ve left it for now but added an animated transition so it looks cleaner. If others dislike it then I’ll be overruled and we can change it
Also, could you change the description of the Questions channel? because right now it’s only about DAML … so my “how to config syntax highlighting” question doesn’t actually fit.
@anthony Doesn’t the code highlighting plugin have an option to output line numbers? It looks like it renders a series of elements with fixed offsets, and sometimes two lines have the same vertical offset. See the example below: the if (args.length < 3) { line has the same vertical offset as the System.err.println("Usage... line (where the content of the second line starts with a line break). I don’t think this can be fixed by CSS alone.
The say their highlighter lays the code out, many lines actually start in the line above with a line break, as @Robert_Autenrieth points out. The trick is thus to use ::after, not ::before. float: left is a bit hard to control , but I was successful using positioning:
Add a generous padding-left : 3.5em and position: relative to the enclosing code element to make space for the line numbers and mark it as a positional anchor. Then position the ::after element absolutely:
Thanks for the help both, will try @bernhard’s solution and confirm.
For some background, @Robert_Autenrieth that’s actually done by lining.js, not the code highlighter (highlight.js). The highlight.js maintainer actually refuses to add line numbering
@bernhard the highlightjs-line-numbers.js looks for an hljs object to hook into and Discourse hides it so that became a bit of a headache and was probably going to require modifying that script.
@bernhard this is rendering weird for me, line numbers are staying static (ie not moving when scrolling), and appear to be outside of the code block. This is on Chrome.