hamilton 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,73 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
6
+
7
+ <header class="post-header">
8
+
9
+ <div class="wrapper">
10
+
11
+ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
12
+ <p class="post-meta">
13
+ {%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
14
+ <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
15
+ {{ page.date | date: date_format }}
16
+ </time>
17
+ {%- if page.modified_date -%}
18
+ ~
19
+ {%- assign mdate = page.modified_date | date_to_xmlschema -%}
20
+ <time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">
21
+ {{ mdate | date: date_format }}
22
+ </time>
23
+ {%- endif -%}
24
+ {%- if page.author -%}
25
+ • {% for author in page.author %}
26
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person">
27
+ <span class="p-author h-card" itemprop="name">{{ author }}</span></span>
28
+ {%- if forloop.last == false %}, {% endif -%}
29
+ {% endfor %}
30
+ {%- endif -%}
31
+ </p>
32
+
33
+ {% if page.tags.size > 0 %}
34
+ <p class="post-meta post-tags">
35
+ {% assign tags = page.tags | sort %}
36
+ {% for tag in tags %}
37
+ <span class="post-tag">
38
+ {% assign slugified_tag = tag | slugify %}
39
+ <a href="{{ '/tags/#:tag' | replace: ':tag', slugified_tag | relative_url }}">#{{ slugified_tag }}</a>
40
+ </span>
41
+ {% endfor %}
42
+ </p>
43
+ {% endif %}
44
+ </div>
45
+
46
+ </header>
47
+
48
+ <div class="wrapper post-body-wrapper">
49
+
50
+ <div class="post-content e-content" itemprop="articleBody">
51
+ {{ content }}
52
+
53
+ {% if page.comments != false and jekyll.environment == "production" %}
54
+ {% include disqus.html %}
55
+ {% endif %}
56
+
57
+ <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
58
+ </div>
59
+
60
+ {% if page.toc %}
61
+ <aside class="post-aside">
62
+ <div class="post-toc-container">
63
+ <h2 class="post-toc-title">Table of Contents</h2>
64
+ <nav class="post-toc">
65
+ {% include toc.html html=content %}
66
+ </nav>
67
+ </div>
68
+ </aside>
69
+ {% endif %}
70
+
71
+ </div>
72
+
73
+ </article>
@@ -0,0 +1,188 @@
1
+ html {
2
+ font-size: $base-font-size;
3
+ }
4
+
5
+ /**
6
+ * Reset some basic elements
7
+ */
8
+ body, h1, h2, h3, h4, h5, h6,
9
+ p, blockquote, pre, hr,
10
+ dl, dd, ol, ul, figure {
11
+ margin: 0;
12
+ padding: 0;
13
+ }
14
+
15
+ /**
16
+ * Set `margin-bottom` to maintain vertical rhythm
17
+ */
18
+ h1, h2, h3, h4, h5, h6,
19
+ p, blockquote, pre,
20
+ ul, ol, dl, figure,
21
+ %vertical-rhythm {
22
+ margin-bottom: $spacing-unit / 2;
23
+ }
24
+
25
+ /**
26
+ * Basic styling
27
+ */
28
+ body {
29
+ font-family: $base-font-family;
30
+ -webkit-text-size-adjust: 100%;
31
+ -webkit-font-feature-settings: "kern" 1;
32
+ -moz-font-feature-settings: "kern" 1;
33
+ -o-font-feature-settings: "kern" 1;
34
+ font-feature-settings: "kern" 1;
35
+ font-kerning: normal;
36
+ display: flex;
37
+ min-height: 100vh;
38
+ flex-direction: column;
39
+ overflow-wrap: break-word;
40
+ line-height: $base-line-height;
41
+ }
42
+
43
+ p {
44
+ -webkit-hyphens: auto;
45
+ -ms-hyphens: auto;
46
+ hyphens: auto;
47
+ }
48
+
49
+ hr {
50
+ margin-top: $spacing-unit;
51
+ margin-bottom: $spacing-unit;
52
+ }
53
+
54
+ /**
55
+ * Images
56
+ */
57
+ img {
58
+ max-width: 100%;
59
+ vertical-align: middle;
60
+ }
61
+
62
+ /**
63
+ * Figures
64
+ */
65
+ figure > img {
66
+ display: block;
67
+ }
68
+
69
+ figcaption {
70
+ font-size: $small-font-size;
71
+ }
72
+
73
+ /**
74
+ * Lists
75
+ */
76
+ ul, ol {
77
+ margin-left: $spacing-unit;
78
+ }
79
+
80
+ li {
81
+ > ul,
82
+ > ol {
83
+ margin-bottom: 0;
84
+ }
85
+ }
86
+
87
+ /**
88
+ * Links
89
+ */
90
+ a {
91
+ text-decoration: none;
92
+
93
+ &:hover {
94
+ text-decoration: underline;
95
+ }
96
+ }
97
+
98
+ /**
99
+ * Blockquotes
100
+ */
101
+ blockquote {
102
+ border-left: 4px solid;
103
+ padding-left: $spacing-unit / 2;
104
+ @include relative-font-size(1.05);
105
+ font-style: italic;
106
+
107
+ > :last-child {
108
+ margin-bottom: 0;
109
+ }
110
+
111
+ i, em {
112
+ font-style: normal;
113
+ }
114
+ }
115
+
116
+ /**
117
+ * Code formatting
118
+ */
119
+ pre,
120
+ code {
121
+ font-family: $code-font-family;
122
+ font-size: 0.9em;
123
+ border-radius: 0.3em;
124
+ }
125
+
126
+ code {
127
+ padding: 1px 5px;
128
+ }
129
+
130
+ pre {
131
+ border: 1px solid;
132
+ padding: 8px 12px;
133
+ overflow-x: auto;
134
+
135
+ > code {
136
+ border: 0;
137
+ padding-right: 0;
138
+ padding-left: 0;
139
+
140
+ white-space: pre;
141
+ word-break: normal;
142
+ word-wrap: normal;
143
+ }
144
+ }
145
+
146
+ .highlight {
147
+ border-radius: 0.3em;
148
+ @extend %vertical-rhythm;
149
+ }
150
+
151
+ /**
152
+ * Tables
153
+ */
154
+ table {
155
+ margin-bottom: $spacing-unit;
156
+ width: 100%;
157
+ border-collapse: collapse;
158
+ border: 1px solid;
159
+
160
+ th, td {
161
+ padding: ($spacing-unit / 3) ($spacing-unit / 2);
162
+ }
163
+
164
+ th {
165
+ border: 1px solid;
166
+ }
167
+
168
+ td {
169
+ border: 1px solid;
170
+ }
171
+ }
172
+
173
+ /**
174
+ * Wrapper
175
+ */
176
+ .wrapper {
177
+ max-width: calc(#{$content-width} - (#{$spacing-unit}));
178
+ margin-right: auto;
179
+ margin-left: auto;
180
+ padding-right: $spacing-unit / 2;
181
+ padding-left: $spacing-unit / 2;
182
+
183
+ @media screen and (min-width: $on-large) {
184
+ max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
185
+ padding-right: $spacing-unit;
186
+ padding-left: $spacing-unit;
187
+ }
188
+ }
@@ -0,0 +1 @@
1
+ // Placeholder to allow customizing styles.
@@ -0,0 +1,9 @@
1
+ @mixin media-query($device) {
2
+ @media screen and (max-width: $device) {
3
+ @content;
4
+ }
5
+ }
6
+
7
+ @mixin relative-font-size($ratio) {
8
+ font-size: #{$ratio}rem;
9
+ }
@@ -0,0 +1,417 @@
1
+ /**
2
+ * Site header
3
+ */
4
+ .site-header {
5
+ border-top: 5px solid;
6
+ border-bottom: 1px solid;
7
+ min-height: $spacing-unit * 1.865;
8
+ line-height: $base-line-height * $base-font-size * 2.25;
9
+
10
+ // Positioning context for the mobile navigation icon
11
+ position: relative;
12
+ }
13
+
14
+ .site-title {
15
+ @include relative-font-size(1.625);
16
+ font-family: $title-font-family;
17
+ letter-spacing: -1px;
18
+ margin-bottom: 0;
19
+ float: left;
20
+
21
+ @include media-query($on-medium) {
22
+ padding-right: 45px;
23
+ }
24
+ }
25
+
26
+ .site-nav {
27
+ position: absolute;
28
+ top: 9px;
29
+ right: $spacing-unit / 2;
30
+ border: 1px solid;
31
+ border-radius: 0.4em;
32
+ text-align: right;
33
+
34
+ .nav-trigger {
35
+ display: none;
36
+ }
37
+
38
+ .menu-icon {
39
+ float: right;
40
+ width: 36px;
41
+ height: 26px;
42
+ line-height: 0;
43
+ padding-top: 10px;
44
+ text-align: center;
45
+ }
46
+
47
+ label[for="nav-trigger"] {
48
+ display: block;
49
+ float: right;
50
+ width: 36px;
51
+ height: 36px;
52
+ z-index: 2;
53
+ cursor: pointer;
54
+ }
55
+
56
+ input ~ .trigger {
57
+ clear: both;
58
+ display: none;
59
+ }
60
+
61
+ input:checked ~ .trigger {
62
+ display: block;
63
+ padding-bottom: 5px;
64
+ }
65
+
66
+ .page-link {
67
+ line-height: $base-line-height * $base-font-size * 1.15;
68
+ display: block;
69
+ padding: 5px 5px;
70
+
71
+ // Gaps between nav items, but not on the last one
72
+ &:not(:last-child) {
73
+ margin-right: 0;
74
+ }
75
+ margin-left: 10px;
76
+ }
77
+
78
+ .current-page {
79
+ text-decoration: line-through;
80
+ }
81
+
82
+ @media screen and (min-width: $on-medium) {
83
+ position: static;
84
+ float: right;
85
+ border: none;
86
+ background-color: inherit;
87
+
88
+ label[for="nav-trigger"] {
89
+ display: none;
90
+ }
91
+
92
+ .menu-icon {
93
+ display: none;
94
+ }
95
+
96
+ input ~ .trigger {
97
+ display: block;
98
+ }
99
+
100
+ .page-link {
101
+ display: inline;
102
+ padding: 0;
103
+
104
+ &:not(:last-child) {
105
+ margin-right: 10px;
106
+ }
107
+ margin-left: auto;
108
+ }
109
+ }
110
+ }
111
+
112
+ /**
113
+ * Homepage
114
+ */
115
+ .home {
116
+ margin-top: $spacing-unit;
117
+ }
118
+
119
+ .post-list-heading {
120
+ @include relative-font-size(1.75);
121
+ }
122
+
123
+ .post-list {
124
+ margin-left: 0;
125
+ padding-left: 0;
126
+ list-style: none;
127
+
128
+ li {
129
+ padding-bottom: $spacing-unit / 2;
130
+ border-bottom: 1px solid;
131
+ margin-bottom: 2 * $spacing-unit;
132
+ }
133
+ }
134
+
135
+ .post-link {
136
+ display: block;
137
+ @include relative-font-size(2.5);
138
+ }
139
+
140
+ /**
141
+ * Pagination
142
+ */
143
+ .pagination {
144
+ list-style: none;
145
+ margin: 0 auto;
146
+ margin-bottom: $spacing-unit;
147
+ display: table;
148
+
149
+ li {
150
+ float: left;
151
+ margin: 5px 15px 5px 0;
152
+
153
+ &:last-of-type { margin-right: 0 }
154
+
155
+ a, div {
156
+ display: block;
157
+ padding: $spacing-unit / 4;
158
+ border: 1px solid;
159
+ min-width: 41px;
160
+ text-align: center;
161
+ box-sizing: border-box;
162
+ }
163
+
164
+ div {
165
+ display: block;
166
+ padding: $spacing-unit / 4;
167
+ border: 1px solid;
168
+ }
169
+ }
170
+ }
171
+
172
+ /**
173
+ * Page content
174
+ */
175
+ .page-content {
176
+ flex: 1 0 auto;
177
+ }
178
+
179
+ /**
180
+ * Posts
181
+ */
182
+ .post-header {
183
+ padding-top: $spacing-unit * 3;
184
+ padding-bottom: $spacing-unit * 3;
185
+ margin-bottom: $spacing-unit * 2;
186
+ }
187
+
188
+ .post-meta {
189
+ font-size: $small-font-size;
190
+ margin-bottom: $spacing-unit / 2;
191
+ }
192
+
193
+ .post-tag {
194
+ margin-right: $spacing-unit / 2;
195
+ }
196
+
197
+ .post-body-wrapper {
198
+ display: flex;
199
+ justify-content: space-between;
200
+
201
+ .post-content {
202
+ width: 100%;
203
+ }
204
+
205
+ .post-aside {
206
+ min-width: 30%;
207
+ height: 100vh;
208
+ position: sticky;
209
+ top: 0;
210
+ margin-left: $spacing-unit / 2;
211
+
212
+ @include media-query($on-medium) {
213
+ visibility: hidden;
214
+ max-width: 0%;
215
+ min-width: 0%;
216
+ }
217
+ }
218
+ }
219
+
220
+ .post-toc-container {
221
+ @include relative-font-size(0.8);
222
+ max-height: 60vh;
223
+ overflow-y: scroll;
224
+ border: 1px solid;
225
+ border-radius: 0.3em;
226
+ margin-top: $spacing-unit / 2;
227
+
228
+ .post-toc-title {
229
+ padding: $spacing-unit / 2;
230
+ margin-bottom: 0;
231
+ }
232
+
233
+ .post-toc {
234
+ ul {
235
+ list-style: none;
236
+ margin: 0;
237
+ padding: 0;
238
+ width: 100%;
239
+ }
240
+
241
+ a {
242
+ display: block;
243
+ padding: 0.25rem 0.75rem;
244
+ font-weight: bold;
245
+ border-bottom: 1px solid;
246
+ }
247
+
248
+ li ul > li a {
249
+ padding-left: 1.25rem;
250
+ font-weight: normal;
251
+ }
252
+
253
+ li ul li ul > li a {
254
+ padding-left: 1.75rem;
255
+ }
256
+
257
+ li ul li ul li ul > li a {
258
+ padding-left: 2.25rem;
259
+ }
260
+
261
+ li ul li ul li ul li ul > li a {
262
+ padding-left: 2.75rem;
263
+ }
264
+
265
+ li ul li ul li ul li ul li ul > li a {
266
+ padding-left: 3.25rem
267
+ }
268
+ }
269
+ }
270
+
271
+ .post-title,
272
+ .post-content h1 {
273
+ @include relative-font-size(2.5);
274
+ font-weight: bold;
275
+ letter-spacing: -1px;
276
+
277
+ @media screen and (min-width: $on-large) {
278
+ @include relative-font-size(2.625);
279
+ }
280
+ }
281
+
282
+ .post-content {
283
+ font-family: $reading-font-family;
284
+ margin-bottom: $spacing-unit;
285
+
286
+ h1, h2, h3 { margin-top: $spacing-unit * 1.5 }
287
+ h4, h5, h6 { margin-top: $spacing-unit }
288
+
289
+ h2 {
290
+ @include relative-font-size(1.75);
291
+
292
+ @media screen and (min-width: $on-large) {
293
+ @include relative-font-size(2);
294
+ }
295
+ }
296
+
297
+ h3 {
298
+ @include relative-font-size(1.375);
299
+
300
+ @media screen and (min-width: $on-large) {
301
+ @include relative-font-size(1.625);
302
+ }
303
+ }
304
+
305
+ h4 {
306
+ @include relative-font-size(1.25);
307
+ }
308
+
309
+ h5 {
310
+ @include relative-font-size(1.125);
311
+ }
312
+
313
+ h6 {
314
+ @include relative-font-size(1.085);
315
+ }
316
+ }
317
+
318
+ /**
319
+ * Taxonomies
320
+ */
321
+ .taxonomies {
322
+ list-style: none;
323
+ display: grid;
324
+ grid-column-gap: 2em;
325
+ grid-template-columns: repeat(3, 1fr);
326
+ margin: 0;
327
+ padding: 0;
328
+ font-weight: bold;
329
+
330
+ @include media-query($on-medium) {
331
+ grid-template-columns: repeat(2, 1fr);
332
+ }
333
+
334
+ .taxonomy {
335
+ display: flex;
336
+ padding: 0.25em 0;
337
+ justify-content: space-between;
338
+ color: inherit;
339
+ text-decoration: none;
340
+ border-bottom: 1px solid;
341
+ margin-bottom: $spacing-unit / 3;
342
+ }
343
+ }
344
+
345
+ .post-list-by-taxonomy {
346
+ time {
347
+ font-family: $code-font-family;
348
+ }
349
+ }
350
+
351
+ .back-to-top {
352
+ display: block;
353
+ font-size: $base-font-size * 0.8;
354
+ text-transform: uppercase;
355
+ text-align: right;
356
+ text-decoration: none;
357
+ }
358
+
359
+ /**
360
+ * Alignment
361
+ */
362
+ .align-right {
363
+ margin-bottom: 1rem;
364
+ margin-left: 1rem;
365
+ float: right;
366
+ }
367
+
368
+ .align-left {
369
+ margin-right: 1rem;
370
+ margin-bottom: 1rem;
371
+ float: left;
372
+ }
373
+
374
+ .align-center {
375
+ display: block;
376
+ margin-right: auto;
377
+ margin-left: auto;
378
+ }
379
+
380
+ figcaption.align-right {
381
+ text-align: right;
382
+ }
383
+
384
+ figcaption.align-left {
385
+ text-align: left;
386
+ }
387
+
388
+ figcaption.align-center {
389
+ text-align: center;
390
+ }
391
+
392
+ /**
393
+ * Site footer
394
+ */
395
+ .site-footer {
396
+ border-top: 1px solid;
397
+ padding: $spacing-unit 0;
398
+ text-align: center;
399
+ font-size: $small-font-size;
400
+
401
+ .feed-subscribe {
402
+ font-weight: bold;
403
+ text-align: left;
404
+ .feed-icon {
405
+ margin-right: 0.3em;
406
+ }
407
+ }
408
+
409
+
410
+ .social-icons {
411
+ padding: $spacing-unit 0;
412
+
413
+ .social-icon {
414
+ margin: 0.3em;
415
+ }
416
+ }
417
+ }
@@ -0,0 +1,11 @@
1
+ @charset "utf-8";
2
+
3
+ @import
4
+ "hamilton/normalize",
5
+ "hamilton/variables",
6
+ "hamilton/override-variables",
7
+ "hamilton/functions",
8
+ "hamilton/base",
9
+ "hamilton/layout",
10
+ "hamilton/custom-styles"
11
+ ;