jekyll-theme-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,206 @@
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
+ @include relative-font-size(0.8);
71
+ margin-top: $spacing-unit / 2;
72
+ }
73
+
74
+ /**
75
+ * Lists
76
+ */
77
+ ul, ol {
78
+ margin-left: $spacing-unit;
79
+ }
80
+
81
+ li {
82
+ > ul,
83
+ > ol {
84
+ margin-bottom: 0;
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Links
90
+ */
91
+ a {
92
+ text-decoration: none;
93
+
94
+ &:hover {
95
+ text-decoration: underline;
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Blockquotes
101
+ */
102
+ blockquote {
103
+ border-left: 0.3em solid;
104
+ padding-left: $spacing-unit / 2;
105
+ padding-top: $spacing-unit / 4;
106
+ padding-bottom: $spacing-unit / 4;
107
+ font-style: italic;
108
+
109
+ > :last-child {
110
+ margin-bottom: 0;
111
+ }
112
+
113
+ i, em {
114
+ font-style: normal;
115
+ }
116
+ }
117
+
118
+ /**
119
+ * Code formatting
120
+ */
121
+ pre,
122
+ code {
123
+ font-family: $code-font-family;
124
+ border-radius: 0.3em;
125
+ }
126
+
127
+ code {
128
+ @include relative-font-size(0.9);
129
+ padding: 1px 5px;
130
+ }
131
+
132
+ pre {
133
+ border: 1px solid;
134
+ padding: 8px 12px;
135
+ overflow-x: auto;
136
+
137
+ > code {
138
+ @include relative-font-size(0.7);
139
+ line-height: $base-line-height * $base-font-size * 0.7;
140
+ border: 0;
141
+ padding-right: 0;
142
+ padding-left: 0;
143
+
144
+ white-space: pre;
145
+ word-break: normal;
146
+ word-wrap: normal;
147
+ }
148
+ }
149
+
150
+ .highlight {
151
+ border-radius: 0.3em;
152
+ @extend %vertical-rhythm;
153
+ }
154
+
155
+ /**
156
+ * Tables
157
+ */
158
+ table {
159
+ margin-bottom: $spacing-unit;
160
+ width: 100%;
161
+ border-collapse: collapse;
162
+ border: 1px solid;
163
+
164
+ th, td {
165
+ padding: ($spacing-unit / 3) ($spacing-unit / 2);
166
+ }
167
+
168
+ th {
169
+ border: 1px solid;
170
+ }
171
+
172
+ td {
173
+ border: 1px solid;
174
+ }
175
+ }
176
+
177
+ /**
178
+ * Task item list
179
+ */
180
+ ul.task-list {
181
+ li {
182
+ list-style-type: none;
183
+
184
+ .task-list-item-checkbox {
185
+ margin: 0 .2em .25em -1.6em;
186
+ vertical-align: middle;
187
+ }
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Wrapper
193
+ */
194
+ .wrapper {
195
+ max-width: calc(#{$content-width} - (#{$spacing-unit}));
196
+ margin-right: auto;
197
+ margin-left: auto;
198
+ padding-right: $spacing-unit / 2;
199
+ padding-left: $spacing-unit / 2;
200
+
201
+ @media screen and (min-width: $on-large) {
202
+ max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
203
+ padding-right: $spacing-unit;
204
+ padding-left: $spacing-unit;
205
+ }
206
+ }
@@ -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,347 @@
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
+ line-height: $base-line-height * $base-font-size * 2;
138
+ @include relative-font-size(2);
139
+
140
+ @media screen and (min-width: $on-large) {
141
+ @include relative-font-size(2.236);
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Pagination
147
+ */
148
+ .pagination {
149
+ list-style: none;
150
+ margin: 0 auto;
151
+ margin-bottom: $spacing-unit;
152
+ display: table;
153
+
154
+ li {
155
+ float: left;
156
+ margin: 5px 15px 5px 0;
157
+
158
+ &:last-of-type { margin-right: 0 }
159
+
160
+ a, div {
161
+ display: block;
162
+ padding: $spacing-unit / 4;
163
+ border: 1px solid;
164
+ min-width: 41px;
165
+ text-align: center;
166
+ box-sizing: border-box;
167
+ }
168
+ }
169
+ }
170
+
171
+ /**
172
+ * Page content
173
+ */
174
+ .page-content {
175
+ flex: 1 0 auto;
176
+ }
177
+
178
+ /**
179
+ * Posts
180
+ */
181
+ .post-header {
182
+ padding-top: $spacing-unit * 2.5;
183
+ padding-bottom: $spacing-unit * 2.5;
184
+ margin-bottom: $spacing-unit * 2;
185
+ }
186
+
187
+ .post-meta {
188
+ @include relative-font-size(0.8);
189
+ margin-bottom: $spacing-unit / 2;
190
+ }
191
+
192
+ .post-tag {
193
+ margin-right: $spacing-unit / 2;
194
+ }
195
+
196
+ // Formula of calculating the relative font size of hn: 1 + 2 * 0.618^n
197
+
198
+ .post-title,
199
+ .post-content h1 {
200
+ @include relative-font-size(2);
201
+ font-weight: bold;
202
+ letter-spacing: -1px;
203
+ line-height: $base-line-height * $base-font-size * 2;
204
+
205
+ @media screen and (min-width: $on-large) {
206
+ @include relative-font-size(2.236);
207
+ }
208
+ }
209
+
210
+ .post-content {
211
+ font-family: $reading-font-family;
212
+ margin-bottom: $spacing-unit;
213
+
214
+ h2 { margin-top: $spacing-unit * 2 }
215
+ h3, h4 { margin-top: $spacing-unit * 1.5 }
216
+ h5, h6 { margin-top: $spacing-unit }
217
+
218
+ h2 {
219
+ @include relative-font-size(1.6);
220
+
221
+ @media screen and (min-width: $on-large) {
222
+ @include relative-font-size(1.764);
223
+ }
224
+ }
225
+
226
+ h3 {
227
+ @include relative-font-size(1.4);
228
+
229
+ @media screen and (min-width: $on-large) {
230
+ @include relative-font-size(1.472);
231
+ }
232
+ }
233
+
234
+ h4 {
235
+ @include relative-font-size(1.292);
236
+ }
237
+
238
+ h5 {
239
+ @include relative-font-size(1.18);
240
+ }
241
+
242
+ h6 {
243
+ @include relative-font-size(1.111);
244
+ }
245
+ }
246
+
247
+ /**
248
+ * Taxonomies
249
+ */
250
+ .taxonomies {
251
+ list-style: none;
252
+ display: grid;
253
+ grid-column-gap: 2em;
254
+ grid-template-columns: repeat(3, 1fr);
255
+ margin: 0;
256
+ padding: 0;
257
+ font-weight: bold;
258
+
259
+ @include media-query($on-medium) {
260
+ grid-template-columns: repeat(2, 1fr);
261
+ }
262
+
263
+ .taxonomy {
264
+ display: flex;
265
+ padding: 0.25em 0;
266
+ justify-content: space-between;
267
+ color: inherit;
268
+ text-decoration: none;
269
+ border-bottom: 1px solid;
270
+ margin-bottom: $spacing-unit / 3;
271
+ }
272
+ }
273
+
274
+ .post-list-by-taxonomy {
275
+ time {
276
+ font-family: $code-font-family;
277
+ @include relative-font-size(0.9);
278
+ }
279
+ }
280
+
281
+ .back-to-top {
282
+ display: block;
283
+ font-size: $base-font-size * 0.8;
284
+ text-transform: uppercase;
285
+ text-align: right;
286
+ text-decoration: none;
287
+ }
288
+
289
+ /**
290
+ * Alignment
291
+ */
292
+ .align-right {
293
+ margin-bottom: 1rem;
294
+ margin-left: 1rem;
295
+ float: right;
296
+ }
297
+
298
+ .align-left {
299
+ margin-right: 1rem;
300
+ margin-bottom: 1rem;
301
+ float: left;
302
+ }
303
+
304
+ .align-center {
305
+ display: block;
306
+ margin-right: auto;
307
+ margin-left: auto;
308
+ }
309
+
310
+ figcaption.align-right {
311
+ text-align: right;
312
+ }
313
+
314
+ figcaption.align-left {
315
+ text-align: left;
316
+ }
317
+
318
+ figcaption.align-center {
319
+ text-align: center;
320
+ }
321
+
322
+ /**
323
+ * Site footer
324
+ */
325
+ .site-footer {
326
+ border-top: 1px solid;
327
+ padding: $spacing-unit 0;
328
+ text-align: center;
329
+ @include relative-font-size(0.8);
330
+
331
+ .feed-subscribe {
332
+ font-weight: bold;
333
+ text-align: left;
334
+ .feed-icon {
335
+ margin-right: 0.3em;
336
+ }
337
+ }
338
+
339
+
340
+ .social-icons {
341
+ padding: $spacing-unit 0;
342
+
343
+ .social-icon {
344
+ margin: 0.3em;
345
+ }
346
+ }
347
+ }
@@ -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
+ ;