~glorifiedgluer/gluer.org

a251b3b36a119a08f4ed3c4ca4f0717dd7afd74d — Victor Freire 4 months ago 222e805
style: add hugo tufte as theme
66 files changed, 2294 insertions(+), 511 deletions(-)

D config.toml
A config.yaml
D layouts/404.html
D layouts/_default/baseof.html
D layouts/_default/blogroll.html
D layouts/_default/list.html
D layouts/_default/single.html
D layouts/index.html
D layouts/partials/backlinks.html
D layouts/partials/footer.html
D layouts/partials/nav.html
M static/css/main.scss
A themes/hugo-tufte/.gitignore
A themes/hugo-tufte/CHANGELOG.md
A themes/hugo-tufte/LICENSE.md
A themes/hugo-tufte/archetypes/default.md
A themes/hugo-tufte/assets/css/modern-normalize.css
A themes/hugo-tufte/assets/scss/components/brand.scss
A themes/hugo-tufte/assets/scss/components/code-highlight.scss
A themes/hugo-tufte/assets/scss/components/meta.scss
A themes/hugo-tufte/assets/scss/components/nav.scss
A themes/hugo-tufte/assets/scss/components/toc.scss
A themes/hugo-tufte/assets/scss/general.scss
A themes/hugo-tufte/assets/scss/hugo-tufte-options.scss
A themes/hugo-tufte/assets/scss/hugo-tufte.scss
A themes/hugo-tufte/assets/scss/pages/footer.scss
A themes/hugo-tufte/assets/scss/syntax/highlight-dark.scss
A themes/hugo-tufte/assets/scss/syntax/highlight-light.scss
A themes/hugo-tufte/assets/scss/syntax/syntax-dark.scss
A themes/hugo-tufte/assets/scss/syntax/syntax-light.scss
A themes/hugo-tufte/assets/scss/tufte.scss
A themes/hugo-tufte/config.toml
A themes/hugo-tufte/layouts/404.html
A themes/hugo-tufte/layouts/_default/_markup/render-heading.html
A themes/hugo-tufte/layouts/_default/baseof.html
R layouts/_default/list.atom.xml => themes/hugo-tufte/layouts/_default/list.atom.xml
A themes/hugo-tufte/layouts/_default/list.html
A themes/hugo-tufte/layouts/_default/single.html
A themes/hugo-tufte/layouts/_default/summary.html
A themes/hugo-tufte/layouts/_default/terms.html
A themes/hugo-tufte/layouts/index.html
A themes/hugo-tufte/layouts/partials/brand.html
A themes/hugo-tufte/layouts/partials/content.header.html
A themes/hugo-tufte/layouts/partials/footer.html
A themes/hugo-tufte/layouts/partials/header.html
A themes/hugo-tufte/layouts/partials/header.includes.html
A themes/hugo-tufte/layouts/partials/nav.html
A themes/hugo-tufte/layouts/partials/shortcodes/button.html
A themes/hugo-tufte/layouts/partials/social.html
A themes/hugo-tufte/layouts/partials/toc.html
A themes/hugo-tufte/layouts/robots.txt
A themes/hugo-tufte/layouts/shortcodes/blockquote.html
A themes/hugo-tufte/layouts/shortcodes/button.html
A themes/hugo-tufte/layouts/shortcodes/cite.html
A themes/hugo-tufte/layouts/shortcodes/cols.html
A themes/hugo-tufte/layouts/shortcodes/div.html
A themes/hugo-tufte/layouts/shortcodes/epigraph.html
A themes/hugo-tufte/layouts/shortcodes/figure.html
A themes/hugo-tufte/layouts/shortcodes/image.html
A themes/hugo-tufte/layouts/shortcodes/marginnote.html
A themes/hugo-tufte/layouts/shortcodes/newthought.html
A themes/hugo-tufte/layouts/shortcodes/section.html
A themes/hugo-tufte/layouts/shortcodes/sidenote.html
A themes/hugo-tufte/layouts/shortcodes/tag.html
A themes/hugo-tufte/layouts/shortcodes/youtube.html
A themes/hugo-tufte/theme.toml
D config.toml => config.toml +0 -33
@@ 1,33 0,0 @@
title = "~glorifiedgluer"
baseURL = "https://gluer.org"
languageCode = "en-us"

pygmentsUseClasses = true
assetDir = "static"

[outputs]
  section = ["HTML", "ATOM"]

[permalinks]
  blog = '/blog/:year/:slug/'

[author]
  name = "Victor Freire"

[mediaTypes."application/atom+xml"]
  suffixes = ["xml"]

[outputFormats.Atom]
  name = "Atom"
  mediaType = "application/atom+xml"
  baseName = "atom"

[outputFormats.RSS]
  mediaType = "application/rss+xml"
  baseName = "rss"

[markup.goldmark.renderer]
  unsafe = true

[markup.tableOfContents]
  ordered = true

A config.yaml => config.yaml +73 -0
@@ 0,0 1,73 @@
title: "glorifiedgluer"
baseURL: "https://gluer.org"
languageCode: "en-us"
theme: "hugo-tufte"

# pygmentsUseClasses = true
assetDir: "static"

markup:
  goldmark:
    renderer:
      unsafe: true
  highlight:
    noClasses: false
    guessSyntax: true

permalinks:
  blog: "/blog/:year/:slug/"

menu:
  nav:
    - name: Home
      weight: -110
      identifier: home
      url: /
    - name: blog
      weight: -100
      identifier: blog
      url: /blog/

params:
  # Subtitle of the website
  favicon: "./favicon.ico"
  touchicon: "./touch-icon.png"
  # Dark code highlighting
  codeblocksdark: false
  # Customize the indicator for margin notes
  # Some suggestions: ⊕, 💬, 💭, 📑, 🏷, ✍, 💡, 🧐, 📎, 📌
  marginNoteInd: "⊕"
  # Your name or the name of you company
  # copyright: Copyright 2023
  # copyrightHolder: Copyright Holder
  # Show the "Powered by Hugo-Tufte and Hugo."
  showPoweredBy: false
  # Site wide kill switch for date in pages
  hidedate: false
  showSummary: true
  # Site wide kill switch for LaTeX support
  math: false
  # #### Control style flavours of the website
  # Use upright & sans-serif font for subtitles
  sansSubtitle: false
  # Make the page centred in screen
  centerArticle: false

outputs:
  section:
    - HTML
    - ATOM

mediaTypes:
  application/atom+xml:
    suffixes:
      - xml

outputFormats:
  Atom:
    name: "Atom"
    mediaType: "application/atom+xml"
    baseName: "atom"
  RSS:
    mediaType: "application/rss+xml"
    baseName: "rss"
\ No newline at end of file

D layouts/404.html => layouts/404.html +0 -3
@@ 1,3 0,0 @@
{{ define "main" }}
  404. Page not found.
{{ end }}

