jekyll-theme-hamilton 2.0.0 → 3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 918cbb51402f2cc6a02a9e8fae490614184e267fcc163f24beceb99f2e50efe6
4
- data.tar.gz: 4978858b0bef6cb18d658cd3ff2f0af380cd9938af66292f164160fd1920473b
3
+ metadata.gz: 3584d766d15707fc08538543ef6f6ed16736c17aa508ba585e88c8fcece167b3
4
+ data.tar.gz: 1b67ff489722f6f6cbd810fc791d369090f46eacc63d2de1fb9f3b6bcf3cb4b3
5
5
  SHA512:
6
- metadata.gz: cdbe0d25fb6e15d6ef2bde21659ac56f10a7b3e9d4212ee3c05a39ffffb1ec22149067563b5bf34ec95a8e3c4c2745a29aede496689f174a8614681dd0451352
7
- data.tar.gz: 17558ee6336979f3c4004ad7bde998f4228e1891835a77ac785375ba1886eb61211a3ea033a0f39d02acd58c7b4dc6f75b899678b905d0cb0f2610d23ab9d4a7
6
+ metadata.gz: 5396fbee10b7f047b8d11a50a55488f6ab26f324a2bc3a95ab7aa1f4b62a004d98f94c68399c6ffc0dbaf89944c6e5621dc2f32d914c6a9f2957d7c13bd3a4d8
7
+ data.tar.gz: 719c26f3a3374deb5225a8c74a359e2581e0ae1bb4e62aca26f363554ac96a294cfe535886d7c2b0c38b5c92be95c3c2c191c255393b406c3c110e952ee410ac
data/README.md CHANGED
@@ -32,7 +32,6 @@ Please check out the [demo](https://ngzhio.github.io/jekyll-theme-hamilton/).
32
32
  - [Optional Parameters](#optional-parameters)
33
33
  - [Archive Pages](#archive-pages)
34
34
  - [MathJax](#mathjax)
35
- - [Images](#images)
36
35
  - [Customization](#customization)
37
36
  - [Metadata](#metadata)
38
37
  - [Navigation](#navigation)
@@ -86,7 +85,7 @@ After installation, you can run `jekyll serve` to check out your site, but befor
86
85
  | `email` | string | The email of the author of the site. |
87
86
  | `skin` | string | The skin name. See more information on the [Customization](#customization) section. |
88
87
  | `lang` | string | The language of the site; The default value is `en`. |
89
- | `paginate` | int | The number of posts on each page. To enable pagination, you must use a third-party plugin, e.g. [`jekyll-paginate`](https://github.com/jekyll/jekyll-paginate), [`jekyll-paginate-v2`](https://github.com/sverrirs/jekyll-paginate-v2), or [`jekyll-pagination`](https://github.com/prometheus-ev/jekyll-pagination). |
88
+ | `paginate` | int | The number of posts on each page. |
90
89
  | `date_format` | string | The date format; The default value is `%b %-d, %Y`. |
91
90
 
92
91
  ## Archive Pages
@@ -117,30 +116,6 @@ layout: archive-years
117
116
 
118
117
  You can enable MathJax on each post or page, just set `math: true` on that page.
119
118
 
120
- ## Images
121
-
122
- Hamilton provides a template [`image.html`](_includes/image.html) to let you import images on each post through an elegant way. For example,
123
-
124
- ```liquid
125
- {% include image.html src="the/path/to/the/image" %}
126
- ```
127
-
128
- By default, the alignment of the image is center, but you can configure the alignment to left or right by passing a parameter `align`, for example,
129
-
130
- ```liquid
131
- {% include image.html src="the/path/to/the/image" align="left" %}
132
- ```
133
-
134
- You can also configure the width and height of the image,
135
-
136
- ```liquid
137
- {% include image.html src="the/path/to/the/image" width="50%" height="128px" %}
138
- ```
139
-
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
-
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
-
144
119
  ## Customization
145
120
 
146
121
  ### Metadata
@@ -15,17 +15,7 @@
15
15
  {% endif %}
16
16
 
17
17
  <!-- Google Fonts -->
18
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
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">
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">
18
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Roboto%20Slab|Roboto%20Mono|Lobster|Dancing%20Script|Noto%20Sans%20SC|Noto%20Sans%20TC|Noto%20Serif%20SC|Noto%20Serif%20TC|ZCOOL%20QingKe%20HuangYou|Ma%20Shan%20Zheng">
29
19
 
30
20
  <link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
31
21
  <link rel="stylesheet" href="{{ '/assets/css/skin.css' | relative_url }}">
@@ -64,6 +64,20 @@ layout: default
64
64
  </ul>
65
65
  </div>
66
66
  {% endif %}
67
+
68
+ <nav class="post-pagination" role="navigation">
69
+ {% if page.previous %}
70
+ <a class="post-previous" href="{{ page.previous.url | relative_url }}">
71
+ <i class="fas fa-arrow-left"></i> {{ page.previous.title | markdownify | strip_html }}
72
+ </a>
73
+ {% endif %}
74
+
75
+ {% if page.next %}
76
+ <a class="post-next" href="{{ page.next.url | relative_url }}">
77
+ {{ page.next.title | markdownify | strip_html }} <i class="fas fa-arrow-right"></i>
78
+ </a>
79
+ {% endif %}
80
+ </nav>
67
81
  </footer>
68
82
 
69
83
  {% if page.comments != false and jekyll.environment == "production" %}
@@ -112,7 +112,6 @@
112
112
  .dropdown-content {
113
113
  display: none;
114
114
  position: absolute;
115
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
116
115
  z-index: 1;
117
116
  }
118
117
 
@@ -402,6 +401,20 @@ ul.post-categories {
402
401
  }
403
402
  }
404
403
 
404
+ .post-pagination {
405
+ @include relative-font-size(0.8);
406
+ display: flex;
407
+ justify-content: space-between;
408
+ padding-top: $spacing-unit / 2;
409
+ padding-bottom: $spacing-unit / 2;
410
+ border-top: 1px solid;
411
+
412
+ .post-previous
413
+ .post-next {
414
+ display: block;
415
+ }
416
+ }
417
+
405
418
 
406
419
  // About font sizes for h1-h6, refer to https://stackoverflow.com/a/6140504/13261366
407
420
  .post-title,
@@ -28,7 +28,7 @@ code {
28
28
  }
29
29
 
30
30
  pre {
31
- box-shadow: $box-shadow;
31
+ box-shadow: $pre-shadow;
32
32
  }
33
33
 
34
34
  .highlight {
@@ -96,6 +96,7 @@ table {
96
96
 
97
97
  .dropdown-content {
98
98
  background-color: $border-color-light;
99
+ box-shadow: $dropdown-shadow;
99
100
  }
100
101
  }
101
102
 
@@ -125,6 +126,10 @@ table {
125
126
  border-color: $border-color-light;
126
127
  }
127
128
 
129
+ .post-pagination {
130
+ border-color: $border-color-light;
131
+ }
132
+
128
133
  ul.post-tags {
129
134
  li {
130
135
  background-color: $border-color-light;
@@ -16,7 +16,8 @@ $table-header-bg-color: mix($background-color, $border-color, 80%) !default;
16
16
  $table-header-border: $border-color !default;
17
17
  $table-border-color: lighten($border-color, 20%) !default;
18
18
 
19
- $box-shadow: 0 0 4px rgba(17,17,17,0.4) inset !default;
19
+ $pre-shadow: 0 0 4px rgba(17,17,17,0.4) inset !default;
20
+ $dropdown-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2) !default;
20
21
 
21
22
  $subscribe-color: #b21000 !default;
22
23
 
@@ -16,7 +16,8 @@ $table-header-bg-color: mix($background-color, $border-color-light, 5%) !default
16
16
  $table-header-border: lighten($border-color, 30%) !default;
17
17
  $table-border-color: lighten($border-color, 20%) !default;
18
18
 
19
- $box-shadow: 0 0 4px rgba(255,255,255,0.4) inset !default;
19
+ $pre-shadow: 0 0 4px rgba(255,255,255,0.4) inset !default;
20
+ $dropdown-shadow: 0px 8px 16px 0px rgba(255,255,255,0.2) !default;
20
21
 
21
22
  $subscribe-color: tomato !default;
22
23
 
@@ -16,7 +16,8 @@ $table-header-bg-color: mix($background-color, $border-color, 70%) !default;
16
16
  $table-header-border: $border-color !default;
17
17
  $table-border-color: $border-color-light !default;
18
18
 
19
- $box-shadow: 0 0 4px rgba(34,34,34,0.4) inset !default;
19
+ $pre-shadow: 0 0 4px rgba(34,34,34,0.4) inset !default;
20
+ $dropdown-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2) !default;
20
21
 
21
22
  $subscribe-color: #004e00 !default;
22
23
 
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: 2.0.0
4
+ version: 3.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-10 00:00:00.000000000 Z
11
+ date: 2020-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,56 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '3.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '3.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jekyll-seo-tag
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.6.1
33
+ version: '2.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.6.1
40
+ version: '2.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jekyll-feed
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.13.0
47
+ version: '0.13'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.13.0
54
+ version: '0.13'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jekyll-sitemap
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.4.0
61
+ version: '1.4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.4.0
68
+ version: '1.4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jekyll-paginate
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +123,6 @@ files:
109
123
  - _includes/google-analytics.html
110
124
  - _includes/head.html
111
125
  - _includes/header.html
112
- - _includes/image.html
113
126
  - _includes/mathjax.html
114
127
  - _includes/sidebar.html
115
128
  - _layouts/archive-taxonomies.html
@@ -1,16 +0,0 @@
1
- {% capture align %}align-{{ include.align | default: "center" }}{% endcapture %}
2
-
3
- {%- if include.src -%}
4
- {% assign src = include.src %}
5
- {%- elsif include.name -%}
6
- {% capture src %}assets/img/posts/{{ page.title | slugify }}/{{ include.name }}{% endcapture %}
7
- {%- endif -%}
8
-
9
- {% if include.caption %}
10
- <figure class="{{ align }}">
11
- <img class="{{ align }}" src="{{ src | absolute_url }}" alt="{{ include.caption }}" {% if include.width %}width="{{ include.width }}"{% endif %} {% if include.height %}height="{{ include.height }}"{% endif %}/>
12
- <figcaption class="{{ align }}">{{ include.caption }}</figcaption>
13
- </figure>
14
- {% else %}
15
- <img class="{{ align }}" src="{{ src | absolute_url }}" alt="{{ include.alt }}" {% if include.width %}width="{{ include.width }}"{% endif %} {% if include.height %}height="{{ include.height }}"{% endif %}/>
16
- {% endif %}