diff --git a/assets/css/extended/zpb-tufte-sidenotes.css b/assets/css/extended/zpb-tufte-sidenotes.css new file mode 100644 index 0000000..d16df6d --- /dev/null +++ b/assets/css/extended/zpb-tufte-sidenotes.css @@ -0,0 +1,106 @@ +/* Unabashedly stolen from tufte-css https://github.com/edwardtufte/tufte-css */ +/* 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) " "; + 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; } + +@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: sans-serif; + letter-spacing: .03em; } + +.code { font-family: 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/layouts/shortcodes/div.html b/layouts/shortcodes/div.html new file mode 100644 index 0000000..1addae0 --- /dev/null +++ b/layouts/shortcodes/div.html @@ -0,0 +1,1533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hugo-tufte/div.html at master · shawnohare/hugo-tufte · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + + + +
+ + + +
+ + + + + + + + + + +
+
+
+ + + + + + + + + + + + + +
+ + + + + + +
+ + +
+ + + + + + +Permalink + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + Go to file + + +
+ + + + + +
+
+
+ + + + + + + + + +
+ +
+
+ + + +
+ + + + + + + + + +
+
+ + Latest commit + b9ec18d + Jan 1, 2016 + + + + + + History + + +
+
+
Add the epigraph shortcode.  This should complete the Tufte-CSS
+specific shortcodes.  Additionally, the section and div shortcodes
+were refactored for ease of use.
+ +
+ +
+
+ + + 1 + + contributor + + +
+ +

+ Users who have contributed to this file +

+
+ + + + + + +
+
+
+
+ + + + + + + + +
+ +
+ + +
+ + 8 lines (8 sloc) + + 236 Bytes +
+ + + +
+ +
+
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ $loc := .Get 0 }}
{{ if .IsNamedParams }}
<div {{with .Get "class"}} class="{{.}}"{{end}}{{with .Get "id"}} id="{{.}}"{{end}}>
{{ else if or (eq $loc "") (eq $loc "begin") }}
<div>
{{ else if eq $loc "end" }}
</div>
{{ end }}
+
+ + + +
+ +
+ + + + +
+ + +
+ + +
+
+ + +
+ +
+ + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/layouts/shortcodes/marginnote.html b/layouts/shortcodes/marginnote.html new file mode 100644 index 0000000..a04eb67 --- /dev/null +++ b/layouts/shortcodes/marginnote.html @@ -0,0 +1,1513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hugo-tufte/marginnote.html at master · shawnohare/hugo-tufte · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + + + +
+ + + +
+ + + + + + + + + + +
+
+
+ + + + + + + + + + + + + +
+ + + + + + +
+ + +
+ + + + + + +Permalink + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + Go to file + + +
+ + + + + +
+
+
+ + + + + + + + + +
+ +
+
+ + @cwimmer + + +
+ + Latest commit + e70a1f0 + Jan 31, 2021 + + + + + + History + + +
+
+ +
+ +
+
+ + + 3 + + contributors + + +
+ +

+ Users who have contributed to this file +

+
+ + + + + + +
+
+ + + @shawnohare + + @jeremyf + + @cwimmer + + + +
+
+ + + + + + + + +
+ +
+ + +
+ + 3 lines (3 sloc) + + 316 Bytes +
+ + + +
+ +
+
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + +
{{ $marginnoteDomIdSuffix := .Ordinal }}<label for="marginnote-{{.Page.File.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle">&#8853;</label>
<input type="checkbox" id="marginnote-{{.Page.File.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle"/>
<span class="marginnote">{{ .Inner }}</span>
+
+ + + +
+ +
+ + + + +
+ + +
+ + +
+
+ + +
+ +
+ + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/layouts/shortcodes/sidenote.html b/layouts/shortcodes/sidenote.html new file mode 100644 index 0000000..61b29d1 --- /dev/null +++ b/layouts/shortcodes/sidenote.html @@ -0,0 +1,1513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hugo-tufte/sidenote.html at master · shawnohare/hugo-tufte · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + + + +
+ + + +
+ + + + + + + + + + +
+
+
+ + + + + + + + + + + + + +
+ + + + + + +
+ + +
+ + + + + + +Permalink + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + Go to file + + +
+ + + + + +
+
+
+ + + + + + + + + +
+ +
+
+ + @cwimmer + + +
+ + Latest commit + e70a1f0 + Jan 31, 2021 + + + + + + History + + +
+
+ +
+ +
+
+ + + 3 + + contributors + + +
+ +

+ Users who have contributed to this file +

+
+ + + + + + +
+
+ + + @shawnohare + + @jeremyf + + @cwimmer + + + +
+
+ + + + + + + + +
+ +
+ + +
+ + 3 lines (3 sloc) + + 313 Bytes +
+ + + +
+ +
+
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + +
{{ $sidenoteDomIdSuffix := .Ordinal }}<label for="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle sidenote-number"></label>
<input type="checkbox" id="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle"/>
<span class="sidenote">{{ .Inner }}</span>
+
+ + + +
+ +
+ + + + +
+ + +
+ + +
+
+ + +
+ +
+ + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +