One of the main reasons for creating this blog, is the detailing of my exploits with code, IT, and hardware (arduino, Pi etc. etc.).
I looked at various offerings and how others did it e.g. StackOverflow, but I wasn’t really happy. Didn’t do what I wanted:
- full-screen on desktop & mobile and in portrait orientation
- controls for width, font-size and line-number toggle
- able to show raw GitHub user-files
- and ajax loading of GitHub user-files
- easy to insert into posts
I’m using a few plug-ins in conjunction to fast-track something a little more toward what I want. Far from perfect!
I haven’t quite achieved what I want, and it’s still too manual. But it’ll do for now.
wp-colorbox/wp-colorbox.js gets loaded and uses JQuery to set attributes for the colorbox lightbox. That’s partly why I use Head & Footer Code to write-over those attributes.
Update: 10th March 2017
Since making this page, my technique has evolved substantially, slightly breaking my old technique. Keeping the magnifying glass png here as an example, has a side-effect of enclosing the buttons rendered with my new technique inside the lightbox. In that situation the width buttons will not work properly because of %’s and an unknown container. My new technique, by itself, does not have this problem.
The magnifying glass was something I found with a quick google. I cleared the background in Photoshop, and saved-for-web as a .png resizing before uploading in WordPress.