diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..8ce9e82 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,28 @@ +--- +name: Bug report +about: Create a report to help us improve this theme +title: '' +labels: triage +assignees: '' + +--- + +## What version of Hugo are you using (`$ hugo version`)? + +## What operating system and processor architecture are you using? + +## What did you do? + +## What did you expect to see? + +## What did you see instead? + +## If you have a hugo log output, please paste it below. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/build-site-ghpages.yml b/.github/workflows/build-site-ghpages.yml new file mode 100644 index 0000000..75a4543 --- /dev/null +++ b/.github/workflows/build-site-ghpages.yml @@ -0,0 +1,33 @@ +name: Build for Github Pages + +on: + push: + branches: + - master # Set a branch to deploy + +jobs: + deploy: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./exampleSite + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.83.1' + extended: true + + - name: Build + run: hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GH_TOKEN }} + publish_dir: ./exampleSite/public \ No newline at end of file diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 0000000..bd75dd8 --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,24 @@ +name: Test Build + +on: [pull_request] + +jobs: + deploy: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./exampleSite + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.83.1' + extended: true + + - name: Build + run: hugo --minify diff --git a/.gitignore b/.gitignore index c8505ab..e13a530 100644 --- a/.gitignore +++ b/.gitignore @@ -34,13 +34,20 @@ Temporary Items ## hugo +*.patch + # Generated files by hugo /public/ +exampleSite/public/* /resources/_gen/ /exampleSite/resources/_gen/ /assets/jsconfig.json hugo_stats.json +# Node +package-lock.json +node_modules + # Executable may be added to repository hugo.exe hugo.darwin diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f89e866 --- /dev/null +++ b/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/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..03ec608 --- /dev/null +++ b/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/LICENSE.md b/LICENSE.md index 0a69324..c6470a2 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Shawn O'Hare +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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4e33e26 --- /dev/null +++ b/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/README.md b/README.md index be4939f..4fa1622 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,73 @@ # Tufte Hugo Theme +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md) +[![build github pages](https://github.com/slashformotion/hugo-tufte/actions/workflows/build-site-ghpages.yml/badge.svg)](https://github.com/slashformotion/hugo-tufte/actions/workflows/build-site-ghpages.yml) -## Maintenance Warning +***This theme isn't actively maintained, if you want a new feature please file a pull request.*** -I do not actively maintain this theme. A fork that now -also apears unmaintained can be found at -https://github.com/slashformotion/hugo-tufte 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. -It supports mathematical typesetting via [MathJax](https://www.mathjax.org). +It supports mathematical typesetting via [katex](https://katex.org/) or [MathJax](https://www.mathjax.org). By utilizing copious partial templates the theme is largely customizable. -## State of Project +This is a fork of the original [hugo-tufte](https://github.com/shawnohare/hugo-tufte). -This theme is largely unmaintained. If there is a particular fork -that should be considered the primary project please submit a PR -updating the README, thanks! +## Quickstart -## Math +### Prerequisite: Hugo Extended -Mathjax renders LaTeX written inside of markdown files. LaTeX can be -written more or less as normal, but inline and display environments that -start with `\` must be escaped. Some examples: +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/): + ```powershell + choco install hugo-extended # remember, you might need admin privs + ``` -- `This $\LaTeX$ will be rendered inline.` -- `This \\(\LaTeX\\) will be rendered inline.` -- `A simple displayed equation: $$f(x, y) := e^{x^2 - y^2}.$$` -- `A simple displayed equation: \\[f(x, y) := e^{x^2 - y^2}.\\]` +### For a new site + +```powershell +# this code is shell-agnostic, and should work in cmd, powershell, bash, zsh.... +hugo new site # create your new site with hugo in your pwd +cd \themes\ # cd into the themes directory +git clone # HTTPS link @ the top of the page if you've never done this before +``` + +Add `theme = 'hugo-tufte'` to your `config.toml` to let your site know to actually use _this_ theme, specifically. + +Then run `hugo server -D` and open up `localhost:1313/` or wherever it says in Firefox. + +## Features + +### Math + +[Katex](https://katex.org/) or [MathJax](https://www.mathjax.org) renders LaTeX written inside of markdown files. LaTeX can be written more or less as normal. Some examples: + +- This `$\frac{1}{2}$` will be rendered inline. +- A simple displayed equation: `$$f(x, y) := e^{x^2 - y^2}.$$` There currently seems to be some weirdness with other environments, -such as the `align` environment. These environments will render provided +such as the `aligned` environment (`align*` is not supported by katex). These environments will render provided they are wrapped in `

