Six Earlier Days (Every Day, #0.5)
![]() |
Review:Everything good about Every Day is here, and everything bad is here too, both just smaller. So, 4 small stars. |
![]() |
Review:Everything good about Every Day is here, and everything bad is here too, both just smaller. So, 4 small stars. |
![]() |
Review:Anyone who has ever been involved in a long-lived project knows the feeling this book describes. It's fun, it's decently written, and it has that feeling. I liked it. |
It all started quietly with an Issue in the Nikola bug tracker:
gustavodiazjaimes opened this issue 3 hours agooembed by micawber - feature sugestioninstead of using specific code for embed object (Youtube, Vimeo, Soundcloud) use a generic solution like https://github.com/coleifer/micawber
So, I looked at micawber. And it's awesome and I had never heard of it before. What it does is, it looks at a URL, and if it knows the site where it's pointed at, it will then gather information from it. And using that information it will create for you a HTML fragment so you can embed it in your own HTML page.
And how hard is it to turn that into a reStructuredText directive? NOT HARD AT ALL.
import micawber class Media(Directive): """ Restructured text extension for inserting any sort of media using micawber.""" has_content = False required_arguments = 1 def run(self): providers = micawber.bootstrap_basic() return [nodes.raw('', micawber.parse_text(self.arguments[0], providers), format='html')]
So now, in Nikola's github master you can do this:
This is a well known problem with bootstrap:
If you use a fixed navigation bar at the top, whenever you follow a link to somewhere inside the page, the actual link target is going to be hidden below that freaking navigation bar.
There are a ton of solutions, which have two tons of minor issues. There seems to be no way to solve this using CSS and JS without causing other problems.
There are a bunch of JS solutions around. Here's mine:
<script type="text/javascript"> $(window).on('hashchange', function(){ if (location.hash) { $('body').animate({scrollTop: $(location.hash).offset().top - $('#navbar').outerHeight(true)*1.2 }, 1); } }); $(document).ready(function(){$(window).trigger('hashchange')}); </script>
It works well, is short and has decent browser coverage. It only fails in the corner case of clicking on the same internal link twice (which, who cares).
For some reason today I got into a little spat with Zed Shaw which ended with me blocked after a barrage of verbal abuse.
So, he says I am a dickhead. Is it so? Here's the exchange in an image, and here it is on twitter:
It seems to me it's mostly a case of someone being quick to dish abuse but slow to accept disagreement. But hey, maybe I am a dickhead for saying that. That conversation had a few other branches, but those were disagreements about the topic (in which, I have to say, Zed is completely clueless, and wrong, although IANAL) Finding them all may be too much effort but here's one