diff --git a/blog/themes/hugo-tufte/CHANGELOG.md b/blog/themes/hugo-tufte/CHANGELOG.md new file mode 100644 index 0000000..f89e866 --- /dev/null +++ b/blog/themes/hugo-tufte/CHANGELOG.md @@ -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 diff --git a/blog/themes/hugo-tufte/CONTRIBUTING.md b/blog/themes/hugo-tufte/CONTRIBUTING.md new file mode 100644 index 0000000..03ec608 --- /dev/null +++ b/blog/themes/hugo-tufte/CONTRIBUTING.md @@ -0,0 +1,66 @@ +# Introduction + +> First off, thank you for considering contributing to Hugo-Tufte! + + +# Ground Rules + +- Respect the [Code of conduct]() +- ***If you just have a question use this [Discussion](https://github.com/slashformotion/hugo-tufte/discussions).*** + + +# How to report a bug + +### Tell your contributors how to file a bug report. +You can even include a template so people can just copy-paste (again, less work for you). + +When filing an issue, make sure to answer these five questions: + +1. What version of Go are you using (`$ hugo version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + + +# How to suggest a feature or enhancement + +If you find yourself wishing for a feature that doesn't exist in hugo-tufte, you are probably not alone. There are bound to be others out there with similar needs. Open an issue on our issues list on GitHub which describes the feature you would like to see, why you need it, and how it should work. + +# Your First Contribution + +
+ +![](https://media.giphy.com/media/3oEduFYRfaeS6KViN2/giphy.gif) + +
+ +Learn how pull request works here: +- https://makeapullrequest.com +- http://www.firsttimersonly.com/ + +> Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). + + + +>At this point, you're ready to make your changes! Feel free to ask for help [here](https://github.com/slashformotion/hugo-tufte/discussions); everyone is a beginner at first :smile_cat: +> +>If a maintainer **(me)** asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge. + +# Getting started to contribute with code + +1. Create your own fork of the code +2. Do the changes in your fork +3. If you like the change and think the project could use it: + * Be sure that you didn't break anything. + +
+ +![](https://media.giphy.com/media/3o7btNa0RUYa5E7iiQ/giphy-downsized.gif) + +
+ + +# Community + +You can chat with me [here](https://github.com/slashformotion/hugo-tufte/discussions). diff --git a/blog/themes/hugo-tufte/LICENSE.md b/blog/themes/hugo-tufte/LICENSE.md new file mode 100644 index 0000000..c6470a2 --- /dev/null +++ b/blog/themes/hugo-tufte/LICENSE.md @@ -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. diff --git a/blog/themes/hugo-tufte/Makefile b/blog/themes/hugo-tufte/Makefile new file mode 100644 index 0000000..4e33e26 --- /dev/null +++ b/blog/themes/hugo-tufte/Makefile @@ -0,0 +1,16 @@ +# VARIABLE +SCSS_DIR := "assets/scss/vendor" + +# LIST OF THE COMMANDS +help: + @echo "Commands available:" + @echo "- 'rebuild': rebuild the public directory in the 'exampleSite'" + +# COMMANDS +rebuild: + @rm -rf exampleSite/public + @cd exampleSite && hugo && cd .. + @echo "SITE REBUILT" + +chroma: + hugo gen chromastyles --style=monokai > assets/scss/syntax/syntax-dark.scss \ No newline at end of file diff --git a/blog/themes/hugo-tufte/README.md b/blog/themes/hugo-tufte/README.md new file mode 100644 index 0000000..1a8a1fb --- /dev/null +++ b/blog/themes/hugo-tufte/README.md @@ -0,0 +1,130 @@ +# Tufte Hugo Theme + +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md) [![Test Build](https://github.com/loikein/hugo-tufte/actions/workflows/test-build.yml/badge.svg)](https://github.com/loikein/hugo-tufte/actions/workflows/test-build.yml) [![Netlify Status](https://api.netlify.com/api/v1/badges/0a3e11e2-0209-40bb-8570-c3eb9b8471dc/deploy-status)](https://app.netlify.com/sites/huto-tufte/deploys) + +## History of this project + +Hugo-Tufte is a minimalist blog-like theme for the +[static site generator Hugo](https://gohugo.io) that +attempts to be a faithful implementation of the +[Tufte-css](https://github.com/edwardtufte/tufte-css) project. The current version supports mathematical typesetting via [KaTeX](https://katex.org/). + +- The original repo: [shawnohare/hugo-tufte](https://github.com/shawnohare/hugo-tufte) +- Second repo: [slashformotion/hugo-tufte](https://github.com/slashformotion/hugo-tufte) +- This ([loikein/hugo-tufte](https://github.com/loikein/hugo-tufte)) is now the _de facto_ third repo although my original intension was only to make a few tweaks. + +## Quickstart + +### Prerequisite: Hugo Extended + +You'll need to install Hugo Extended for this theme to test it locally, since this theme uses SCSS. + +- On Windows: + - Using [Chocolatey](https://chocolatey.org/): + ```shell + choco install hugo-extended # remember, you might need admin privs + ``` +- On macOS: + + Using [Homebrew](https://brew.sh/): + ```shell + brew install hugo + ``` + +### Check out the example site + +```shell +git clone https://github.com/loikein/hugo-tufte.git +cd hugo-tufte/exampleSite +hugo server --buildDrafts --disableFastRender +``` + +Then open `localhost:1313` or wherever it says in browser. + +The showcase posts are: + +- `The big old test page` +- `Tufte CSS` + +### For a new site + +```shell +hugo new site +cd /themes/ +git clone https://github.com/loikein/hugo-tufte.git +``` + +Add `theme: 'hugo-tufte'` to your `config.yaml` to let your site know to actually use _this_ theme, specifically. + +Then run `hugo server --buildDrafts --disableFastRender` and open `localhost:1313` or wherever it says in browser. + +## Features + +### Math + +In this version, I use [Yihui Xie's method](https://yihui.org/en/2018/07/latex-math-markdown/) to support (almost) seamless LaTeX rendering with [KaTeX](https://katex.org/). + +For usage and examples, refer to [./exampleSite/content/posts/tufte-features.md ](https://github.com/loikein/hugo-tufte/blob/main/exampleSite/content/posts/tufte-features.md). + +Downside: LaTeX in post title is no longer supported. + +### Site Parameters + +`params` for this theme are: + +- `subtitle` string: If set, displayed under the main title. +- `showPoweredBy` boolean: If `true`, display a shoutout to Hugo and this theme. +- `copyrightHolder` string: Inserts the value in the default copyright notice. +- `copyright` string: Custom copyright notice. +- `math` boolean: Site wide kill switch for Latex support +- `codeBlocksDark` boolean: If `true`, code blocks will use a dark theme. +- `marginNoteInd` string: (NEW) Custom indicator for margin notes, with suggestions in comment. (Only displayed on mobile devices or inside `cols` shortcode.) +- `sansSubtitle` boolean: If `true`, all subtitles (`h2` \& `h3`) will use up-right and sans-serif font. (As seen in _Visual Display of Quantitative Information_.) +- (`centerArticle` boolean: Not implemented yet) + +**Socials** + +_(The followings have not been tested for this repo, use at your own risk.)_ + +You can add links to your social media profile by using thoses parameters: + +- `github`: string +- `gitlab`: string +- `twitter`: string +- `linkedin`: string +- `patreon`: string +- `youtube`: string +- `medium`: string +- `reddit`: string +- `stackoverflow`: string +- `instagram`: string +- `mastodon`: string +- `orcid`: string +- `google_scholar`: string + +Please see [`exampleSite/config.yaml`](https://github.com/loikein/hugo-tufte/blob/main/exampleSite/config.yaml#L47) to see the full implementation with exemples. + +### Page Parameters + +- `math` boolean: If `true`, try to render the page's LaTeX code using KaTeX. +- `meta` boolean: If `true`, display page metadata such as author, date, categories. + + `hideDate` boolean: If `true`, do not display a page date in metadata. + + `hideReadTime` boolean: if `true`, do not display the page's reading time + estimate in metadata. +- `toc` boolean: if true, display the table of contents for the page. +- Layout parameters: (NEW) + + For more information, see [Hugo's Lookup Order | Hugo](https://gohugo.io/templates/lookup-order/). + + `type` string: If set to `book`, layout files in [./layouts/book/](https://github.com/loikein/hugo-tufte/tree/main/layouts/book) will be prioritised. + + `layout` string: If set, layout files with the name of this field's value will be prioritised. + +### Shortcodes + +This theme provides the following shortcodes in an attempt to completely +support all the features present in the [Tufte-css](https://github.com/edwardtufte/tufte-css) project. + +For usage and examples, refer to [./exampleSite/content/posts/tufte-features.md ](https://github.com/loikein/hugo-tufte/blob/main/exampleSite/content/posts/tufte-features.md). + +- `blockquote` +- `div` +- `epigraph` +- `marginnote` +- `sidenote` diff --git a/blog/themes/hugo-tufte/archetypes/default.md b/blog/themes/hugo-tufte/archetypes/default.md new file mode 100644 index 0000000..1e08347 --- /dev/null +++ b/blog/themes/hugo-tufte/archetypes/default.md @@ -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: "" +--- + + diff --git a/blog/themes/hugo-tufte/assets/latex-fix.js b/blog/themes/hugo-tufte/assets/latex-fix.js new file mode 100644 index 0000000..2b10161 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/latex-fix.js @@ -0,0 +1,22 @@ +(function() { + var i, text, code, codes = document.getElementsByTagName('code'); + for (i = 0; i < codes.length;) { + code = codes[i]; + if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0 && !(code.classList.contains("nolatex")) ) { + text = code.textContent; + if (/^\$[^$]/.test(text) && /[^$]\$$/.test(text)) { + text = text.replace(/^\$/, '\\(').replace(/\$$/, '\\)'); + code.textContent = text; + } + if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) || + /^\$(.|\s)+\$$/.test(text) || + /^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) { + code.outerHTML = code.innerHTML; // remove + continue; + } + } + i++; + } +})(); + +// https://yihui.org/en/2018/07/latex-math-markdown/ diff --git a/blog/themes/hugo-tufte/assets/scss/components/brand.scss b/blog/themes/hugo-tufte/assets/scss/components/brand.scss new file mode 100644 index 0000000..7fdb514 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/components/brand.scss @@ -0,0 +1,4 @@ +.brand { + padding-top: 1rem; + padding-bottom: 1rem; +} diff --git a/blog/themes/hugo-tufte/assets/scss/components/code-highlight.scss b/blog/themes/hugo-tufte/assets/scss/components/code-highlight.scss new file mode 100644 index 0000000..305457f --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/components/code-highlight.scss @@ -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%; +} diff --git a/blog/themes/hugo-tufte/assets/scss/components/meta.scss b/blog/themes/hugo-tufte/assets/scss/components/meta.scss new file mode 100644 index 0000000..1ad7b8d --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/components/meta.scss @@ -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; +} diff --git a/blog/themes/hugo-tufte/assets/scss/components/nav.scss b/blog/themes/hugo-tufte/assets/scss/components/nav.scss new file mode 100644 index 0000000..605a0e6 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/components/nav.scss @@ -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; +} diff --git a/blog/themes/hugo-tufte/assets/scss/components/toc.scss b/blog/themes/hugo-tufte/assets/scss/components/toc.scss new file mode 100644 index 0000000..f0ea1cd --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/components/toc.scss @@ -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; +} diff --git a/blog/themes/hugo-tufte/assets/scss/general.scss b/blog/themes/hugo-tufte/assets/scss/general.scss new file mode 100644 index 0000000..c8c3d11 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/general.scss @@ -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: 87.5%; + 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; +} diff --git a/blog/themes/hugo-tufte/assets/scss/hugo-tufte-options.scss b/blog/themes/hugo-tufte/assets/scss/hugo-tufte-options.scss new file mode 100644 index 0000000..c33ecd9 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/hugo-tufte-options.scss @@ -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 }} diff --git a/blog/themes/hugo-tufte/assets/scss/hugo-tufte.scss b/blog/themes/hugo-tufte/assets/scss/hugo-tufte.scss new file mode 100644 index 0000000..c26f8ac --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/hugo-tufte.scss @@ -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 }} diff --git a/blog/themes/hugo-tufte/assets/scss/pages/footer.scss b/blog/themes/hugo-tufte/assets/scss/pages/footer.scss new file mode 100644 index 0000000..927c9ab --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/pages/footer.scss @@ -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%; +} diff --git a/blog/themes/hugo-tufte/assets/scss/syntax/highlight-dark.scss b/blog/themes/hugo-tufte/assets/scss/syntax/highlight-dark.scss new file mode 100644 index 0000000..ac10397 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/syntax/highlight-dark.scss @@ -0,0 +1,3 @@ +$ht-code-bgcolor: #282a36; + +@import "syntax-dark.scss"; diff --git a/blog/themes/hugo-tufte/assets/scss/syntax/highlight-light.scss b/blog/themes/hugo-tufte/assets/scss/syntax/highlight-light.scss new file mode 100644 index 0000000..472f4b7 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/syntax/highlight-light.scss @@ -0,0 +1,3 @@ +$ht-code-bgcolor: #dde2ff; + +@import "syntax-light.scss"; diff --git a/blog/themes/hugo-tufte/assets/scss/syntax/syntax-dark.scss b/blog/themes/hugo-tufte/assets/scss/syntax/syntax-dark.scss new file mode 100644 index 0000000..3a4640a --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/syntax/syntax-dark.scss @@ -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 +* @author Chris Bracco +* @author Zeno Rocha +*/ + +.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 */ diff --git a/blog/themes/hugo-tufte/assets/scss/syntax/syntax-light.scss b/blog/themes/hugo-tufte/assets/scss/syntax/syntax-light.scss new file mode 100644 index 0000000..0a199a0 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/syntax/syntax-light.scss @@ -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 */ diff --git a/blog/themes/hugo-tufte/assets/scss/tufte.scss b/blog/themes/hugo-tufte/assets/scss/tufte.scss new file mode 100644 index 0000000..a701941 --- /dev/null +++ b/blog/themes/hugo-tufte/assets/scss/tufte.scss @@ -0,0 +1,495 @@ +/* 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"; + +@font-face { + font-family: "et-book"; + src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot"); + src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"), + url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"), + url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"), + url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbookromanosf") format("svg"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: "et-book"; + src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot"); + src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") + format("embedded-opentype"), + url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") + format("woff"), + url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") + format("truetype"), + url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbookromanosf") + format("svg"); + font-weight: normal; + font-style: italic; +} + +@font-face { + font-family: "et-book"; + src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot"); + src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"), + url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"), + url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"), + url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbookromanosf") format("svg"); + font-weight: bold; + font-style: normal; +} + +@font-face { + font-family: "et-book-roman-old-style"; + src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot"); + src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") + format("embedded-opentype"), + url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"), + url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"), + url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbookromanosf") format("svg"); + font-weight: normal; + font-style: normal; +} + +$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: 45%; + -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%; + } +} diff --git a/blog/themes/hugo-tufte/code_of_conduct.md b/blog/themes/hugo-tufte/code_of_conduct.md new file mode 100644 index 0000000..015d7cf --- /dev/null +++ b/blog/themes/hugo-tufte/code_of_conduct.md @@ -0,0 +1,134 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +slashformotion[at]protonmail[dot].com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations + diff --git a/blog/themes/hugo-tufte/config.toml b/blog/themes/hugo-tufte/config.toml new file mode 100644 index 0000000..9eee913 --- /dev/null +++ b/blog/themes/hugo-tufte/config.toml @@ -0,0 +1,4 @@ +[module] + [module.hugoVersion] + extended = true + min = "0.83.0" diff --git a/blog/themes/hugo-tufte/exampleSite/config.yaml b/blog/themes/hugo-tufte/exampleSite/config.yaml new file mode 100644 index 0000000..9fe28a2 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/config.yaml @@ -0,0 +1,113 @@ +# Set your theme here +theme: hugo-tufte +# Remove this if your site folder is not inside the theme folder +themesDir: "../.." +# The language of your website (see https://www.andiamo.co.uk/resources/iso-language-codes/ for reference) +languageCode: en-US +# If you write Chinese, Japanese or Korean, this helps with word counting +hasCJKLanguage: true +# The url of your website +baseurl: "https://hugo-tufte.netlify.app/" +# The title of your website (shown on all the pages) +title: "Hugo-Tufte Theme Example Site" +canonifyurls: true +# Number of posts per page on the home page +paginate: 5 + +# Only modify the following if you know what you are doing +markup: + goldmark: + renderer: + unsafe: true + highlight: + noClasses: false + guessSyntax: true + +params: + # Subtitle of the website + subtitle: "Fancy subtitle." + 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 + # Site wide kill switch for post summary on home page + showSummary: true + # Site wide kill switch for LaTeX support + math: true + KaTeXVersion: 0.16.4 + KaTeXCDN: "//cdn.jsdelivr.net/npm" + # #### Control style flavours of the website + # Use upright & sans-serif font for subtitles + sansSubtitle: false + # Make the page centred in screen + centerArticle: false + # ######## Common social website links, please comment the unused ones. + # (if your favorite one is not in the list, please head to the footer menu below and add an entry) + # Please note that some of the value below are only provided as an exemple, perhaps the computed isn't valid + # github: slashformotion + # gitlab: slashformotion + # linkedin: + # twitter: slashformotion + # patreon: '' + # youtube: user/ChromeDevelopers # check the end of your youtube url https://www.youtube.com/ + # medium: slashformotion + # reddit: Slashformotion + # stackoverflow: 16609732/slashformotion + # instagram: google + # mastodon: instance.url/@username + # orcid: 0000-0003-0634-3275 + # google_scholar: jm5QaHkAAAAJ + +taxonomies: + category: categories + series: series + tag: tags + +# ----------------------------------------------------------------------- +# Navigation menu +# ----------------------------------------------------------------------- +menu: + nav: + - name: Home + weight: -110 + identifier: home + url: / + - name: Posts + weight: -100 + identifier: posts + url: /posts/ + - name: A-Book + weight: -95 + identifier: book + url: /a-book/ + - name: Categories + weight: -90 + identifier: categories + url: /categories/ + - name: About + weight: -80 + identifier: about + url: /about/ + - name: Source Code + weight: -70 + identifier: github + url: "https://github.com/loikein/hugo-tufte" +# ----------------------------------------------------------------------- +# FOOTER MENU +# If you need to add custom links to you footer: put them here. +# ----------------------------------------------------------------------- + # footer: + # - name: Custom footer link + # weight: -90 + # identifier: custom_link + # url: 'https://example.com' diff --git a/blog/themes/hugo-tufte/exampleSite/content/_index.md b/blog/themes/hugo-tufte/exampleSite/content/_index.md new file mode 100644 index 0000000..c315938 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/_index.md @@ -0,0 +1,4 @@ +--- +title: Home +--- +In actual sites, drafts will not be built (unless you choose to). diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/_index.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/_index.md new file mode 100644 index 0000000..4705d2f --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/_index.md @@ -0,0 +1,17 @@ +--- +title: Probably A Book +subtitle: Best book ever! +type: book +layout: all +draft: true +--- +This is a layout showcase for: + +```yaml +type: book +layout: all +``` + +Change `all` to `volumes` to hide chapters. + +Below lists all volumes and chapters in this book alphabetically. If you see repetitions, just restart the hugo server and it should be fixed. diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/ch-0.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/ch-0.md new file mode 100644 index 0000000..102d019 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/ch-0.md @@ -0,0 +1,3 @@ +--- +title: Chapter 0. Preface +--- diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/_index.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/_index.md new file mode 100644 index 0000000..f138787 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/_index.md @@ -0,0 +1,13 @@ +--- +title: Volume 1. Good Volume +type: book +layout: chapters +--- +This is a layout showcase for: + +```yaml +type: book +layout: chapters +``` + +Below lists all chapters in this volume alphabetically. If you see repetitions, just restart the hugo server and it should be fixed. diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/vol-1-ch-1.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/vol-1-ch-1.md new file mode 100644 index 0000000..bf860b7 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/vol-1-ch-1.md @@ -0,0 +1,3 @@ +--- +title: Chapter 1. Good Chapter +--- diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/vol-1-ch-2.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/vol-1-ch-2.md new file mode 100644 index 0000000..e52cc6e --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-1/vol-1-ch-2.md @@ -0,0 +1,3 @@ +--- +title: Chapter 2. Better Chapter +--- diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/_index.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/_index.md new file mode 100644 index 0000000..8b6c40b --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/_index.md @@ -0,0 +1,14 @@ +--- +title: Volume 2. Cool Volume +type: book +layout: chapters +draft: true +--- +This is a layout showcase for: + +```yaml +type: book +layout: chapters +``` + +Below lists all chapters in this volume alphabetically. If you see repetitions, just restart the hugo server and it should be fixed. diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-1.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-1.md new file mode 100644 index 0000000..25c6a0e --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-1.md @@ -0,0 +1,3 @@ +--- +title: Chapter 3. Cool Chapter +--- diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-2.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-2.md new file mode 100644 index 0000000..28eeab4 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-2.md @@ -0,0 +1,3 @@ +--- +title: Chapter 4. Cooler Chapter +--- diff --git a/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-3.md b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-3.md new file mode 100644 index 0000000..b089e60 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/a-book/vol-2/vol-2-ch-3.md @@ -0,0 +1,4 @@ +--- +title: Chapter 5. Coolest Chapter +draft: true +--- diff --git a/blog/themes/hugo-tufte/exampleSite/content/about.md b/blog/themes/hugo-tufte/exampleSite/content/about.md new file mode 100644 index 0000000..72b64aa --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/about.md @@ -0,0 +1,8 @@ +--- +title: "About This Site" +hasMath: false +_build: + list: never +--- + +This is the example site for [hugo-tufte](https://github.com/loikein/hugo-tufte), a theme for the static site generator [Hugo](https://gohugo.io/). diff --git a/blog/themes/hugo-tufte/exampleSite/content/posts/blockquote.md b/blog/themes/hugo-tufte/exampleSite/content/posts/blockquote.md new file mode 100644 index 0000000..afcf999 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/posts/blockquote.md @@ -0,0 +1,38 @@ +--- +author: Hiro Protagonist +date: '2015-01-19T23:57:58-08:00' +hasMath: false +title: Blockquotes +--- + +Below is a blockquote. + +> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, +> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. +> +> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse +> id sem consectetuer libero luctus adipiscing. + + + +Now we have nested blockquotes. + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +And finally a blockquote with some markdown. + +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> ```sh +> return shell_exec("echo $input | $markdown_script"); +> ``` diff --git a/blog/themes/hugo-tufte/exampleSite/content/posts/more-maths.md b/blog/themes/hugo-tufte/exampleSite/content/posts/more-maths.md new file mode 100644 index 0000000..ff8911e --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/posts/more-maths.md @@ -0,0 +1,65 @@ +--- +author: AUTHOR NAME +date: '2021-07-20T13:56:01-08:00' +type: post +title: More math +subtitle: 'Wow this really works !' +toc: true +math: true +categories: + - katex + - latex + - tufte-css +--- +A compilation of `$\LaTeX$` formulas... + + +## Matrix + +`$$ +\begin{matrix} +\alpha& \beta^{*}\\ +\gamma^{*}& \delta +\end{matrix} +$$` + + +` +$$ +\begin{bmatrix} +\alpha& \beta^{*}\\ +\gamma^{*}& \delta +\end{bmatrix} +$$ +` + + + +` +$$ +\begin{Vmatrix} +\alpha& \beta^{*}\\ +\gamma^{*}& \delta +\end{Vmatrix} +$$ +` + +## Limits + +`$$ +\lim_{n \to \infty} + \sum_{k=1}^n \frac{1}{k^2} + = \frac{\pi^2}{6} +$$` + + +`$$ +\lim_{n \to \infty} + \frac{1}{x^n} + = 0 +$$` + +## Various symbols + +`$$\lambda,\xi,\pi,\theta, +\mu,\Phi,\Omega,\Delta$$` diff --git a/blog/themes/hugo-tufte/exampleSite/content/posts/new.md b/blog/themes/hugo-tufte/exampleSite/content/posts/new.md new file mode 100644 index 0000000..2eb5eff --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/posts/new.md @@ -0,0 +1,27 @@ +--- +title: "Just another sample post" +date: "2014-03-29" +description: "This should be a more useful description" +categories: + - "hugo" + - "fun" + - "test" +--- + +## First heading + +| Tables | Are | Cool | +|:---------|:-------------:|------:| +| col 1 is | left-aligned | $1600 | +| col 2 is | centered | $12 | +| col 3 is | right-aligned | $1 | + +Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus, consequatur aspernatur omnis iste. Voluptates, id inventore ea natus ab sed amet ipsa ratione sunt dignissimos. Soluta illum aliquid repellendus recusandae. + +### Sub heading + +Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio, perferendis saepe voluptatem a nesciunt architecto voluptas deleniti dolor tempora quasi quidem odit rem fugit magnam minima quam dolores vel id? + +## Conclusion + +Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis, numquam ipsa ad! Quasi, deleniti quae sint consequatur error corporis dicta inventore alias soluta dignissimos? Molestias, quia ab deserunt repellat ut. diff --git a/blog/themes/hugo-tufte/exampleSite/content/posts/nodate.md b/blog/themes/hugo-tufte/exampleSite/content/posts/nodate.md new file mode 100644 index 0000000..3616fe8 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/posts/nodate.md @@ -0,0 +1,11 @@ ++++ +title = "Hide Date" +date = "2015-05-15" +hideDate = true +hideReadTime = true + ++++ + +Here is an example post where the date set, but hidden from display. +Moreover, the reading time is also hidden. + diff --git a/blog/themes/hugo-tufte/exampleSite/content/posts/tufte-css.md b/blog/themes/hugo-tufte/exampleSite/content/posts/tufte-css.md new file mode 100644 index 0000000..0dbc5a5 --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/posts/tufte-css.md @@ -0,0 +1,212 @@ +--- +author: Dave Liepmann +date: '2023-04-17T16:03:45+0100' +title: Tufte CSS +# subtitle: A CSS library for creating beautiful Tufte-inspired HTML documents. +meta: true +math: true +toc: false +hideDate: true +hideReadTime: true +# categories: [tufte-css] +--- +Tufte CSS provides tools to style web articles using the ideas demonstrated by Edward Tufte’s books and handouts. Tufte’s style is known for its simplicity, extensive use of sidenotes, tight integration of graphics with text, and carefully chosen typography.{{< marginnote ind="⚠" >}}This demo page is a technical replicate of the original [Tufte CSS](https://edwardtufte.github.io/tufte-css/) page on Edward Tufte's GitHub site. Information may not accurately reflect features of the hugo-tufte theme.{{< /marginnote >}} + +Tufte CSS was created by [Dave Liepmann](http://www.daveliepmann.com) and is now an Edward Tufte project. The original idea was cribbed from [Tufte-`$\LaTeX{}$`](https://tufte-latex.github.io/tufte-latex/) and [R Markdown’s Tufte Handout format](http://rmarkdown.rstudio.com/tufte_handout_format.html). We give hearty thanks to all the people who have contributed to those projects. + +If you see anything that Tufte CSS could improve, we welcome your contribution in the form of an issue or pull request on the GitHub project: [tufte-css](https://github.com/edwardtufte/tufte-css). Please note the [contribution guidelines](https://github.com/edwardtufte/tufte-css#contributing). + +Finally, a reminder about the goal of this project. The web is not print. Webpages are not books. Therefore, the goal of Tufte CSS is not to say “websites should look like this interpretation of Tufte’s books” but rather “here are some techniques Tufte developed that we’ve found useful in print; maybe you can find a way to make them useful on the web”. Tufte CSS is merely a sketch of one way to implement this particular set of ideas. It should be a starting point, not a design goal, because any project should present their information as best suits their particular circumstances. + + +## Getting Started + +To use Tufte CSS, copy `tufte.css` and the `et-book` directory of font files to your project directory, then add the following to your HTML document’s `head` block: + +```html + +``` + +Now you just have to use the provided CSS rules, and the Tufte CSS conventions described in this document. For best results, View Source and Inspect Element frequently. + + +## Fundamentals + +### Sections and Headings + +Organize your document with an `article` element inside your `body` tag. Inside that, use `section` tags around each logical grouping of text and headings. + +Tufte CSS uses `h1` for the document title, `p` with class `subtitle` for the document subtitle, `h2` for section headings, and `h3` for low-level headings. More specific headings are not supported. If you feel the urge to reach for a heading of level 4 or greater, consider redesigning your document: + +{{< blockquote cite="[‘Book design: advice and examples’ thread](http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000hB)" author="Edward Tufte" >}} +\[It is\] notable that the Feynman lectures (3 volumes) write about all of physics in 1800 pages, using only 2 levels of hierarchical headings: chapters and A-level heads in the text. It also uses the methodology of _sentences_ which then cumulate sequentially into _paragraphs_, rather than the grunts of bullet points. Undergraduate Caltech physics is very complicated material, but it didn’t require an elaborate hierarchy to organize. +{{< /blockquote >}} + +As a bonus, this excerpt regarding the use of headings provides an example of block quotes. In Tufte CSS they are just lightly styled, semantically correct HTML using `blockquote` and `footer` elements. See page 20 of [The Visual Display of Quantitative Information](https://www.edwardtufte.com/tufte/books_vdqi) for an example in print. + +{{< newthought >}}In his later books{{< /newthought >}}{{< sidenote >}}_[Beautiful Evidence](http://www.edwardtufte.com/tufte/books_be)_{{< /sidenote >}}, Tufte starts each section with a bit of vertical space, a non-indented paragraph, and the first few words of the sentence set in small caps. For this we use a span with the class newthought, as demonstrated at the beginning of this paragraph. Vertical spacing is accomplished separately through `
` tags. Be consistent: though we do so in this paragraph for the purpose of demonstration, do not alternate use of header elements and the newthought technique. Pick one approach and stick to it. + +### Text + +Although paper handouts obviously have a pure white background, the web is better served by the use of slightly off-white and off-black colors. Tufte CSS uses `#fffff8` and `#111111` because they are nearly indistinguishable from their ‘pure’ cousins, but dial down the harsh contrast. We stick to the greyscale for text, reserving color for specific, careful use in figures and images. + +In print, Tufte has used the proprietary Monotype Bembo{{< sidenote >}}See Tufte’s comment in the [Tufte book fonts](http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000Vt) thread{{< /sidenote >}} font. A similar effect is achieved in digital formats with the now open-source [ETBook](https://github.com/edwardtufte/et-book), which Tufte CSS supplies with a `@font-face` reference to a `.ttf` file. In case ETBook somehow doesn’t work, Tufte CSS shifts gracefully to other serif fonts like Palatino and Georgia. + +Also notice how Tufte CSS includes separate font files for bold (strong) and italic (emphasis), instead of relying on the browser to mechanically transform the text. This is typographic best practice. + +If you prefer sans-serifs, use the sans class. It relies on Gill Sans, Tufte’s sans-serif font of choice. + +Links in Tufte CSS match the body text in color and do not change on mouseover or when clicked. Here is a [dummy example](#) that goes nowhere. These links are underlined, since this is the most widely recognized indicator of clickable text. {{< marginnote ind="⊕" >}}Blue text, while also a widely recognizable clickable-text indicator, is crass and distracting. Luckily, it is also rendered unnecessary by the use of underlining.{{< /marginnote >}} However, because most browsers’ default underlining does not clear descenders and is so thick and distracting, the underline effect is instead achieved using CSS trickery involving background gradients instead of standard `text-decoration`. Credit goes to Adam Schwartz for that technique. + +As always, these design choices are merely one approach that Tufte CSS provides by default. Other approaches can also be made to work. The goal is to make sentences readable without interference from links, as well as to make links immediately identifiable even by casual web users. + + +## Epigraphs + +{{< epigraph author="George Orwell" cite="Politics and the English Language" >}} +The English language… becomes ugly and inaccurate because our thoughts are foolish, but the slovenliness of our language makes it easier for us to have foolish thoughts. +{{< /epigraph >}} + +{{< epigraph author="Richard P. Feynman" cite="What Do You Care What Other People Think?" >}} +For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled. +{{< /epigraph >}} + +{{< epigraph author="Henri Matisse" cite="Henri Matisse Dessins: thèmes et variations" detail=" (Paris, 1943), 37" >}} +I do not paint things, I paint only the differences between things. +{{< /epigraph >}} + +If you’d like to introduce your page or a section of your page with some quotes, use epigraphs. Modeled after chapter epigraphs in Tufte’s books (particularly _Beautiful Evidence_), these are `blockquote` elements with a bit of specialized styling. Quoted text is italicized. The source goes in a `footer` element inside the `blockquote`. We have provided three examples in the epigraph of this section, demonstrating shorter and longer quotes, with and without a paragraph tag, and showing how multiple quotes within an epigraph fit together with the use of a wrapper class. + + +## Sidenotes: Footnotes and Marginal Notes + +One of the most distinctive features of Tufte’s style is his extensive use of sidenotes.{{< sidenote >}}This is a sidenote.{{< /sidenote >}} Sidenotes are like footnotes, except they don’t force the reader to jump their eye to the bottom of the page, but instead display off to the side in the margin. Perhaps you have noticed their use in this document already. You are very astute. + +Sidenotes are a great example of the web not being like print. On sufficiently large viewports, Tufte CSS uses the margin for sidenotes, margin notes, and small figures. On smaller viewports, elements that would go in the margin are hidden until the user toggles them into view. The goal is to present related but not necessary information such as asides or citations _as close as possible_ to the text that references them. At the same time, this secondary information should stay out of the way of the eye, not interfering with the progression of ideas in the main text. + +Sidenotes consist of two elements: a superscript reference number that goes inline with the text, and a sidenote with content. To add the former, just put a label and dummy checkbox into the text where you want the reference to go, like so: + +```html + + +``` + +You must manually assign a reference `id` to each side or margin note, replacing “sn-demo” in the `for` and the `id` attribute values with an appropriate descriptor. It is useful to use prefixes like `sn-` for sidenotes and `mn-` for margin notes. + +Immediately adjacent to that sidenote reference in the main text goes the sidenote content itself, in a `span` with class `sidenote`. This tag is also inserted directly in the middle of the body text, but is either pushed into the margin or hidden by default. Make sure to position your sidenotes correctly by keeping the sidenote-number label close to the sidenote itself. + +If you want a sidenote without footnote-style numberings, then you want a margin note.{{< marginnote ind="⊕" >}}This is a margin note. Notice there isn’t a number preceding the note.{{< /marginnote >}} On large screens, a margin note is just a sidenote that omits the reference number. This lessens the distracting effect taking away from the flow of the main text, but can increase the cognitive load of matching a margin note to its referent text. However, on small screens, a margin note is like a sidenote except its view­ability-toggle is a symbol rather than a reference number. This document currently uses the symbol ⊕ (`⊕`), but it’s up to you. + +Margin notes are created just like sidenotes, but with the `marginnote` class for the content and the `margin-toggle` class for the label and dummy checkbox. For instance, here is the code for the margin note used in the previous paragraph: + +```html + + + + This is a margin note. Notice there isn’t a number preceding the note. + +``` + +Figures in the margin are created as margin notes, as demonstrated in the next section. + + +## Figures + +Tufte emphasizes tight integration of graphics with text. Data, graphs, and figures are kept with the text that discusses them. In print, this means they are not relegated to a separate page. On the web, that means readability of graphics and their accompanying text without extra clicks, tab-switching, or scrolling. + +Figures should try to use the `figure` element, which by default are constrained to the main column. Don’t wrap figures in a paragraph tag. Any label or margin note goes in a regular margin note inside the figure. For example, most of the time one should introduce a figure directly into the main flow of discussion, like so: + +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/exports-imports.png" + caption="From Edward Tufte, Visual Display of Quantitative Information, page 92." + ind="⊕" + label="mn-export-import" + alt="Exports and Imports to and from Denmark & Norway from 1700 to 1780" +>}} + +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/rhino.png" + type="margin" + label="mn-rhino" + caption=`F.J. Cole, “The History of Albrecht Dürer’s Rhinoceros in Zooological Literature,” _Science, Medicine, and History: Essays on the Evolution of Scientific Thought and Medical Practice_ (London, 1953), ed. E. Ashworth Underwood, 337-356. From page 71 of Edward Tufte’s _Visual Explanations_.` + ind="⊕" + alt="Image of a Rhinoceros" +>}} +But tight integration of graphics with text is central to Tufte’s work even when those graphics are ancillary to the main body of a text. In many of those cases, a margin figure may be most appropriate. To place figures in the margin, just wrap an image (or whatever) in a margin note inside a `p` tag, as seen to the right of this paragraph. + +If you need a full-width figure, give it the `fullwidth` class. Make sure that’s inside an `article`, and it will take up (almost) the full width of the screen. This approach is demonstrated below using Edward Tufte’s English translation of the Napoleon’s March data visualization. From _Beautiful Evidence_, page 122-124. + +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/napoleons-march.png" + type="full" + label="mn-napoleonic-wars" + alt="Figurative map of the successive losses of the French Army in the Russian campaign, 1812-1813" +>}} + +One obstacle to creating elegant figures on the web is the difficulty of handling different screen sizes, especially on the fly. Embedded `iframe` elements are particularly troublesome. For these instances we provide a helper class, `iframe-wrapper`, the most common use for which is probably YouTube videos, e.g. + +```html +
+ +
+``` + +{{< youtube id=YslQ2625TR4 title="iPhone Resolution by Edward Tufte" >}} + +You can use this class on a `div` instead of a `figure`, with slightly different results but the same general effect. Experiment and choose depending on your application. + + +## Code + +Technical jargon, programming language terms, and code samples are denoted with the `code` class, as I’ve been using in this document to denote HTML. Code needs to be monospace for formatting purposes and to aid in code analysis, but it must maintain its readability. To those ends, Tufte CSS follows GitHub’s font selection, which shifts gracefully along the monospace spectrum from the elegant but rare Consolas all the way to good old reliable Courier. + +Extended code examples should live in a `code` element within a `pre` element. This adds control over indentation and overflow as well: + +```Clojure +;; Some code examples in Clojure. This is a comment. + +;; applying a function to every item in the collection +(map tufte-css blog-posts) +;;;; if unfamiliar, see http://www.lispcast.com/annotated-map + +;; side-effecty loop (unformatted, causing text overflow) - from https://clojuredocs.org/clojure.core/doseq +(doseq [[[a b] [c d]] (map list (sorted-map :1 1 :2 2) (sorted-map :3 3 :4 4))] (prn (* b d))) + +;; that same side-effecty loop, formatted +(doseq [[[a b] [c d]] (map list + (sorted-map :1 1 :2 2) + (sorted-map :3 3 :4 4))] + (prn (* b d))) + +;; If this proselytizing has worked, check out: +;; http://howistart.org/posts/clojure/1 +``` + + +## ImageQuilts + +Tufte CSS provides support for Edward Tufte and Adam Schwartz’s [ImageQuilts](http://imagequilts.com/).{{< marginnote ind="⚠" >}}It is not maintained as of 2023-04-17.{{< /marginnote >}} See the [ET forum announcement thread](http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0003wk) for more on quilts. Some have ragged edges, others straight. Include these images just as you would any other `figure`. + +This is an ImageQuilt surveying Chinese calligraphy, placed in a full-width figure to accomodate its girth: + +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/imagequilt-chinese-calligraphy.png" + type="full" + alt="Image of Chinese Calligraphy" +>}} + +Here is an ImageQuilt of 47 animal sounds over and over, in a figure constrained to the main text region. This quilt has ragged edges, but the image itself is of course still rectangular. + +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/imagequilt-animal-sounds.png" + alt="Image of animal sounds" +>}} + + +## Epilogue + +Many thanks go to Edward Tufte for leading the way with his work. It is only through his kind and careful editing that this project accomplishes what it does. All errors of implementation are of course mine. diff --git a/blog/themes/hugo-tufte/exampleSite/content/posts/tufte-features.md b/blog/themes/hugo-tufte/exampleSite/content/posts/tufte-features.md new file mode 100644 index 0000000..aac0f4b --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/content/posts/tufte-features.md @@ -0,0 +1,350 @@ +--- +author: Totally famous person +date: '2023-04-16T16:03:45+0100' +title: The big old test page +subtitle: Fancy Subtitle +meta: true +math: true +toc: true +# hideDate: true +# hideReadTime: true +categories: [katex, latex, tufte-css] +description: "If the description field is not empty, its contents will show in the home page instead of the first 140 characters of the post." +--- + +## New features + +### Emoji + +Powered by [Noto Emoji font](https://emojipedia.org/noto-emoji/). + +We really like cats. Yes, they are fluffy and happy. 🐈🐱 + +🪷🫶🤍😊💀🔥 + + +### Button + +{{< button +style="primary" +icon="✅" +href="javascript:javascript:(function(){function checkFrames(w) {try {var inputs = w.document.getElementsByTagName('input');for (var i=0; i < inputs.length; i++) {if (inputs[i].type && inputs[i].type == 'checkbox'){inputs[i].checked = true;}}} catch (e){}if(w.frames && w.frames.length>0){for(var i=0;i}} +Open all notes +{{< /button >}} + +{{< button +style="primary" +icon="❎" +href="javascript:javascript:(function(){function checkFrames(w) {try {var inputs = w.document.getElementsByTagName('input');for (var i=0; i < inputs.length; i++) {if (inputs[i].type && inputs[i].type == 'checkbox'){inputs[i].checked = false;}}} catch (e){}if(w.frames && w.frames.length>0){for(var i=0;i}} +Close all notes +{{< /button >}} + +{{< button +style="primary" +icon="🔄" +href="javascript:javascript:(function(){function checkFrames(w) {try {var inputs = w.document.getElementsByTagName('input');for (var i=0; i < inputs.length; i++) {if (inputs[i].type && inputs[i].type == 'checkbox'){inputs[i].checked = !inputs[i].checked;}}} catch (e){}if(w.frames && w.frames.length>0){for(var i=0;i}} +Toggle all notes +{{< /button >}} + +```html +{{0){for(var i=0;i}} +Toggle all notes +{{}} +``` + + +### Cols (with `lang` option) + +Certain things do not work with this shortcode layout, for example, Markdown's default footnote (like `[^1]`). + +{{< cols "zh-Hans,en,ja" >}} +我是一个懒人。 {{< marginnote >}}这是一个边注。在屏幕很小的时候,它有一个可以点击展开的按钮。{{< /marginnote >}}{{< marginnote ind="🐱" >}}您可以在 `config.yaml` 中修改全站按钮默认设置,也可以使用 `ind` 选项为每一个边注单独设置按钮。{{< /marginnote>}}{{< marginnote ind="⚠" >}}在这个版本中,我提升了可访问性,但不包括[用不了 `:has` 的火狐](https://caniuse.com/css-has)。{{< /marginnote>}} +|| +But sometimes you just have to get your hands dirty. + +This is the joy and the curse of a programmer. {{< sidenote >}}Sidenote numbers are consistent across the whole page. Good numbers.{{< /sidenote >}} +|| +さらに、なんと!日本語もいけます。{{< sidenote >}}読めないのか?私は大丈夫だが。{{< /sidenote >}} +{{< /cols >}} + +```html +{{}} +我是一个懒人。{{}}这是一个边注。{{}} +|| +But sometimes you just have to get your hands dirty.{{}}Good numbers.{{}} +|| +読めないのか?私は大丈夫だが。 +{{}} +``` + + +### YouTube-nocookie + +Never again click things in the video accidentally and it opens YouTube. Oh no. + +{{< youtube id="YslQ2625TR4" title="iPhone Resolution by Edward Tufte" >}} + +```html +{{}} +```` + + +## Tufte features + +### Marginnote and sidenote + +This is what you came here for. {{< marginnote >}}This is a marginnote. It has no indicators on big screens.{{< /marginnote >}} Be honest. {{< sidenote >}}This is a sidenote! It has a little number.{{< /sidenote >}} + +### Epigraph + +{{< epigraph author="Shawn O'Hare" cite="Math is Fun" detail="p.8" >}} +This is an example of an epigraph with some math +`$ \mathbb N \subseteq \mathbb R $` +to start the beginning of a section. +{{< /epigraph >}} + +```html +{{}} +This is an example of an epigraph with some math +`$ \mathbb N \subseteq \mathbb R $` +to start the beginning of a section. +{{}} +``` + +### Blockquote + +Some blockquotes. But first, we try to manually cite via + +This is between cite tags and has math: `$e^x $` {{< sidenote >}}Only use `$\KaTeX{}$`, you must.{{< /sidenote >}} + +{{< blockquote author="Shawn O'Hare" cite="www.shawnohare.com" >}} +This is a blockquote with two paragraphs, that employs the +theme's `blockquote` shortcode. Lorem ipsum dolor sit amet, +consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + +Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse +id sem consectetuer libero luctus adipiscing. +Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. +{{< /blockquote >}} + +```html +{{}} +This is a blockquote with two paragraphs, that employs the +theme's `blockquote` shortcode. Lorem ipsum dolor sit amet, +consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. +... +{{}} +``` + +### Small-caps + +{{< newthought >}}Sometimes a new thought{{< /newthought >}} distinguishes a section, as here. + +```html +{{}}Sometimes a new thought{{}} +``` + +### Figure + +**Regular width figure:** + +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/exports-imports.png" + title="The image title" + label="mn-export-import" + caption="This is the image caption." + attr="[Image attribution](#)" + link="link" +>}} + +```html +{{}} +``` + + +**Margin figure:** + +Margin figures appear on the margin. Highly logical. +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/rhino.png" + type="margin" + label="mn-rhino" + title="The image title" + caption="This is the image caption." + attr="[Image attribution](https://edwardtufte.github.io/tufte-css)" + alt="alt" + link="#" +>}} +Very importantly, they want some text to go with them, either before or after, with only one line break. + +No worries if you forgot to give your figure a `label`. Marginnote (either for figure or with figure inside) will be created if any one of the following conditions is met: + +1. Has `type="margin`; or +2. Has `caption`; or +3. Has `attr`. + +```html {hl_lines=[3]} +{{}} +``` + +**Full-width figure:** + +{{< figure + src="https://github.com/edwardtufte/tufte-css/raw/gh-pages/img/napoleons-march.png" + type="full" + label="mn-napoleonic-wars" + title="Napoleonic wars" + caption="This the image caption." + attr="[Image attribution](#)" + alt="Napoleonic wars" + link="#" +>}} + +```html {hl_lines=[3]} +{{}} +``` + + +## Normal Markdown tests + +Begin [test file](https://gist.github.com/loikein/27ef6913386b206d1b3c18b8e93c5768)… + +### Formatting + +**Bold**, __bold__, **加粗** + +*Italic*, _italic_, *斜体* + +Underline, underline + +Strike, strike, ~~strike~~, ~strike~, --strike-- + +Highlight, =highlight=, ==highlight== + + + +Footnote[^1], footnote[^2] + +[^1]: The linked footnote appears at the end of the document. + +[^2]: New lines + +--- + + +### Lists + +- `ul` +- Unordered list + +1. `ol` +1. Ordered list + +`dl` +: `dt` +: Description list + +- [x] Task list +- [ ] Task list + +### Code + +Inline `code`, `` `escape` ``, and keystroke + +```go {linenos=table,hl_lines=["2-5"],linenostart=199} +package main + +import "log" + +func add(x int, y int) int { + log.Println("We are going to take the sum of two numbers, and leave a long comment.") + return x + y +} + +func main() { + y := add(1, 2) + log.Println(y) +} +``` + +Here's an example without line numbers. + +```go {hl_lines=["2-5"],linenostart=199} +package main + +import "log" + +func add(x int, y int) int { + log.Println("We are going to take the sum of two numbers, and leave a very very very long comment.") + return x + y +} + +func main() { + y := add(1, 2) + log.Println(y) +} +``` + +### Font + +> 我能体に傷つけないで吞下 259 ml glass。 + +> Four score and seven years ago our fathers brought forth upon this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal. + +0 Oo Ii Ll 1 | 2 Z 5 s 8 Bb 6 # * ^ ~ \(\) {} \[\] . , : ; “ ‘ ’ \` + +``` +0 Oo Ii Ll 1 | 2 Z 5 s 8 Bb 6 # * ^ ~ () {} [] . , : ; “ ‘ ’ ` +``` + +### Inline HTML + +ref: https://burk.io/2020/let-there-be-dark + +
#282a36
+ +
#f8f8f2
+ +### LaTeX & Table + +`$\LaTeX{}$` + +`$$R_1 \begin{cases} >\mu_{2} \\ \leq \mu_{2} \end{cases}$$` + +| Message to agent 1 | `$M_1$` | +| ------------------ | -------------- | +| Agent 1's action | `$a_1$` | +| New finding | `$R_1 \begin{cases} >\mu_{2} \\ \leq \mu_{2} \end{cases}$` | diff --git a/blog/themes/hugo-tufte/exampleSite/static/css/hugo-tufte-override.css b/blog/themes/hugo-tufte/exampleSite/static/css/hugo-tufte-override.css new file mode 100644 index 0000000..3d0b1ac --- /dev/null +++ b/blog/themes/hugo-tufte/exampleSite/static/css/hugo-tufte-override.css @@ -0,0 +1 @@ +/* Nothing here yet, (This file is waiting your customizations) */ \ No newline at end of file diff --git a/blog/themes/hugo-tufte/go.mod b/blog/themes/hugo-tufte/go.mod new file mode 100644 index 0000000..b35398f --- /dev/null +++ b/blog/themes/hugo-tufte/go.mod @@ -0,0 +1,3 @@ +module github.com/loikein/hugo-tufte + +go 1.17 diff --git a/blog/themes/hugo-tufte/images/screenshot.png b/blog/themes/hugo-tufte/images/screenshot.png new file mode 100644 index 0000000..ae6c6e2 Binary files /dev/null and b/blog/themes/hugo-tufte/images/screenshot.png differ diff --git a/blog/themes/hugo-tufte/images/tn.png b/blog/themes/hugo-tufte/images/tn.png new file mode 100644 index 0000000..f85f278 Binary files /dev/null and b/blog/themes/hugo-tufte/images/tn.png differ diff --git a/blog/themes/hugo-tufte/layouts/404.html b/blog/themes/hugo-tufte/layouts/404.html new file mode 100644 index 0000000..8ad1f81 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/404.html @@ -0,0 +1,13 @@ +{{ define "main" }} +
+
+ {{ partial "brand.html" . }} + +

Looks like there is a problem in the url...
+ Go Home ?

+
+ {{ partial "footer.html" . }} +
+
+
+{{ end }} \ No newline at end of file diff --git a/blog/themes/hugo-tufte/layouts/_default/_markup/render-heading.html b/blog/themes/hugo-tufte/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..47b7adf --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/_default/_markup/render-heading.html @@ -0,0 +1,4 @@ + +{{ .Text | safeHTML }} +# + diff --git a/blog/themes/hugo-tufte/layouts/_default/baseof.html b/blog/themes/hugo-tufte/layouts/_default/baseof.html new file mode 100644 index 0000000..5574927 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/_default/baseof.html @@ -0,0 +1,16 @@ + + +{{- partial "header.html" . -}} + + + +{{ block "main" . }}{{ end }} + + +{{ if or .Params.math .IsHome }} +{{ partial "math.html" . }} +{{ end }} + + + + diff --git a/blog/themes/hugo-tufte/layouts/_default/list.html b/blog/themes/hugo-tufte/layouts/_default/list.html new file mode 100644 index 0000000..36e1ec7 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/_default/list.html @@ -0,0 +1,36 @@ +{{ define "main" }} + +
+
+ +{{ partial "brand.html" . }} +{{ partial "content.header.html" . }} + +
+{{ range .Data.Pages.GroupByDate "2006" }} +
    +
  • {{ .Key }} ({{ len .Pages }})
  • + {{ range .Pages.GroupByDate "January" }} +
      +
    • {{ .Key }} ({{ len .Pages }})
    • + {{ range .Pages }} +
        +
      • + {{ .Date.Format "Jan 2" }} · + {{.Title}} +
      • +
      + {{ end }} + +
    + {{ end }} +
+ {{ end }} +
+ +{{ partial "footer.html" . }} + +
+
+ +{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/_default/single.html b/blog/themes/hugo-tufte/layouts/_default/single.html new file mode 100644 index 0000000..8179450 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/_default/single.html @@ -0,0 +1,15 @@ +{{/* + + This template render single pages + +*/}} + +{{ define "main" }} +
+ {{ partial "content.header.html" . }} + {{ partial "toc.html" . }} +
{{ .Content }}
+
{{ partial "footer.html" . }}
+
{{ partial "nav.html" . }}
+
+{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/_default/summary.html b/blog/themes/hugo-tufte/layouts/_default/summary.html new file mode 100644 index 0000000..f594868 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/_default/summary.html @@ -0,0 +1 @@ +{{ .Summary }} diff --git a/blog/themes/hugo-tufte/layouts/_default/terms.html b/blog/themes/hugo-tufte/layouts/_default/terms.html new file mode 100644 index 0000000..16cd988 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/_default/terms.html @@ -0,0 +1,64 @@ +{{ partial "header.html" . }} + + +
+
+{{ partial "brand.html" . }} +{{ partial "content.header.html" . }} + {{ $data := .Data }} +
+
+

By Frequency

+
+ + + + + + + + + {{ range $key, $value := .Data.Terms.ByCount }} + + + + + {{ end }} + +
TermCount
+ + {{ $value.Name}} + + {{ $value.Count }}
+
+
+ +
+

Alphabetically

+
+ + + + + + + + + {{ range $key, $value := .Data.Terms.Alphabetical}} + + + + + {{ end }} + +
TermCount
+ {{ $value.Name}} + {{ $value.Count }}
+
+
+
+{{ partial "footer.html" . }} +
+
+ + diff --git a/blog/themes/hugo-tufte/layouts/book/all.html b/blog/themes/hugo-tufte/layouts/book/all.html new file mode 100644 index 0000000..f5c8843 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/book/all.html @@ -0,0 +1,42 @@ +{{ define "main" }} +
+
+ +{{- partial "content.header.html" . -}} + + +{{- with .Content -}} +
+{{ . }} +
+{{- end -}} + +
+ + +{{- if .RegularPages -}} + +{{- end -}} + + + +{{- range .Sections.ByTitle -}} +

{{ .Title }}{{- if .Draft -}} :: Draft{{- end -}}

+ +{{- end -}} +
+ +{{ partial "footer.html" . }} +{{ partial "nav.html" . }} + +
+
+{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/book/chapters.html b/blog/themes/hugo-tufte/layouts/book/chapters.html new file mode 100644 index 0000000..42b105c --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/book/chapters.html @@ -0,0 +1,30 @@ +{{ define "main" }} + +
+
+ +{{ partial "content.header.html" . }} + +{{ with .Content }} +
+{{ . }} +
+{{ end }} + +
+ +
+ +{{ partial "footer.html" . }} +{{ partial "nav.html" . }} + +
+
+ +{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/book/volumes.html b/blog/themes/hugo-tufte/layouts/book/volumes.html new file mode 100644 index 0000000..dc32104 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/book/volumes.html @@ -0,0 +1,44 @@ +{{ define "main" }} + +
+ +
+ +{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/index.html b/blog/themes/hugo-tufte/layouts/index.html new file mode 100644 index 0000000..ba63012 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/index.html @@ -0,0 +1,55 @@ +{{ define "main" }} +
+{{ partial "brand.html" . }} +{{ with .Content }} +
+ {{ . }} +
+{{ end }} +
+{{ $pgFilter1 := where .Site.RegularPages "Draft" false }} +{{ $pgFilter2 := where .Site.RegularPages "Params.date" "!=" nil }} +{{ $pgFilter := $pgFilter1 | intersect $pgFilter2 }} +{{ range (.Paginate $pgFilter).Pages }} +

+ {{ if .IsNode }} + {{ .Title}} + {{ else }} + {{ .Title }}{{ if .Draft }} :: Draft{{end}} + {{ end }} +

+ + {{ if .Description }} +

{{ .Description }}

+ {{ else }} + {{ if .Site.Params.showSummary }} +

{{ truncate 140 .Summary }}

+ {{ end }} + {{ end }} +{{ end }} +
+ +{{ if and (.Paginator) (gt .Paginator.TotalPages 1) }} +
+ + +{{ if .Paginator.HasPrev }} +« +{{ end }} + + + +{{.Paginator.PageNumber}} / {{.Paginator.TotalPages}} + + + +{{ if .Paginator.HasNext }} +» +{{ end }} + + +{{ end }} + +{{ partial "footer.html" . }} +
+{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/partials/brand.html b/blog/themes/hugo-tufte/layouts/partials/brand.html new file mode 100644 index 0000000..eaebca6 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/brand.html @@ -0,0 +1,6 @@ +
+

{{ .Site.Title}}

+

{{ .Site.Params.subtitle }}

+{{ partial "nav.html" . }} +
+
diff --git a/blog/themes/hugo-tufte/layouts/partials/content.header.html b/blog/themes/hugo-tufte/layouts/partials/content.header.html new file mode 100644 index 0000000..d31ebe7 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/content.header.html @@ -0,0 +1,28 @@ +
+

+{{- .Title -}}{{- if .Draft -}} :: Draft{{- end -}} +

+{{- if .Params.subtitle -}} +

{{ .Params.subtitle }}

+{{- end -}} + +{{- if and (.IsPage) (.Params.meta) -}} + +{{- end -}} +
diff --git a/blog/themes/hugo-tufte/layouts/partials/footer.html b/blog/themes/hugo-tufte/layouts/partials/footer.html new file mode 100644 index 0000000..ec9bf12 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/footer.html @@ -0,0 +1,96 @@ +
+
+ + + + + + + +{{ if .Site.Params.showPoweredBy}} +

+ Powered by Hugo and the + Tufte theme. +

+{{ end }} + +{{ if or ( isset .Site.Params "copyright" ) ( isset .Site.Params "copyrightHolder" ) }} + +{{ end }} + +
diff --git a/blog/themes/hugo-tufte/layouts/partials/header.html b/blog/themes/hugo-tufte/layouts/partials/header.html new file mode 100644 index 0000000..980fff8 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/header.html @@ -0,0 +1,16 @@ + +{{ .Title }} - {{ .Site.Title }} + + + + + +{{ if .Site.Params.favicon }} + +{{ end }} +{{ if .Site.Params.touchicon }} + +{{ end }} + {{ partial "header.includes.html" . }} + diff --git a/blog/themes/hugo-tufte/layouts/partials/header.includes.html b/blog/themes/hugo-tufte/layouts/partials/header.includes.html new file mode 100644 index 0000000..1b5f489 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/header.includes.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + +{{ $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 }} + + +{{ $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 }} + + + diff --git a/blog/themes/hugo-tufte/layouts/partials/math.html b/blog/themes/hugo-tufte/layouts/partials/math.html new file mode 100644 index 0000000..0e4c810 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/math.html @@ -0,0 +1,28 @@ + +{{ $script := resources.Get "latex-fix.js" | resources.Minify }} +{{ with $script.Content }} + +{{ end }} + + + + + + diff --git a/blog/themes/hugo-tufte/layouts/partials/nav.html b/blog/themes/hugo-tufte/layouts/partials/nav.html new file mode 100644 index 0000000..616ce5e --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/nav.html @@ -0,0 +1,7 @@ + diff --git a/blog/themes/hugo-tufte/layouts/partials/shortcodes/button.html b/blog/themes/hugo-tufte/layouts/partials/shortcodes/button.html new file mode 100644 index 0000000..b4e2a6b --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/shortcodes/button.html @@ -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 -}} + + +{{ if $isButton -}} + +{{ else -}} + +{{- end -}} + + {{ if and $icon (eq $iconposition "left") -}} + {{- $icon -}} + {{- end -}} + {{- $title | safeHTML -}} + {{ if and $icon (eq $iconposition "right") -}} + {{- $icon -}} + {{- end -}} + +{{ if $isButton -}} + +{{ else -}} + +{{ end -}} + +{{- end -}} + +{{/* https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/shortcodes/button.html */}} diff --git a/blog/themes/hugo-tufte/layouts/partials/social.html b/blog/themes/hugo-tufte/layouts/partials/social.html new file mode 100644 index 0000000..2ebaf36 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/social.html @@ -0,0 +1 @@ + diff --git a/blog/themes/hugo-tufte/layouts/partials/toc.html b/blog/themes/hugo-tufte/layouts/partials/toc.html new file mode 100644 index 0000000..08316c1 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/partials/toc.html @@ -0,0 +1,8 @@ +{{ if .Params.toc }} +
+
+ Table of Contents + {{ .TableOfContents }} +
+
+{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/robots.txt b/blog/themes/hugo-tufte/layouts/robots.txt new file mode 100644 index 0000000..af6d90e --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/robots.txt @@ -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 diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/blockquote.html b/blog/themes/hugo-tufte/layouts/shortcodes/blockquote.html new file mode 100644 index 0000000..22ad5fd --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/blockquote.html @@ -0,0 +1,8 @@ +
+{{ .Inner | $.Page.RenderString (dict "display" "block") }} +
+{{- with .Get "author" -}}{{ . }}{{- end -}} +{{- with .Get "cite" -}}, {{ . | markdownify }}{{- end -}} +{{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}} +
+
diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/button.html b/blog/themes/hugo-tufte/layouts/shortcodes/button.html new file mode 100644 index 0000000..130ed85 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/button.html @@ -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 */}} diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/cite.html b/blog/themes/hugo-tufte/layouts/shortcodes/cite.html new file mode 100644 index 0000000..0c44508 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/cite.html @@ -0,0 +1 @@ +{{ .Inner }} diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/cols.html b/blog/themes/hugo-tufte/layouts/shortcodes/cols.html new file mode 100644 index 0000000..67745cb --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/cols.html @@ -0,0 +1,12 @@ +{{ $cols := split .Inner "||" }} + +{{ $lang := .Get "lang" | default ( .Get 0 ) }} +{{ $lang := split $lang "," }} + + +{{ range $indCol,$col := $cols }} + + {{ . | $.Page.RenderString (dict "display" "block") }} + +{{ end }} + diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/div.html b/blog/themes/hugo-tufte/layouts/shortcodes/div.html new file mode 100644 index 0000000..2aaa0bd --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/div.html @@ -0,0 +1,8 @@ +{{ $loc := .Get 0 }} +{{ if .IsNamedParams }} +
+{{ else if or (eq $loc "") (eq $loc "begin") }} +
+{{ else if eq $loc "end" }} +
+{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/epigraph.html b/blog/themes/hugo-tufte/layouts/shortcodes/epigraph.html new file mode 100644 index 0000000..74fd3ee --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/epigraph.html @@ -0,0 +1,12 @@ +
+
+{{ .Inner | $.Page.RenderString (dict "display" "block") }} +{{ if .IsNamedParams }} +
+ {{- with .Get "author" -}}{{ . }}{{- end -}} + {{- with .Get "cite" -}}, {{ . | markdownify }}{{- end -}} + {{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}} +
+{{ end }} +
+
diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/figure.html b/blog/themes/hugo-tufte/layouts/shortcodes/figure.html new file mode 100644 index 0000000..d9a6c89 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/figure.html @@ -0,0 +1,62 @@ +{{ $alt := .Get "alt" | default "Image" }} +{{ $type := .Get "type" | default "normal" }} +{{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}} + + +{{- $label := printf "%#v" (add .Ordinal 1) | printf "%s%s" "marginfig-" | printf "%s" -}} +{{- if .Get "label" -}} +{{- $label = .Get "label" -}} +{{- end -}} + + +{{- if not (eq $type "margin") -}} + {{ if eq $type "full" }} +
+ {{ else }} +
+ {{ end }} +{{- end -}} + + +{{- if eq $type "full" -}} + {{ with .Get "link" }}{{ end }} + {{ $alt }} + {{ if .Get "link" }}{{ end }} +
+{{- else -}} + + {{- if or (or (.Get "caption") (.Get "attr")) (eq $type "margin") -}} + + + + {{- end -}} + + {{- if eq $type "margin" -}} + {{ with .Get "link" }}{{ end }} + {{ $alt }} + {{ if .Get "link" }}{{ end }} + {{- end -}} + +{{- end -}} + +{{ with .Get "title"}}{{ . | markdownify }}. {{ end}} +{{ with .Get "caption"}}{{ . | markdownify }}{{ end }} +{{ with .Get "attr" }}{{ . | markdownify }}.{{ end }} + + +{{ if eq $type "full" }} +
+{{ else }} + {{- if or (or (.Get "caption") (.Get "attr")) (eq $type "margin") -}}{{- end -}} +{{ end }} + +{{ if (eq $type "normal") }} + {{ with .Get "link" }}{{ end }} + {{ $alt }} + {{ if .Get "link" }}{{ end }} +{{ end }} + + +{{ if not (eq $type "margin") }} +
+{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/marginnote.html b/blog/themes/hugo-tufte/layouts/shortcodes/marginnote.html new file mode 100644 index 0000000..61dcebf --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/marginnote.html @@ -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 -}} + + + +{{ .Inner | markdownify}} + diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/newthought.html b/blog/themes/hugo-tufte/layouts/shortcodes/newthought.html new file mode 100644 index 0000000..f36eabc --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/newthought.html @@ -0,0 +1 @@ +{{ .Inner | markdownify }} diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/section.html b/blog/themes/hugo-tufte/layouts/shortcodes/section.html new file mode 100644 index 0000000..fbb0d86 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/section.html @@ -0,0 +1,9 @@ +{{ $loc := .Get 0 }} +{{ if .IsNamedParams }} +
+{{ else if or (eq $loc "") (eq $loc "begin") }} +
+{{ else if eq $loc "end" }} +
+{{ end }} + diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/sidenote.html b/blog/themes/hugo-tufte/layouts/shortcodes/sidenote.html new file mode 100644 index 0000000..786d20d --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/sidenote.html @@ -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 }}){{ .Inner | markdownify }} + diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/tag.html b/blog/themes/hugo-tufte/layouts/shortcodes/tag.html new file mode 100644 index 0000000..b7d9755 --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/tag.html @@ -0,0 +1,5 @@ +{{ if .IsNamedParams }} + <{{ .Get "name" }}{{with .Get "class"}} class="{{.}}"{{end}}{{with .Get "id"}} id="{{.}}"{{end}}> +{{ else }} + <{{ .Get 0 }}> +{{ end }} diff --git a/blog/themes/hugo-tufte/layouts/shortcodes/youtube.html b/blog/themes/hugo-tufte/layouts/shortcodes/youtube.html new file mode 100644 index 0000000..7c8dffe --- /dev/null +++ b/blog/themes/hugo-tufte/layouts/shortcodes/youtube.html @@ -0,0 +1,9 @@ +{{ $id := .Get "id" | default (.Get 0) }} +{{ $4x3 := .Get "4x3" | default "false" }} +{{ $title := .Get "title" | default "YouTube Video" }} + +
+ +
diff --git a/blog/themes/hugo-tufte/netlify.toml b/blog/themes/hugo-tufte/netlify.toml new file mode 100644 index 0000000..59fe139 --- /dev/null +++ b/blog/themes/hugo-tufte/netlify.toml @@ -0,0 +1,6 @@ +[build] +command = "cd exampleSite && hugo --buildDrafts --minify --gc --themesDir .. --theme ." +publish = "exampleSite/public" + +[build.environment] +HUGO_THEME = "hugo-tufte" diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot new file mode 100755 index 0000000..3610c74 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg new file mode 100755 index 0000000..254f4cc --- /dev/null +++ b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf new file mode 100755 index 0000000..9798360 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff new file mode 100755 index 0000000..c6685a1 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot new file mode 100755 index 0000000..88a6c74 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg new file mode 100755 index 0000000..881a6bd --- /dev/null +++ b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf new file mode 100755 index 0000000..9da91de Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff new file mode 100755 index 0000000..b0e5b68 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot new file mode 100755 index 0000000..22fff5b Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg new file mode 100755 index 0000000..c5013b3 --- /dev/null +++ b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf new file mode 100755 index 0000000..daceffb Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff new file mode 100755 index 0000000..440ae04 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot new file mode 100755 index 0000000..4ef9973 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg new file mode 100755 index 0000000..24cf3ef --- /dev/null +++ b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf new file mode 100755 index 0000000..5ae5198 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff new file mode 100755 index 0000000..10eb336 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot new file mode 100755 index 0000000..bcc6f9d Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg new file mode 100755 index 0000000..a6c168a --- /dev/null +++ b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf new file mode 100755 index 0000000..725af42 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf differ diff --git a/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff new file mode 100755 index 0000000..5753ca4 Binary files /dev/null and b/blog/themes/hugo-tufte/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff differ diff --git a/blog/themes/hugo-tufte/static/favicon.ico b/blog/themes/hugo-tufte/static/favicon.ico new file mode 100644 index 0000000..4258594 Binary files /dev/null and b/blog/themes/hugo-tufte/static/favicon.ico differ diff --git a/blog/themes/hugo-tufte/theme.toml b/blog/themes/hugo-tufte/theme.toml new file mode 100644 index 0000000..df80aad --- /dev/null +++ b/blog/themes/hugo-tufte/theme.toml @@ -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"} +]