diff options
| author | mjfernez <mjf@mjfer.net> | 2024-07-22 23:46:12 -0400 | 
|---|---|---|
| committer | mjfernez <mjf@mjfer.net> | 2024-07-22 23:46:12 -0400 | 
| commit | 2c8af81586db3d715853d7894625683c0ae8153d (patch) | |
| tree | c307457c81352f8ff1abdce795d39b508b4ca6cc /thoughts | |
| parent | 288f0962cc62e0ee85ea5081effaa9687b83414f (diff) | |
| download | site-files-2c8af81586db3d715853d7894625683c0ae8153d.tar.gz | |
Make pandoc use main.css
Diffstat (limited to 'thoughts')
| -rw-r--r-- | thoughts/syntax/my-worst-habit.html | 155 | ||||
| -rw-r--r-- | thoughts/syntax/random-python-idiosyncrasies.html | 179 | 
2 files changed, 37 insertions, 297 deletions
| diff --git a/thoughts/syntax/my-worst-habit.html b/thoughts/syntax/my-worst-habit.html index c901894..ac0c36a 100644 --- a/thoughts/syntax/my-worst-habit.html +++ b/thoughts/syntax/my-worst-habit.html @@ -6,154 +6,23 @@  <meta content="width=device-width, initial-scale=1.0, user-scalable=yes" name="viewport"/>  <title>my-worst-habit</title>  <style> -    html { -      line-height: 1.5; -      font-family: Georgia, serif; -      font-size: 20px; -      color: #1a1a1a; -      background-color: #fdfdfd; -    } -    body { -      margin: 0 auto; -      max-width: 36em; -      padding-left: 50px; -      padding-right: 50px; -      padding-top: 50px; -      padding-bottom: 50px; -      hyphens: auto; -      overflow-wrap: break-word; -      text-rendering: optimizeLegibility; -      font-kerning: normal; -    } -    @media (max-width: 600px) { -      body { -        font-size: 0.9em; -        padding: 1em; -      } -      h1 { -        font-size: 1.8em; -      } -    } -    @media print { -      body { -        background-color: transparent; -        color: black; -        font-size: 12pt; -      } -      p, h2, h3 { -        orphans: 3; -        widows: 3; -      } -      h2, h3, h4 { -        page-break-after: avoid; -      } -    } -    p { -      margin: 1em 0; -    } -    a { -      color: #1a1a1a; -    } -    a:visited { -      color: #1a1a1a; -    } -    img { -      max-width: 100%; -    } -    h1, h2, h3, h4, h5, h6 { -      margin-top: 1.4em; -    } -    h5, h6 { -      font-size: 1em; -      font-style: italic; -    } -    h6 { -      font-weight: normal; -    } -    ol, ul { -      padding-left: 1.7em; -      margin-top: 1em; -    } -    li > ol, li > ul { -      margin-top: 0; -    } -    blockquote { -      margin: 1em 0 1em 1.7em; -      padding-left: 1em; -      border-left: 2px solid #e6e6e6; -      color: #606060; -    } -    code { -      font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace; -      font-size: 85%; -      margin: 0; -    } -    pre { -      margin: 1em 0; -      overflow: auto; -    } -    pre code { -      padding: 0; -      overflow: visible; -      overflow-wrap: normal; -    } -    .sourceCode { -     background-color: transparent; -     overflow: visible; -    } -    hr { -      background-color: #1a1a1a; -      border: none; -      height: 1px; -      margin: 1em 0; -    } -    table { -      margin: 1em 0; -      border-collapse: collapse; -      width: 100%; -      overflow-x: auto; -      display: block; -      font-variant-numeric: lining-nums tabular-nums; -    } -    table caption { -      margin-bottom: 0.75em; -    } -    tbody { -      margin-top: 0.5em; -      border-top: 1px solid #1a1a1a; -      border-bottom: 1px solid #1a1a1a; -    } -    th { -      border-top: 1px solid #1a1a1a; -      padding: 0.25em 0.5em 0.25em 0.5em; -    } -    td { -      padding: 0.125em 0.5em 0.25em 0.5em; -    } -    header { -      margin-bottom: 4em; -      text-align: center; -    } -    #TOC li { -      list-style: none; -    } -    #TOC ul { -      padding-left: 1.3em; -    } -    #TOC > ul { -      padding-left: 0; -    } -    #TOC a:not(:hover) { -      text-decoration: none; -    }      code{white-space: pre-wrap;}      span.smallcaps{font-variant: small-caps;} -    span.underline{text-decoration: underline;} -    div.column{display: inline-block; vertical-align: top; width: 50%;} +    div.columns{display: flex; gap: min(4vw, 1.5em);} +    div.column{flex: auto; overflow-x: auto;}      div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} -    ul.task-list{list-style: none;} +    /* The extra [class] is a hack that increases specificity enough to +       override a similar rule in reveal.js */ +    ul.task-list[class]{list-style: none;} +    ul.task-list li input[type="checkbox"] { +      font-size: inherit; +      width: 0.8em; +      margin: 0 0.8em 0.2em -1.6em; +      vertical-align: middle; +    }      .display.math{display: block; text-align: center; margin: 0.5rem auto;}    </style> +<link href="../../static/main.css" rel="stylesheet"/>  </head>  <body>  <p>Overuse of parentheses, by far.</p> diff --git a/thoughts/syntax/random-python-idiosyncrasies.html b/thoughts/syntax/random-python-idiosyncrasies.html index 5c6ecef..77d586c 100644 --- a/thoughts/syntax/random-python-idiosyncrasies.html +++ b/thoughts/syntax/random-python-idiosyncrasies.html @@ -6,154 +6,24 @@  <meta content="width=device-width, initial-scale=1.0, user-scalable=yes" name="viewport"/>  <title>random-python-idiosyncrasies</title>  <style> -    html { -      line-height: 1.5; -      font-family: Georgia, serif; -      font-size: 20px; -      color: #1a1a1a; -      background-color: #fdfdfd; -    } -    body { -      margin: 0 auto; -      max-width: 36em; -      padding-left: 50px; -      padding-right: 50px; -      padding-top: 50px; -      padding-bottom: 50px; -      hyphens: auto; -      overflow-wrap: break-word; -      text-rendering: optimizeLegibility; -      font-kerning: normal; -    } -    @media (max-width: 600px) { -      body { -        font-size: 0.9em; -        padding: 1em; -      } -      h1 { -        font-size: 1.8em; -      } -    } -    @media print { -      body { -        background-color: transparent; -        color: black; -        font-size: 12pt; -      } -      p, h2, h3 { -        orphans: 3; -        widows: 3; -      } -      h2, h3, h4 { -        page-break-after: avoid; -      } -    } -    p { -      margin: 1em 0; -    } -    a { -      color: #1a1a1a; -    } -    a:visited { -      color: #1a1a1a; -    } -    img { -      max-width: 100%; -    } -    h1, h2, h3, h4, h5, h6 { -      margin-top: 1.4em; -    } -    h5, h6 { -      font-size: 1em; -      font-style: italic; -    } -    h6 { -      font-weight: normal; -    } -    ol, ul { -      padding-left: 1.7em; -      margin-top: 1em; -    } -    li > ol, li > ul { -      margin-top: 0; -    } -    blockquote { -      margin: 1em 0 1em 1.7em; -      padding-left: 1em; -      border-left: 2px solid #e6e6e6; -      color: #606060; -    } -    code { -      font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace; -      font-size: 85%; -      margin: 0; -    } -    pre { -      margin: 1em 0; -      overflow: auto; -    } -    pre code { -      padding: 0; -      overflow: visible; -      overflow-wrap: normal; -    } -    .sourceCode { -     background-color: transparent; -     overflow: visible; -    } -    hr { -      background-color: #1a1a1a; -      border: none; -      height: 1px; -      margin: 1em 0; -    } -    table { -      margin: 1em 0; -      border-collapse: collapse; -      width: 100%; -      overflow-x: auto; -      display: block; -      font-variant-numeric: lining-nums tabular-nums; -    } -    table caption { -      margin-bottom: 0.75em; -    } -    tbody { -      margin-top: 0.5em; -      border-top: 1px solid #1a1a1a; -      border-bottom: 1px solid #1a1a1a; -    } -    th { -      border-top: 1px solid #1a1a1a; -      padding: 0.25em 0.5em 0.25em 0.5em; -    } -    td { -      padding: 0.125em 0.5em 0.25em 0.5em; -    } -    header { -      margin-bottom: 4em; -      text-align: center; -    } -    #TOC li { -      list-style: none; -    } -    #TOC ul { -      padding-left: 1.3em; -    } -    #TOC > ul { -      padding-left: 0; -    } -    #TOC a:not(:hover) { -      text-decoration: none; -    }      code{white-space: pre-wrap;}      span.smallcaps{font-variant: small-caps;} -    span.underline{text-decoration: underline;} -    div.column{display: inline-block; vertical-align: top; width: 50%;} +    div.columns{display: flex; gap: min(4vw, 1.5em);} +    div.column{flex: auto; overflow-x: auto;}      div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} -    ul.task-list{list-style: none;} +    /* The extra [class] is a hack that increases specificity enough to +       override a similar rule in reveal.js */ +    ul.task-list[class]{list-style: none;} +    ul.task-list li input[type="checkbox"] { +      font-size: inherit; +      width: 0.8em; +      margin: 0 0.8em 0.2em -1.6em; +      vertical-align: middle; +    } +    .display.math{display: block; text-align: center; margin: 0.5rem auto;} +    /* CSS for syntax highlighting */      pre > code.sourceCode { white-space: pre; position: relative; } -    pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } +    pre > code.sourceCode > span { line-height: 1.25; }      pre > code.sourceCode > span:empty { height: 1.2em; }      .sourceCode { overflow: visible; }      code.sourceCode > span { color: inherit; text-decoration: inherit; } @@ -215,28 +85,29 @@      code span.va { color: #19177c; } /* Variable */      code span.vs { color: #4070a0; } /* VerbatimString */      code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ -    .display.math{display: block; text-align: center; margin: 0.5rem auto;}    </style> +<link href="../../static/main.css" rel="stylesheet"/>  </head>  <body>  <nav id="TOC" role="doc-toc">  <h2 id="toc-title">Contents</h2>  <ul> -<li><a href="#coding-style-guide" target="_self">Coding Style Guide</a> +<li><a href="#coding-style-guide" id="toc-coding-style-guide" target="_self">Coding +Style Guide</a>  <ul> -<li><a href="#strings-are-double-quoted.-keys-and-chars-are-single-quoted." target="_self">1) +<li><a href="#strings-are-double-quoted.-keys-and-chars-are-single-quoted." id="toc-strings-are-double-quoted.-keys-and-chars-are-single-quoted." target="_self">1)  <em>Strings</em> are <em>double-quoted</em>. <em>Keys</em> and  <em>chars</em> are <em>single-quoted</em>.</a></li> -<li><a href="#long-strings-belong-in-parentheses" target="_self">2) Long strings belong -in parentheses</a></li> -<li><a href="#tabs-are-four-spaces-and-spaces-are-always-preferred-to-tabs" target="_self">3) +<li><a href="#long-strings-belong-in-parentheses" id="toc-long-strings-belong-in-parentheses" target="_self">2) Long strings belong in +parentheses</a></li> +<li><a href="#tabs-are-four-spaces-and-spaces-are-always-preferred-to-tabs" id="toc-tabs-are-four-spaces-and-spaces-are-always-preferred-to-tabs" target="_self">3)  Tabs are four spaces and spaces are <em>ALWAYS</em> preferred to  tabs</a></li> -<li><a href="#always-add-spaces-between-arithmetic-but-never-for-brackets" target="_self">4) +<li><a href="#always-add-spaces-between-arithmetic-but-never-for-brackets" id="toc-always-add-spaces-between-arithmetic-but-never-for-brackets" target="_self">4)  Always add spaces between arithmetic, but never for brackets</a></li> -<li><a href="#everything-should-be-snake_case" target="_self">5) EVERYTHING should be +<li><a href="#everything-should-be-snake_case" id="toc-everything-should-be-snake_case" target="_self">5) EVERYTHING should be  snake_case</a></li> -<li><a href="#if-its-over-100-lines-you-probably-need-a-new-file-and-a-class" target="_self">6) +<li><a href="#if-its-over-100-lines-you-probably-need-a-new-file-and-a-class" id="toc-if-its-over-100-lines-you-probably-need-a-new-file-and-a-class" target="_self">6)  If it's over 100 lines, you probably need a new file (and a  class)</a></li>  </ul></li> @@ -277,7 +148,7 @@ avoid escapes, really)</p>  <div class="sourceCode" id="cb3"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb3-1"><a aria-hidden="true" href="#cb3-1" tabindex="-1"></a>quoted_string <span class="op">=</span> (</span>  <span id="cb3-2"><a aria-hidden="true" href="#cb3-2" tabindex="-1"></a>    <span class="st">'"You miss 100</span><span class="sc">% o</span><span class="st">f the shots you don'</span>t take <span class="op">-</span> Wayne Gretsky<span class="st">"'</span></span>  <span id="cb3-3"><a aria-hidden="true" href="#cb3-3" tabindex="-1"></a><span class="er">    ' - Michael Scott'</span></span> -<span id="cb3-4"><a aria-hidden="true" href="#cb3-4" tabindex="-1"></a><span class="er">)</span></span></code></pre></div> +<span id="cb3-4"><a aria-hidden="true" href="#cb3-4" tabindex="-1"></a>)</span></code></pre></div>  <p>That brings me to my next point.</p>  <h2 id="long-strings-belong-in-parentheses">2) Long strings belong in  parentheses</h2> | 
