dojo / dojo.io

Dojo - source for the dojo.io website
Other
17 stars 43 forks source link

Enhance codefile with title and note #446

Closed schontz closed 6 years ago

schontz commented 6 years ago

This is a branch of the PR used for #444. Instead of desc at the bottom we now have:

title which inserts HTML/text at the top of the block.

note which inserts HTML/text at the bottom of the block.

The top is generally more useful, but I already had the bottom code done so I migrated desc to note (footnote).

nicknisi commented 6 years ago

@schontz This looks great! I also tested the changes in Edge and IE11 and things look good. My only feedback is that the title is clipped when horizontally scrolling. This is particularly noticeable on mobile devices. It's not a huge deal but do you have any ideas on fixes?

2018-06-08 22 48 30

I played around with placing the .prism-code-title outside of the <pre> tag and that seems promising. Thoughts?

Also, it looks like this includes the changes as #444, so we should be able to merge only this one and close that one, right?

schontz commented 6 years ago

Yes, #446 is a branch of #444 so merging this one should be sufficient. I'll look into the horizontal scroll cut off when I get a chance.

nicknisi commented 6 years ago

@schontz Aside from the minor scrolling issue, this looks good! I'm going to land this and we can fix the scrolling issue in another PR. Thanks for the contribution!

schontz commented 6 years ago

You're welcome. I hope no one tries to do these samples on mobile but I'll put the PR up once it's ready.

This fixes #443