commit b3a2e36507a8fba40561c67933c37607670ea249 Author: Shawn O'Hare Date: Tue Dec 29 18:35:20 2015 -0800 Initial commit. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..0a69324 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 Shawn O'Hare + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3649fbe --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# Tufte Hugo Theme + +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://githubcom/edwardtufte/tufte-css) project. +It supports mathematical typesetting via [MathJax](https://www.mathjax.org). +By utilizing copious partial templates the theme is largely customizable. + +## Site Parameters + +The site specific parameters that this theme :wrecognizes are: + +- `subtitle` string: This is displayed under the main title. +- `showPoweredBy` boolean: if true, display a shoutout to Hugo and this theme. +- `copyrightHolder` string: Inserts the value in the default copyright notice. +- `copyright` string: Custom copyright notice. + +## Page Parameters + +- `hideDate` boolean: if true, do not display a page date. When `meta` is set to + true, `hideDate` takes greater precedence. +- `hideReadTime` boolean: if true, do not display the page's reading time + estimate. When `meta` is set to true, `hideReadTime` takes greater precedence. +- `math` boolean: if true, try to render the page's LaTeX code using MatheJax. The + theme follows the conventions in [Hugo's MathJax tutorial]. +- `meta` boolean: if true, display page meta-data author, date, categories provided + these page parameters exist and are not overridden. Content in the `/post` directory, + (i.e., pages of type "post") ignore this parameter. +- `toc` boolean: if true, display the table of contents for the page. + +## Templates +TODO +- [ ] Describe the role of each template file, as commenting within the files + themselves seems to break the templates. diff --git a/archetypes/page.md b/archetypes/page.md new file mode 100644 index 0000000..5dbf7df --- /dev/null +++ b/archetypes/page.md @@ -0,0 +1,10 @@ ++++ +math = false +meta = false +toc = false +author = "AUTHOR NAME" + ++++ + + + diff --git a/archetypes/post.md b/archetypes/post.md new file mode 100644 index 0000000..2454f9f --- /dev/null +++ b/archetypes/post.md @@ -0,0 +1,10 @@ ++++ +math = false +meta = true +toc = true +author = "AUTHOR NAME" + ++++ + + + diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..2d10d95 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,10 @@ +{{ partial "header.html" . }} +{{ partial "subheader.html" . }} + +
+
+

{{ .Title }}