` tags and blank lines. The snippet below should render correctly. -``` +```latex Let $G$ be a finite group with exponent $2$. Then every element is an involution, hence for any $x$, $y$ in $G$ we have:

-\begin{align*} +\begin{aligned} e &= (xy)^2 \\ &=xyxy \implies \\ y^{-1} &= xyx \implies \\ y^{-1}x^{-1} &= xy, -\end{align*} +\end{aligned}

establishing that $G$ is abelian. ``` -## Site Parameters +### Site Parameters The site specific parameters that this theme recognizes are: @@ -58,8 +75,29 @@ The site specific parameters that this theme recognizes are: - `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 +- `katex` boolean: if "katex" is set to true katex will be used to render LaTex, if not MathJax will be used instead. (Set to `true` by default) +- `codeBlocksDark` boolean: if true, code blocks will use a dark theme. -## Page Parameters +***Socials*** + +You can add links to your social media profile by using thoses parameters: +- `github`: string +- `gitlab`: string +- `twitter`: string +- `patreon`: string +- `youtube`: string +- `medium`: string +- `reddit`: string +- `stackoverflow`: string +- `instagram`: string +- `mastodon`: string +- `orcid`: string +- `google_scholar`: string + +Please see [`exampleSite/config.toml`](https://github.com/slashformotion/hugo-tufte/blob/master/exampleSite/config.toml#L30) to see the full implementation with exemples. + +### Page Parameters - `hideDate` boolean: if true, do not display a page date. When `meta` is set to true, `hideDate` takes greater precedence. @@ -71,7 +109,7 @@ The site specific parameters that this theme recognizes are: (i.e., pages of type "post") ignore this parameter. - `toc` boolean: if true, display the table of contents for the page. -## Shortcodes +### Shortcodes This theme provides the following shortcodes in an attempt to completely support all the features present in the @@ -83,9 +121,9 @@ support all the features present in the - **Usage**: Accepts the named parameters `cite` and `footer`. - **Example**: ```html - {{% blockquote cite="www.shawnohare.com" footer="Shawn" %}} + {{< blockquote cite="www.shawnohare.com" footer="Shawn" >}} There is nothing more beautiful than an elegant mathematical proof. - {{% /blockquote %}}` + {{< /blockquote >}} ``` - `div` @@ -103,22 +141,25 @@ support all the features present in the - `epigraph` - **Description**: Create an epigraph with the wrapped text. - **Usage**: To include a footer with source attribution, pass in the - optional named parameters `pre`, `cite`, `post`. These parameters + optional named parameters `pre`, `cite`, `post`, `link`. These parameters make no styling assumptions, so spacing is important. A more compactly styled epigraph will be used if the `type` parameter is set to `compact`. - **Example**: - ``` - {{% epigraph pre="Author Writer, " cite="Math is Fun" %}} + ```html + {{< epigraph pre="Author Writer, " cite="Math is Fun" link='https://www.google.com' >}} This is an example of an epigraph with some math - \\( \mathbb N \subseteq \mathbb R \\) + $ \mathbb N \subseteq \mathbb R $ to start the beginning of a section. - {{% /epigraph %}} + {{< /epigraph >}} ``` - `marginnote` - **Description**: Wrap text to produce a numberless margin note. - - Usage: `{{% marginnote %}}...{{% /marginnote %}}` - - **Example**: `{{% marginnote %}}Some marginnote{{% /marginnote%}}` + - Usage: `{{< marginnote >}}...{{< /marginnote >}}` + - **Example**: + ```html + {{< marginnote >}}Some marginnote{{< /marginnote>}} + ``` - `section` - **Description**: This shortcode is provided as a work-around for wrapping @@ -135,11 +176,9 @@ support all the features present in the - `sidenote` - **Description**: Wrap text to produce an automatically numbered sidenote. - **Usage**: identical to `marginnote` - `{{% sidenote %}}...{{% /sidenote %}}` - - **Example**: `{{% sidenote %}}Some sidenote{{% /sidenote %}}` + `{{< sidenote >}}...{{< /sidenote >}}` + - **Example**: + ```html + {{< sidenote >}}Some sidenote{{< /sidenote >}} + ``` - -## Templates -TODO -- [ ] Describe the role of each template file, as commenting within the files - themselves seems to break the templates. diff --git a/archetypes/post.md b/archetypes/post.md index 2454f9f..6ffe550 100644 --- a/archetypes/post.md +++ b/archetypes/post.md @@ -3,7 +3,7 @@ math = false meta = true toc = true author = "AUTHOR NAME" - +type = "post" +++ diff --git a/assets/scss/components/code-highlight.scss b/assets/scss/components/code-highlight.scss new file mode 100644 index 0000000..c0f2a27 --- /dev/null +++ b/assets/scss/components/code-highlight.scss @@ -0,0 +1,64 @@ +$ht-code-border-radius: .4em; +.highlight { + width: 55%; + overflow-x: scroll; + border-radius: $ht-code-border-radius; + + &>div.chroma>table.lntable{ + margin: $ht-code-border-radius 0 $ht-code-border-radius 0; + & td:first-of-type { + & span:not(& span>span) { + padding: 0 .75em 0 .5em; + } + } + } + &>.chroma>code { + + width: max-content; + margin-top: .5em; + margin-bottom: .5em; + margin-left: .5em; + &>span.hl{ + margin-left: -.5em; + padding-left: .5em; + } + } + + .chroma .hl { + // border-radius: $ht-code-border-radius / 2; + display: block; + } + + &::-webkit-scrollbar { + border-radius: $ht-code-border-radius; + width: 10px; + height: 1rem; + } + &::-webkit-scrollbar-thumb { + border-radius: $ht-code-border-radius; + } +} + +@media screen and (max-width: 760px) { + .highlight { + width: 90%; + } +} + +.highlight .lntable { + overflow: initial; +} + +.highlight pre { + margin: 0; +} + +.highlight pre code { + display: block; + font-size: 1rem; +} + +// fix #48 => https://github.com/slashformotion/hugo-tufte/issues/48 +ul>li>div.highlight { + width: 100%; +} \ No newline at end of file diff --git a/assets/scss/components/header.scss b/assets/scss/components/header.scss new file mode 100644 index 0000000..137b9be --- /dev/null +++ b/assets/scss/components/header.scss @@ -0,0 +1,26 @@ +header.brand { + margin-top: 0.5em; +} + +/* Main brand title */ +header.brand h1 { + margin: 0; + font-weight: 400; + color: rgba(65, 70, 75, 1); + font-size: 3em; +} + +header.brand h2 { + margin: 0; + padding-top: 0rem; + /*font-style: normal;*/ + /*font-weight: 200;*/ + color: rgba(100, 105, 110, 1); +} + +header.brand hr { + text-align: left; + margin-left: 0; + width: 75%; + border-color: rgba(250, 250, 250, 0.25); +} diff --git a/assets/scss/components/meta.scss b/assets/scss/components/meta.scss new file mode 100644 index 0000000..be8cef5 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/assets/scss/components/nav.scss b/assets/scss/components/nav.scss new file mode 100644 index 0000000..558082c --- /dev/null +++ b/assets/scss/components/nav.scss @@ -0,0 +1,32 @@ + +nav.menu ul { + list-style: none; + display: block; + /*text-align:center;*/ + margin-top: 0.75rem; + padding: 0; + max-width: 45rem; + /* Width is the same as tufte.css body */ + font-size: 0.9rem; + width: 87.5%; +} + +nav.menu li { + display: inline-block; + margin-right: 1rem; +} + +nav.menu li a { + text-decoration: none; + background: transparent; + color: rgba(65, 70, 75, 1); + letter-spacing: 0.05em; + text-transform: uppercase; +} + +nav.menu li a:hover, +nav.menu li a:active, +nav.menu li a:focus { + background: inherit; + color: darkgray; +} \ No newline at end of file diff --git a/assets/scss/components/toc.scss b/assets/scss/components/toc.scss new file mode 100644 index 0000000..f0ea1cd --- /dev/null +++ b/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/assets/scss/general.scss b/assets/scss/general.scss new file mode 100644 index 0000000..b30103c --- /dev/null +++ b/assets/scss/general.scss @@ -0,0 +1,115 @@ +/* ------------------------------------------------------------------------ */ +/* hugo-tufte.css */ +/* Contains extensions to the original tufte.css styles to */ +/* accomodate a blog-like site. */ +/* ------------------------------------------------------------------------ */ + +@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@351&display=swap"); + +/* When setting the primary font stack, apply it to the Pure grid units along */ +/* with `html`, `button`, `input`, `select`, and `textarea`. Pure Grids use */ +/* specific font stacks to ensure the greatest OS/browser compatibility. */ +html, +button, +input, +select, +textarea, +p, +nav, +section, +article, +header, +footer, +.pure-g [class*="pure-u"] { + font-family: "et-book", -apple-system, "San Francisco", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", + "Open Sans", "Helvetica Neue", "Lucida Grand", sans-serif; +} + +p { + text-align: justify; +} + +code { + font-family: "Fira Code", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1.125rem; + line-height: 1.6; +} + +.sidenote, +.marginnote { + margin-right: -55%; + width: 45%; +} + + +/* ------------------------------------------------------------------------ */ +/* Generic content, such as the index list pages */ +/* ------------------------------------------------------------------------ */ + +/* Content Title styling. This is mostly to avoid underlying links. */ +h1.content-title { + /*max-width: 50rem;*/ + font-size: 4rem; +} +h1.content-title a:link, +h1.content-title a:visited { + background: transparent; + text-decoration: none; + color: inherit; +} +h1.content-title a:hover, +h1.content-title a:focus { + color: darkgray; +} + + + +/* ------------------------------------------------------------------------ */ +/* 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: 1em; + 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; */ + border-top: 2px solid #111; + border-bottom: 2px solid #111; +} + +table:not(.lntable) th, +table:not(.lntable) td { + font-size: 1.25rem; + line-height: 1.71428571; +} + +table:not(.lntable) td { + padding-right: 0.75em; +} + +table.lntable { + td.lntd { + padding: 0em; + } + border-spacing: 0; + padding: 0; +} diff --git a/assets/scss/hugo-tufte.scss b/assets/scss/hugo-tufte.scss new file mode 100644 index 0000000..03d6290 --- /dev/null +++ b/assets/scss/hugo-tufte.scss @@ -0,0 +1,22 @@ +// VENDOR +@import "vendor/tufte.scss"; + +// OUR CODE +@import "general"; + +/// PAGES +@import "pages/footer"; + +/// COMPONENTS +@import "components/code-highlight"; +@import "components/toc"; +@import "components/nav"; +@import "components/header"; +@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 }} \ No newline at end of file diff --git a/assets/scss/pages/footer.scss b/assets/scss/pages/footer.scss new file mode 100644 index 0000000..c036f6a --- /dev/null +++ b/assets/scss/pages/footer.scss @@ -0,0 +1,46 @@ +/* Footer, but with a different name to avoid conflicts with tufte.css */ +footer.page-footer{ + padding-top: 1em; + margin-top: 3em; + 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 { + text-align: left; + margin-left: 0; + width: 100%; + border-color: rgba(250, 250, 250, 0.25); +} + +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/assets/scss/syntax/highlight-dark.scss b/assets/scss/syntax/highlight-dark.scss new file mode 100644 index 0000000..1016174 --- /dev/null +++ b/assets/scss/syntax/highlight-dark.scss @@ -0,0 +1,12 @@ +$ht-code-bgcolor: #282a36; + +@import "syntax-dark.scss"; + +.highlight { + &::-webkit-scrollbar { + background: $ht-code-bgcolor; + } + &::-webkit-scrollbar-thumb { + background: scale-color($ht-code-bgcolor, $lightness: 23%, $saturation: -40%); + } +} \ No newline at end of file diff --git a/assets/scss/syntax/highlight-light.scss b/assets/scss/syntax/highlight-light.scss new file mode 100644 index 0000000..5a1303d --- /dev/null +++ b/assets/scss/syntax/highlight-light.scss @@ -0,0 +1,12 @@ +$ht-code-bgcolor: #dde2ff; + +@import "syntax-light.scss"; + +.highlight { + &::-webkit-scrollbar { + background: $ht-code-bgcolor; + } + &::-webkit-scrollbar-thumb { + background: scale-color($ht-code-bgcolor, $lightness: -13%, $saturation: -80%); + } +} \ No newline at end of file diff --git a/assets/scss/syntax/syntax-dark.scss b/assets/scss/syntax/syntax-dark.scss new file mode 100644 index 0000000..6ac2598 --- /dev/null +++ b/assets/scss/syntax/syntax-dark.scss @@ -0,0 +1,91 @@ +/* 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 .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 */ \ No newline at end of file diff --git a/assets/scss/syntax/syntax-light.scss b/assets/scss/syntax/syntax-light.scss new file mode 100644 index 0000000..b27f7ff --- /dev/null +++ b/assets/scss/syntax/syntax-light.scss @@ -0,0 +1,69 @@ +.highlight .hl { background-color: #ffffd4 } +.highlight { background: $ht-code-bgcolor;} +.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 */ \ No newline at end of file diff --git a/assets/scss/vendor/_normalize.scss b/assets/scss/vendor/_normalize.scss new file mode 100644 index 0000000..fd669eb --- /dev/null +++ b/assets/scss/vendor/_normalize.scss @@ -0,0 +1,3 @@ +@import 'normalize/variables'; +@import 'normalize/vertical-rhythm'; +@import 'normalize/normalize-mixin'; diff --git a/assets/scss/vendor/tufte.scss b/assets/scss/vendor/tufte.scss new file mode 100644 index 0000000..8df7479 --- /dev/null +++ b/assets/scss/vendor/tufte.scss @@ -0,0 +1,462 @@ +/* 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; +} + +/* Tufte CSS styles */ +html { + font-size: 15px; +} + +body { + width: 87.5%; + margin-left: auto; + margin-right: auto; + padding-left: 12.5%; + font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; + background-color: #fffff8; + color: #111; + max-width: 1400px; + counter-reset: sidenote-counter; +} + +h1 { + font-weight: 400; + margin-top: 4rem; + margin-bottom: 1.5rem; + font-size: 3.2rem; + line-height: 1; +} + +h2 { + font-style: italic; + font-weight: 400; + margin-top: 2.1rem; + margin-bottom: 0; + font-size: 2.2rem; + line-height: 1; +} + +h3 { + font-style: italic; + font-weight: 400; + font-size: 1.7rem; + margin-top: 2rem; + margin-bottom: 0; + line-height: 1; +} + +p.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; +} + +p, +ol, +ul { + font-size: 1.4rem; +} + +p { + line-height: 2rem; + margin-top: 1.4rem; + margin-bottom: 1.4rem; + padding-right: 0; + vertical-align: baseline; +} + +/* Chapter Epigraphs */ +div.epigraph { + margin: 5em 0; +} + +div.epigraph > blockquote { + margin-top: 3em; + margin-bottom: 3em; +} + +div.epigraph > blockquote, +div.epigraph > blockquote > p { + font-style: italic; +} + +div.epigraph > blockquote > footer { + font-style: normal; +} + +div.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; +} + +ol, +ul { + width: 45%; + -webkit-padding-start: 5%; + -webkit-padding-end: 5%; +} + +li ul { + width: 100%; +} + +li { + padding: 0.5rem 0; +} + +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; +} + +a:link { + text-decoration: none; + background: -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#fffff8, #fffff8), + -webkit-linear-gradient(#333, #333); + background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(#333, #333); + -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + background-repeat: no-repeat, no-repeat, repeat-x; + text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, + -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, + -0.15em 0 #fffff8; + background-position: 0% 93%, 100% 93%, 0% 93%; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + a:link { + background-position-y: 87%, 87%, 87%; + } +} + +a:link::selection { + text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, + -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, + -0.15em 0 #b4d5fe; + background: #b4d5fe; +} + +a:link::-moz-selection { + text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, + -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, + -0.15em 0 #b4d5fe; + background: #b4d5fe; +} + +/* 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; +} + +.sidenote-number { + counter-increment: sidenote-counter; +} + +.sidenote-number:after, +.sidenote:before { + content: counter(sidenote-counter) " "; + font-family: et-book-roman-old-style; + position: relative; + vertical-align: baseline; +} + +.sidenote-number:after { + content: counter(sidenote-counter); + font-size: 1rem; + top: -0.5rem; + left: 0.1rem; +} + +.sidenote:before { + content: counter(sidenote-counter) " "; + top: -0.5rem; +} + +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; +} + +@media screen and (max-width: 760px) { + p, + footer { + width: 90%; + } + pre.code { + width: 87.5%; + } + ul { + 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: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; + letter-spacing: 0.03em; +} + +.code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1.125rem; + line-height: 1.6; +} + +h1 .code, +h2 .code, +h3 .code { + font-size: 0.8em; +} + +.marginnote .code, +.sidenote .code { + font-size: 1rem; +} + +pre.code { + width: 52.5%; + padding-left: 2.5%; + overflow-x: scroll; +} + +.fullwidth { + max-width: 90%; + clear: both; +} + +span.newthought { + font-variant: small-caps; + font-size: 1.2em; +} + +input.margin-toggle { + display: none; +} + +label.sidenote-number { + display: inline; +} + +label.margin-toggle:not(.sidenote-number) { + display: none; +} + +@media (max-width: 760px) { + label.margin-toggle:not(.sidenote-number) { + 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; + } + label { + cursor: pointer; + } + 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%; + } +} diff --git a/code_of_conduct.md b/code_of_conduct.md new file mode 100644 index 0000000..015d7cf --- /dev/null +++ b/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/config.toml b/config.toml new file mode 100644 index 0000000..fbb88d9 --- /dev/null +++ b/config.toml @@ -0,0 +1,4 @@ +[module] + [module.hugoVersion] + extended = true + min = "0.83.0" \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a1be4a1..ffb5c11 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,57 +1,107 @@ -contentdir = "content" -layoutdir = "layouts" -publishdir = "public" -builddrafts = true -canonifyurls = true -baseurl = "https://github.com/shawnohare/hugo-tufte" -theme = "hugo-tufte" -title = "Hugo-tufte Theme Example Site" +# Remove this if your site folder is not inside the theme folder +themesDir = "../../" -[taxonomies] - category = "categories" - group = "groups" - series = "series" - tag = "tags" +# Set your theme here +theme = "hugo-tufte" +# The language of your website (see https://www.andiamo.co.uk/resources/iso-language-codes/ for reference) +languageCode = "en-us" +# The url of your website +baseurl = "https://slashformotion.github.io/hugo-tufte/" +# The title of your website (shown on all the pages) +title = "Hugo-tufte Theme Example Site" +# Site wide kill switch for Latex support +math = true +# (If math is enabled) +## if "katex" is set to true katex will be used to render LaTex, if not MathJax will be used instead +katex = true [params] + # Subtitle of the website subtitle = "Subtitle goes here." + # Your name or the name of you company copyrightHolder = "Copyright Holder" + # Show the "Powered by Hugo-Tufte and Hugo." showPoweredBy = true + # Site wide kill switch + hidedate = false + # Uncomment for dark code blocks + # codeBlocksDark = true + # 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" + 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" - pre = " " + pre = "" weight = -110 identifier = "home" url = "/" [[menu.nav]] name = "Posts" - pre = " " + pre = " " weight = -100 identifier = "posts" url = "/post" [[menu.nav]] name = "Categories" - pre = " " + pre = " " weight = -90 identifier = "categories" url = "/categories" +[[menu.nav]] + name = "About" + pre = " " + weight = -80 + identifier = "about" + url = "/about" +[[menu.nav]] + name = "Source Code" + pre = " " + weight = -70 + identifier = "github" + url = "https://github.com/slashformotion/hugo-tufte" # ----------------------------------------------------------------------- -# Footer menu +# FOOTER MENU +# If you need to add custom links to you footer: put them here. Be aware that this theme is using fontawesome. +# Please head to https://fontawesome.com/v4.7/icons/ to pick icons # ----------------------------------------------------------------------- + [[menu.footer]] - name = "" - pre = " " - weight = -100 - identifier = "github" - url = "https://github.com/shawnohare/hugo-tufte" -[[menu.footer]] - name = "" - pre = " " + name = "Custom footer link" + pre = " " weight = -90 - identifier = "twitter" - url = "https://twitter.com" + identifier = "custom_link" + url = "https://google.com" + + +# Don't change the settings below +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true # make the shortcodes work + [markup.highlight] + noClasses = false + +pygmentsUseClasses = true +canonifyurls = true \ No newline at end of file diff --git a/layouts/partials/comments.html b/exampleSite/content/_index.md similarity index 100% rename from layouts/partials/comments.html rename to exampleSite/content/_index.md diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md new file mode 100644 index 0000000..93d03b5 --- /dev/null +++ b/exampleSite/content/about.md @@ -0,0 +1,16 @@ ++++ +title = "About This Site" +hasMath = false ++++ + +Hello, I'm an example site that uses the Hugo Tufte theme. + + +Here is a bullet list: + +- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +- Arcu felis bibendum ut tristique et. Volutpat odio facilisis mauris sit amet massa. +- Sed id semper risus in hendrerit gravida rutrum. + - Risus pretium quam vulputate dignissim suspendisse in est ante. Bibendum neque egestas congue quisque egestas diam in arcu. + - Nulla porttitor massa id neque aliquam. Laoreet non curabitur gravida arcu ac tortor dignissim convallis. +- Sit amet consectetur adipiscing elit. \ No newline at end of file diff --git a/exampleSite/content/page/about.md b/exampleSite/content/page/about.md deleted file mode 100644 index cd352c6..0000000 --- a/exampleSite/content/page/about.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "About This Site" -hasMath = false -+++ - -Hello, I'm an example site that uses the Hugo Morphism theme. diff --git a/exampleSite/content/post/more-maths.md b/exampleSite/content/post/more-maths.md new file mode 100644 index 0000000..a8b6c38 --- /dev/null +++ b/exampleSite/content/post/more-maths.md @@ -0,0 +1,64 @@ ++++ +math = true +meta = false +author = "AUTHOR NAME" +date = "2021-07-20T13:56:01-08:00" +type = "post" +title = "More math $\\xi_{(even-in-the-title-!)}$" +subtitle = "Wow this really works ! " +toc = 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$$ \ No newline at end of file diff --git a/exampleSite/content/post/new.md b/exampleSite/content/post/new.md index 033e12f..1f8f2c0 100644 --- a/exampleSite/content/post/new.md +++ b/exampleSite/content/post/new.md @@ -10,6 +10,12 @@ categories: ## 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 diff --git a/exampleSite/content/post/old.md b/exampleSite/content/post/old.md deleted file mode 100644 index 9da0b8a..0000000 --- a/exampleSite/content/post/old.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "First Post" -description: "Welcome to the first blog post." -date: "2014-03-28" -categories: - - "template" - - "boring" ---- - -## Sample Post 1 - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -### Sub-heading - -Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est, non, ratione, molestiae illo optio quia sequi id fuga natus nihil ad architecto dolor alias ex sunt iste aperiam eius itaque. - - -## foo - -Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quo, neque, eveniet voluptate eos debitis illum qui nostrum eius maxime ratione assumenda suscipit impedit deserunt voluptatibus odio ducimus non. Ex, ratione. diff --git a/exampleSite/content/post/tufte-features.md b/exampleSite/content/post/tufte-features.md index c467e2d..b145a0d 100644 --- a/exampleSite/content/post/tufte-features.md +++ b/exampleSite/content/post/tufte-features.md @@ -6,74 +6,81 @@ math = true title = "Hugo-Tufte Features" subtitle = "Fancy Subtitle" toc = true -categories = ["mathjax", "latex", "tufte-css"] +categories = ["katex", "latex", "tufte-css"] +++ This is a quick demonstration post. It serves as an example of the features -of this theme. One of them is \\( \LaTeX \\) via MathJax. +of this theme. One of them is $ \LaTeX $ via [Katex](https://katex.org/). {{< section "begin" >}} ## A Bit About Mathematics -{{% epigraph pre="Shawn O'Hare, " cite="Math is Fun" %}} +{{< epigraph pre="Shawn O'Hare, " cite="Math is Fun" >}} This is an example of an epigraph with some math -\\(\mathbb N \subseteq \mathbb R \\) +$ \mathbb N \subseteq \mathbb R $ to start the beginning of a section. -{{% /epigraph %}} +{{< /epigraph >}} ### Inline Some inline math: -{{% marginnote "mn-example" %}}This is a margin note.{{% /marginnote %}} -$e^{i \pi} = -1$ and \\(\sqrt{-1} = i \\) -and \\( a_2 = 3 \\). +{{< marginnote "mn-example" >}}This is a margin note.{{< /marginnote >}} +$e^{i \pi} = -1$ + and $\sqrt{-1} = i $ +and $ a_2 = 3 $. ### Display -And display math using escaped brackets `\\[`: -{{% sidenote "sn-example" %}}This is a sidenote!{{% /sidenote %}} -\\[ +And display math using this symbol `$$`: +{{< sidenote "sn-example" >}}This is a sidenote!{{< /sidenote >}} +$$ -- \cdot_H -- \colon B(G,H) \times B(H, K) \to B(G, K), \quad ([X], [Y]) \mapsto [X \times_H Y]. -\\] +$$ ### Environments Currently, certain $\LaTeX$ environments need to be escaped so that -the markdown processor does not override MathJax. Currently, display +the markdown processor does not override Katex. Currently, display environments should be enclosed in `

