From 14074019d62d98885c4c764401a9e7e1fd129f79 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Mon, 10 Jun 2024 10:12:28 -0400 Subject: Set proper timestamps for header and footer HTML templates, update some post contents --- build/atom.xml | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) (limited to 'build/atom.xml') diff --git a/build/atom.xml b/build/atom.xml index 2a34916..de68764 100644 --- a/build/atom.xml +++ b/build/atom.xml @@ -2,7 +2,7 @@ Making software better without sacrificing user experience. - 2024-06-10T09:40:10Z + 2024-06-10T10:11:12Z Bradley Taunt @@ -444,20 +444,18 @@ chmod -R 775 uploads <h1 id="please-make-your-table-headings-sticky">Please Make Your Table Headings Sticky</h1> <p>2024-02-23</p> <p>I often stumble upon large data sets or table layouts across the web. When these tables contain hundreds of rows of content, things become problematic once you start to scroll&#8230;</p> -<p>Your browser does not support the video tag. -</p> +<p><a href="/public/videos/not-fixed-header-tables.mp4">Click here to see standard table headers video</a></p> <p>Look at that table header disappear! Now, if I scroll all the way down to item #300 (for example) will I remember what each column&#8217;s data is associated with? If this is my first time looking at this table - probably not. Luckily we can fix this (no pun intended!) with a tiny amount of CSS.</p> <h2 id="sticky-header">Sticky Header</h2> <p>Check it out:</p> -<p>Your browser does not support the video tag. -</p> +<p><a href="/public/videos/fixed-header-tables.mp4">Click here to see &#8220;fixed&#8221; table headers video</a></p> <p>Pretty awesome, right? It might look like magic but it&#8217;s actually very easy to implement. You only need to add 2 CSS properties on your <code>thead</code>:</p> <pre><code>position: sticky; top: 0; </code></pre> <p>That&#8217;s it! Best of all, <code>sticky</code> has <a href="https://caniuse.com/?search=sticky">~96% global support</a> which means this isn&#8217;t some &#8220;bleeding-edge&#8221; property and can safely support a ton of browsers. Not to mention the improved experience for your end-users!</p> <p>You can view a live demo of this table on the <a href="https://codepen.io/bradleytaunt/pen/bGZyJBj">CodePen example pen</a>.</p> -<p>If you found this interesting, feel free to check out my other table-focused post: <a href="https://btxx.org/posts/tables/">Making Tables Responsive With Minimal CSS</a></p> +<p>If you found this interesting, feel free to check out my other table-focused post: <a href="/posts/tables/">Making Tables Responsive With Minimal CSS</a></p> https://btxx.org/posts/Please_Make_Your_Table_Headings_Sticky 2024-02-23T10:00:00Z @@ -4707,8 +4705,8 @@ done <p>Simple as that. Happy converting!</p> <p>If you&#8217;re interested, I also have some other Automator scripts available:</p> <ul> -<li><a href="/batch-webp-conversion/">Batch Converting Images to webp with macOS Automator</a></li> -<li><a href="/macos-convert-to-html/">Convert Files to HTML with macOS Automator Quick Actions</a></li> +<li><a href="/posts/batch-webp-conversion/">Batch Converting Images to webp with macOS Automator</a></li> +<li><a href="/posts/macos-convert-to-html/">Convert Files to HTML with macOS Automator Quick Actions</a></li> </ul> https://btxx.org/posts/heif @@ -5806,6 +5804,8 @@ input[type="radio"]:nth-of-type(5):checked ~ .slide:nth-of-type(5) { <p>2023-05-19</p> <h2 id="a-brief-background">A Brief Background</h2> <p>I&#8217;m no stranger to robotic lawnmowers. When my wife and I moved into our rural home just over five years ago, we picked up the Husqvarna 450X Automower since I was far too lazy to manually mow my property and the cost was equal to that of a standard riding mower. It was a no-brainer.</p> +<p><img src="/public/images/mower-1.jpeg" alt="The Husqvarna 450X" /></p> +<p><em>The Husqvarna 450X (not mine but same model)</em></p> <p>Fast-forward five years. Everything is still going great with the Automower. Some minor repairs were needed but that was mostly my fault since I was allowing the mower into places it shouldn&#8217;t have been (ie. root systems and dirt &#8220;craters&#8221;). Then lightning struck our backyard at the beginning of April this year. The mower was fine, since we stow it away inside for the winter but the charging station, charging brick and perimeter wire we <em>not</em> so lucky&#8230;</p> <p>The lightning traveled along the main perimeter wire and went straight to the charging station. Boom. The charging dock was quite literally blown up into a million tiny pieces and scattered across my backyard. Giant trenches were carved up where the perimeter wire had been embedded in the lawn. This surge also followed the path towards the main power adapter and exploded that as well. All of this happened even with the charging station &#47; adapter <em>turned off and unplugged from any outlet</em>. At least my mower was safe&#8230;</p> <h2 id="shopping-for-automower-parts">Shopping for Automower Parts</h2> @@ -5827,6 +5827,8 @@ input[type="radio"]:nth-of-type(5):checked ~ .slide:nth-of-type(5) { <p><em>Sigh</em>. The mower gods were trying to tell me something. It seemed Husqvarna was just not meant for me anymore.</p> <h2 id="luba-to-the-rescue">Luba to the Rescue!</h2> <p>While researching &#8220;wireless&#8221; automowers, I came across the <a href="https://mammotion.com/?ref=bpjfzw7s">Luba Series 5000</a> (referral link) and kept it in my &#8220;maybe&#8221; pile to follow-up on if needed. So follow-up I did.</p> +<p><img src="/public/images/mower-2.webp" alt="The Luba Series 5000" /></p> +<p><em>The Luba Series 5000 AWD (not mine but same model)</em></p> <p>This mower seemed to check all my boxes:</p> <ul> <li>Decently priced</li> @@ -5861,7 +5863,7 @@ input[type="radio"]:nth-of-type(5):checked ~ .slide:nth-of-type(5) { Convert Files to HTML with macOS Automator Quick Actions <h1 id="convert-files-to-html-with-macos-automator-quick-actions">Convert Files to HTML with macOS Automator Quick Actions</h1> <p>2022-01-28</p> -<p>Since a few people have reached out and thanked me for my previous post <a href="/batch-webp-conversion">Batch Converting Images to webp with macOS Automator</a>, I thought I would continue to share more of my own custom Automator Quick Actions. Today&#8217;s post will cover the ability to convert <em>any</em> text-based document into pure HTML.</p> +<p>Since a few people have reached out and thanked me for my previous post <a href="/posts/batch-webp-conversion">Batch Converting Images to webp with macOS Automator</a>, I thought I would continue to share more of my own custom Automator Quick Actions. Today&#8217;s post will cover the ability to convert <em>any</em> text-based document into pure HTML.</p> <p>I know - there are over 6 billion conversion apps that do this very same thing. But our way of doing it is <em>cooler</em>. Our conversion tool:</p> <ul> <li>Will run directly inside macOS Finder (right-click actions FTW)</li> @@ -5890,13 +5892,15 @@ input[type="radio"]:nth-of-type(5):checked ~ .slide:nth-of-type(5) { <p>Wait for everything to finish and you&#8217;re done!</p> <h2 id="our-custom-automator-quick-action">Our Custom Automator Quick Action</h2> <p>Next you&#8217;ll want to open the macOS Automator app and create a new &#8220;Quick Action&#8221; when given the prompt to do so.</p> +<p><img src="/public/images/new-automator.webp" alt="Toggle prompt for new automation in macOS Automator" /></p> +<p><em>After opening Automator, select &#8220;Quick Action&#8221; from the menu</em></p> <p>Now do the following (reference the image further below to make sure your parameters match):</p> <ol> -<li>Set &#8220;Workflow receives current&#8221; to documents in any application</li> +<li>Set &#8220;Workflow receives current&#8221; to <strong>documents</strong> in <strong>any application</strong></li> <li>In the search bar type in &#8220;Run Shell Script&#8221;</li> <li>Drag-and-drop the &#8220;Run Shell Script&#8221; from the left pane into the right pane</li> -<li>Set the &#8220;Shell&#8221; parameter to &#47;bin&#47;bash</li> -<li>Set &#8220;Pass input&#8221; as as arguments</li> +<li>Set the &#8220;Shell&#8221; parameter to <strong>&#47;bin&#47;bash</strong></li> +<li>Set &#8220;Pass input&#8221; as <strong>as arguments</strong></li> </ol> <p>Once all that is done, simply paste the following in the open text field within the &#8220;Run Shell Script&#8221; item:</p> <pre><code>for f in "$@" @@ -5905,16 +5909,23 @@ do done </code></pre> <p>If you&#8217;ve done everything correctly it should look something like this:</p> +<p><img src="/public/images/new-automator-2.webp" alt="Automator quick action details for converting to HTML" /></p> <p>Save this new Quick Action (Name is something like &#8220;Convert to HTML&#8221; to keep things simple). That&#8217;s it! Amazing, right?</p> <h2 id="time-to-convert">Time to Convert</h2> <p>Now it is finally time to see our Quick Action is <em>action</em>! Navigate to any document file in a Finder window and follow along.</p> <ol> -<li>First, right-click on the file you wish to convert. (<a href="#fig-1">Figure 1</a>)</li> +<li>First, right-click on the file you wish to convert. See Fig.1)</li> <li>In the pop-up container, scroll down and hover over <code>Quick Actions</code>.</li> -<li>A secondary pop-out will appear. Look for the action <code>Convert File to HTML</code> and click it. (<a href="#fig-2">Figure 2</a>)</li> +<li>A secondary pop-out will appear. Look for the action <code>Convert File to HTML</code> and click it. See Fig.2)</li> </ol> +<p><img src="/public/images/macos-convert-1.webp" alt="A markdown file in macOS Finder" /></p> +<p><em>Fig 1: Finding and right-clicking on your desired file</em></p> +<p><img src="/public/images/macos-convert-2.webp" alt="Convert to HTML action selection" /></p> +<p><em>Fig 2: From the &#8220;Quick Actions&#8221; menu, select &#8220;Convert to HTML&#8221;</em></p> <p>If everything was set up properly (and depending on the size of the file) you should see your converted HTML file show up right next to your existing document. Time to celebrate!</p> <p>Don&#8217;t forget - you can also <em>batch</em> convert multiple files and multiple file <em>types</em> at once. The possibilities are endless!</p> +<p><img src="/public/images/macos-convert-3.webp" alt="Finder window showing a Markdown file and an HTML file" /></p> +<p><em>Our converted document is now available in HTML. Absolutely glorious.</em></p> <h2 id="no-limits">No Limits</h2> <p>Although this article has mainly focused on converting documents to HTML, <code>pandoc</code> is so powerful you could do any number of conversions. Re-using these steps above, you have the ability to make as many different conversion quick actions as your heart desires!</p> <p>Have fun converting!</p> @@ -6161,9 +6172,13 @@ done <p>I recently covered how to <a href="/git-patches">work with git email patches in Evolution on Linux</a>, so I thought it would make sense to walk through a similar workflow for those using Apple Mail on MacOS. The idea is essentially the same, with just a little extra work involved.</p> <h2 id="create-a-patches-mailbox">Create a &#8220;Patches&#8221; Mailbox</h2> <p>The first thing you&#8217;ll need to do is make a new <code>Patches</code> mailbox folder inside your existing mail account. Once done, your default Mail sidebar should look similar to the following:</p> +<p><img src="/public/images/apple-mail-1.png" alt="The Apple Mail sidebar with the Patches folder present" /></p> +<p><em>The Apple Mail sidebar with the &#8220;Patches&#8221; folder present</em></p> <h2 id="applying-patches">Applying Patches</h2> <p>Now navigate to the email message containing a <code>git</code> patch. Right-click and select <em>Move to</em> &#62; <em>Patches</em>. Now in the sidebar, right-click your <em>Patches</em> folder and select <em>Export Mailbox&#8230;</em>. You&#8217;ll be prompted to save this folder locally. I suggest having a top-level folder named <strong>Patches</strong> to make things consistent.</p> <p>Inside this folder you should see something similar to the following structure:</p> +<p><img src="/public/images/apple-mail-2.png" alt="The contents of the saved Patches mailbox folder" /></p> +<p><em>The contents of the saved Patches mailbox folder</em></p> <p>Once saved, open your terminal, navigate to the project you wish to apply this new patch to:</p> <pre><code>cd my-path&#47;very-cool-project </code></pre> @@ -9888,9 +9903,10 @@ flatpak remote-add --user --if-not-exists flathub https:&#47;&#47;flathu Making Tables Responsive With Minimal CSS <h1 id="making-tables-responsive-with-minimal-css">Making Tables Responsive With Minimal CSS</h1> <p>2019-06-11</p> +<p><strong>Update (Oct 2019):</strong> @aardrian wrote a previous post about how changing the <code>display</code> properties on tables can impact screen readers. I highly recommend his excellent article <a href="https://adrianroselli.com/2018/02/tables-css-display-properties-and-aria.html">Tables, CSS Display Properties, and ARIA</a></p> <hr/> <p>I find that the need to create responsive table layouts pops up far more often than most developers would expect. The gut reaction might to be implement some sort of custom grid-system or pull in a pre-built library. Don&#8217;t do this - just use tables and some simple CSS.</p> -<p>My recent article, <a href="/html-like-1999">Write HTML Like It&#8217;s 1999</a>, received far more attention than I ever expected on HackerNews. With this attention came a few comments mentioning how <code>table</code> elements don&#8217;t play nice with mobile devices or that it&#8217;s not possible to have a useable layout on smaller screens. <em>This simply isn&#8217;t true</em>.</p> +<p>My recent article, <a href="/posts/html-like-1999">Write HTML Like It&#8217;s 1999</a>, received far more attention than I ever expected on HackerNews. With this attention came a few comments mentioning how <code>table</code> elements don&#8217;t play nice with mobile devices or that it&#8217;s not possible to have a useable layout on smaller screens. <em>This simply isn&#8217;t true</em>.</p> <p>Included below are two separate demos showing how to optimize <code>table</code> HTML for mobile devices using only a minimal amount of CSS. These implementations may not be perfect, but they are far superior to injecting a bunch of custom <code>div</code> elements to <em>look</em> like tables.</p> <h2 id="demo-1-just-let-them-scroll">Demo 1: Just let them scroll</h2> <p>Okay I will admit, this implementation isn&#8217;t the <em>greatest</em> but I find it does work well with huge datasets. Simply set a <code>min-width</code> on your parent <code>table</code> element and the browser will just require the user to scroll the contents horizontally.</p> -- cgit v1.2.3-54-g00ecf