D layouts/_default/baseof.html => layouts/_default/baseof.html +0 -27
@@ 1,27 0,0 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>
      {{- block "title" . -}}
        {{- .Site.Title -}}
      {{ end }}
    </title>
    {{ $style := resources.Get "css/main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
    <link rel="stylesheet" href="{{ $style.RelPermalink }}" />
    {{- template "_internal/opengraph.html" . -}}
  </head>
  <body>
      {{- partial "nav.html" -}}
      <main>
        {{- block "main" . -}}
        {{ end }}
      </main>

      {{- block "footer" . -}}
        {{- partial "footer.html" . -}}
      {{ end }}
    </main>
  </body>
</html>

D layouts/_default/blogroll.html => layouts/_default/blogroll.html +0 -28
@@ 1,28 0,0 @@
{{ define "main" }}
  <article>
    <header>
      <h1>{{.Title}}</h1>
      <p> {{ .Description }} <a href="{{ .Site.BaseURL  }}/blogroll.xml">OPML File</a>.</p>
    </header>
  
    {{ $resource := resources.Get "blogroll.xml" | transform.Unmarshal  }}
    {{ range $resource.body  }}
      {{ range $category := .  }}
        <section>
          <header>
            <h1>{{ index $category "-title"  }}</h1>
            <p><small>{{ index $category "-text"  }}</small></p>
          </header>

          <ul style="list-style-type: none; padding: unset;">
            {{ range $entry := .outline  }}
              <li>
                <span><a href="{{ index $entry "-htmlUrl"  }}">{{ index $entry "-title"  }}</a> <sup><a href="{{ index $entry "-xmlUrl"  }}">feed</a></sup></span>
              </li>
            {{ end  }}
          </ul>
        </section>
      {{ end  }}
    {{ end }}
  </article>
{{ end }}

D layouts/_default/list.html => layouts/_default/list.html +0 -21
@@ 1,21 0,0 @@
{{ define "title" }}
  {{ .Title }}
{{ end }}

{{ define "main" }}
  <article>
    <header>
      <h1>{{ .Title | title }}</h1>
      <p><a href="{{.Site.BaseURL}}/{{.Section}}/atom.xml">RSS feed</a></p>
    </header>

    <ul class="page-list">
      {{ range .Data.Pages  }}
        <li>
          <span><time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>{{ .Date.Format "02 Jan 2006" }}</time></span>
          <a href="{{.RelPermalink}}"> {{.Title}} </a>
        </li>
      {{ end  }}
    </ul>
  </article>
{{ end }}

D layouts/_default/single.html => layouts/_default/single.html +0 -27
@@ 1,27 0,0 @@
{{ define "title" }}
  {{ .Title }}
{{ end }}

{{ define "main" }}
  <article>
    <header>
      <h1>{{ .Title }}</h1>
      <p>
        {{ if .Date }}
          <time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>{{ .Date.Format "02 Jan 2006" }}</time>
        {{ else if .Description }}
          {{ .Description }}
        {{ end }}
      </p>
    </header>

    {{- if .Params.toc -}}
      <h2>Table of Contents</h2>
      {{ .TableOfContents }}
    {{ end }}

    {{- .Content -}}

    <!-- {{ partial "backlinks" . }} -->
  </article>
{{ end }}

D layouts/index.html => layouts/index.html +0 -3
@@ 1,3 0,0 @@
{{ define "main" }}
  {{.Content}}
{{ end }}

D layouts/partials/backlinks.html => layouts/partials/backlinks.html +0 -22
@@ 1,22 0,0 @@
{{ $re := $.File.BaseFileName }}
{{ $backlinks := slice }}
{{ range .Site.AllPages }}
   {{ if and (findRE $re .RawContent) (not (eq $re .File.BaseFileName)) }}
      {{ $backlinks = $backlinks | append . }}
   {{ end }}
{{ end }}


{{ if gt (len $backlinks) 0 }}
  <hr>
  <div class="bl-section">
    <h4>Links to this note</h4>
    <div class="backlinks">
      <ul>
       {{ range $backlinks }}
          <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
       {{ end }}
     </ul>
    </div>
  </div>
{{ end }}

D layouts/partials/footer.html => layouts/partials/footer.html +0 -6
@@ 1,6 0,0 @@
<footer>
  <p><em>
      Have something to say about this? Feel free to send me an email at
      <a href="mailto:~glorifiedgluer/inbox@lists.sr.ht">my inbox</a>.
  </em></p>
</footer>

D layouts/partials/nav.html => layouts/partials/nav.html +0 -9
@@ 1,9 0,0 @@
<header class="page-header">
  <h1>{{ site.Title }}</h1>

  <nav>
    <a href="/">Home</a>
    <a href="/blog">Blog</a>
    <a href="/blogroll">Blogroll</a>
  </nav>
</header>

M static/css/main.scss => static/css/main.scss +0 -332
@@ 1,332 0,0 @@
:root {
  --width: 720px;
  --component-padding: 20px;

  --bg: white;
  --secondary-bg: #eee;
  --primary: #007bff;
  --text-color: #444;
  --code-literal: #484;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121415;
    --secondary-bg: #2d2d2d;
    --primary: #78bef8;
    --text-color: #444;
    --code-literal: #f79;
  }
}

html {
  font-family: sans-serif;
}

body {
  font-family: sans-serif;
  line-height: 1.5;
  margin: auto;
  max-width: var(--width);
  font-size: 1em;
  padding: var(--component-padding);
  background-color: var(--bg);

  @media (prefers-color-scheme: dark) {
    background-color: var(--bg);
    color: #e1dfdc;
  }
}

dt {
  font-weight: bold;
}

nav a {
  margin-right: 10px;
}

article {
  header {
    margin-top: var(--component-padding);
    margin-bottom: var(--component-padding);
  }

  header > h1 {
    margin-bottom: 0.1rem;
  }

  header > p {
    margin: 0.1rem;
  }
}

h1 {
  margin-bottom: 0.5rem;
}

main {
  margin: 0 auto;

  @media (max-width: 1000px) {
    padding: 0;
  }
}

blockquote {
  border: 1px solid var(--text-color);
  border-left: 6px solid var(--text-color);
  margin: 2rem 0;
  padding: calc(var(--component-padding) / 2);

  @media (prefers-color-scheme: dark) {
    border: 1px solid var(--text-color);
    border-left: 6px solid var(--text-color);
  }
}

blockquote p {
  margin: 0;
}

a {
  color: var(--primary);

  &:visited {
    filter: brightness(85%)
  }

  &:hover {
    text-decoration: none;
  }

  @media (prefers-color-scheme: dark) {
    color: var(--primary);

    &:visited {
      color: var(--primary);
    }
  }
}

.page-header {
  margin-bottom: calc(var(--component-padding) * 2);
  h1 {
    margin-bottom: 0.1rem;
    font-size: inherit;
  }
}

.page-list {
  list-style-type: none;
  padding: unset;

  li {
    display: flex;
    margin-bottom: calc(var(--component-padding) / 2);

    span {
      flex: 0 0 140px;
    }
  }

}

code {
  font-size: 1rem;
  background: var(--secondary-bg);
  padding: 0 0.3rem;

  @media(prefers-color-scheme: dark) {
    background: var(--secondary-bg);
  }
}

pre code {
  font-size: inherit;
  padding: 0;
  background: none;
}

pre {
  padding: 10px;
  overflow-x: auto;
  border: solid 1px var(--text-color);

  @media (prefers-color-scheme: dark) {
    border: solid 1px var(--text-color);
  }

  // comment
  .c,
  .c1 {
    color: #707070;
    font-style: italic;

    @media (prefers-color-scheme: dark) {
      color: #999999;
    }
  }

  // keywords
  .k,
  .kd,
  .kn,
  .nt,
  .nb {
    color: #008;

    @media (prefers-color-scheme: dark) {
      color: #69f;
    }
  }

  .cp {
    color: #222;
    font-weight: bold;

    @media (prefers-color-scheme: dark) {
      color: #db8;
    }
  }

  .kt {
    color: #44f;
    @media (prefers-color-scheme: dark) {
      color: #3cf;
    }
  }

  // strings
  .s,
  .s2,
  .sd,
  .s1 {
    color: var(--code-literal);
    font-style: italic;

    @media (prefers-color-scheme: dark) {
      color: var(--code-literal);
    }
  }

  // constant
  .no {
    color: var(--code-literal);

    @media (prefers-color-scheme: dark) {
      color: var(--code-literal);
    }
  }

  // number integer
  .mi, .kc {
    color: var(--code-literal);

    @media (prefers-color-scheme: dark) {
      color: var(--code-literal);
    }
  }
}

main img {
  display: block;
  margin: 0.5rem auto;
  max-width: 80%;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  width: 100%;

  th {
    background: var(--secondary-bg); 
    font-weight: bold;
  }

  tbody tr:nth-child(even) { 
    background: var(--secondary-bg); 
  }

  td,
  th {
    border-bottom: 1px solid black;
  }
}

ol li {
  line-height: 1.3;

  &:not(:last-child) {
    margin-bottom: 0.35rem;
  }
}

footer {
  padding: 20px;
  text-align: center;
}

.image {
  width: 80%;

  img {
    display: block;
    margin: 0.5rem auto;
    max-width: 80%;
  }

  figure {
    margin: 0 20px 0 20px;
  }

  figcaption {
    margin: auto;
    width: 75%;
    text-align: center;
    font-size: 0.8rem;

    @media (prefers-color-scheme: dark) {
      color: #555;
    }

    @media (max-width: 768px) {
      width: 90%;
    }
  }

  @media (max-width: 768px) {
    width: 100%;
  }
}

.image-center {
  margin: auto;
  display: block;
}

.image-left {
  float: left;
  width: 50%;

  @media (max-width: 768px) {
    float: none;
    margin: auto;
    display: block;
    width: 100%;
  }
}

.image-right {
  width: 50%;
  float: right;

  @media (max-width: 768px) {
    float: none;
    margin: auto;
    display: block;
    width: 100%;
  }
}

A themes/hugo-tufte/.gitignore => themes/hugo-tufte/.gitignore +57 -0
@@ 0,0 1,57 @@
## custom

/_drafts/

## macos

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

## hugo

*.patch

# Generated files by hugo
/public/
exampleSite/public/*
/resources/_gen/
/exampleSite/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Node
package-lock.json
node_modules

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
.hugo_build.lock

A themes/hugo-tufte/CHANGELOG.md => themes/hugo-tufte/CHANGELOG.md +46 -0
@@ 0,0 1,46 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] - 2021-11-03
### Fixed 
- Fixed Two deprecation warnings for _normalize-mixin.scss 

### Changed
- Replaced normalize.scss with a cdn link to normalize.css
## [0.1.2] - 2021-08-21
### Changed
- There is no css files anymore, all the css is generated from scss, except for the hugo-tufte-override.css of course (70c7b91) [#15](https://github.com/slashformotion/hugo-tufte/issues/15)

### Fixed
- An icon wasn't showing in the navbar menu (c8bc5f6) [#26](https://github.com/slashformotion/hugo-tufte/issues/26)

### Deprecated
- Some parts of Feather.js support remained in the code, they are now removed. (472bb3d) [#32](https://github.com/slashformotion/hugo-tufte/issues/32)
## [0.1.1] - 2021-08-15
### Added
- Markdown styling support in the following shortcodes 
    - `marginnote` (4e38a13) [#18](https://github.com/slashformotion/hugo-tufte/issues/18)
    - `blockquote` (628637b) [#20](https://github.com/slashformotion/hugo-tufte/issues/20)
    - `epigraph` (628637b) [#20](https://github.com/slashformotion/hugo-tufte/issues/20)
    - `newthought` (628637b) [#20](https://github.com/slashformotion/hugo-tufte/issues/20)
    - `sidenote` (628637b) [#20](https://github.com/slashformotion/hugo-tufte/issues/20)

### Note
- The link to the repo in the footer is now pointing at https://github.com/slashformotion/hugo-tufte (ccb1ac0) [#22](https://github.com/slashformotion/hugo-tufte/issues/22)
## [0.1.0] - 2021-08-14
### Added
- All of the [Tufte-css](https://github.com/edwardtufte/tufte-css) feature via [shortcodes](https://github.com/slashformotion/hugo-tufte#shortcodes). 
- Support out of the box for social media links( github, gitlab, twitter, patreon, youtube, medium, reddit, stackoverflow, instagram, mastodon, orcid, google_scholar).
- Support for custom navbar and footer links.
- Support for  mathematical typesetting (LaTex) support via [katex](https://katex.org/) or [MathJax](https://www.mathjax.org). 

[Unreleased]: https://github.com/slashformotion/hugo-tufte/compare/v0.1.2...HEAD
[0.1.2]: https://github.com/slashformotion/hugo-tufte/releases/tag/v0.2.0
[0.1.2]: https://github.com/slashformotion/hugo-tufte/releases/tag/v0.1.2
[0.1.1]: https://github.com/slashformotion/hugo-tufte/releases/tag/v0.1.1
[0.1.0]: https://github.com/slashformotion/hugo-tufte/releases/tag/v0.1.0
\ No newline at end of file

A themes/hugo-tufte/LICENSE.md => themes/hugo-tufte/LICENSE.md +20 -0
@@ 0,0 1,20 @@
The MIT License (MIT)

Copyright (c) 2015 Shawn O'Hare, Slashformotion

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

A themes/hugo-tufte/archetypes/default.md => themes/hugo-tufte/archetypes/default.md +16 -0
@@ 0,0 1,16 @@
---
title: "{{ replace .Name "-" " " | title }}"
subtitle: Fancy Subtitle
author: Totally famous person
date: "{{ .Date }}"
meta: true
math: false
toc: false
hideDate: false
hideReadTime: false
categories: []
draft: true
description: ""
---

<!--more-->

A themes/hugo-tufte/assets/css/modern-normalize.css => themes/hugo-tufte/assets/css/modern-normalize.css +274 -0
@@ 0,0 1,274 @@
/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */

/*
Document
========
*/

/**
Use a better box model (opinionated).
*/

*,
::before,
::after {
	box-sizing: border-box;
}

html {
	/* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */
	font-family:
		system-ui,
		'Segoe UI',
		Roboto,
		Helvetica,
		Arial,
		sans-serif,
		'Apple Color Emoji',
		'Segoe UI Emoji';
	line-height: 1.15; /* 1. Correct the line height in all browsers. */
	-webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */
	-moz-tab-size: 4; /* 3. Use a more readable tab size (opinionated). */
	tab-size: 4; /* 3 */
}

/*
Sections
========
*/

body {
	margin: 0; /* Remove the margin in all browsers. */
}

/*
Grouping content
================
*/

/**
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
*/

hr {
	height: 0; /* 1 */
	color: inherit; /* 2 */
}

/*
Text-level semantics
====================
*/

/**
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr[title] {
	text-decoration: underline dotted;
}

/**
Add the correct font weight in Edge and Safari.
*/

b,
strong {
	font-weight: bolder;
}

/**
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
2. Correct the odd 'em' font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
	font-family:
		ui-monospace,
		SFMono-Regular,
		Consolas,
		'Liberation Mono',
		Menlo,
		monospace; /* 1 */
	font-size: 1em; /* 2 */
}

