Skip to content

Commit

Permalink
move stylesheet to local static, add fitvids-ish css aspect-ratio han…
Browse files Browse the repository at this point in the history
…dling for videos, different link hovers
  • Loading branch information
natebeaty committed Jun 2, 2024
1 parent b8048e3 commit 146c49d
Show file tree
Hide file tree
Showing 5 changed files with 1,618 additions and 8 deletions.
2 changes: 1 addition & 1 deletion content/posts/2010-05-11-coding-ye-olde-todo-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
slug = "coding-ye-olde-todo-app"
layout = "blog"
+++
<iframe src="//www.youtube.com/embed/o4M8mw_0IOg" frameborder="0"></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/o4M8mw_0IOg?si=xUaK3lRK9onILrbd" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p><a href="http://microcosmpublishing.com/">Microcosm</a> asked to add a todo section to their admin, and this is what I came up with after a few half-days of coding (thanks in large part to my good friend <a href="http://mootools.net/">MooTools</a>). They have two shops and a growing staff, and everybody spends quite a bit of time in the admin I built for them.</p>
<p>I&rsquo;m a huge fan of <a href="http://www.potionfactory.com/thehitlist/">The Hit List</a>, which I believe is just about as perfect a task manager as you could ask for, and I obviously borrowed some ideas. If I had more time to fuss with this, and if it was something <i>I&rsquo;d</i> be using regularly, I&rsquo;d implement full keyboard control and mimic The Hit List even more.</p>
<p>Todo apps feel like the advanced &ldquo;Hello, World&rdquo; of programming exercises, akin to Tetris for game developers. I can&rsquo;t believe it took me this long to get to make one.</p>
4 changes: 4 additions & 0 deletions static/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Adjust aspect-ratio for "fitvid" videos
document.querySelectorAll('iframe[src*="youtube"], iframe[src*="vimeo"]').forEach((video) => {
video.style.aspectRatio = `${video.getAttribute('width')} / ${video.getAttribute('height')}`
});
Loading

0 comments on commit 146c49d

Please sign in to comment.