jekyll-theme-tufte 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +24 -0
  3. data/README.md +81 -0
  4. data/_config.yml +18 -0
  5. data/_includes/footer.html +11 -0
  6. data/_includes/head.html +25 -0
  7. data/_includes/header.html +33 -0
  8. data/_includes/print-footer.html +1 -0
  9. data/_layouts/blog.html +30 -0
  10. data/_layouts/default.html +12 -0
  11. data/_layouts/page-hero.html +8 -0
  12. data/_layouts/page.html +8 -0
  13. data/_layouts/post.html +12 -0
  14. data/_sass/_extras.scss +362 -0
  15. data/_sass/_settings.scss +16 -0
  16. data/_sass/_site-style.scss +1 -0
  17. data/_sass/_style_base16.monokai.dark.css +81 -0
  18. data/_sass/_style_github.css +221 -0
  19. data/_sass/_syntax-highlighting.scss +11 -0
  20. data/_sass/_tufte.scss +447 -0
  21. data/assets/css/fonts-et-book.css +38 -0
  22. data/assets/css/fonts-lato.css +92 -0
  23. data/assets/css/latex.scss +21 -0
  24. data/assets/css/main.scss +14 -0
  25. data/assets/fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff +0 -0
  26. data/assets/fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff +0 -0
  27. data/assets/fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff +0 -0
  28. data/assets/fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff +0 -0
  29. data/assets/fonts/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff +0 -0
  30. data/assets/fonts/lato-latin/LatoLatin-Black.woff2 +0 -0
  31. data/assets/fonts/lato-latin/LatoLatin-BlackItalic.woff2 +0 -0
  32. data/assets/fonts/lato-latin/LatoLatin-Bold.woff2 +0 -0
  33. data/assets/fonts/lato-latin/LatoLatin-BoldItalic.woff2 +0 -0
  34. data/assets/fonts/lato-latin/LatoLatin-Heavy.woff2 +0 -0
  35. data/assets/fonts/lato-latin/LatoLatin-HeavyItalic.woff2 +0 -0
  36. data/assets/fonts/lato-latin/LatoLatin-Italic.woff2 +0 -0
  37. data/assets/fonts/lato-latin/LatoLatin-Light.woff2 +0 -0
  38. data/assets/fonts/lato-latin/LatoLatin-LightItalic.woff2 +0 -0
  39. data/assets/fonts/lato-latin/LatoLatin-Medium.woff2 +0 -0
  40. data/assets/fonts/lato-latin/LatoLatin-MediumItalic.woff2 +0 -0
  41. data/assets/fonts/lato-latin/LatoLatin-Regular.woff2 +0 -0
  42. data/assets/fonts/lato-latin/LatoLatin-Thin.woff2 +0 -0
  43. data/assets/fonts/lato-latin/LatoLatin-ThinItalic.woff2 +0 -0
  44. data/assets/fonts/lato-latin/OFL.txt +94 -0
  45. data/blog/index.md +5 -0
  46. data/lib/jekyll-theme-tufte/epigraph.rb +59 -0
  47. data/lib/jekyll-theme-tufte/fullwidth.rb +36 -0
  48. data/lib/jekyll-theme-tufte/main_column_img.rb +36 -0
  49. data/lib/jekyll-theme-tufte/margin_figure.rb +44 -0
  50. data/lib/jekyll-theme-tufte/marginnote.rb +27 -0
  51. data/lib/jekyll-theme-tufte/mathjaxtag.rb +27 -0
  52. data/lib/jekyll-theme-tufte/newthought.rb +32 -0
  53. data/lib/jekyll-theme-tufte/sidenote.rb +27 -0
  54. data/lib/jekyll-theme-tufte.rb +10 -0
  55. metadata +154 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 74393a043fe873cb442b2c7c7ac2ee0ea78886bc82eb88cfaae8b7d2a7b212bf