/**
Add the correct font size in all browsers.
*/

small {
	font-size: 80%;
}

/**
Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
*/

sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

/*
Tabular data
============
*/

/**
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
*/

table {
	text-indent: 0; /* 1 */
	border-color: inherit; /* 2 */
}

/*
Forms
=====
*/

/**
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
*/

button,
input,
optgroup,
select,
textarea {
	font-family: inherit; /* 1 */
	font-size: 100%; /* 1 */
	line-height: 1.15; /* 1 */
	margin: 0; /* 2 */
}

/**
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
	text-transform: none;
}

/**
Correct the inability to style clickable types in iOS and Safari.
*/

button,
[type='button'],
[type='reset'],
[type='submit'] {
	-webkit-appearance: button;
}

/**
Remove the inner border and padding in Firefox.
*/

::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

/**
Restore the focus styles unset by the previous rule.
*/

:-moz-focusring {
	outline: 1px dotted ButtonText;
}

/**
Remove the additional ':invalid' styles in Firefox.
See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
*/

:-moz-ui-invalid {
	box-shadow: none;
}

/**
Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
*/

legend {
	padding: 0;
}

/**
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
	vertical-align: baseline;
}

/**
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
	height: auto;
}

/**
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
	-webkit-appearance: textfield; /* 1 */
	outline-offset: -2px; /* 2 */
}

/**
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
	-webkit-appearance: none;
}

/**
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to 'inherit' in Safari.
*/

::-webkit-file-upload-button {
	-webkit-appearance: button; /* 1 */
	font: inherit; /* 2 */
}

/*
Interactive
===========
*/

/*
Add the correct display in Chrome and Safari.
*/

summary {
	display: list-item;
}

A themes/hugo-tufte/assets/scss/components/brand.scss => themes/hugo-tufte/assets/scss/components/brand.scss +4 -0
@@ 0,0 1,4 @@
.brand {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

A themes/hugo-tufte/assets/scss/components/code-highlight.scss => themes/hugo-tufte/assets/scss/components/code-highlight.scss +78 -0
@@ 0,0 1,78 @@
$ht-code-border-radius: .4em;
.highlight {
    width: 50%;
    overflow-x: scroll;
    // border-radius: $ht-code-border-radius;
    margin-top: 1.4em;
    margin-bottom: 1.4em;
    margin-right: 2.5%;
    margin-left: 2.5%;
    -ms-overflow-style: none;
    scrollbar-width: none;

    &::-webkit-scrollbar {
        display: none;
    }

    code {
        font-size: 1rem;
        display: block;
    }

    &>.chroma {
        margin: 0;
    }

    &>.chroma .hl {
        // border-radius: $ht-code-border-radius / 2;
        display: block;

        &::before{
            content: "> ";
            // font-family: "Noto Emoji";
            font-family: inherit;
            position: absolute;
            left: 0;
            color: #111;
        }
    }

    &>div.chroma>table.lntable{
        overflow: initial;
        // margin: $ht-code-border-radius 0 $ht-code-border-radius 0;
        & td:first-of-type {
            & span:not(& span>span) {
                padding: 0 .75em 0 .5em;
            }
        }

        pre {
            margin-block-start: 0.5em;
            margin-block-end: 0.5em;
        }
    }

    &>.chroma>code {
        width: max-content;
        margin-top: .5em;
        margin-bottom: .5em;
        margin-left: .5em;

        &>span.hl{
            margin-left: -.5em;
            padding-left: .5em;
        }
    }
}


@media screen and (max-width: 760px) {
    .highlight {
        width: 90%;
    }
}

// fix #48 => https://github.com/slashformotion/hugo-tufte/issues/48
ul>li>div.highlight {
    width: 100%;
}

A themes/hugo-tufte/assets/scss/components/meta.scss => themes/hugo-tufte/assets/scss/components/meta.scss +19 -0
@@ 0,0 1,19 @@
/* Content meta-data such as author, publication date, etc. */
.content-meta {
    display: block;
    /*color: rgba(155, 155, 155, 1);*/
    // color: rgba(100, 105, 110, 1);
    font-size: 1.1rem;
    margin-top: 1em;
}

.content-meta .author {
    /*color: rgb(90, 20, 55)*/
    // color: rgba(65, 70, 75, 1);
}

.post-avatar {
    border-radius: 50px;
    float: right;
    margin-left: 1em;
}

A themes/hugo-tufte/assets/scss/components/nav.scss => themes/hugo-tufte/assets/scss/components/nav.scss +24 -0
@@ 0,0 1,24 @@
.menu {
    margin: 1.4rem 0;
}

.menu ul {
    list-style: none;
    display: block;
    padding: 0;
    max-width: 45rem;
    /* Width is the same as tufte.css body */
    font-size: 1.2rem;
    width: 87.5%;
}

.menu li {
    display: inline-block;
    margin-right: 1rem;
}

.menu li a {
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

A themes/hugo-tufte/assets/scss/components/toc.scss => themes/hugo-tufte/assets/scss/components/toc.scss +47 -0
@@ 0,0 1,47 @@
/* We utilize the html5 summary tags in order to create a post archive */
/* with built-in folding. */
details {
    border-radius: 3px;
}

details summary {
    vertical-align: top;
    padding: .3em .5em;
    outline: none;
    /*color: rgba(65, 70, 75, 1);*/
}

details summary.year {
    font-size: 1.5rem;
}

// details[open] summary {
// }


/* Table of Contents */
.toc summary {
    font-size: 1.5rem;
    margin-bottom: -1.5rem;
    padding-left: 0;
}

.toc {
	// float: right;
	/*padding: 0rem 1rem 1rem 1rem;*/
    /*margin-top: 1rem;*/
	// border-left: 1px solid #eee;
}

.toc ul {
	list-style: none;
	display: block;
	/*margin-top: 0.75rem;*/
	padding: 0;
    width: 87.5%;
}

.toc li {
    line-height: 0.5rem;
    margin: 1rem;
}

A themes/hugo-tufte/assets/scss/general.scss => themes/hugo-tufte/assets/scss/general.scss +275 -0
@@ 0,0 1,275 @@
/* ------------------------------------------------------------------------ */
/* hugo-tufte.css */
/* Contains extensions to the original tufte.css styles to */
/* accomodate a blog-like site. */
/* ------------------------------------------------------------------------ */

/* ------------------------------------------------------------------------ */
/* Generic content, such as the index list pages */
/* ------------------------------------------------------------------------ */
:root * {
      text-align: left;
      text-rendering: optimizeLegibility;
}

:focus {
  outline: medium auto currentColor;
  outline: medium auto invert;
  outline: 5px auto -webkit-focus-ring-color;
}

::selection {
    color: #fffff8;
    background-color: #404040;
}

a.heading-anchor {
    display: none;
    visibility: collapse;
}

h2 {
    margin-top: 5.5rem;
}

h2:hover > a.heading-anchor,
h3:hover > a.heading-anchor {
    display: inline;
    visibility: visible;
}

hr {
    text-align: left;
    margin-left: 0;
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    width: 75%;
    max-width: 45rem;
    border-style: solid none none none;
    border-color: #111;
}

kbd {
  border: 1px #111 solid;
  border-radius: 5px;
  padding-right: 2px;
  padding-left: 2px;
}

mark {
    background: #f0d9bb;
}

/* ------------------------------------------------------------------------ */
/* Styling for listing pages. */
/* ------------------------------------------------------------------------ */
.list-page {
    ul {
        list-style-type: none;
        margin: -0.25em;
        width: 100%;
        max-width: 45rem;
    }
    li {
        margin: 0;
        /*font-size: 95%;*/
    }
}
.list-page .list-date {
    display: inline;
    font-size: 0.75em;
    /* padding-right: 2em; */
    /* margin-right: 2em; */
}

table:not(.lntable) {
    margin-top: 1.4em;
    font-size: 1.4rem;
    width: auto; /* making booktabs style tables the unstyled default in case someone uses Markdown styling */
    /* margin: 0 auto; */
    /* border-spacing: 0px; */
}

table:not(.lntable) tr th {
  border-bottom: 1px solid #111;
  text-transform: uppercase;
}

table:not(.lntable) tr th,
table:not(.lntable) tr td {
    padding-right: 0.5rem;
}

table.lntable {
    td.lntd {
        padding: 0em;
    }
    border-spacing: 0;
    padding: 0;
}

/* ------------------------------------------------------------------------ */
/* Styling for footnotes. */
/* ------------------------------------------------------------------------ */
.footnotes hr {
    margin-top: 4.4em;
}

.footnotes ol {
    width: 55%;
    margin-top: 4.4rem;

    li {
        p {
            width: 100%;
            margin: 0;
            padding: 0;

            a.footnote-backref {
                font-size: 1.2rem;
                text-decoration: none;
            }
        }
    }
}

/* ------------------------------------------------------------------------ */
/* Styling for maths. */
/* ------------------------------------------------------------------------ */

/* mjx-container[jax="CHTML"][display="true"]::-webkit-scrollbar,
.katex-display::-webkit-scrollbar {
  display: none;
}*/

mjx-container[jax="CHTML"][display="true"],
.katex-display {
      overflow: auto;
      overflow-y: hidden;
/*     -ms-overflow-style: none;
    scrollbar-width: none; */
}


/* ------------------------------------------------------------------------ */
/* Styling for margin/side notes. */
/* ------------------------------------------------------------------------ */
.marginnote .marginnote-ind,
.sidenote .sidenote-number {
    margin-right: 5px;
}

/* prevent over-crowding */

.sidenote, .marginnote {
    margin-bottom: 1rem;
}

.sidenote code,
.marginnote code {
    font-size: 0.9rem;
}

/* ------------------------------------------------------------------------ */
/* Styling & fixes for cols. */
/* ------------------------------------------------------------------------ */
// create grid
.row {
  /* mobile */
  display: grid;
  width: 75%;
  gap: 0.3rem;
  margin: 0 0 1rem 0;
}

.row .column:nth-of-type(2n) {
  margin-left: 1rem;
}

.row .column:nth-of-type(3n) {
  margin-left: 2rem;
}

.row .column > p:first-child {
  margin-top: 0;
}

.row .column > p:last-child {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  /* desktop */
  /* https://stackoverflow.com/a/62086985 */
  .row {
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    /* above 2 lines are equivalent as below 1 line */
    /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */
    gap: 1.4rem;
    margin: 0 0 1.4rem 0;
  }
  .row .column {
    margin-left: 0 !important;
  }
}

.column > p {
  width: 100%;
}

.column > p > label.margin-toggle.marginnote-ind {
  display: inline;
}

.column > p > .sidenote,
.column > p > .marginnote {
  display: none;
}

.column > p > .margin-toggle:checked + .sidenote,
.column > p > .margin-toggle:checked + .marginnote {
  display: block;
  float: left;
  left: 1rem;
  clear: both;
  width: 95%;
  margin: 1rem 2.5%;
  vertical-align: baseline;
  position: relative;
}

/* ------------------------------------------------------------------------ */
/* Styling for buttons. */
/* ------------------------------------------------------------------------ */
.btn {
    display: inline-block;
    margin-top: 1.4rem;
}
.btn button {
    font-size: 1.4rem;
}
.btn button .icon {
    font-size: 1.2rem;
}

/* ------------------------------------------------------------------------ */
/* Styling for i18n. */
/* ------------------------------------------------------------------------ */

/* reduce zh & ja font-size to match en */

p:lang(zh), span:lang(zh),
p:lang(ja), span:lang(ja), {
    font-size: 1.2rem;
}

.sidenote:lang(zh),
.marginnote:lang(zh) {
    font-size: 0.5rem;
}

.sidenote:lang(ja),
.marginnote:lang(ja) {
    font-size: 0.9rem;
}

A themes/hugo-tufte/assets/scss/hugo-tufte-options.scss => themes/hugo-tufte/assets/scss/hugo-tufte-options.scss +10 -0
@@ 0,0 1,10 @@
{{ if and (isset .Site.Params "sanssubtitle") .Site.Params.sansSubtitle  }}
h2, h3 {
    font-style: normal;
    font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif, "Noto Emoji";
}
{{ end }}

{{ if and (isset .Site.Params "centerarticle") .Site.Params.centerArticle  }}
// tba
{{ end }}

A themes/hugo-tufte/assets/scss/hugo-tufte.scss => themes/hugo-tufte/assets/scss/hugo-tufte.scss +22 -0
@@ 0,0 1,22 @@
// Tufte
@import "tufte";

// Additional styles for Hugo
@import "general";

/// Pages
@import "pages/footer";

/// Components
@import "components/code-highlight";
@import "components/toc";
@import "components/nav";
@import "components/brand";
@import "components/meta";

// Look at this https://gohugo.io/hugo-pipes/resource-from-template/#readout
{{ if and (isset .Site.Params "codeblocksdark") .Site.Params.codeBlocksDark  }}
@import "syntax/highlight-dark.scss"
{{ else }}
@import "syntax/highlight-light.scss"
{{ end }}

A themes/hugo-tufte/assets/scss/pages/footer.scss => themes/hugo-tufte/assets/scss/pages/footer.scss +42 -0
@@ 0,0 1,42 @@
/* Footer, but with a different name to avoid conflicts with tufte.css */
footer.page-footer{
    margin-top: 1.4rem;
    color: #aaa;
    width: 95%;
    max-width: 45rem;
}
footer.page-footer p {
    font-size: 1.2rem;
    margin: 0em;
    /* light font looked odd on chrome */
    /*font-weight: lighter;*/
}
footer.page-footer a {
    color: rgba(65, 70, 75, 1);
    text-decoration: none;
    background: transparent;
}
footer.page-footer hr {
    width: 100%;
}

footer.page-footer ul.page-footer-menu {
	list-style: none;
	display: block;
	/*text-align:center;*/
	margin: 0;
	padding: 0;
    width: unset;
}

footer.page-footer ul.page-footer-menu li {
	display: inline-block;
	margin-right: 0.5rem;
	// font-size: 55%;
}

.copyright {
}
.copyright p {
    font-size: 90%;
}

A themes/hugo-tufte/assets/scss/syntax/highlight-dark.scss => themes/hugo-tufte/assets/scss/syntax/highlight-dark.scss +3 -0
@@ 0,0 1,3 @@
$ht-code-bgcolor: #282a36;

@import "syntax-dark.scss";

A themes/hugo-tufte/assets/scss/syntax/highlight-light.scss => themes/hugo-tufte/assets/scss/syntax/highlight-light.scss +3 -0
@@ 0,0 1,3 @@
$ht-code-bgcolor: #dde2ff;

@import "syntax-light.scss";

A themes/hugo-tufte/assets/scss/syntax/syntax-dark.scss => themes/hugo-tufte/assets/scss/syntax/syntax-dark.scss +92 -0
@@ 0,0 1,92 @@
/* Dracula Theme v1.2.5
*
* https://github.com/zenorocha/dracula-theme
*
* Copyright 2016, All rights reserved
*
* Code licensed under the MIT license
* http://zenorocha.mit-license.org
*
* @author Rob G <wowmotty@gmail.com>
* @author Chris Bracco <chris@cbracco.me>
* @author Zeno Rocha <hi@zenorocha.com>
*/

.highlight .lnt { color: #6272a4 } /* line number */
.highlight .hl { background-color: scale-color($ht-code-bgcolor, $lightness: 32%, $saturation: -40%) }
.highlight  { background: $ht-code-bgcolor; color: #f8f8f2 }
.highlight .c { color: #6272a4 } /* Comment */
.highlight .err { color: #f8f8f2 } /* Error */
.highlight .g { color: #f8f8f2 } /* Generic */
.highlight .k { color: #ff79c6 } /* Keyword */
.highlight .l { color: #f8f8f2 } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #ff79c6 } /* Operator */
.highlight .x { color: #f8f8f2 } /* Other */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #6272a4 } /* Comment.Hashbang */
.highlight .cm { color: #6272a4 } /* Comment.Multiline */
.highlight .cp { color: #ff79c6 } /* Comment.Preproc */
.highlight .cpf { color: #6272a4 } /* Comment.PreprocFile */
.highlight .c1 { color: #6272a4 } /* Comment.Single */
.highlight .cs { color: #6272a4 } /* Comment.Special */
.highlight .gd { color: #8b080b } /* Generic.Deleted */
.highlight .ge { color: #f8f8f2; text-decoration: underline } /* Generic.Emph */
.highlight .gr { color: #f8f8f2 } /* Generic.Error */
.highlight .gh { color: #f8f8f2; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #f8f8f2; font-weight: bold } /* Generic.Inserted */
.highlight .go { color: #44475a } /* Generic.Output */
.highlight .gp { color: #f8f8f2 } /* Generic.Prompt */
.highlight .gs { color: #f8f8f2 } /* Generic.Strong */
.highlight .gu { color: #f8f8f2; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #f8f8f2 } /* Generic.Traceback */
.highlight .kc { color: #ff79c6 } /* Keyword.Constant */
.highlight .kd { color: #8be9fd; font-style: italic } /* Keyword.Declaration */
.highlight .kn { color: #ff79c6 } /* Keyword.Namespace */
.highlight .kp { color: #ff79c6 } /* Keyword.Pseudo */
.highlight .kr { color: #ff79c6 } /* Keyword.Reserved */
.highlight .kt { color: #8be9fd } /* Keyword.Type */
.highlight .ld { color: #f8f8f2 } /* Literal.Date */
.highlight .m { color: #bd93f9 } /* Literal.Number */
.highlight .s { color: #f1fa8c } /* Literal.String */
.highlight .na { color: #50fa7b } /* Name.Attribute */
.highlight .nb { color: #8be9fd; font-style: italic } /* Name.Builtin */
.highlight .nc { color: #50fa7b } /* Name.Class */
.highlight .no { color: #f8f8f2 } /* Name.Constant */
.highlight .nd { color: #f8f8f2 } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #f8f8f2 } /* Name.Exception */
.highlight .nf { color: #50fa7b } /* Name.Function */
.highlight .nl { color: #8be9fd; font-style: italic } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #f8f8f2 } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #ff79c6 } /* Name.Tag */
.highlight .nv { color: #8be9fd; font-style: italic } /* Name.Variable */
.highlight .ow { color: #ff79c6 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #bd93f9 } /* Literal.Number.Bin */
.highlight .mf { color: #bd93f9 } /* Literal.Number.Float */
.highlight .mh { color: #bd93f9 } /* Literal.Number.Hex */
.highlight .mi { color: #bd93f9 } /* Literal.Number.Integer */
.highlight .mo { color: #bd93f9 } /* Literal.Number.Oct */
.highlight .sa { color: #f1fa8c } /* Literal.String.Affix */
.highlight .sb { color: #f1fa8c } /* Literal.String.Backtick */
.highlight .sc { color: #f1fa8c } /* Literal.String.Char */
.highlight .dl { color: #f1fa8c } /* Literal.String.Delimiter */
.highlight .sd { color: #f1fa8c } /* Literal.String.Doc */
.highlight .s2 { color: #f1fa8c } /* Literal.String.Double */
.highlight .se { color: #f1fa8c } /* Literal.String.Escape */
.highlight .sh { color: #f1fa8c } /* Literal.String.Heredoc */
.highlight .si { color: #f1fa8c } /* Literal.String.Interpol */
.highlight .sx { color: #f1fa8c } /* Literal.String.Other */
.highlight .sr { color: #f1fa8c } /* Literal.String.Regex */
.highlight .s1 { color: #f1fa8c } /* Literal.String.Single */
.highlight .ss { color: #f1fa8c } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2; font-style: italic } /* Name.Builtin.Pseudo */
.highlight .fm { color: #50fa7b } /* Name.Function.Magic */
.highlight .vc { color: #8be9fd; font-style: italic } /* Name.Variable.Class */
.highlight .vg { color: #8be9fd; font-style: italic } /* Name.Variable.Global */
.highlight .vi { color: #8be9fd; font-style: italic } /* Name.Variable.Instance */
.highlight .vm { color: #8be9fd; font-style: italic } /* Name.Variable.Magic */
.highlight .il { color: #bd93f9 } /* Literal.Number.Integer.Long */

A themes/hugo-tufte/assets/scss/syntax/syntax-light.scss => themes/hugo-tufte/assets/scss/syntax/syntax-light.scss +70 -0
@@ 0,0 1,70 @@
// .highlight .hl { background-color: #ffffd4 }
// .highlight  { background: $ht-code-bgcolor;}
.highlight .lnt { color: #6a737d } /* line number */
.highlight .c { color: #6a737d } /* Comment */
.highlight .err {  } /* Error */
.highlight .k { color: #d73a49 } /* Keyword */
.highlight .o { } /* Operator */
.highlight .ch { color: #6a737d } /* Comment.Hashbang */
.highlight .cm { color: #6a737d } /* Comment.Multiline */
.highlight .cp { color: #d73a49 } /* Comment.Preproc */
.highlight .cpf { color: #032f62 } /* Comment.PreprocFile */
.highlight .c1 { color: #6a737d } /* Comment.Single */
.highlight .cs { color: #6a737d } /* Comment.Special */
.highlight .gd { color: #b31d28; background-color: #ffeef0 } /* Generic.Deleted */
.highlight .ge {  } /* Generic.Emph */
.highlight .gr {  } /* Generic.Error */
.highlight .gh { color: #005cc5 } /* Generic.Heading */
.highlight .gi { color: #22863a; background-color: #f0fff4 } /* Generic.Inserted */
.highlight .go {  } /* Generic.Output */
.highlight .gp {  } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #6f42c1; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #005cc5 } /* Keyword.Constant */
.highlight .kd { color: #d73a49 } /* Keyword.Declaration */
.highlight .kn { color: #d73a49 } /* Keyword.Namespace */
.highlight .kp { color: #d73a49 } /* Keyword.Pseudo */
.highlight .kr { color: #d73a49 } /* Keyword.Reserved */
.highlight .kt { color: #d73a49 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #032f62 } /* Literal.String */
.highlight .na { } /* Name.Attribute */
.highlight .nb { color: #005cc5 } /* Name.Builtin */
.highlight .nc { color: #6f42c1 } /* Name.Class */
.highlight .no { color: #005cc5 } /* Name.Constant */
.highlight .nd { color: #6f42c1 } /* Name.Decorator */
.highlight .ni { color: #005cc5 } /* Name.Entity */
.highlight .ne { color: #005cc5 } /* Name.Exception */
.highlight .nf { color: #6f42c1 } /* Name.Function */
.highlight .nl { color: #005cc5 } /* Name.Label */
.highlight .nn { color: #6f42c1 } /* Name.Namespace */
.highlight .nt { color: #22863a } /* Name.Tag */
.highlight .nv { color: #24292e } /* Name.Variable */
.highlight .ow { color: #d73a49; } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #005cc5 } /* Literal.Number.Bin */
.highlight .mf { color: #005cc5 } /* Literal.Number.Float */
.highlight .mh { color: #005cc5 } /* Literal.Number.Hex */
.highlight .mi { color: #005cc5 } /* Literal.Number.Integer */
.highlight .mo { color: #005cc5 } /* Literal.Number.Oct */
.highlight .sa { color: #d73a49 } /* Literal.String.Affix */
.highlight .sb { color: #032f62 } /* Literal.String.Backtick */
.highlight .sc { color: #032f62 } /* Literal.String.Char */
.highlight .dl { color: #d73a49 } /* Literal.String.Delimiter */
.highlight .sd { color: #032f62 } /* Literal.String.Doc */
.highlight .s2 { color: #032f62 } /* Literal.String.Double */
.highlight .se { color: #032f62 } /* Literal.String.Escape */
.highlight .sh { color: #032f62 } /* Literal.String.Heredoc */
.highlight .si { color: #005cc5 } /* Literal.String.Interpol */
.highlight .sx { color: #032f62 } /* Literal.String.Other */
.highlight .sr { color: #032f62 } /* Literal.String.Regex */
.highlight .s1 { color: #032f62 } /* Literal.String.Single */
.highlight .ss { color: #005cc5 } /* Literal.String.Symbol */
.highlight .bp { color: #005cc5 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #005cc5 } /* Name.Function.Magic */
.highlight .vc { color: #24292e } /* Name.Variable.Class */
.highlight .vg { color: #24292e } /* Name.Variable.Global */
.highlight .vi { color: #24292e } /* Name.Variable.Instance */
.highlight .vm { color: #005cc5 } /* Name.Variable.Magic */
.highlight .il { color: #005cc5 } /* Literal.Number.Integer.Long */

A themes/hugo-tufte/assets/scss/tufte.scss => themes/hugo-tufte/assets/scss/tufte.scss +446 -0
@@ 0,0 1,446 @@
/* You can find the original at https://github.com/edwardtufte/tufte-css */

/* Import ET Book styles
   adapted from https://github.com/edwardtufte/et-book/blob/gh-pages/et-book.css */

@charset "UTF-8";

$serif-fonts: et-book, "Noto Serif SC", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif, "Noto Emoji";
$sans-fonts: "Gill Sans", "Gill Sans MT", Calibri, sans-serif, "Noto Emoji";
$mono-fonts: Consolas, "Liberation Mono", Menlo, Courier, monospace, "Noto Emoji";

/* Tufte CSS styles */
html {
    font-size: 15px;
}

body {
    margin-left: auto;
    margin-right: auto;
    padding-left: 12.5%;
    font-family: $serif-fonts;
    background-color: #fffff8;
    color: #111;
    max-width: 1400px;
}

h1, h2, h3 {
    font-weight: 400;
    line-height: 1;
}

h1 {
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-size: 3.2rem;
}

h2, h3 {
    font-style: italic;
    margin-bottom: 0;
}

h2 {
    margin-top: 2.1rem;
    font-size: 2.2rem;
}

h3 {
    font-size: 1.7rem;
    margin-top: 2rem;
}

.author, .date {
  font-size: 1.4rem;
  font-weight: 400;
  margin: 1rem auto 1rem 0;
  line-height: 1;
}

.subtitle {
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    display: block;
    line-height: 1;
}

.numeral {
    font-family: et-book-roman-old-style;
}

.danger {
    color: red;
}

article {
    position: relative;
    padding: 5rem 0rem;
}

section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.page-list .content-title {
    margin-top: 4.2rem;
    margin-bottom: 1.4rem;
}

.page-list .content-title:first-child {
    margin-top: 1.4rem;
}

p,
ol,
ul,
dl {
    font-size: 1.4rem;
}

p {
    line-height: 2rem;
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    padding-right: 0;
    vertical-align: baseline;
    hyphens: auto;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 4;
    -ms-hyphenate-limit-chars: 10 3 4;
    hyphenate-limit-chars: 10 3 4;
}

/* Chapter Epigraphs */
.epigraph {
    margin: 3em 0;
}

.epigraph > blockquote {
    margin-top: 3em;
    margin-bottom: 3em;
}

.epigraph > blockquote {
    font-style: italic;
}

.epigraph > blockquote > footer {
    font-style: normal;
}

.epigraph > blockquote > footer > cite {
    font-style: italic;
}

/* end chapter epigraphs styles */

blockquote {
    font-size: 1.4rem;
}

blockquote p {
    width: 50%;
}

blockquote footer {
    width: 50%;
    font-size: 1.1rem;
    text-align: right !important;
}

ol,
ul,
dl {
    width: 50%;
    -webkit-padding-start: 5%;
    -webkit-padding-end: 5%;
}

li  ul {
    width: 100%;
}

li,
dt, dd {
    padding: 0.5rem 0;
}

dt {
    font-weight: 700;
}

figure {
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    max-width: 55%;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    margin: 0 0 3em 0;
}

figcaption {
    float: right;
    clear: right;
    margin-right: -48%;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    vertical-align: baseline;
    position: relative;
    max-width: 40%;
}

figure.fullwidth figcaption {
    margin-right: 24%;
}

/* Links: replicate underline that clears descenders */
a:link,
a:visited {
    color: inherit;
}

/* Sidenotes, margin notes, figures, captions */
img {
    max-width: 100%;
}

.sidenote,
.marginnote {
    float: right;
    clear: right;
    margin-right: -60%;
    width: 50%;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    vertical-align: baseline;
    position: relative;
}

.table-caption {
    float: right;
    clear: right;
    margin-right: -60%;
    width: 50%;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.marginnote-ind,
.sidenote-number {
    // font-family: et-book-roman-old-style, "Noto Emoji";
    position: relative;
    vertical-align: baseline;
    user-select: none;
}

// note indicator
label.marginnote-ind,
label.sidenote-number {
    font-size: 1rem;
    top: -0.5rem;
    left: 0.1rem;
}

// inside sidenote
span.marginnote-ind,
span.sidenote-number {
    font-size: 1.1rem;
}

p,
footer,
table,
div.table-wrapper-small,
div.supertable-wrapper > p,
div.booktabs-wrapper {
    width: 55%;
}

div.fullwidth,
table.fullwidth {
    width: 100%;
}

div.table-wrapper {
    overflow-x: scroll;
    font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif, "Noto Emoji";
}

@media screen and (max-width: 760px) {
    h2,
    h3,
    p,
    footer {
        width: 90%;
    }
    ul,
    ol,
    dl {
        width: 85%;
    }
    figure {
        max-width: 90%;
    }
    figcaption,
    figure.fullwidth figcaption {
        margin-right: 0%;
        max-width: none;
    }
    blockquote p,
    blockquote footer {
        width: 90%;
    }
}

.sans {
    font-family: $sans-fonts;
    letter-spacing: 0.03em;
}

code,
.code,
kbd {
    font-family: $mono-fonts;
    font-size: 1.125rem;
    line-height: 1.42;
}

h1 .code,
h2 .code,
h3 .code {
    font-size: 0.8em;
}

.marginnote .code,
.sidenote .code {
    font-size: 1rem;
}

pre.code {
    font-size: 0.9rem;
    width: 52.5%;
    padding-left: 2.5%;
    overflow-x: scroll;
}

.fullwidth {
    max-width: 90%;
    clear: both;
}

.newthought {
    font-variant: small-caps;
    font-size: 1.2em;
}

.margin-toggle {
    cursor: pointer;
}

// accessibility feature: make label focus-able
input.margin-toggle {
    position: absolute;
    outline: none;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin-left: 5px;
    margin-top: 5px;
    z-index: -100;
}

label:has(+ input.margin-toggle:focus) {
  outline: medium auto currentColor;
  outline: medium auto invert;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -3px;
}

label.sidenote-number {
    display: inline;
}

label.marginnote-ind {
    display: none;
}

.video-container {
    width: 100%;
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
}

.video {
    width: 55%;
}

.video--16x9 {
    aspect-ratio: 16/9;
}

.video--4x3 {
    aspect-ratio: 4/3;
}

@media (max-width: 760px) {
    label.marginnote-ind {
        display: inline;
    }
    .sidenote,
    .marginnote {
        display: none;
    }
    .margin-toggle:checked + .sidenote,
    .margin-toggle:checked + .marginnote {
        display: block;
        float: left;
        left: 1rem;
        clear: both;
        width: 95%;
        margin: 1rem 2.5%;
        vertical-align: baseline;
        position: relative;
    }
    pre.code {
        width: 90%;
        padding: 0;
    }
    .table-caption {
        display: block;
        float: right;
        clear: both;
        width: 98%;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        margin-left: 1%;
        margin-right: 1%;
        vertical-align: baseline;
        position: relative;
    }
    div.table-wrapper,
    table,
    table.booktabs {
        width: 85%;
    }
    div.table-wrapper {
        border-right: 1px solid #efefef;
    }
    img {
        width: 100%;
    }
    .video {
        width: 90%;
    }
}

A themes/hugo-tufte/config.toml => themes/hugo-tufte/config.toml +4 -0
@@ 0,0 1,4 @@
[module]
    [module.hugoVersion]
    extended = true
    min = "0.83.0"

A themes/hugo-tufte/layouts/404.html => themes/hugo-tufte/layouts/404.html +13 -0
@@ 0,0 1,13 @@
{{ define "main" }}
  <div id="layout" class="pure-g">
    <article class="pure-u-1">
      {{ partial "brand.html" . }}
      
      <section><h2 id="title">Looks like there is a problem in the url... <br/>
        <a href="{{ "" | relURL}}">Go Home ? </a></h2></section>
      <section>
        {{ partial "footer.html" . }}
      </section>
    </article>
  </div>
{{ end }}
\ No newline at end of file

A themes/hugo-tufte/layouts/_default/_markup/render-heading.html => themes/hugo-tufte/layouts/_default/_markup/render-heading.html +4 -0
@@ 0,0 1,4 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
{{ .Text | safeHTML }}
<a href="#{{ .Anchor | safeURL }}" class="heading-anchor">#</a>
</h{{ .Level }}>

A themes/hugo-tufte/layouts/_default/baseof.html => themes/hugo-tufte/layouts/_default/baseof.html +11 -0
@@ 0,0 1,11 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{- partial "header.html" . -}}

<body>

{{ block "main" . }}{{ end }}

</body>

</html>

R layouts/_default/list.atom.xml => themes/hugo-tufte/layouts/_default/list.atom.xml +0 -0
A themes/hugo-tufte/layouts/_default/list.html => themes/hugo-tufte/layouts/_default/list.html +36 -0
@@ 0,0 1,36 @@
{{ define "main" }}

<div id="layout" class="pure-g">
<article class="pure-u-1">

{{ partial "brand.html" . }}
{{ partial "content.header.html" . }}

<section class="list-page">
{{ range .Data.Pages.GroupByDate "2006" }}
  <ul>
  <li class="year">{{ .Key }} ({{ len .Pages }})</li>
    {{ range .Pages.GroupByDate "January" }}
    <ul>
    <li>{{ .Key }} ({{ len .Pages }})</li>
      {{ range .Pages }}
      <ul>
      <li>
        <span class="list-date">{{ .Date.Format "Jan 2" }} &middot;</span>
        <a href="{{ .RelPermalink }}">{{.Title}}</a>
      </li>
      </ul>
      {{ end }}
    </li>
    </ul>
    {{ end }}
  </ul>
  {{ end }}
</section>

{{ partial "footer.html" . }}

</article>
</div>

{{ end }}

A themes/hugo-tufte/layouts/_default/single.html => themes/hugo-tufte/layouts/_default/single.html +15 -0
@@ 0,0 1,15 @@
{{/*  

  This template render single pages 

*/}}

{{ define "main" }}
<article id="main">
  {{ partial "content.header.html" . }}
  {{ partial "toc.html" . }}
  <section>{{ .Content }}</section>
  <section>{{ partial "footer.html" . }}</section>
  <section>{{ partial "nav.html" . }}</section>
</article>
{{ end }}

A themes/hugo-tufte/layouts/_default/summary.html => themes/hugo-tufte/layouts/_default/summary.html +1 -0
@@ 0,0 1,1 @@
{{ .Summary }}

A themes/hugo-tufte/layouts/_default/terms.html => themes/hugo-tufte/layouts/_default/terms.html +64 -0
@@ 0,0 1,64 @@
{{ partial "header.html" . }}

<body>
<div id="layout" class="pure-g">
<article class="pure-u-1">
{{ partial "brand.html" . }}
{{ partial "content.header.html" . }}
    {{ $data := .Data }}
    <div class="pure-g">
      <div class="pure-u-1 pure-u-sm-1-2">
        <h2>By Frequency</h2>
        <section>
        <table class="pure-table pure-table-horizontal pure-table-striped">
        <thead>
          <tr>
            <th>Term</th>
            <th>Count</th>
          </tr>
        </thead>
        </tbody>
        {{ range $key, $value := .Data.Terms.ByCount }}
          <tr>
            <td>
            <a href="{{ $value.Name| urlize }}">
            {{ $value.Name}}
            </a>
            </td>
            <td>{{  $value.Count }}</td>
          </tr>
        {{ end }}
        </tbody>
        </table>
      </section>
      </div>

      <div class="pure-u-1 pure-u-sm-1-2">
        <h2>Alphabetically</h2>
        <section>
        <table class="pure-table pure-table-horizontal pure-table-striped">
        <thead>
          <tr>
            <th>Term</th>
            <th>Count</th>
          </tr>
        </thead>
        </tbody>
        {{ range $key, $value := .Data.Terms.Alphabetical}}
          <tr>
            <td><a href="{{ $value.Name| urlize }}">
              {{ $value.Name}}
            </a></td>
            <td>{{  $value.Count }}</td>
          </tr>
        {{ end }}
        </tbody>
        </table>
        </section>
      </div>
    </div>
{{ partial "footer.html" . }}
</article>
</div>
</body>
</html>

A themes/hugo-tufte/layouts/index.html => themes/hugo-tufte/layouts/index.html +55 -0
@@ 0,0 1,55 @@
{{ define "main" }}
<article id="main" class="home-page">
{{ partial "brand.html" . }}
{{ with .Content }}
  <section>
  {{ . }}
  </section>
{{ end }}
<section class="page-list">
{{ $pgFilter1 := where .Site.RegularPages "Draft" false }}
{{ $pgFilter2 := where .Site.RegularPages "Params.date" "!=" nil }}
{{ $pgFilter := $pgFilter1 | intersect $pgFilter2 }}
{{ range (.Paginate $pgFilter).Pages }}
  <h2 class="content-title">
  {{ if .IsNode }}
  <a href="{{ .Permalink }}">{{ .Title}}</a>
  {{ else }}
  <a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }}&nbsp;:: Draft{{end}}</a>
  {{ end }}
  </h2>

  {{ if .Description }}
  <p>{{ .Description }}</p>
  {{ else }}
  {{ if .Site.Params.showSummary }}
  <p>{{ truncate 140 .Summary }}</p>
  {{ end }}
  {{ end }}
{{ end }}
</section>

{{ if and (.Paginator) (gt .Paginator.TotalPages 1) }}
<hr />

<span class="previous-page">
{{ if .Paginator.HasPrev }}
<a class="link-reverse" href="{{.Paginator.Prev.URL}}">«</a>
{{ end }}
</span>

<span class="pagination-indicator">
{{.Paginator.PageNumber}} / {{.Paginator.TotalPages}}
</span>

<span class="next-page">
{{ if .Paginator.HasNext }}
<a class="link-reverse" href="{{.Paginator.Next.URL}}">»</a>
{{ end }}
</span>

{{ end }}

{{ partial "footer.html" . }}
</article>
{{ end }}

A themes/hugo-tufte/layouts/partials/brand.html => themes/hugo-tufte/layouts/partials/brand.html +6 -0
@@ 0,0 1,6 @@
<header class="brand">
<h1>{{ .Site.Title}}</h1>
<p class="subtitle">{{ .Site.Params.subtitle }}</p>
{{ partial "nav.html" . }}
<hr />
</header>

A themes/hugo-tufte/layouts/partials/content.header.html => themes/hugo-tufte/layouts/partials/content.header.html +29 -0
@@ 0,0 1,29 @@
<section>
<h1 class="content-title">
{{- .Title -}}{{- if .Draft -}}&nbsp;:: Draft{{- end -}}
</h1>

{{- if (.IsSection) -}}
  <p><a href="{{.Site.BaseURL}}{{.Section}}/atom.xml">RSS feed</a></p>
{{- end -}}

{{- if .Params.subtitle -}}
<p class=subtitle>{{ .Params.subtitle }}</p>
{{- end -}}

{{- if .IsPage -}}
<span class="content-meta">
  {{- if not .Params.hidedate -}}
  <p class="date">{{ .Date.Format "02 Jan 2006" }}</p>
  {{- end -}}

  {{- if not .Params.hidereadtime -}}
  <span>{{ .ReadingTime }} min read&nbsp;</span>
  {{- end -}}

  {{- range .Params.tags -}}
  <a href="{{ "/tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>&nbsp;
  {{- end -}}
</span>
{{- end -}}
</section>

A themes/hugo-tufte/layouts/partials/footer.html => themes/hugo-tufte/layouts/partials/footer.html +92 -0
@@ 0,0 1,92 @@
<footer class="page-footer">
<hr />

<div class="previous-post" style="display:inline-block;">
  {{ if .PrevPage }}
  <a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a>
  {{ end }}
</div>

<div class="next-post", style="display:inline-block;float:right;">
  {{ if .NextPage }}
  <a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a>
  {{ end }}
</div>

<ul class="page-footer-menu">
  {{/* SOCIALS */}}
  {{ if isset .Site.Params "twitter" }}
  <li><a href="https://twitter.com/{{.Site.Params.twitter}}">Twitter</a></li>
  {{ end }}

  {{ if isset .Site.Params "github" }}
  <li><a href="https://github.com/{{.Site.Params.github}}">GitHub</a></li>
  {{ end }}

  {{ if isset .Site.Params "gitlab" }}
  <li><a href="https://gitlab.com/{{.Site.Params.gitlab}}">GitLab</a></li>
  {{ end }}

  {{ if isset .Site.Params "patreon" }}
  <li><a href="https://www.patreon.com/{{.Site.Params.patreon}}">Patreon</i></a></li>
  {{ end }}

  {{ if isset .Site.Params "youtube" }}
  <li><a href="https://www.youtube.com/{{.Site.Params.youtube}}">YouTube</a></li>
  {{ end }}

  {{ if isset .Site.Params "medium" }}
  <li><a href="https://medium.com/{{.Site.Params.medium}}">Medium</a></li>
  {{ end }}

  {{ if isset .Site.Params "reddit" }}
  <li><a href="https://www.reddit.com/user/{{.Site.Params.reddit}}">Reddit</a></li>
  {{ end }}

  {{ if isset .Site.Params "stackoverflow" }}
  <li><a href="https://stackoverflow.com/users/{{.Site.Params.stackoverflow}}?tab=profile">StackOverflow</a></li>
  {{ end }}

  {{ if isset .Site.Params "instagram" }}
  <li><a href="https://www.instagram.com/{{.Site.Params.instagram}}">Instagram</a></li>
  {{ end }}

  {{ if isset .Site.Params "mastodon" }}
  <li><a href="https://{{.Site.Params.mastodon}}">Mastodon</a></li>
  {{ end }}

  {{ if isset .Site.Params "orcid" }}
  <li><a href="https://orcid.org/{{.Site.Params.orcid}}">ORCID</a></li>
  {{ end }}

  {{ if isset .Site.Params "google_scholar" }}
  <li><a href="https://scholar.google.com/citations?user={{.Site.Params.google_scholar}}">Google Scholar</a></li>
  {{ end }}
  {{/* END SOCIALS */}}
  {{ range .Site.Menus.footer }}
    <li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
  {{ end }}
</ul>

{{ if .Site.Params.showPoweredBy}}
<p>
  Powered by <a href="https://gohugo.io">Hugo</a> and the
  <a href="https://github.com/loikein/hugo-tufte">Tufte theme</a>.
</p>
{{ end }}

{{ if or ( isset .Site.Params "copyright" ) ( isset .Site.Params "copyrightHolder" ) }}
<div class="copyright">
<p>
  {{ with .Site.Params.copyright }}
  {{ . | safeHTML }}
  {{ else }}
  &copy; {{now.Format "2006"}}
  {{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
  All rights reserved.
  {{end}}
</p>
</div>
{{ end }}

</footer>

A themes/hugo-tufte/layouts/partials/header.html => themes/hugo-tufte/layouts/partials/header.html +16 -0
@@ 0,0 1,16 @@
<head>
<title>{{ .Title  }} - {{ .Site.Title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="description"
    content="{{ with .Description }}{{ . }}{{ else }}{{ with .Summary }}{{ . }}{{ else }}{{ .Site.Params.description }}{{end }}{{ end }} ">
<link rel="canonical" href="{{ .Permalink }}" />
<!-- favicon -->
{{ if .Site.Params.favicon }}
<link rel="icon" href="{{ .Site.Params.favicon | absURL }}" />
{{ end }}
{{ if .Site.Params.touchicon }}
<link rel="apple-touch-icon" href="{{ .Site.Params.touchicon | absURL }}" />
{{ end }}
  {{ partial "header.includes.html" . }}
</head>

A themes/hugo-tufte/layouts/partials/header.includes.html => themes/hugo-tufte/layouts/partials/header.includes.html +28 -0
@@ 0,0 1,28 @@
<!-- Pure css -->
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" crossorigin="anonymous" /> -->

<!-- Fonts -->
<!-- <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans"> -->
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface"> -->
<!-- <link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> -->

<!-- asynchronously load Google Fonts -->
<!-- https://csswizardry.com/2020/05/the-fastest-google-fonts/#google-fonts-async-snippet -->

<!-- Font Awesome -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.css"> -->

{{ $modernoptions := (dict "targetPath" "/css/modern-normalize.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $modernstyle := resources.Get "css/modern-normalize.css" | resources.ToCSS $modernoptions }}
<link rel="stylesheet" href="{{ $modernstyle.Permalink | relURL }}">


{{ $htoptions := (dict "targetPath" "/css/hugo-tufte.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $htstyle := resources.Get "scss/hugo-tufte.scss"| resources.ExecuteAsTemplate "main.scss" .  | resources.ToCSS $htoptions }}
<link rel="stylesheet" href="{{ $htstyle.Permalink | relURL }}">

{{ $ht_o_options := (dict "targetPath" "/css/hugo-tufte-options.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $ht_o_style := resources.Get "scss/hugo-tufte-options.scss"| resources.ExecuteAsTemplate "main.scss" .  | resources.ToCSS $ht_o_options }}
<link rel="stylesheet" href="{{ $ht_o_style.Permalink | relURL }}">

<link rel="stylesheet" href="{{ "/css/hugo-tufte-override.css" | relURL }}">

A themes/hugo-tufte/layouts/partials/nav.html => themes/hugo-tufte/layouts/partials/nav.html +7 -0
@@ 0,0 1,7 @@
<nav class="menu">
    <ul>
    {{ range .Site.Menus.nav  }}
        <li><a href="{{ .URL }}">{{ .Pre }}{{ .Name }}</a></li>
    {{ end }}
    </ul>
</nav>

A themes/hugo-tufte/layouts/partials/shortcodes/button.html => themes/hugo-tufte/layouts/partials/shortcodes/button.html +60 -0
@@ 0,0 1,60 @@
{{- $context := .context -}}
{{- $color := .color | default "" -}}
{{- $content := .content -}}
{{- $href := (trim .href " ") | default "" -}}
{{- $style := .style | default "default" -}}
{{- if and (not $color) (eq (len $color) 0) -}}
  {{- $style = .style | default "transparent" -}}
{{- end -}}
{{- $target := .target | default "" -}}
{{- $type := .type | default "" -}}
{{- $isButton := false -}}
{{- if or (not $href) (strings.HasPrefix $href "javascript:") -}}
  {{- $isButton = true -}}
  {{- $href = substr $href (len "javascript:") -}}
  {{- if not $type -}}
    {{- $type = "button" -}}
  {{- end -}}
{{- else if and (eq (len $target) 0) (or (strings.HasPrefix $href "http://") (strings.HasPrefix $href "https://") ) -}}
  {{- $target = "_blank" -}}
  {{- if isset $context.Site.Params "externallinktarget" -}}
    {{- $target = $context.Site.Params.externalLinkTarget -}}
  {{- end -}}
{{- end }}
{{- $title := .title | default ($content) | default ($style | T) -}}
{{- $title = trim $title " " -}}
{{- $icon := .icon | default "" -}}
{{- if and (not $icon) (eq (len $icon) 0) -}}
  {{- if eq $style "info" -}}{{ $icon = default "info-circle" }}{{- end -}}
  {{- if eq $style "warning" -}}{{ $icon = default "exclamation-triangle" }}{{- end -}}
  {{- if eq $style "note" -}}{{ $icon = default "exclamation-circle" }}{{- end -}}
  {{- if eq $style "tip" -}}{{ $icon = default "lightbulb" }}{{- end -}}
{{- end -}}
{{- $icon = trim $icon " " -}}
{{- $iconposition := .iconposition | default "left" -}}
{{- with $context -}}
<span class="btn {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>

{{ if $isButton -}}
<button{{ if $href }} onclick="{{ $href | safeJS }}"{{ end }}{{ if gt (len $type) 0 }} type="{{ $type }}"{{ end }}>
{{ else -}}
<a{{ if $href }} href="{{ $href }}"{{ if gt (len $target) 0 }} target="{{ $target }}"{{ end }}{{ end }}>
{{- end -}}

  {{ if and $icon (eq $iconposition "left") -}}
  <span class="icon">{{- $icon -}}</span>
  {{- end -}}
  {{- $title | safeHTML -}}
  {{ if and $icon (eq $iconposition "right") -}}
  <span class="icon">{{- $icon -}}</span>
  {{- end -}}

{{ if $isButton -}}
</button>
{{ else -}}
</a>
{{ end -}}
</span>
{{- end -}}

{{/* https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/shortcodes/button.html */}}

A themes/hugo-tufte/layouts/partials/social.html => themes/hugo-tufte/layouts/partials/social.html +1 -0
@@ 0,0 1,1 @@
<!-- nav and social can go here -->

A themes/hugo-tufte/layouts/partials/toc.html => themes/hugo-tufte/layouts/partials/toc.html +8 -0
@@ 0,0 1,8 @@
{{ if .Params.toc  }}
<section>
  <details closed class="toc">
    <summary>Table of Contents</summary>
    {{ .TableOfContents }}
  </details>
</section>
{{ end  }}

A themes/hugo-tufte/layouts/robots.txt => themes/hugo-tufte/layouts/robots.txt +7 -0
@@ 0,0 1,7 @@
User-agent: *
{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }}
Allow: /
{{- else }}
Disallow: /
{{- end }}
Sitemap: {{ "sitemap.xml" | absURL }}
\ No newline at end of file

A themes/hugo-tufte/layouts/shortcodes/blockquote.html => themes/hugo-tufte/layouts/shortcodes/blockquote.html +8 -0
@@ 0,0 1,8 @@
<blockquote cite="{{ .Get "cite" }}">
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
<footer>
{{- with .Get "author" -}}{{ . }}{{- end -}}
{{- with .Get "cite" -}}, <cite>{{ . | markdownify }}</cite>{{- end -}}
{{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}}
</footer>
</blockquote>

A themes/hugo-tufte/layouts/shortcodes/button.html => themes/hugo-tufte/layouts/shortcodes/button.html +15 -0
@@ 0,0 1,15 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/button.html" (dict
  "context"       .
  "color"         (.Get "color")
  "content"       .Inner
  "href"          (.Get "href")
  "icon"          (.Get "icon")
  "iconposition"  ((.Get "iconposition") | default (.Get "icon-position"))
  "style"         (.Get "style")
  "title"         (.Get "title")
  "target"        (.Get "target")
  "type"          (.Get "type")
) }}

{{/* https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/shortcodes/button.html */}}

A themes/hugo-tufte/layouts/shortcodes/cite.html => themes/hugo-tufte/layouts/shortcodes/cite.html +1 -0
@@ 0,0 1,1 @@
<cite>{{ .Inner }}</cite>

A themes/hugo-tufte/layouts/shortcodes/cols.html => themes/hugo-tufte/layouts/shortcodes/cols.html +12 -0
@@ 0,0 1,12 @@
{{ $cols := split .Inner "||" }}

{{ $lang := .Get "lang" | default ( .Get 0 ) }}
{{ $lang := split $lang "," }}

<span class="row">
{{ range $indCol,$col := $cols }}
   <span class="column" {{ with $lang }} lang="{{ index $lang $indCol }}"{{ end }}>
   {{ . | $.Page.RenderString (dict "display" "block") }}
   </span>
{{ end }}
</span>

A themes/hugo-tufte/layouts/shortcodes/div.html => themes/hugo-tufte/layouts/shortcodes/div.html +8 -0
@@ 0,0 1,8 @@
{{ $loc := .Get 0  }}
{{ if .IsNamedParams }}
  <div {{with .Get "class"}} class="{{.}}"{{end}}{{with .Get "id"}} id="{{.}}"{{end}}>
{{ else if or (eq $loc "") (eq $loc "begin") }}
  <div>
{{ else if eq $loc "end" }}
  </div>
{{ end }}

A themes/hugo-tufte/layouts/shortcodes/epigraph.html => themes/hugo-tufte/layouts/shortcodes/epigraph.html +12 -0
@@ 0,0 1,12 @@
<div class="epigraph">
<blockquote>
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
{{ if .IsNamedParams }}
    <footer>
    {{- with .Get "author" -}}{{ . }}{{- end -}}
    {{- with .Get "cite" -}}, <cite>{{ . | markdownify }}</cite>{{- end -}}
    {{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}}
    </footer>
{{ end }}
</blockquote>
</div>

A themes/hugo-tufte/layouts/shortcodes/figure.html => themes/hugo-tufte/layouts/shortcodes/figure.html +62 -0
@@ 0,0 1,62 @@
{{ $alt := .Get "alt" | default "Image" }}
{{ $type := .Get "type" | default "normal" }}
{{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}}

<!-- get a default label just in case -->
{{- $label := printf "%#v" (add .Ordinal 1) | printf "%s%s" "marginfig-" | printf "%s" -}}
{{- if .Get "label" -}}
{{- $label = .Get "label" -}}
{{- end -}}

<!-- begin figure tag -->
{{- if not (eq $type "margin") -}}
  {{ if eq $type "full" }}<!-- full -->
    <figure class="fullwidth">
  {{ else }}<!-- normal -->
    <figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
  {{ end }}
{{- end -}}

<!-- begin child elements -->
{{- if eq $type "full" -}}<!-- child for full -->
  {{ with .Get "link" }}<a href="{{ . }}">{{ end }}
  <img src="{{ .Get "src" }}" alt="{{ $alt }}">
  {{ if .Get "link" }}</a>{{ end }}
  <figcaption>
{{- else -}}<!--  child for margin or normal (begin) -->

  {{- if or (or (.Get "caption") (.Get "attr")) (eq $type "margin") -}}<!-- begin marginnote -->
    <label for="{{ $label }}" class="margin-toggle marginnote-ind">{{ $ind }}</label>
    <input type="checkbox" id="{{ $label }}" class="margin-toggle"/>
    <span class="marginnote">
  {{- end -}}

  {{- if eq $type "margin" -}}<!-- margin image inside marginnote -->
    {{ with .Get "link" }}<a href="{{ . }}">{{ end }}
    <img src="{{ .Get "src" }}" alt="{{ $alt }}">
    {{ if .Get "link" }}</a>{{ end }}
  {{- end -}}

{{- end -}}<!--  child for margin or normal (end) -->

{{ with .Get "title"}}<strong>{{ . | markdownify }}. </strong>{{ end}}
{{ with .Get "caption"}}{{ . | markdownify }}{{ end }}
{{ with .Get "attr" }}{{ . | markdownify }}.{{ end }}

<!-- end child elements -->
{{ if eq $type "full" }}<!-- end full -->
  </figcaption>
{{ else }}<!--  end margin or normal -->
  {{- if or (or (.Get "caption") (.Get "attr")) (eq $type "margin") -}}</span>{{- end -}}<!-- end marginnote -->
{{ end }}

{{ if (eq $type "normal") }}
  {{ with .Get "link" }}<a href="{{ . }}">{{ end }}
  <img src="{{ .Get "src" }}" alt="{{ $alt }}">
  {{ if .Get "link" }}</a>{{ end }}
{{ end }}

<!-- end figure tag -->
{{ if not (eq $type "margin") }}
</figure>
{{ end }}

A themes/hugo-tufte/layouts/shortcodes/image.html => themes/hugo-tufte/layouts/shortcodes/image.html +37 -0
@@ 0,0 1,37 @@
{{/* possible sizes */}}
{{ $sizes := (slice "480" "800" "1200" "1500") }}

{{ $side := .Get "side" | default "center" }}
{{ $src := resources.Get (.Get "src") }}
{{ $caption := .Inner | default "" }}

<div class="image image-{{- $side -}}">
  <figure>
    <img
      sizes="(min-width: 35em) 1500px, 100vw"

      {{/* Only resize if the image width size is bigger than the resize size. */}}
      srcset='
        {{ range $sizes }}
          {{ if ge $src.Width . }}
            {{ ($src.Resize (printf "%sx" .)).Permalink }} {{ (printf "%sw" .) }},
          {{ end }}
        {{ end }}'

      {{/* when no support for srcset (old browsers, RSS), we load small (800px) */}}
      {{/* if image smaller than 800, then load the image itself */}}
      {{ if ge $src.Width "800" }}
        src="{{ ($src.Resize "800x").Permalink }}"
      {{ else }}
        src="{{ $src.Permalink }}"
      {{ end }}
      alt="{{- $caption -}}" loading="lazy"/>

    <figcaption>
      {{ if $caption }}
        <em>{{ $caption | markdownify }}</em>
      {{ end }}
      (<a href="{{ $src.Permalink }}">full size</a>)
    </figcaption>
  </figure>
</div>

A themes/hugo-tufte/layouts/shortcodes/marginnote.html => themes/hugo-tufte/layouts/shortcodes/marginnote.html +12 -0
@@ 0,0 1,12 @@
{{- with $.Page.Scratch.Get "marginnoteCounter" -}}
{{- $.Page.Scratch.Set "marginnoteCounter" (add . 1) -}}
{{- else -}}
{{- $.Page.Scratch.Set "marginnoteCounter" 1 -}}
{{- end -}}
{{- $label := $.Page.Scratch.Get "marginnoteCounter" -}}
{{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}}
<label for="marginnote-{{ $label }}" class="margin-toggle marginnote-ind">{{ $ind }}</label>
<input type="checkbox" id="marginnote-{{ $label }}" class="margin-toggle"/>
<span class="marginnote"{{ with .Get "lang" }} lang="{{ . }}"{{ end }}>
{{ .Inner | markdownify}}
</span>

A themes/hugo-tufte/layouts/shortcodes/newthought.html => themes/hugo-tufte/layouts/shortcodes/newthought.html +1 -0
@@ 0,0 1,1 @@
<span class="newthought">{{ .Inner | markdownify }}</span>

A themes/hugo-tufte/layouts/shortcodes/section.html => themes/hugo-tufte/layouts/shortcodes/section.html +9 -0
@@ 0,0 1,9 @@
{{ $loc := .Get 0  }}
{{ if .IsNamedParams }}
  <section {{with .Get "class"}} class="{{.}}"{{end}}{{with .Get "id"}} id="{{.}}"{{end}}>
{{ else if or (eq $loc "") (eq $loc "begin") }}
  <section>
{{ else if eq $loc "end" }}
  </section>
{{ end }}
    

A themes/hugo-tufte/layouts/shortcodes/sidenote.html => themes/hugo-tufte/layouts/shortcodes/sidenote.html +11 -0
@@ 0,0 1,11 @@
{{- with $.Page.Scratch.Get "sidenoteCounter" -}}
{{- $.Page.Scratch.Set "sidenoteCounter" (add . 1) -}}
{{- else -}}
{{- $.Page.Scratch.Set "sidenoteCounter" 1 -}}
{{- end -}}
{{- $label := $.Page.Scratch.Get "sidenoteCounter" -}}
<label for="sidenote-{{ $label }}" class="margin-toggle sidenote-number">({{ $label }})</label>
<input type="checkbox" id="sidenote-{{ $label }}" class="margin-toggle"/>
<span class="sidenote"{{ with .Get "lang" }} lang="{{ . }}"{{ end }}>
<span class="sidenote-number">({{ $label }})</span>{{ .Inner | markdownify }}
</span>

A themes/hugo-tufte/layouts/shortcodes/tag.html => themes/hugo-tufte/layouts/shortcodes/tag.html +5 -0
@@ 0,0 1,5 @@
{{ if .IsNamedParams }}
  <{{ .Get "name" }}{{with .Get "class"}} class="{{.}}"{{end}}{{with .Get "id"}} id="{{.}}"{{end}}>
{{ else }}
  <{{ .Get 0 }}>
{{ end }}

A themes/hugo-tufte/layouts/shortcodes/youtube.html => themes/hugo-tufte/layouts/shortcodes/youtube.html +9 -0
@@ 0,0 1,9 @@
{{ $id := .Get "id" | default (.Get 0) }}
{{ $4x3 := .Get "4x3" | default "false" }}
{{ $title := .Get "title" | default "YouTube Video" }}

<div class="video-container">
<iframe
class="video {{ with $4x3 }}{{ if eq . "true" }}video--4x3{{ else }}video--16x9{{ end }}{{ end }}"
src="https://www.youtube-nocookie.com/embed/{{ $id }}?cc_load_policy=1&cc=1{{ with .Get "start" }}&start={{ . }}{{ end }}{{ with .Get "end" }}&end={{ . }}{{ end }}" allowfullscreen title="{{ $title }}" frameborder="0" sandbox="allow-same-origin allow-scripts" loading="lazy"></iframe>
</div>

A themes/hugo-tufte/theme.toml => themes/hugo-tufte/theme.toml +14 -0
@@ 0,0 1,14 @@
name = "Tufte"
license = "MIT"
licenselink = "https://github.com/loikein/hugo-tufte/blob/main/LICENSE.md"
description = "A minimalist blog theme using Tufte-css."
homepage = "https://github.com/loikein/hugo-tufte"
demo = "https://slashformotion.github.io/hugo-tufte/"
tags = ["blog", "tufte", "minimal", 'light', "personal"]
features = ["math", "tufte-css", "tufte"]
min_version = 0.83

authors = [
  {name = "Shawn O'Hare", homepage = "http://www.shawnohare.com"},
  {name = "Slashformotion", homepage = "https://github.com/slashformotion"}
]