jekyll-theme-hamilton 1.4.0 → 2.0.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/_includes/head.html +8 -3
- data/_includes/header.html +1 -1
- data/_includes/image.html +1 -1
- data/_layouts/archive-taxonomies.html +8 -1
- data/_layouts/archive-years.html +8 -1
- data/_layouts/default.html +1 -1
- data/_layouts/post.html +35 -15
- data/_sass/hamilton/layout.scss +55 -37
- data/_sass/hamilton/skin.scss +10 -0
- data/_sass/hamilton/skins/midnight.scss +2 -2
- data/_sass/hamilton/variables.scss +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 918cbb51402f2cc6a02a9e8fae490614184e267fcc163f24beceb99f2e50efe6
|
4
|
+
data.tar.gz: 4978858b0bef6cb18d658cd3ff2f0af380cd9938af66292f164160fd1920473b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdbe0d25fb6e15d6ef2bde21659ac56f10a7b3e9d4212ee3c05a39ffffb1ec22149067563b5bf34ec95a8e3c4c2745a29aede496689f174a8614681dd0451352
|
7
|
+
data.tar.gz: 17558ee6336979f3c4004ad7bde998f4228e1891835a77ac785375ba1886eb61211a3ea033a0f39d02acd58c7b4dc6f75b899678b905d0cb0f2610d23ab9d4a7
|
data/README.md
CHANGED
@@ -139,7 +139,7 @@ You can also configure the width and height of the image,
|
|
139
139
|
|
140
140
|
Besides, you can pass the `caption` parameter to the include, then it will wrap the `img` with a `figure` block; alternatively, you can pass the `alt` parameter to the include.
|
141
141
|
|
142
|
-
If you feel that passing a long path to the image to the include is ugly and wasting time, you can replace the `src` parameter with the `name` parameter, which is just the name of the image, and by default, the path would be `assets/img/{{ page.title | slugify}}/{{ include.name }}`.
|
142
|
+
If you feel that passing a long path to the image to the include is ugly and wasting time, you can replace the `src` parameter with the `name` parameter, which is just the name of the image, and by default, the path would be `assets/img/posts/{{ page.title | slugify}}/{{ include.name }}`.
|
143
143
|
|
144
144
|
## Customization
|
145
145
|
|
data/_includes/head.html
CHANGED
@@ -16,11 +16,16 @@
|
|
16
16
|
|
17
17
|
<!-- Google Fonts -->
|
18
18
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
|
19
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open%20Sans">
|
20
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inconsolata">
|
21
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Dancing%20Script">
|
22
19
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto%20Sans%20SC">
|
20
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto%20Sans%20TC">
|
21
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto%20Slab">
|
23
22
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto%20Serif%20SC">
|
23
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto%20Serif%20TC">
|
24
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto%20Mono">
|
25
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lobster">
|
26
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=ZCOOL%20QingKe%20HuangYou">
|
27
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Dancing%20Script">
|
28
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ma%20Shan%20Zheng">
|
24
29
|
|
25
30
|
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
|
26
31
|
<link rel="stylesheet" href="{{ '/assets/css/skin.css' | relative_url }}">
|
data/_includes/header.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<script>
|
3
3
|
function clickSidebarButton() {
|
4
4
|
const elem = document.getElementById("site-sidebar")
|
5
|
-
if (elem.style.display == "none") {
|
5
|
+
if (elem.style.display == "none" || elem.style.display == "") {
|
6
6
|
elem.style.display = "block";
|
7
7
|
} else {
|
8
8
|
elem.style.display = "none";
|
data/_includes/image.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
{%- if include.src -%}
|
4
4
|
{% assign src = include.src %}
|
5
5
|
{%- elsif include.name -%}
|
6
|
-
{% capture src %}assets/img/{{ page.title | slugify }}/{{ include.name }}{% endcapture %}
|
6
|
+
{% capture src %}assets/img/posts/{{ page.title | slugify }}/{{ include.name }}{% endcapture %}
|
7
7
|
{%- endif -%}
|
8
8
|
|
9
9
|
{% if include.caption %}
|
@@ -70,7 +70,14 @@ layout: page
|
|
70
70
|
</li>
|
71
71
|
{%- endfor -%}
|
72
72
|
</ul>
|
73
|
-
<a href="#" class="back-to-top">Top ⇈</a>
|
73
|
+
<a href="#" onclick="backToTop()" class="back-to-top">Top ⇈</a>
|
74
74
|
{%- endif -%}
|
75
75
|
{%- endfor -%}
|
76
76
|
{%- endfor -%}
|
77
|
+
|
78
|
+
<script>
|
79
|
+
function backToTop() {
|
80
|
+
const main = document.getElementById("site-main");
|
81
|
+
main.scrollTop = 0;
|
82
|
+
}
|
83
|
+
</script>
|
data/_layouts/archive-years.html
CHANGED
@@ -33,5 +33,12 @@ layout: page
|
|
33
33
|
</li>
|
34
34
|
{%- endfor -%}
|
35
35
|
</ul>
|
36
|
-
<a href="#" class="back-to-top">Top ⇈</a>
|
36
|
+
<a href="#" onclick="backToTop()" class="back-to-top">Top ⇈</a>
|
37
37
|
{%- endfor -%}
|
38
|
+
|
39
|
+
<script>
|
40
|
+
function backToTop() {
|
41
|
+
const main = document.getElementById("site-main");
|
42
|
+
main.scrollTop = 0;
|
43
|
+
}
|
44
|
+
</script>
|
data/_layouts/default.html
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
<aside class="site-sidebar" id="site-sidebar">
|
16
16
|
{% include sidebar.html %}
|
17
17
|
</aside>
|
18
|
-
<main class="site-main" aria-label="Content">
|
18
|
+
<main class="site-main" id="site-main" aria-label="Content">
|
19
19
|
{{ content }}
|
20
20
|
<footer class="site-footer">
|
21
21
|
{% include footer.html %}
|
data/_layouts/post.html
CHANGED
@@ -28,26 +28,46 @@ layout: default
|
|
28
28
|
{%- endif -%}
|
29
29
|
</p>
|
30
30
|
|
31
|
-
{% if page.tags.size > 0 %}
|
32
|
-
<p class="post-meta post-tags">
|
33
|
-
{% assign tags = page.tags | sort %}
|
34
|
-
{% for tag in tags %}
|
35
|
-
<span class="post-tag">
|
36
|
-
{% assign slugified_tag = tag | slugify %}
|
37
|
-
<a href="{{ '/tags/#:tag' | replace: ':tag', slugified_tag | relative_url }}">#{{ slugified_tag }}</a>
|
38
|
-
</span>
|
39
|
-
{% endfor %}
|
40
|
-
</p>
|
41
|
-
{% endif %}
|
42
|
-
|
43
31
|
</header>
|
44
32
|
|
45
33
|
<div class="post-content e-content" itemprop="articleBody">
|
46
34
|
{{ content }}
|
35
|
+
</div>
|
47
36
|
|
48
|
-
|
49
|
-
|
37
|
+
<footer class="post-footer">
|
38
|
+
{% if page.categories.size > 0 %}
|
39
|
+
<div class="post-meta">
|
40
|
+
<i class="fas fa-folder"></i>
|
41
|
+
<ul class="post-taxonomies post-categories">
|
42
|
+
{% assign categories = page.categories | sort %}
|
43
|
+
{% for category in categories %}
|
44
|
+
<li class="post-category">
|
45
|
+
{% assign slugified_category = category | slugify %}
|
46
|
+
<a href="{{ '/categories/#:category' | replace: ':category', slugified_category | relative_url }}">{{ category }}</a>
|
47
|
+
</li>
|
48
|
+
{% endfor %}
|
49
|
+
</ul>
|
50
|
+
</div>
|
50
51
|
{% endif %}
|
51
|
-
|
52
|
+
|
53
|
+
{% if page.tags.size > 0 %}
|
54
|
+
<div class="post-meta">
|
55
|
+
<i class="fas fa-tags"></i>
|
56
|
+
<ul class="post-taxonomies post-tags">
|
57
|
+
{% assign tags = page.tags | sort %}
|
58
|
+
{% for tag in tags %}
|
59
|
+
<li class="post-tag">
|
60
|
+
{% assign slugified_tag = tag | slugify %}
|
61
|
+
<a href="{{ '/tags/#:tag' | replace: ':tag', slugified_tag | relative_url }}">{{ slugified_tag }}</a>
|
62
|
+
</li>
|
63
|
+
{% endfor %}
|
64
|
+
</ul>
|
65
|
+
</div>
|
66
|
+
{% endif %}
|
67
|
+
</footer>
|
68
|
+
|
69
|
+
{% if page.comments != false and jekyll.environment == "production" %}
|
70
|
+
{% include disqus.html %}
|
71
|
+
{% endif %}
|
52
72
|
|
53
73
|
</article>
|
data/_sass/hamilton/layout.scss
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
width: 100vw;
|
7
7
|
display: grid;
|
8
8
|
grid-template-columns: 1fr;
|
9
|
-
grid-template-rows: $base-font-size * 3 1fr;
|
9
|
+
grid-template-rows: $base-font-size * 3 + 6px 1fr;
|
10
10
|
}
|
11
11
|
|
12
12
|
/**
|
@@ -17,8 +17,6 @@
|
|
17
17
|
border-bottom: 1px solid;
|
18
18
|
min-height: $base-font-size * 3;
|
19
19
|
line-height: $base-font-size * 3;
|
20
|
-
position: sticky;
|
21
|
-
top: 0;
|
22
20
|
|
23
21
|
@include media-query($on-small) {
|
24
22
|
display: flex;
|
@@ -27,7 +25,7 @@
|
|
27
25
|
|
28
26
|
.site-sidebar-button {
|
29
27
|
position: absolute;
|
30
|
-
top:
|
28
|
+
top: 3px;
|
31
29
|
left: $spacing-unit / 2;
|
32
30
|
|
33
31
|
img {
|
@@ -43,7 +41,7 @@
|
|
43
41
|
|
44
42
|
.site-title {
|
45
43
|
@include relative-font-size(1.625);
|
46
|
-
font-family: $
|
44
|
+
font-family: $handwriting-font-family;
|
47
45
|
letter-spacing: -1px;
|
48
46
|
margin-bottom: 0;
|
49
47
|
float: left;
|
@@ -55,7 +53,7 @@
|
|
55
53
|
|
56
54
|
.site-nav {
|
57
55
|
position: absolute;
|
58
|
-
top:
|
56
|
+
top: 12px;
|
59
57
|
right: $spacing-unit / 2;
|
60
58
|
border: 1px solid;
|
61
59
|
border-radius: 0.4em;
|
@@ -184,7 +182,7 @@
|
|
184
182
|
*/
|
185
183
|
.site-body {
|
186
184
|
display: grid;
|
187
|
-
grid-template-columns: calc(#{$content-width} * 0.
|
185
|
+
grid-template-columns: calc(#{$content-width} * 0.22) 1fr;
|
188
186
|
overflow: hidden;
|
189
187
|
|
190
188
|
@include media-query($on-medium) {
|
@@ -200,11 +198,12 @@
|
|
200
198
|
* Site sidebar
|
201
199
|
*/
|
202
200
|
.site-sidebar {
|
203
|
-
padding: $spacing-unit
|
201
|
+
padding: $spacing-unit;
|
204
202
|
border-right: 1px solid;
|
205
203
|
@include relative-font-size(0.8);
|
206
204
|
|
207
205
|
@include media-query($on-medium) {
|
206
|
+
padding: $spacing-unit / 2;
|
208
207
|
@include relative-font-size(0.6);
|
209
208
|
}
|
210
209
|
|
@@ -246,14 +245,13 @@
|
|
246
245
|
margin-bottom: 0;
|
247
246
|
}
|
248
247
|
|
249
|
-
.social-icons {
|
248
|
+
ul.social-icons {
|
250
249
|
list-style: none;
|
251
250
|
margin-left: 0;
|
252
251
|
margin-bottom: 0;
|
253
|
-
text-align: left;
|
254
|
-
display: flex;
|
255
252
|
|
256
|
-
|
253
|
+
> li {
|
254
|
+
display: inline-block;
|
257
255
|
margin: 0.3em;
|
258
256
|
}
|
259
257
|
}
|
@@ -275,8 +273,13 @@
|
|
275
273
|
-ms-overflow-style: none; // IE and Edge
|
276
274
|
scrollbar-width: none; // Firefox
|
277
275
|
|
278
|
-
padding-left: $spacing-unit
|
279
|
-
padding-right: $spacing-unit
|
276
|
+
padding-left: $spacing-unit;
|
277
|
+
padding-right: $spacing-unit;
|
278
|
+
|
279
|
+
@include media-query($on-medium) {
|
280
|
+
padding-left: $spacing-unit / 2;
|
281
|
+
padding-right: $spacing-unit / 2;
|
282
|
+
}
|
280
283
|
|
281
284
|
@include media-query($on-small) {
|
282
285
|
padding-left: 0;
|
@@ -309,6 +312,11 @@
|
|
309
312
|
|
310
313
|
h2 {
|
311
314
|
margin-bottom: 0;
|
315
|
+
@include relative-font-size(1.4);
|
316
|
+
|
317
|
+
@media screen and (min-width: $on-large) {
|
318
|
+
@include relative-font-size(1.5);
|
319
|
+
}
|
312
320
|
}
|
313
321
|
|
314
322
|
.post-excerpt {
|
@@ -321,14 +329,6 @@
|
|
321
329
|
}
|
322
330
|
}
|
323
331
|
|
324
|
-
.post-link {
|
325
|
-
@include relative-font-size(1.5);
|
326
|
-
|
327
|
-
@media screen and (min-width: $on-large) {
|
328
|
-
@include relative-font-size(1.55);
|
329
|
-
}
|
330
|
-
}
|
331
|
-
|
332
332
|
/**
|
333
333
|
* Pagination
|
334
334
|
*/
|
@@ -360,7 +360,7 @@
|
|
360
360
|
*/
|
361
361
|
.post-header {
|
362
362
|
padding-top: $spacing-unit * 2;
|
363
|
-
padding-bottom: $spacing-unit
|
363
|
+
padding-bottom: $spacing-unit;
|
364
364
|
border-bottom: 1px solid;
|
365
365
|
margin-bottom: $spacing-unit * 2;
|
366
366
|
text-align: center;
|
@@ -371,13 +371,34 @@
|
|
371
371
|
margin-bottom: $spacing-unit / 2;
|
372
372
|
}
|
373
373
|
|
374
|
-
.post-
|
375
|
-
|
376
|
-
|
374
|
+
.post-footer {
|
375
|
+
padding-top: $spacing-unit / 2;
|
376
|
+
border-top: 1px solid;
|
377
|
+
border-bottom: 1px solid;
|
378
|
+
}
|
379
|
+
|
380
|
+
ul.post-taxonomies {
|
381
|
+
list-style: none;
|
382
|
+
display: inline-block;
|
383
|
+
vertical-align: middle;
|
384
|
+
margin: 0 0 0 $spacing-unit / 3;
|
385
|
+
|
386
|
+
li {
|
387
|
+
float: left;
|
388
|
+
margin-right: $spacing-unit / 6;
|
389
|
+
padding: 0.3em 0.5em 0.2em 0.5em;
|
377
390
|
}
|
378
|
-
|
379
|
-
|
380
|
-
|
391
|
+
}
|
392
|
+
|
393
|
+
ul.post-tags {
|
394
|
+
li {
|
395
|
+
border-radius: 0.5em;
|
396
|
+
}
|
397
|
+
}
|
398
|
+
|
399
|
+
ul.post-categories {
|
400
|
+
li {
|
401
|
+
text-decoration: underline;
|
381
402
|
}
|
382
403
|
}
|
383
404
|
|
@@ -385,13 +406,14 @@
|
|
385
406
|
// About font sizes for h1-h6, refer to https://stackoverflow.com/a/6140504/13261366
|
386
407
|
.post-title,
|
387
408
|
.post-content h1 {
|
388
|
-
|
409
|
+
font-family: $display-font-family;
|
410
|
+
@include relative-font-size(1.8);
|
389
411
|
font-weight: bold;
|
390
412
|
letter-spacing: -1px;
|
391
413
|
line-height: $base-line-height * $base-font-size * 2;
|
392
414
|
|
393
415
|
@media screen and (min-width: $on-large) {
|
394
|
-
@include relative-font-size(2
|
416
|
+
@include relative-font-size(2);
|
395
417
|
}
|
396
418
|
}
|
397
419
|
|
@@ -404,19 +426,15 @@
|
|
404
426
|
h5, h6 { margin-top: $spacing-unit }
|
405
427
|
|
406
428
|
h2 {
|
407
|
-
@include relative-font-size(1.
|
429
|
+
@include relative-font-size(1.4);
|
408
430
|
|
409
431
|
@media screen and (min-width: $on-large) {
|
410
|
-
@include relative-font-size(1.
|
432
|
+
@include relative-font-size(1.5);
|
411
433
|
}
|
412
434
|
}
|
413
435
|
|
414
436
|
h3 {
|
415
437
|
@include relative-font-size(1.17);
|
416
|
-
|
417
|
-
@media screen and (min-width: $on-large) {
|
418
|
-
@include relative-font-size(1.175);
|
419
|
-
}
|
420
438
|
}
|
421
439
|
|
422
440
|
h4 {
|
data/_sass/hamilton/skin.scss
CHANGED
@@ -121,6 +121,16 @@ table {
|
|
121
121
|
color: $text-color-light;
|
122
122
|
}
|
123
123
|
|
124
|
+
.post-footer {
|
125
|
+
border-color: $border-color-light;
|
126
|
+
}
|
127
|
+
|
128
|
+
ul.post-tags {
|
129
|
+
li {
|
130
|
+
background-color: $border-color-light;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
124
134
|
.pagination {
|
125
135
|
li {
|
126
136
|
a, div {
|
@@ -3,8 +3,8 @@ $text-color-light: silver !default;
|
|
3
3
|
$background-color: #121212 !default;
|
4
4
|
$code-background-color: #49483e !default;
|
5
5
|
|
6
|
-
$border-color: mix($text-color, $background-color,
|
7
|
-
$border-color-light: darken($border-color,
|
6
|
+
$border-color: mix($text-color, $background-color, 30%) !default;
|
7
|
+
$border-color-light: darken($border-color, 5%) !default;
|
8
8
|
$border-color-dark: lighten($border-color, 10%) !default;
|
9
9
|
|
10
10
|
$link-base-color: #00b1c9 !default;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
// Fonts
|
2
|
-
$base-font-family: "
|
3
|
-
$
|
4
|
-
$
|
5
|
-
$
|
2
|
+
$base-font-family: Roboto, "Noto Sans SC", "Noto Sans TC" !default;
|
3
|
+
$reading-font-family: "Roboto Slab", "Noto Serif SC", "Noto Serif TC" !default;
|
4
|
+
$code-font-family: "Roboto Mono" !default;
|
5
|
+
$display-font-family: Lobster, "ZCOOL QingKe HuangYou" !default;
|
6
|
+
$handwriting-font-family: "Dancing Script", "Ma Shan Zheng" !default;
|
6
7
|
$base-font-size: 18px !default;
|
7
8
|
$base-line-height: 1.4 !default;
|
8
9
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-hamilton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shangzhi Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|