` tags and blank lines. For instance:

-\begin{align*} +$$ +\begin{aligned} \mu(A) &= \iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dx\right) dy = \int_I 0 \ dy= 0 \quad \text{and} \\ \mu(A) &=\iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dy \right) dx =\int_I dx = 1, -\end{align*} +\end{aligned} +$$

+ is produced from -``` + +```txt

-\begin{align*} +$$ +\begin{aligned} \mu(A) &= \iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dx\right) dy = \int_I 0 \ dy= 0 \quad \text{and} \\ \mu(A) &=\iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dy \right) dx =\int_I dx = 1, -\end{align*} +\end{aligned} +$$

``` ### Blockquotes Some blockquotes. But first, we try to manually cite via -This is between cite tags and has math: \\(e^x \\) +This is between cite tags and has math: $e^x $ -{{% blockquote cite="www.shawnohare.com" footer="Shawn O'Hare" %}} +{{< blockquote cite="www.shawnohare.com" footer="Shawn O'Hare" >}} 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. @@ -82,7 +89,7 @@ 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 %}} +{{< /blockquote >}} ### New thoughts @@ -94,7 +101,7 @@ the `newthought` shortcode. ### Code As an example of some inline code: `go test -v -short`. And this is some block-code: -```go +```go {linenos=table,hl_lines=["2-5"],linenostart=199} package main import "log" @@ -109,6 +116,24 @@ func main() { 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) +} +``` + ### Figure Below we have an example of a regular width figure. {{< figure @@ -124,7 +149,8 @@ Below we have an example of a regular width figure. >}} {{< section "end" >}} -And now we exhibit a margin figure. + + {{< figure src="https://edwardtufte.github.io/tufte-css/img/rhino.png" class="class param" @@ -134,10 +160,11 @@ And now we exhibit a margin figure. label="mn-export-import" caption="This is the image caption." attr="Image attribution" - attrlink="attribute link" + attrlink="https://edwardtufte.github.io/tufte-css" alt="alt" link="link" >}} + 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. {{< section "end" >}} Below is a full-width figure. diff --git a/exampleSite/static/css/hugo-tufte-override.css b/exampleSite/static/css/hugo-tufte-override.css new file mode 100644 index 0000000..3d0b1ac --- /dev/null +++ b/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/exampleSite/static/hugo-tufte-override.css b/exampleSite/static/hugo-tufte-override.css deleted file mode 100644 index f39c0d7..0000000 --- a/exampleSite/static/hugo-tufte-override.css +++ /dev/null @@ -1,2 +0,0 @@ -This file is the last hugo-tufte related css file -loaded by the theme, and so personal customization can go here. diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b80effd --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/slashformotion/hugo-tufte + +go 1.17 diff --git a/layouts/404.html b/layouts/404.html index e9be069..8ad1f81 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,7 +1,13 @@ -{{ partial "header.html" . }} -
-
-

{{ .Title }}

+{{ define "main" }} +
+
+ {{ partial "brand.html" . }} + +

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

+
+ {{ partial "footer.html" . }} +
+
-
-{{ partial "footer.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..4cb5269 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,9 @@ + + + {{- partial "header.html" . -}} + + + {{ block "main" . }}{{ end }} + + + \ No newline at end of file diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..a52757e --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,23 @@ + + +{{ define "main" }} + + + +
+
+ {{ partial "brand.html" . }} + {{ range first 5 .Site.Pages }} + {{ partial "content.header.html" . }} +

{{ .Summary }}

+ {{ if .Truncated }} +

Read On →

+ {{ end }} + {{ end }} + {{ partial "footer.html" . }} +
+
+ +{{ end }} \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e1625b7..ae3c150 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,5 @@ -{{ partial "header.html" . }} +{{ define "main" }} -
{{ partial "brand.html" . }} @@ -32,5 +31,5 @@ {{ partial "footer.html" . }}
- - + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index faa1bd8..75a6ccb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,17 +1,19 @@ -{{ partial "header.html" . }} +{{/* - + This template render single pages + +*/}} + +{{ define "main" }}
-
-{{ partial "brand.html" . }} -{{ partial "content.header.html" . }} -{{ partial "toc.html" . }} -
{{ .Content }}
-
- {{ partial "disqus.html" . }} - {{ partial "footer.html" . }} -
-
+
+ {{ partial "brand.html" . }} + {{ partial "content.header.html" . }} + {{ partial "toc.html" . }} +
{{ .Content }}
+
+ {{ partial "footer.html" . }} +
+
- - +{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 496e3c8..1bded08 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,17 +1,25 @@ -{{ partial "header.html" . }} - +{{ define "main" }}
-
-{{ partial "brand.html" . }} -{{ range first 5 .Site.Pages }} - {{ partial "content.header.html" . }} -

{{ .Summary }}

- {{ if .Truncated }} -

Read On →

- {{ end }} -{{ end }} -{{ partial "footer.html" . }} -
+
+ {{ partial "brand.html" . }} + {{ range where .Site.RegularPages "Type" "post"}} + +

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

+ + +

{{ truncate 120 .Summary }}

+ {{/* {{ if .Truncated }} */}} +

Read On →

+ {{/* {{ end }} */}} + + {{ end }} + {{ partial "footer.html" . }} +
- - +{{ end }} \ No newline at end of file diff --git a/layouts/partials/body.includes.html b/layouts/partials/body.includes.html deleted file mode 100644 index 026abba..0000000 --- a/layouts/partials/body.includes.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/layouts/partials/brand.html b/layouts/partials/brand.html index 61262f4..9dd58d1 100644 --- a/layouts/partials/brand.html +++ b/layouts/partials/brand.html @@ -1,5 +1,6 @@
-

{{ .Site.Title}}

+

{{ .Site.Title}}

{{ .Site.Params.subtitle }}

{{ partial "nav.html" . }} +
diff --git a/layouts/partials/content.header.html b/layouts/partials/content.header.html index 53fadb1..d47e048 100644 --- a/layouts/partials/content.header.html +++ b/layouts/partials/content.header.html @@ -1,39 +1,42 @@
-

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

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

+ {{ if .IsPage }} + {{ if .Params.subtitle }} +

{{ .Params.subtitle }}

+ {{ end }} + {{ if or (eq .Type "post") (.Params.meta) }} + + {{ end }} {{ end }} - -{{ if .IsPage }} -{{ if .Params.subtitle }}

{{ .Params.subtitle }}

{{ end }} -{{ if or (eq .Type "post") (.Params.meta) }} - -{{ end }} -{{ end }} -
+ \ No newline at end of file diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html deleted file mode 100644 index 64a4a3b..0000000 --- a/layouts/partials/disqus.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ if .Params.comments }} -
- - - comments powered by Disqus -{{ end }} diff --git a/layouts/partials/doctype.html b/layouts/partials/doctype.html deleted file mode 100644 index 6cab5bb..0000000 --- a/layouts/partials/doctype.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1c1b3ee..c779bc8 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,15 +1,78 @@

+ + + + + {{ if .Site.Params.showPoweredBy}}

Powered by Hugo and the - Tufte theme. + Tufte theme.

{{ end }} @@ -25,4 +88,3 @@

-{{ partial "body.includes.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index bc494d1..9c7d37c 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,7 +1,11 @@ -{{ partial "doctype.html" . }} {{ .Site.Title }} - {{ .Title }} - {{ partial "meta.html" . }} - {{ partial "opengraph.html" }} + + + + + + {{ partial "header.includes.html" . }} diff --git a/layouts/partials/header.includes.html b/layouts/partials/header.includes.html index 0e6e8af..d72adab 100644 --- a/layouts/partials/header.includes.html +++ b/layouts/partials/header.includes.html @@ -1,19 +1,11 @@ - + {{ if or .Params.math .IsHome }} - {{ partial "math.html" . }} + {{ partial "math.html" . }} {{ end }} - - - + - - - - - + @@ -21,9 +13,12 @@ - + + +{{ $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 }} + + + + - - - - diff --git a/layouts/partials/highlight.html b/layouts/partials/highlight.html deleted file mode 100644 index e69de29..0000000 diff --git a/layouts/partials/math.html b/layouts/partials/math.html index 37f1595..60366bf 100644 --- a/layouts/partials/math.html +++ b/layouts/partials/math.html @@ -1,18 +1,29 @@ - - - +{{ if .Params.katex }} + + + + +{{ else }} + + + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html deleted file mode 100644 index 0c1120f..0000000 --- a/layouts/partials/meta.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -{{ hugo.Generator }} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html deleted file mode 100644 index e69de29..0000000 diff --git a/layouts/partials/subheader.html b/layouts/partials/subheader.html deleted file mode 100644 index e69de29..0000000 diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..af6d90e --- /dev/null +++ b/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/layouts/shortcodes/blockquote.html b/layouts/shortcodes/blockquote.html index e00389c..16f78fc 100644 --- a/layouts/shortcodes/blockquote.html +++ b/layouts/shortcodes/blockquote.html @@ -1,4 +1,6 @@
- {{ .Inner }} +

+ {{ .Inner | markdownify }} +

{{ .Get "footer" }}
-
+ \ No newline at end of file diff --git a/layouts/shortcodes/epigraph.html b/layouts/shortcodes/epigraph.html index 2d60ad7..b991f27 100644 --- a/layouts/shortcodes/epigraph.html +++ b/layouts/shortcodes/epigraph.html @@ -1,11 +1,13 @@
{{ $t := .Get "type" }} -{{ if eq $t "compact" }}{{ .Inner }}{{ else }}

{{ .Inner }}

{{ end }} +{{ if eq $t "compact" }}{{ .Inner | markdownify }}{{ else }}

{{ .Inner | markdownify }}

{{ end }} {{ if .IsNamedParams }} {{ end }} diff --git a/layouts/shortcodes/marginnote.html b/layouts/shortcodes/marginnote.html index 285d03f..aa73245 100644 --- a/layouts/shortcodes/marginnote.html +++ b/layouts/shortcodes/marginnote.html @@ -1,3 +1,4 @@ -{{ $marginnoteDomIdSuffix := .Ordinal }} +{{ $marginnoteDomIdSuffix := .Ordinal }} + {{ .Inner | markdownify}} diff --git a/layouts/shortcodes/newthought.html b/layouts/shortcodes/newthought.html index 5fabf2d..f36eabc 100644 --- a/layouts/shortcodes/newthought.html +++ b/layouts/shortcodes/newthought.html @@ -1 +1 @@ -{{ .Inner }} +{{ .Inner | markdownify }} diff --git a/layouts/shortcodes/sidenote.html b/layouts/shortcodes/sidenote.html index 22a9a66..818bc91 100644 --- a/layouts/shortcodes/sidenote.html +++ b/layouts/shortcodes/sidenote.html @@ -1,3 +1,3 @@ {{ $sidenoteDomIdSuffix := .Ordinal }} -{{ .Inner }} +{{ .Inner | markdownify }} diff --git a/static/css/hugo-tufte-override.css b/static/css/hugo-tufte-override.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/hugo-tufte.css b/static/css/hugo-tufte.css deleted file mode 100644 index 25ac266..0000000 --- a/static/css/hugo-tufte.css +++ /dev/null @@ -1,285 +0,0 @@ -/* ------------------------------------------------------------------------ */ -/* hugo-tufte.css */ -/* Contains extensions to the original tufte.css styles to */ -/* accomodate a blog-like site. */ -/* ------------------------------------------------------------------------ */ - -/* When setting the primary font stack, apply it to the Pure grid units along */ -/* with `html`, `button`, `input`, `select`, and `textarea`. Pure Grids use */ -/* specific font stacks to ensure the greatest OS/browser compatibility. */ -html, button, input, select, textarea, p, nav, section, article, header, footer, .pure-g [class *= "pure-u"] { - font-family: "et-book", -apple-system, "San Francisco", "Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Open Sans","Helvetica Neue", "Lucida Grand", sans-serif; -} - -/* Hugo code blocks are
...
*/ -/*@media screen and (max-width: 760px) { - pre code { - } -}*/ - -code { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 1.125rem; - line-height: 1.6; -} - -pre code { - width: 52.5%; - font-size: 1.2rem; - padding-left: 2.5%; - display: block; - overflow-x: scroll; -} - -/*@media (max-width: 760px) { - pre code { - width: 90%; - padding: 0; - } - }*/ - -/* ------------------------------------------------------------------------ */ -/* Brand details, such as a sidebar or top display. */ -/* ------------------------------------------------------------------------ */ -header.brand{ - margin-top: 0.5em; -} - -/* Main brand title */ -header.brand h1 { - margin: 0; - font-weight: 400; - color: rgba(65, 70, 75, 1); -} - -header.brand h2 { - margin: 0; - padding-top: 0rem; - /*font-style: normal;*/ - /*font-weight: 200;*/ - color: rgba(100, 105, 110, 1); -} - -header.brand hr { - text-align: left; - margin-left: 0; - width: 75%; - border-color: rgba(250, 250, 250, 0.25); -} - -nav.menu ul { - list-style: none; - display: block; - /*text-align:center;*/ - margin-top: 0.75rem; - padding: 0; - max-width: 45rem; - /* Width is the same as tufte.css body */ - font-size: .9rem; - width: 87.5%; -} - -nav.menu li { - display: inline-block; - margin-right: 1rem; -} - -nav.menu li a { - text-decoration: none; - background: transparent; - color: rgba(65, 70, 75, 1); - letter-spacing: 0.05em; - text-transform: uppercase; -} - -nav.menu li a:hover, -nav.menu li a:active, -nav.menu li a:focus { - background: inherit; - color: darkgray; -} - -/* ------------------------------------------------------------------------ */ -/* Generic content, such as the index list pages */ -/* ------------------------------------------------------------------------ */ - -/* Content Title styling. This is mostly to avoid underlying links. */ -h1.content-title { - /*max-width: 50rem;*/ -} -h1.content-title a:link, -h1.content-title a:visited { - background: transparent; - text-decoration: none; - color: inherit; -} -h1.content-title a:hover, -h1.content-title a:focus { - color: darkgray; -} - -/* 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; -} - -/* ------------------------------------------------------------------------ */ - /* Styling for listing pages. */ -/* ------------------------------------------------------------------------ */ -.list-page ul { - list-style-type: none; - margin: -0.25em; - width: 87.5%; - max-width: 45rem; -} -.list-page li { - margin: 0; - /*font-size: 95%;*/ -} -.list-date { - display: inline; - font-size: 0.75em; - /* padding-right: 2em; */ - /* margin-right: 2em; */ -} - -/* 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; -} - -table { - font-size: 1.4rem; -} - -/* Footer, but with a different name to avoid conflicts with tufte.css */ -footer.page-footer{ - padding-top: 1em; - margin-top: 3em; - 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 { - text-align: left; - margin-left: 0; - width: 100%; - border-color: rgba(250, 250, 250, 0.25); -} - -footer.page-footer ul.page-footer-menu { - list-style: none; - display: block; - /*text-align:center;*/ - margin: 0; - padding: 0; -} - -footer.page-footer ul.page-footer-menu li { - display: inline-block; - margin-right: 0.5rem; - font-size: 55%; -} - -.copyright { -} -.copyright p { - font-size: 90%; -} - -/* ------------------------------------------------------------------------ */ -/* Post Archive. */ -/* ------------------------------------------------------------------------ */ -/* 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 { -} - - - -/* ------------------------------------------------------------------------ */ -/* MathJax styling -/* ------------------------------------------------------------------------ */ -.MathJax { - font: inherit; - color: inherit; - font-size: 100%; - background: inherit; - border: inherit; -} - -.MathJax_Display { - font: inherit; - color: inherit; - font-size: 100%; - background: inherit; - border: inherit; - padding-bottom: 1rem; - /* max-width: 45rem; */ - overflow-x: auto; - overflow-y: auto; -} diff --git a/static/css/tufte.css b/static/css/tufte.css deleted file mode 100644 index a3f2932..0000000 --- a/static/css/tufte.css +++ /dev/null @@ -1,274 +0,0 @@ -/* 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; -} - -/* Tufte CSS styles */ -html { font-size: 15px; } - -body { width: 87.5%; - margin-left: auto; - margin-right: auto; - padding-left: 12.5%; - font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; - background-color: #fffff8; - color: #111; - max-width: 1400px; - counter-reset: sidenote-counter; } - -h1 { font-weight: 400; - margin-top: 4rem; - margin-bottom: 1.5rem; - font-size: 3.2rem; - line-height: 1; } - -h2 { font-style: italic; - font-weight: 400; - margin-top: 2.1rem; - margin-bottom: 0; - font-size: 2.2rem; - line-height: 1; } - -h3 { font-style: italic; - font-weight: 400; - font-size: 1.7rem; - margin-top: 2rem; - margin-bottom: 0; - line-height: 1; } - -p.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; } - -p, ol, ul { font-size: 1.4rem; } - -p { line-height: 2rem; - margin-top: 1.4rem; - margin-bottom: 1.4rem; - padding-right: 0; - vertical-align: baseline; } - -/* Chapter Epigraphs */ -div.epigraph { margin: 5em 0; } - -div.epigraph > blockquote { margin-top: 3em; - margin-bottom: 3em; } - -div.epigraph > blockquote, div.epigraph > blockquote > p { font-style: italic; } - -div.epigraph > blockquote > footer { font-style: normal; } - -div.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; } - -ol, ul { width: 45%; - -webkit-padding-start: 5%; - -webkit-padding-end: 5%; } - -li { padding: 0.5rem 0; } - -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; } - -a:link { text-decoration: none; - background: -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#333, #333); - background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(#333, #333); - -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; - -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; - background-size: 0.05em 1px, 0.05em 1px, 1px 1px; - background-repeat: no-repeat, no-repeat, repeat-x; - text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, -0.15em 0 #fffff8; - background-position: 0% 93%, 100% 93%, 0% 93%; } - -@media screen and (-webkit-min-device-pixel-ratio: 0) { a:link { background-position-y: 87%, 87%, 87%; } } - -a:link::selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe; - background: #b4d5fe; } - -a:link::-moz-selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe; - background: #b4d5fe; } - -/* 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: 1.0rem; - line-height: 1.6; } - -.sidenote-number { counter-increment: sidenote-counter; } - -.sidenote-number:after, .sidenote:before { content: counter(sidenote-counter) " "; - font-family: et-book-roman-old-style; - position: relative; - vertical-align: baseline; } - -.sidenote-number:after { content: counter(sidenote-counter); - font-size: 1rem; - top: -0.5rem; - left: 0.1rem; } - -.sidenote:before { content: counter(sidenote-counter) " "; - top: -0.5rem; } - -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; } - -@media screen and (max-width: 760px) { p, footer { width: 90%; } - pre.code { width: 87.5%; } - ul { 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: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; - letter-spacing: .03em; } - -.code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 1.125rem; - line-height: 1.6; } - -h1 .code, h2 .code, h3 .code { font-size: 0.80em; } - -.marginnote .code, .sidenote .code { font-size: 1rem; } - -pre.code { width: 52.5%; - padding-left: 2.5%; - overflow-x: scroll; } - -.fullwidth { max-width: 90%; - clear:both; } - -span.newthought { font-variant: small-caps; - font-size: 1.2em; } - -input.margin-toggle { display: none; } - -label.sidenote-number { display: inline; } - -label.margin-toggle:not(.sidenote-number) { display: none; } - -@media (max-width: 760px) { label.margin-toggle:not(.sidenote-number) { 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; } - label { cursor: pointer; } - 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%; } } diff --git a/static/favicon/favicon.ico b/static/favicon/favicon.ico new file mode 100644 index 0000000..4258594 Binary files /dev/null and b/static/favicon/favicon.ico differ diff --git a/theme.toml b/theme.toml index 7a1680a..f823287 100644 --- a/theme.toml +++ b/theme.toml @@ -1,12 +1,14 @@ name = "Tufte" license = "MIT" -licenselink = "https://github.com/shawnohare/hugo-tufte/blob/master/LICENSE.md" +licenselink = "https://github.com/slashformotion/hugo-tufte/blob/master/LICENSE.md" description = "A minimalist blog theme using Tufte-css." -homepage = "http://github.com/shawnohare/hugo-tufte" -tags = ["blog", "tufte", "minimal"] +homepage = "https://github.com/slashformotion/hugo-tufte" +demo = "https://slashformotion.github.io/hugo-tufte/" +tags = ["blog", "tufte", "minimal", 'light', "personal"] features = ["math", "tufte-css", "tufte"] -min_version = 0.15 +min_version = 0.83 -[author] - name = "Shawn O'Hare" - homepage = "http://www.shawnohare.com" +authors = [ + {name = "Shawn O'Hare", homepage = "http://www.shawnohare.com"}, + {name = "Slashformotion", homepage = "https://github.com/slashformotion"} +]