Nord Light Theme

I like my terminal to change theme when I ssh into another machine. I have been using Solarized Light and Solarized Dark to facilitate this for some time. But now I have gotten hooked on Nord which has no light version. So I made one, just for Terminal for now at least.

Screenshot of Nord Light theme with colored ls output

There are notes about a “bright ambiance” version of the theme in the Nord docs but no actual themes available. The official Terminal.app theme actually deviates from the core 16-color palette but I didn’t do that here. I just chose the most appropriate color from the 16 color palette for each option in a Terminal theme.

Avoid trailing comma when emitting lists in Mustache templates

In pure Mustache there’s no (simple) way to avoid a trailing comma on a list:

{{#items}}{{.}}, {{/items}}

Which produces something like: “First, Second, Third, “

There are various ways around this. If you’re working in HTML I think the nicest is to model your list as an actual HTML list and use CSS:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>Lists</title>
    <style>
      .list {           
        margin: 0;      
        padding: 0;
      }
      .list li {           
        display: inline;             
      }
      .list li:not(:last-child):after {
        content: ", ";               
      }
    </style>
  </head>
  <body>
    <ol class="list">
      <li>First</li>
      <li>Second</li>
      <li>Third</li>
    </ol>
  </body>
</html>

Which produces: “First, Second, Third”.