4
+ data.tar.gz: 1a1640cdc0349836de87daf17dd44b14cf7e43b8f56b93278315a4ffa7685222
5
+ SHA512:
6
+ metadata.gz: f2fe188c0c3c39a5ed09a19d9f1e79f6afea16bb0a56d8811fcebf39cff9d97f6f7e7d056b778503d45739266db3ddca8be71f5a381d5591d6e5dc921d664939
7
+ data.tar.gz: aaae0fa97e69b528b829fe7f74c444f7378c4716ca557fe7820c37ca4841bd2e3a1aba191f217a6a6b21238dd2fba11d77b67ef734141bcec14dad022443a57f
data/LICENSE.txt ADDED
@@ -0,0 +1,24 @@
1
+ The MIT License (MIT)
2
+
3
+ Derived from work copyright (c) 2015 Clay H, used under MIT license
4
+ Derived from work copyright (c) 2016 Stephan Druskat, used under MIT license
5
+ Derived from work copyright (c) 2016 Jacob Zimmerman, used under MIT license
6
+ Copyright (c) 2022 Andy Brody
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # jekyll-theme-tufte
2
+
3
+ ## *A modern Jekyll theme based on [tufte-css](https://github.com/edwardtufte/tufte-css)*
4
+
5
+ *jekyll-theme-tufte* is a [Jekyll](https://jekyllrb.com) static website theme inspired by the text design of Edward
6
+ Tufte. It is enabled by [*tufte-css*](https://github.com/edwardtufte/tufte-css),
7
+ a CSS file providing the Tufte styles.
8
+
9
+ This is a gem-packaged theme that can be easily installed by including
10
+ *jekyll-theme-tufte* in your `Gemfile`.
11
+
12
+ Large portions of the theme are derived from prior work to bring *tufte-css* to Jekyll, including:
13
+
14
+ * [*tufte-css-jekyll*](https://github.com/sdruskat/tufte-css-jekyll), a classic-style Jekyll theme
15
+ * [*tufte-jekyll*](https://github.com/clayh53/tufte-jekyll), a classic-style theme with a lot of extra visual stuff added
16
+ * [*tufte-pandoc-jekyll*](https://github.com/jez/tufte-pandoc-jekyll), a gem-style theme that uses pandoc under the hood
17
+ * [*ET-Jekyll*](https://github.com/bradleytaunt/ET-Jekyll), a classic-style theme that makes a number of CSS changes
18
+
19
+ This theme is minimalist and tries to stick closely to the original tufte-css styles. As a gem-based theme, it is also easier to install and manage compared to classic style themes. (Classic Jekyll themes are installed by mixing all the files in with your site’s files, which creates a big mess.)
20
+
21
+ This theme is responsive and adapts to desktop and mobile screens. (Margin notes
22
+ are displayed inline on narrow screens.) It also supports dark mode detection
23
+ via `prefers-color-scheme`, looking good on dark and light backgrounds alike.
24
+
25
+ ### [Try out the demo!](https://ab.github.io/jekyll-theme-tufte/)
26
+
27
+ [![demo-screenshot](./screenshot.png)](https://ab.github.io/jekyll-theme-tufte/)
28
+
29
+ ## Installation
30
+
31
+ Add this line to your Jekyll site's `Gemfile`:
32
+
33
+ ```ruby
34
+ gem 'jekyll-theme-tufte'
35
+ ```
36
+
37
+ And add these lines to your Jekyll site's `_config.yml`:
38
+
39
+ ```yaml
40
+ theme: jekyll-theme-tufte
41
+ plugins:
42
+ - jekyll-theme-tufte
43
+ ```
44
+
45
+ (Adding the theme to the plugins list is necessary if you want to use the
46
+ custom Liquid template tags like `{% marginnote ... %}`. If you already have a
47
+ plugins list, append `- jekyll-theme-tufte` to the list.)
48
+
49
+ Then, to install all the gem dependencies, run:
50
+
51
+ $ bundle
52
+
53
+ Or install it manually with:
54
+
55
+ $ gem install jekyll-theme-tufte
56
+
57
+ ## Usage
58
+
59
+ If you are new to Jekyll, check out the [Jekyll documentation](https://jekyllrb.com/docs/home/) first.
60
+
61
+ ### Some theme specifics
62
+
63
+ - The **large site title (and subtitle)** can be switched on/off by setting the value for `header` in `_config.yml` to false.
64
+
65
+ - The nav menu page order and titles can be configured in the YAML front matter at the top of each page. See [Available Page Layouts](https://ab.github.io/jekyll-theme-tufte/page/layouts) in the demo site for more info.
66
+
67
+ ## Contributing
68
+
69
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ab/jekyll-theme-tufte. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
70
+
71
+ ## Development of the theme
72
+
73
+ To set up your environment to develop this theme, clone the theme and run `bundle install`.
74
+
75
+ Themes work much like normal Jekyll sites, so to test changes to the theme, run `bundle exec jekyll serve -w` and open your browser at `http://localhost:4000/jekyll-theme-tufte/`. This starts a Jekyll server running the theme demo site.
76
+
77
+ Only files listed in the regex in the gemspec are included in the published theme. Custom directories can be added by editing the regex in `jekyll-theme-tufte.gemspec`.
78
+
79
+ ## License
80
+
81
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/_config.yml ADDED
@@ -0,0 +1,18 @@
1
+ # Note: Remove the baseurl in order to deploy at the domain root
2
+ baseurl: /jekyll-theme-tufte
3
+ title: jekyll-theme-tufte
4
+ # Whether the header (with large title and subtitle) should be displayed
5
+ header: false
6
+ subtitle: A Jekyll theme based on tufte-css
7
+ author: Andy Brody
8
+ description: A Jekyll theme based on tufte-css
9
+ markdown: kramdown
10
+ markdown_ext: "markdown,mkdown,mkdn,mkd,md"
11
+ highlighter: rouge
12
+ # permalink: /blog/:categories/:year/:month/:day/:title.html
13
+ permalink: /blog/:categories/:slug
14
+ timezone: America/New_York
15
+ excerpt_separator: <!--more-->
16
+ exclude: ['Gemfile', 'Gemfile.lock', 'Rakefile', 'README.md']
17
+ plugins:
18
+ - jekyll-feed
@@ -0,0 +1,11 @@
1
+ <footer class="page-footer">
2
+ <div class="credits faded">
3
+ <span>&copy; {{ site.time | date: '%Y' }}
4
+ {% if site.email == "" or site.email == nil %}
5
+ {{ site.author }}
6
+ {% else %}
7
+ <a href="mailto:{{ site.email }}">{{site.author}}</a>
8
+ {% endif %}
9
+ </span>
10
+ </div>
11
+ </footer>
@@ -0,0 +1,25 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+
6
+ {% if page.head_title %}
7
+ <title>{{ page.head_title }}</title>
8
+ {% else %}
9
+ {% if page.collection == "posts" %}
10
+ <title>{{ page.title | default: "Post" }}{% if site.author %} | by {{ site.author }}{% endif %}</title>
11
+ {% else %}
12
+ <title>{% if page.nav_title or page.title %}{{ page.nav_title | default: page.title }} | {% endif %}{{ site.title }}</title>
13
+ {% endif %}
14
+ {% endif %}
15
+ <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
16
+
17
+ <link rel="stylesheet" type="text/css" href="{{ "/assets/css/main.css" | prepend: site.baseurl }}">
18
+ <link rel="stylesheet" type="text/css" href="{{ "/assets/css/fonts-et-book.css" | prepend: site.baseurl }}">
19
+ <link rel="stylesheet" type="text/css" href="{{ "/assets/css/fonts-lato.css" | prepend: site.baseurl }}">
20
+ <link rel="stylesheet" type="text/css" href="{{ "/assets/css/latex.css" | prepend: site.baseurl }}">
21
+
22
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
23
+
24
+ {% feed_meta %}{% comment %} Insert link to RSS feed via jekyll-feed plugin {% endcomment %}
25
+ </head>
@@ -0,0 +1,33 @@
1
+ <!--- Header and nav template site-wide -->
2
+ <header>
3
+ {% if site.header == true %}
4
+ <h1 class="header-title"><a href="{{site.baseurl}}/">{{ site.title }}</a></h1>
5
+ {% unless site.subtitle == "" or site.subtitle == nil %}
6
+ <h2 class="header-subtitle">{{ site.subtitle }}</h2>
7
+ {% endunless %}
8
+ {% endif %}
9
+
10
+ <nav class="group">
11
+ <ul>
12
+ {%- assign pg = site.pages | sort: "weight" %}
13
+ {%- for node in pg %}
14
+ {%- if node.nav_exclude or node.url contains ".css" or node.url contains ".scss" %}
15
+ {%- continue %}
16
+ {%- endif %}
17
+
18
+ {%- assign title = node.nav_title | default: node.title %}
19
+ {%- unless title and title != "" %}
20
+ {%- continue %}
21
+ {%- endunless %}
22
+
23
+ <li>
24
+ <a href="{{node.url | prepend: site.baseurl}}"
25
+ {%- if page.url == node.url %} class="active" {% endif -%}
26
+ >
27
+ {{ title }}
28
+ </a>
29
+ </li>
30
+ {%- endfor %}
31
+ </ul>
32
+ </nav>
33
+ </header>
@@ -0,0 +1 @@
1
+ <span class="print-footer">{% if page.date %}{{ page.title }} - {{ page.date | date: "%B %-d, %Y" }} - {{site.author}}{% else %}{{ page.title }} - {{site.author}}{% endif %}</span>
@@ -0,0 +1,30 @@
1
+ ---
2
+ layout: default
3
+ title: blog
4
+ full_width: true
5
+ ---
6
+
7
+ <h1>Writing</h1>
8
+ <p class=subtitle>{{ site.author }}</p>
9
+
10
+ {{ content }}
11
+
12
+ {%- for post in site.posts -%}
13
+ {%- assign currentyear = post.date | date: "%Y" -%}
14
+ {%- if currentyear != prevyear -%}
15
+ {% unless forloop.first %}
16
+ </ul>
17
+ {% endunless %}
18
+ <h2 id="{{ currentyear }}">{{ currentyear }}</h2>
19
+ <ul>
20
+ {%- assign prevyear = currentyear -%}
21
+ {% endif %}
22
+ <li>
23
+ <p><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> — {{ post.date | date: '%B %-d' }}</p>
24
+ </li>
25
+ {%- if forloop.last %}
26
+ </ul>
27
+ {%- endif -%}
28
+ {% else %}
29
+ <p>Watch this space for the first post!</p>
30
+ {% endfor %}
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ {% include head.html %}
4
+ <body {% if page.full_width or layout.full_width %}class="full-width"{% endif %}>
5
+ {% include header.html %}
6
+ <article class="group">
7
+ {{ content }}
8
+ </article>
9
+ {% include print-footer.html %}
10
+ {% include footer.html %}
11
+ </body>
12
+ </html>
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <h1 class="header-title">{{ page.title }}</h1>
5
+ <h2 class="header-subtitle">{{ page.subtitle }}</h2>
6
+ <p class="margin-maker"/>
7
+
8
+ {{ content }}
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <h1>{{ page.title }}</h1>
5
+ <p class="subtitle">{{ page.subtitle }}</p>
6
+ <p class="margin-maker"/>
7
+
8
+ {{ content }}
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <h1>{{ page.title }}</h1>
5
+ <p class="subtitle">{{ page.date | date: "%B %-d, %Y" }}</p>
6
+
7
+ {{ content }}
8
+
9
+ <section>
10
+ <div style="clear: both"></div>
11
+ <p class="backarrow"><a href="{% link blog/index.md %}">← Back to all posts</a></p>
12
+ </section>
@@ -0,0 +1,362 @@
1
+ /* Overrides and additional CSS functionality */
2
+
3
+ .contrast { color: $contrast-color;}
4
+ .smaller { font-size: 80%;}
5
+ .larger { font-size: 2.8rem;}
6
+
7
+ .faded { color: rgba(17,17,17,0.5); }
8
+
9
+ /**
10
+ * Make it so that top-level <p> don't need to be wrapped in <section>
11
+ */
12
+ article {
13
+ p, li, footer, table {
14
+ width: 55%;
15
+ }
16
+ }
17
+ footer {
18
+ width: 55%;
19
+ }
20
+ // should still go wide on narrow screens
21
+ @media (max-width: 760px) {
22
+ article {
23
+ p, li, footer, table {
24
+ width: 100%;
25
+ }
26
+ }
27
+ footer { width: 100%; }
28
+ }
29
+
30
+
31
+ /* Back home link */
32
+ p.backarrow {
33
+ font-size: 1.2rem;
34
+ font-style: italic;
35
+ margin-top: 3rem;
36
+ }
37
+
38
+
39
+ /* Styles for nav and headers */
40
+
41
+ /* Style for active menu links: bold and with surrounding angle brackets */
42
+ nav.group a.active { font-weight: bold; }
43
+ nav.group a.active:before { content:"\27e8"; }
44
+ nav.group a.active:after { content:"\27e9" ; }
45
+
46
+ header > nav ul {
47
+ list-style-type: none;
48
+ margin: 0;
49
+ padding: 0;
50
+ }
51
+ header > nav a {
52
+ font-size: 1.3rem;
53
+ letter-spacing: 0.15em;
54
+ text-transform: uppercase;
55
+ color: $contrast-color;
56
+ text-decoration: none;
57
+ background: unset !important;
58
+ text-shadow: unset !important;
59
+ display: inline-block;
60
+ float: left;
61
+ margin-top: 0;
62
+ margin-bottom: 0;
63
+ margin-right: 2rem;
64
+ margin-top: 1.5rem;
65
+ padding-right: 0;
66
+ vertical-align: baseline;
67
+ }
68
+ header > nav li:last-child a {
69
+ margin-right: inherit;
70
+ }
71
+ header > nav a img{
72
+ height: 5rem;
73
+ position: relative;
74
+ max-width: 100%;
75
+ top:-1.5rem;
76
+ }
77
+
78
+ header::after {
79
+ display: block;
80
+ content: '';
81
+ clear: both;
82
+ }
83
+
84
+ // article doesn't need top padding due to nav and h1 margins
85
+ article {
86
+ padding-top: 0em;
87
+ }
88
+
89
+
90
+ /* Footers */
91
+
92
+ ul.footer-links, .credits{
93
+ list-style: none;
94
+ text-align: center;
95
+ margin: 0 auto;
96
+ }
97
+ ul.footer-links li{
98
+ display: inline;
99
+ padding: 0.5rem 0.25rem;
100
+ }
101
+ .credits{
102
+ padding: 1rem 0rem;
103
+ }
104
+
105
+ /* End of styles for headers and footers */
106
+
107
+
108
+ // Full width page styling stuff
109
+
110
+ .full-width article {
111
+ p, li, footer, table {
112
+ width: 90%;
113
+ }
114
+ }
115
+ .full-width footer {
116
+ width: 90%;
117
+ }
118
+
119
+
120
+ li.listing hr{
121
+ width:100%;
122
+ }
123
+ .listing, .listing h3
124
+ {
125
+ display: inline-block;
126
+ margin:0;
127
+ }
128
+ li.listing {
129
+ margin:0;
130
+ & p{
131
+ width: 100%
132
+ }
133
+ }
134
+
135
+
136
+ li.listing:last-of-type{
137
+ border-bottom: none;
138
+ margin-bottom: 1.4rem;
139
+ }
140
+ li.listing h3.new {
141
+ text-transform: uppercase;
142
+ font-style: normal;
143
+ }
144
+ hr.slender {
145
+ border: 0;
146
+ height: 1px;
147
+ margin-top: 2.1rem;
148
+ margin-bottom:2.1rem;
149
+ background-color: black;
150
+ // background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
151
+ // background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
152
+ // background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
153
+ // background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
154
+ }
155
+ // End of front listing page stuff
156
+
157
+
158
+ // Printing ands screen media queries
159
+
160
+ // Does not display a print-footer for screen display
161
+ @media screen{
162
+ .print-footer{
163
+ display: none;
164
+ }
165
+ }
166
+
167
+ //printing stuff
168
+ @media print {
169
+
170
+ * {
171
+ -webkit-transition: none !important;
172
+ transition: none !important;
173
+ }
174
+ *,
175
+ *:before,
176
+ *:after {
177
+ background: transparent !important;
178
+ box-shadow: none !important;
179
+ text-shadow: none !important;
180
+ }
181
+ @page {
182
+ margin: 0.75in 0.5in 0.75in 0.5in;
183
+ orphans:4; widows:2;
184
+ }
185
+
186
+ body {
187
+ font-size: 12pt;
188
+
189
+ }
190
+ html body span.print-footer{
191
+ font-size: 9pt;
192
+ margin-top: 22.4pt;
193
+ padding-top: 4pt;
194
+ border-top: 1px solid #000;
195
+ }
196
+
197
+ thead {
198
+ display: table-header-group;
199
+ }
200
+
201
+ tr,
202
+ img {
203
+ page-break-inside: avoid;
204
+ }
205
+
206
+ img {
207
+ max-width: 100% !important;
208
+ }
209
+
210
+ p,
211
+ h2,
212
+ h3 {
213
+ orphans: 4;
214
+ widows: 4;
215
+ }
216
+ article h2, article h2 h3, article h3, article h3 h4, article h4, article h4 h5 {
217
+ page-break-after: avoid;
218
+ }
219
+
220
+ // Hide screen headers and footers
221
+ body header, footer.page-footer, p.backarrow {
222
+ display: none;
223
+ }
224
+ }
225
+
226
+
227
+ // --------- Typography stuff -----------//
228
+ // added rational line height and margins ala http://webtypography.net/intro/
229
+
230
+ // h1 { font-weight: 400;
231
+ // margin-top: 1.568rem;
232
+ // margin-bottom: 1.568rem;
233
+ // font-size: 2.5rem;
234
+ // line-height: 0.784; }
235
+ //
236
+ // h2 { font-style: italic;
237
+ // font-weight: 400;
238
+ // margin-top: 1.866666666666667rem;
239
+ // margin-bottom: 0;
240
+ // font-size: 2.1rem;
241
+ // line-height: 0.933333333333333; }
242
+ //
243
+ // h3 { font-style: italic;
244
+ // font-weight: 400;
245
+ // font-size: 1.8rem;
246
+ // margin-top: 2.1777777777777778rem;
247
+ // margin-bottom: 0;
248
+ // line-height: 1.08888888888889; }
249
+ h1 { font-weight: 400;
250
+ margin-top: 4rem;
251
+ margin-bottom: 2rem;
252
+ font-size: 3.2rem;
253
+ line-height: 1; }
254
+
255
+ h1.header-title { font-weight: 400;
256
+ margin-top: 4rem;
257
+ margin-bottom: 2rem;
258
+ font-size: 6rem;
259
+ line-height: 1;
260
+ a {
261
+ background: unset;
262
+ text-shadow: unset;
263
+ }
264
+ }
265
+
266
+ h2 { font-style: italic;
267
+ font-weight: 400;
268
+ margin-top: 5.1rem;
269
+ margin-bottom: 0;
270
+ font-size: 2.2rem;
271
+ line-height: 1; }
272
+
273
+ h2.header-subtitle { font-weight: 400;
274
+ margin-top: 4rem;
275
+ margin-bottom: 1.5rem;
276
+ font-size: 3rem;
277
+ font-style: italic;
278
+ line-height: 1;
279
+ }
280
+
281
+ h3 { font-style: italic;
282
+ font-weight: 400;
283
+ font-size: 1.7rem;
284
+ margin-top: 2rem;
285
+ margin-bottom: 0;
286
+ line-height: 1; }
287
+
288
+ // ET style doesn't like more than 3 levels of headings
289
+
290
+
291
+ /* Reduce size of header-title on narrow phone screens */
292
+ @media screen and (max-width: 500px) {
293
+ h1.header-title {
294
+ font-size: 4rem;
295
+ }
296
+ h2.header-subtitle {
297
+ font-size: 2.5rem;
298
+ }
299
+ }
300
+
301
+ p.subtitle { font-style: italic;
302
+ margin-top: 1rem;
303
+ margin-bottom: 1rem;
304
+ font-size: 1.8rem;
305
+ display: block;
306
+ line-height: 1; }
307
+
308
+ p.margin-maker {
309
+ margin-top: 1rem;
310
+ margin-bottom: 3.4rem;
311
+ }
312
+
313
+ p, ol, ul { font-size: 1.4rem; }
314
+
315
+ p, li { line-height: 2rem;
316
+ margin-top: 1.4rem;
317
+ padding-right: 2rem; //removed because, why?
318
+ vertical-align: baseline; }
319
+
320
+
321
+ .sans { font-family: $sans-font;
322
+ letter-spacing: .03em; }
323
+
324
+
325
+ // removed .code 'class' since code is an actual html tag
326
+ // also added p code, p pre code and pre selector to account for Markdown parsing
327
+ // of triple backticks plus rationalized line-heights and margins
328
+ pre, pre code, p code, p pre code {
329
+ font-family: $code-font;
330
+ font-size: 1rem;
331
+ line-height: 1.71428571;
332
+ margin-top: 1.71428571rem;
333
+
334
+ // override tufte-css and make code blocks full width
335
+ width: inherit;
336
+ }
337
+
338
+
339
+ h1 code, h2 code, h3 code { font-size: 0.80em; } //left in for no real reason
340
+
341
+
342
+ /*
343
+ * Fancy Blockquotes
344
+ * Style the blockquotes with a fancy quote character at the beginning
345
+ */
346
+ blockquote.fancy p:first-child {
347
+ position: relative;
348
+ }
349
+ blockquote.fancy p:first-child::before {
350
+ content: "“";
351
+ display: block;
352
+ position: absolute;
353
+ font-size: 5rem;
354
+ top: 0.9rem;
355
+ left: -3.4rem;
356
+ }
357
+ /* Make all elements in a blockquote except the last line of a blockquote non-italic so it looks like an attribution line.
358
+ * To avoid this, either add an empty <p></p> at the end, style the p with italic, or don't use the fancy blockquote.
359
+ */
360
+ blockquote.fancy p {
361
+ font-style: italic;
362
+ }
@@ -0,0 +1,16 @@
1
+ /* This file contains all the constants for colors and font styles */
2
+
3
+ $body-font: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
4
+ /*
5
+ * The tufte-css preferred sans font is Gill Sans, but this is not freely available.
6
+ * We use Lato instead, which is royalty free.
7
+ */
8
+ $sans-font: Lato, LatoLatin, "Cabin", "Gill Sans", "Trebuchet MS", sans-serif;
9
+ $code-font: Consolas, "Liberation Mono", Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
10
+ $text-color: #111;
11
+ $bg-color: #fffff8;
12
+ $contrast-color: #111;
13
+ $border-color: #333333;
14
+ $link-style: color; // choices are 'color' or 'underline'. Default is color using $contrast-color set above
15
+
16
+
@@ -0,0 +1 @@
1
+ /* Override this file in your site to create any custom site-local CSS */