+
+
+ +{{ partial "footer.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..0792a9c --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,43 @@ +{{ partial "header.html" . }} + + +
+
+ {{ partial "brand.html" . }} + +

{{ .Title }}

+ + {{ range .Data.Pages.GroupByDate "2006" }} +
+ {{ .Key }} ({{ len .Pages }}) + + {{ range .Pages.GroupByDate "January" }} +
+
    +
  • +
    + {{ .Key }} ({{ len .Pages }}) + {{ range .Pages }} +
      +
    • + {{ .Date.Format "Jan 2" }} · + {{.Title}} +
    • +
    + {{ end }} + +
    +
  • +
+
+ {{ end }} +
+ {{ end }} + + + {{ partial "footer.html" . }} +
+ +
+ + diff --git a/layouts/_default/paginate.list.html b/layouts/_default/paginate.list.html new file mode 100644 index 0000000..73b34a5 --- /dev/null +++ b/layouts/_default/paginate.list.html @@ -0,0 +1,21 @@ +{{ .Title }} + +Hello this is a list of content. +{{ .TableOfContents }} + +{{ $paginator := .Paginate ( (.Data.Pages.GroupByDate "2006") ) }} + + + +{{ range $paginator.PageGroups }} +

{{ .Key }}

+ {{ range .Pages }} +
+ {{.Title}} + {{ end }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..ccb8acc --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,23 @@ +{{ partial "header.html" . }} + + +
+
+ {{ partial "brand.html" . }} + {{ partial "content.header.html" . }} + {{ if .Params.toc }} +
+

Contents

+ {{ .TableOfContents }} +
+ {{ end }} + {{ .Content }} + + {{ partial "disqus.html" . }} + {{ partial "footer.html" . }} +
+
+ + {{ partial "body.includes.html" . }} + + diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..f594868 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1 @@ +{{ .Summary }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..2370442 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,60 @@ +{{ partial "header.html" . }} + + + +
+
+ {{ partial "brand.html" . }} + +

{{ .Title }}

+ {{ $data := .Data }} +
+
+

By Frequency

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

Alphabetically

+ + + + + + + + + {{ range $key, $value := .Data.Terms.Alphabetical}} + + + + + {{ end }} + +
TermCount
+ {{ $value.Name}} + {{ $value.Count }}
+
+
+ {{ partial "footer.html" . }} +
+
+ + diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..18632e2 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,23 @@ +{{ partial "header.html" . }} +{{ partial "math.html" . }} + + +
+ {{ partial "brand.html" . }} + + {{ range first 5 .Site.Pages }} +
+ {{ partial "content.header.html" . }} +

{{ .Summary }}

+ {{ if .Truncated }} + Read On → + {{ end }} +
+ {{ end }} + + {{ partial "footer.html" . }} + + {{ partial "body.includes.html" . }} +
+ + diff --git a/layouts/partials/body.includes.html b/layouts/partials/body.includes.html new file mode 100644 index 0000000..026abba --- /dev/null +++ b/layouts/partials/body.includes.html @@ -0,0 +1 @@ + diff --git a/layouts/partials/brand.html b/layouts/partials/brand.html new file mode 100644 index 0000000..f601b71 --- /dev/null +++ b/layouts/partials/brand.html @@ -0,0 +1,7 @@ +
+
+

{{ .Site.Title}}

+

{{ .Site.Params.subtitle }}

+ {{ partial "nav.html" . }} +
+
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/content.header.html b/layouts/partials/content.header.html new file mode 100644 index 0000000..3ffd2b7 --- /dev/null +++ b/layouts/partials/content.header.html @@ -0,0 +1,35 @@ +

{{ .Type }}

+

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

+{{ if .Params.subtitle }}

{{ .Params.subtitle }}

{{ end }} +{{ if or (eq .Type "post") (.Params.meta) }} + + {{ if .Params.author }} +   +  {{ .Params.author }}
+ {{ end }} + + + {{ if not .Params.hidedate }} + +  {{ .Date.Format "Jan 2, 2006" }} + {{end }} + + {{ if not .Params.hidereadtime }} +   +  {{ .ReadingTime }} min read + {{ end }} + + {{ if .Params.categories }} +
+ + {{ range .Params.categories }} + {{ . }} + {{ end }} + {{ end }} +
+{{ end }} diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html new file mode 100644 index 0000000..64a4a3b --- /dev/null +++ b/layouts/partials/disqus.html @@ -0,0 +1,19 @@ +{{ if .Params.comments }} +
+ + + comments powered by Disqus +{{ end }} diff --git a/layouts/partials/doctype.html b/layouts/partials/doctype.html new file mode 100644 index 0000000..6cab5bb --- /dev/null +++ b/layouts/partials/doctype.html @@ -0,0 +1,2 @@ + + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..18a89dd --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,26 @@ +
+ + + {{ if .Site.Params.showPoweredBy}} +

+ Powered by Hugo and the + Morphism theme. +

+ {{ end }} + + +
diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..bc494d1 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,7 @@ +{{ 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 new file mode 100644 index 0000000..055f50c --- /dev/null +++ b/layouts/partials/header.includes.html @@ -0,0 +1,28 @@ + +{{ if eq .Params.math true }} + {{ partial "math.html" . }} +{{ end }} + + + + + + + + + + + + + + + + + + + + + + diff --git a/layouts/partials/highlight.html b/layouts/partials/highlight.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/math.html b/layouts/partials/math.html new file mode 100644 index 0000000..37f1595 --- /dev/null +++ b/layouts/partials/math.html @@ -0,0 +1,18 @@ + + + diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html new file mode 100644 index 0000000..632f64e --- /dev/null +++ b/layouts/partials/meta.html @@ -0,0 +1,7 @@ + + + + + + +{{ .Hugo.Generator }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..54faf95 --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,5 @@ + + {{ range .Site.Menus.nav }} + {{ .Pre }}{{ .Name }} + {{ end }} + diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/social.html b/layouts/partials/social.html new file mode 100644 index 0000000..2ebaf36 --- /dev/null +++ b/layouts/partials/social.html @@ -0,0 +1 @@ + diff --git a/layouts/partials/subheader.html b/layouts/partials/subheader.html new file mode 100644 index 0000000..e69de29 diff --git a/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot new file mode 100755 index 0000000..3610c74 Binary files /dev/null and b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot differ diff --git a/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg new file mode 100755 index 0000000..254f4cc --- /dev/null +++ b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf new file mode 100755 index 0000000..9798360 Binary files /dev/null and b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf differ diff --git a/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff new file mode 100755 index 0000000..c6685a1 Binary files /dev/null and b/static/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff differ diff --git a/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot new file mode 100755 index 0000000..88a6c74 Binary files /dev/null and b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot differ diff --git a/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg new file mode 100755 index 0000000..881a6bd --- /dev/null +++ b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf new file mode 100755 index 0000000..9da91de Binary files /dev/null and b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf differ diff --git a/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff new file mode 100755 index 0000000..b0e5b68 Binary files /dev/null and b/static/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff differ diff --git a/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot new file mode 100755 index 0000000..22fff5b Binary files /dev/null and b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot differ diff --git a/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg new file mode 100755 index 0000000..c5013b3 --- /dev/null +++ b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf new file mode 100755 index 0000000..daceffb Binary files /dev/null and b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf differ diff --git a/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff new file mode 100755 index 0000000..440ae04 Binary files /dev/null and b/static/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff differ diff --git a/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot new file mode 100755 index 0000000..4ef9973 Binary files /dev/null and b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot differ diff --git a/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg new file mode 100755 index 0000000..24cf3ef --- /dev/null +++ b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf new file mode 100755 index 0000000..5ae5198 Binary files /dev/null and b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf differ diff --git a/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff new file mode 100755 index 0000000..10eb336 Binary files /dev/null and b/static/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff differ diff --git a/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot new file mode 100755 index 0000000..bcc6f9d Binary files /dev/null and b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot differ diff --git a/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg new file mode 100755 index 0000000..a6c168a --- /dev/null +++ b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf new file mode 100755 index 0000000..725af42 Binary files /dev/null and b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf differ diff --git a/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff new file mode 100755 index 0000000..5753ca4 Binary files /dev/null and b/static/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff differ diff --git a/static/css/hugo-tufte.css b/static/css/hugo-tufte.css new file mode 100644 index 0000000..7d96155 --- /dev/null +++ b/static/css/hugo-tufte.css @@ -0,0 +1,236 @@ +/* hugo-tufte.css */ +/* Contains extensions to the original tufte.css styles to */ +/* accomodate a blog-like site. */ + +/* ------------------------------------------------------------------------ */ +/* Brand details, such as a sidebar or top display. */ +/* ------------------------------------------------------------------------ */ +.brand{ + margin-top: 0.5em; +} + +/* Main brand title */ +.brand h1 { + margin: 0; + font-weight: 400; + color: rgba(65, 70, 75, 1); +} + +/* Brand subtitles */ +.brand h2 { + margin: 0; + font-weight: 200; + color: rgba(100, 105, 110, 1); +} + +.nav { + display: inline-block; + *display: inline; + zoom: 1; + margin-top: 0.4em; + padding: 0; +} +.nav a { + text-decoration: none; + background: transparent; + color: rgba(65, 70, 75, 1); + padding: 0.5em; + letter-spacing: 0.05em; + text-transform: uppercase; + font-size: 90%; +} +.nav a:hover, +.nav a:active, +.nav a:focus { + background: inherit; + color: lightgray; +} + +/* ------------------------------------------------------------------------ */ +/* Generic content, such as the index list pages */ +/* ------------------------------------------------------------------------ */ + +/* Content Title styling. This is mostly to avoid underlying links. */ +h1.content-title a { + background: transparent; + text-decoration: none; + color: inherit; +} +h1.content-title a:hover, +h1.content-title a:focus { + color: lightgray; +} +h1.content-title-mini { + text-transform: uppercase; + color: rgba(170, 170, 170, 1); + /*border-bottom: 1px solid #eee;*/ + padding: 0.4em 0; + margin-top: 2em; + font-size: 80%; + font-weight: normal; + letter-spacing: 0.1em; +} + +/* Content meta-data such as author, publication date, etc. */ +.content-meta { + display: block; + color: rgba(155, 155, 155, 1); + font-size: 90%; + margin-top: 1em; +} + +.content-meta .author { + /*color: rgb(90, 20, 55)*/ + color: rgba(65, 70, 75, 1); +} + +/* Content envelope that limits the max width. */ +.content-column { + max-width: 38em; + margin: 0 auto; +} + + +/* ------------------------------------------------------------------------ */ +/* Posts FIXME can probably delete */ +/* ------------------------------------------------------------------------ */ +.post-summary { + padding-bottom: 2em; +} + +.post-avatar { + border-radius: 50px; + float: right; + margin-left: 1em; +} + +/* ------------------------------------------------------------------------ */ + /* Styling for listing pages. */ +/* ------------------------------------------------------------------------ */ +.list-page { + +} +.list-page ul { + margin: -0.25em; +} +.list-page li { + margin: 0; + font-size: 95%; +} +.list-date { + display: inline; + font-size: 0.75em; + color: #9a9a9a; + /* padding-right: 2em; */ + /* margin-right: 2em; */ +} + +/* Table of Contents */ +.toc { + /*float: right;*/ + padding: 0 1rem 1rem 1rem; + border-left: 1px solid #eee; +} + +.toc h1 { + font-weight: lighter; + font-size: 1em; +} + +.toc ul { +} + +.toc li { + font-size: 0.9em; + margin: 0.3em; +} + +/* Footer, but with a different name to avoid conflicts with tufte.css */ +.fineprint{ + padding-top: 1em; + margin-top: 3em; + color: #aaa; +} +.fineprint p { + font-size: 100%; + margin: 0em; + /* light font looked odd on chrome */ + /*font-weight: lighter;*/ +} +.fineprint a { + color: rgba(65, 70, 75, 1); + text-decoration: none; + background: transparent; +} +.fineprint hr { + text-align: left; + margin-left: 0; + width: 55%; + color: #aaa; + background-color: red; + border-color: #fff; +} + +ul.footer-menu { + list-style: none; + display: block; + /*text-align:center;*/ + margin: 0; + padding: 0; +} +.footer-menu li { + display: inline-block; + margin-right: 0.5rem; + font-size: 75%; +} + +.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 { + font-size: 100%; + font-weight: 300; + vertical-align: top; + padding: .3em .5em; + outline: none; + color: rgba(65, 70, 75, 1); +} + +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; + max-width: 38em; + overflow-x: auto; + overflow-y: auto; +} diff --git a/static/css/tufte.css b/static/css/tufte.css new file mode 100644 index 0000000..a3f2932 --- /dev/null +++ b/static/css/tufte.css @@ -0,0 +1,274 @@ +/* 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/theme.toml b/theme.toml new file mode 100644 index 0000000..c60f0d5 --- /dev/null +++ b/theme.toml @@ -0,0 +1,12 @@ +name = "Tufte" +license = "MIT" +licenselink = "https://github.com/shawnohare/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"] +features = ["math", "tufte-css"] +min_version = 0.15 + +[author] + name = "Shawn O'Hare" + homepage = "https://shawnohare.com"