jekyll-theme-hamilton 1.3.0 → 1.4.4
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 +7 -3
- data/_includes/footer.html +20 -49
- data/_includes/header.html +51 -35
- data/_includes/image.html +1 -1
- data/_includes/sidebar.html +39 -0
- data/_layouts/archive-taxonomies.html +8 -1
- data/_layouts/archive-years.html +8 -1
- data/_layouts/default.html +17 -9
- data/_layouts/home.html +1 -1
- data/_layouts/page.html +3 -7
- data/_layouts/post.html +36 -43
- data/_sass/hamilton/layout.scss +147 -36
- data/_sass/hamilton/skin.scss +10 -1
- data/_sass/hamilton/skins/midnight.scss +2 -2
- data/_sass/hamilton/variables.scss +4 -4
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c7ba52644a1de4f49df82c4a8137e0e73e2a6113c969bee996501f8054ad206
|
4
|
+
data.tar.gz: 320198c139ab3193443f4f5746eda02d31a6d6e3e759419be66d66d8eab21058
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19fafeea368e6e2d1984ddf4c203415ce1834c814d65fb48f44a5aef2c89320f7e7c27149bf450b1521b44634b0ae470fb762237c4ad1e068e00a06a4f02eae5
|
7
|
+
data.tar.gz: d4754deb6fb09c618f14977339f4eb2871943da5cdc7f1ee8d837707fec2b5739cc4812cb3b449921e09539e9f7a6e78a7ff940dbbdb701289e5cc252ea15943
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Hamilton <!-- omit in toc -->
|
2
2
|
|
3
|
-
|
3
|
+
A minimal and beautiful Jekyll theme best for writing and note-taking.
|
4
|
+
|
5
|
+
The original purpose of this theme is to be a replacement of the default Jekyll theme -- [Minima](https://github.com/jekyll/minima). Hamilton is an enhancement of Minima but still, keep in minimal.
|
4
6
|
|
5
7
|
Please check out the [demo](https://ngzhio.github.io/jekyll-theme-hamilton/).
|
6
8
|
|
@@ -79,7 +81,9 @@ After installation, you can run `jekyll serve` to check out your site, but befor
|
|
79
81
|
|
80
82
|
| Parameters | Types | Specifications |
|
81
83
|
|:---------- |:----- |:-------------- |
|
82
|
-
| `author` | string | The
|
84
|
+
| `author` | string | The name of the author of the site; It would be showed in the copyright statement. |
|
85
|
+
| `avatar` | string | The avatar of the author of the site. |
|
86
|
+
| `email` | string | The email of the author of the site. |
|
83
87
|
| `skin` | string | The skin name. See more information on the [Customization](#customization) section. |
|
84
88
|
| `lang` | string | The language of the site; The default value is `en`. |
|
85
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). |
|
@@ -135,7 +139,7 @@ You can also configure the width and height of the image,
|
|
135
139
|
|
136
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.
|
137
141
|
|
138
|
-
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 }}`.
|
139
143
|
|
140
144
|
## Customization
|
141
145
|
|
data/_includes/footer.html
CHANGED
@@ -1,53 +1,24 @@
|
|
1
|
-
<
|
2
|
-
<div class="wrapper">
|
3
|
-
<div class="footer-col-wrapper">
|
1
|
+
<div class="footer-col-wrapper">
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
{%- endif -%}
|
18
|
-
</ul>
|
19
|
-
</div>
|
20
|
-
|
21
|
-
<div class="footer-col">
|
22
|
-
<p>{{ site.description | escape }}</p>
|
23
|
-
</div>
|
24
|
-
|
25
|
-
<div class="footer-col">
|
26
|
-
<div class="copyright">
|
27
|
-
{% assign year_from = site.posts[-1].date | date: '%Y' %}
|
28
|
-
{% assign year_to = site.time | date: '%Y' %}
|
29
|
-
{% if year_from == nil or year_from == year_to %}
|
30
|
-
{% assign year_string = year_from %}
|
31
|
-
{% else %}
|
32
|
-
{% assign year_string = year_from | append: ' ' | append: '-' | append: ' ' | append: year_to %}
|
33
|
-
{% endif %}
|
34
|
-
{% if site.author %}
|
35
|
-
<p>Copyright © {{ year_string }} {{ site.author }}; All rights reserved.</p>
|
36
|
-
{% endif %}
|
37
|
-
</div>
|
38
|
-
<p>
|
39
|
-
Powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/ngzhio/jekyll-theme-hamilton">Hamilton</a>
|
40
|
-
</p>
|
41
|
-
</div>
|
3
|
+
<div class="footer-col">
|
4
|
+
<div class="copyright">
|
5
|
+
{% assign year_from = site.posts[-1].date | date: '%Y' %}
|
6
|
+
{% assign year_to = site.time | date: '%Y' %}
|
7
|
+
{% if year_from == nil or year_from == year_to %}
|
8
|
+
{% assign year_string = year_from %}
|
9
|
+
{% else %}
|
10
|
+
{% assign year_string = year_from | append: ' ' | append: '-' | append: ' ' | append: year_to %}
|
11
|
+
{% endif %}
|
12
|
+
{% if site.author %}
|
13
|
+
<p>Copyright © {{ year_string }} {{ site.author }}; All rights reserved.</p>
|
14
|
+
{% endif %}
|
42
15
|
</div>
|
16
|
+
<p>
|
17
|
+
Powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/ngzhio/jekyll-theme-hamilton">Hamilton</a>
|
18
|
+
</p>
|
19
|
+
</div>
|
43
20
|
|
44
|
-
|
45
|
-
|
46
|
-
{% for social in site.data.social %}
|
47
|
-
<a class="social-icon" href="{{ social.url }}"><i class="{{ social.icon | default: 'fas fa-link' }} fa-2x" title="{{ social.title }}"></i></a>
|
48
|
-
{% endfor %}
|
49
|
-
</div>
|
50
|
-
{% endif %}
|
21
|
+
<div class="footer-col">
|
22
|
+
<p>{{ site.description | escape }}</p>
|
51
23
|
</div>
|
52
|
-
</
|
53
|
-
|
24
|
+
</div>
|
data/_includes/header.html
CHANGED
@@ -1,38 +1,54 @@
|
|
1
|
-
<
|
1
|
+
<div class="wrapper">
|
2
|
+
<script>
|
3
|
+
function clickSidebarButton() {
|
4
|
+
const elem = document.getElementById("site-sidebar")
|
5
|
+
if (elem.style.display == "none" || elem.style.display == "") {
|
6
|
+
elem.style.display = "block";
|
7
|
+
} else {
|
8
|
+
elem.style.display = "none";
|
9
|
+
}
|
10
|
+
}
|
11
|
+
</script>
|
12
|
+
<a class="site-sidebar-button" onclick="clickSidebarButton()">
|
13
|
+
{%- if site.avatar contains "://" -%}
|
14
|
+
{%- assign avatar = site.avatar -%}
|
15
|
+
{%- else -%}
|
16
|
+
{%- assign avatar = site.avatar | relative_url -%}
|
17
|
+
{%- endif -%}
|
18
|
+
<i class="far fa-user"></i>
|
19
|
+
</a>
|
2
20
|
|
3
|
-
<
|
4
|
-
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
|
21
|
+
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
|
5
22
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
23
|
+
{% if site.data.navigation %}
|
24
|
+
<nav class="site-nav">
|
25
|
+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
26
|
+
<label for="nav-trigger" title="nav-trigger">
|
27
|
+
<span class="menu-icon">
|
28
|
+
<svg viewBox="0 0 18 15" width="18px" height="15px">
|
29
|
+
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
|
30
|
+
</svg>
|
31
|
+
</span>
|
32
|
+
</label>
|
16
33
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
</header>
|
34
|
+
<ul class="trigger">
|
35
|
+
{%- for nav in site.data.navigation -%}
|
36
|
+
{%- if nav.title -%}
|
37
|
+
{% if nav.sublinks %}
|
38
|
+
<li class="dropdown" href="#">
|
39
|
+
<a href="javascript:void(0)" class="dropbtn">{{ nav.title | escape }}</a>
|
40
|
+
<div class="dropdown-content">
|
41
|
+
{%- for link in nav.sublinks %}
|
42
|
+
<a class="{% if page.url == link.url %}current-page{% endif %}" href="{{ link.url | relative_url }}">{{ link.title | escape }}</a>
|
43
|
+
{%- endfor %}
|
44
|
+
</div>
|
45
|
+
</li>
|
46
|
+
{% else %}
|
47
|
+
<li><a class="{% if page.url == nav.url %}current-page{% endif %}" href="{{ nav.url | relative_url }}">{{ nav.title | escape }}</a></li>
|
48
|
+
{% endif %}
|
49
|
+
{%- endif -%}
|
50
|
+
{%- endfor -%}
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
{% endif %}
|
54
|
+
</div>
|
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 %}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{% if site.avatar -%}
|
2
|
+
<div class="sidebar-section">
|
3
|
+
{%- if site.avatar contains "://" -%}
|
4
|
+
{%- assign avatar = site.avatar -%}
|
5
|
+
{%- else -%}
|
6
|
+
{%- assign avatar = site.avatar | relative_url -%}
|
7
|
+
{%- endif -%}
|
8
|
+
<img src="{{ avatar }}" class="author-avatar u-photo align-center" alt="{{ site.author }}">
|
9
|
+
</div>
|
10
|
+
{%- endif %}
|
11
|
+
|
12
|
+
<div class="sidebar-section">
|
13
|
+
<ul class="contact-list">
|
14
|
+
{% if site.author -%}
|
15
|
+
<li class="p-name"><i class="sidebar-icon fas fa-at"></i><span>{{ site.author | escape }}</span></li>
|
16
|
+
{%- endif %}
|
17
|
+
{% if site.email -%}
|
18
|
+
<li><a class="u-email" href="mailto:{{ site.email }}"><i class="sidebar-icon fas fa-envelope"></i><span>{{ site.email }}</span></a></li>
|
19
|
+
{%- endif %}
|
20
|
+
</ul>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="sidebar-section feed-subscribe">
|
24
|
+
<a href="{{ 'feed.xml' | relative_url }}">
|
25
|
+
<i class="sidebar-icon fas fa-rss"></i><span>Subscribe</span>
|
26
|
+
</a>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
{% if site.data.social -%}
|
30
|
+
<div class="sidebar-section">
|
31
|
+
<ul class="social-icons">
|
32
|
+
{% for social in site.data.social -%}
|
33
|
+
<li>
|
34
|
+
<a class="social-icon" href="{{ social.url }}"><i class="{{ social.icon | default: 'fas fa-link' }} fa-2x" title="{{ social.title }}"></i></a>
|
35
|
+
</li>
|
36
|
+
{%- endfor %}
|
37
|
+
</ul>
|
38
|
+
</div>
|
39
|
+
{%- endif %}
|
@@ -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
@@ -6,15 +6,23 @@
|
|
6
6
|
</head>
|
7
7
|
|
8
8
|
<body>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
<div class="site-container">
|
10
|
+
<header class="site-header">
|
11
|
+
{% include header.html %}
|
12
|
+
</header>
|
13
|
+
|
14
|
+
<div class="site-body wrapper">
|
15
|
+
<aside class="site-sidebar" id="site-sidebar">
|
16
|
+
{% include sidebar.html %}
|
17
|
+
</aside>
|
18
|
+
<main class="site-main" id="site-main" aria-label="Content">
|
19
|
+
{{ content }}
|
20
|
+
<footer class="site-footer">
|
21
|
+
{% include footer.html %}
|
22
|
+
</footer>
|
23
|
+
</main>
|
24
|
+
</div>
|
25
|
+
</div>
|
18
26
|
</body>
|
19
27
|
|
20
28
|
</html>
|
data/_layouts/home.html
CHANGED
data/_layouts/page.html
CHANGED
@@ -5,15 +5,11 @@ layout: default
|
|
5
5
|
<article class="post">
|
6
6
|
|
7
7
|
<header class="post-header">
|
8
|
-
<
|
9
|
-
<h1 class="post-title">{{ page.title | escape }}</h1>
|
10
|
-
</div>
|
8
|
+
<h1 class="post-title">{{ page.title | escape }}</h1>
|
11
9
|
</header>
|
12
10
|
|
13
|
-
<div class="
|
14
|
-
|
15
|
-
{{ content }}
|
16
|
-
</div>
|
11
|
+
<div class="post-content">
|
12
|
+
{{ content }}
|
17
13
|
</div>
|
18
14
|
|
19
15
|
</article>
|
data/_layouts/post.html
CHANGED
@@ -6,55 +6,48 @@ layout: default
|
|
6
6
|
|
7
7
|
<header class="post-header">
|
8
8
|
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
{
|
14
|
-
|
15
|
-
|
9
|
+
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
|
10
|
+
<p class="post-meta">
|
11
|
+
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
|
12
|
+
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
|
13
|
+
{{ page.date | date: date_format }}
|
14
|
+
</time>
|
15
|
+
{%- if page.modified_date -%}
|
16
|
+
~
|
17
|
+
{%- assign mdate = page.modified_date | date_to_xmlschema -%}
|
18
|
+
<time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">
|
19
|
+
{{ mdate | date: date_format }}
|
16
20
|
</time>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
{
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
{
|
21
|
+
{%- endif -%}
|
22
|
+
{%- if page.author -%}
|
23
|
+
• {% for author in page.author %}
|
24
|
+
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
|
25
|
+
<span class="p-author h-card" itemprop="name">{{ author }}</span></span>
|
26
|
+
{%- if forloop.last == false %}, {% endif -%}
|
27
|
+
{% endfor %}
|
28
|
+
{%- endif -%}
|
29
|
+
</p>
|
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 %}
|
31
40
|
</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>
|
41
|
+
{% endif %}
|
45
42
|
|
46
43
|
</header>
|
47
44
|
|
48
|
-
<div class="
|
49
|
-
|
50
|
-
{% include toc.html html=content class="toc" %}
|
51
|
-
|
52
|
-
{{ content }}
|
45
|
+
<div class="post-content e-content" itemprop="articleBody">
|
46
|
+
{{ content }}
|
53
47
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
</div>
|
48
|
+
{% if page.comments != false and jekyll.environment == "production" %}
|
49
|
+
{% include disqus.html %}
|
50
|
+
{% endif %}
|
58
51
|
</div>
|
59
52
|
|
60
53
|
</article>
|
data/_sass/hamilton/layout.scss
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Site container
|
3
|
+
*/
|
4
|
+
.site-container {
|
5
|
+
height: 100vh;
|
6
|
+
width: 100vw;
|
7
|
+
display: grid;
|
8
|
+
grid-template-columns: 1fr;
|
9
|
+
grid-template-rows: $base-font-size * 3 + 6px 1fr;
|
10
|
+
}
|
11
|
+
|
1
12
|
/**
|
2
13
|
* Site header
|
3
14
|
*/
|
@@ -7,8 +18,25 @@
|
|
7
18
|
min-height: $base-font-size * 3;
|
8
19
|
line-height: $base-font-size * 3;
|
9
20
|
|
10
|
-
|
11
|
-
|
21
|
+
@include media-query($on-small) {
|
22
|
+
display: flex;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.site-sidebar-button {
|
27
|
+
position: absolute;
|
28
|
+
top: 3px;
|
29
|
+
left: $spacing-unit / 2;
|
30
|
+
|
31
|
+
img {
|
32
|
+
width: $base-font-size * 2.5;
|
33
|
+
height: auto;
|
34
|
+
border-radius: 50%;
|
35
|
+
}
|
36
|
+
|
37
|
+
@media screen and (min-width: $on-small) {
|
38
|
+
display: none;
|
39
|
+
}
|
12
40
|
}
|
13
41
|
|
14
42
|
.site-title {
|
@@ -18,14 +46,14 @@
|
|
18
46
|
margin-bottom: 0;
|
19
47
|
float: left;
|
20
48
|
|
21
|
-
@include media-query($on-
|
22
|
-
|
49
|
+
@include media-query($on-small) {
|
50
|
+
float: center;
|
23
51
|
}
|
24
52
|
}
|
25
53
|
|
26
54
|
.site-nav {
|
27
55
|
position: absolute;
|
28
|
-
top:
|
56
|
+
top: 12px;
|
29
57
|
right: $spacing-unit / 2;
|
30
58
|
border: 1px solid;
|
31
59
|
border-radius: 0.4em;
|
@@ -149,6 +177,116 @@
|
|
149
177
|
}
|
150
178
|
}
|
151
179
|
|
180
|
+
/**
|
181
|
+
* Site body
|
182
|
+
*/
|
183
|
+
.site-body {
|
184
|
+
display: grid;
|
185
|
+
grid-template-columns: calc(#{$content-width} * 0.2) 1fr;
|
186
|
+
overflow: hidden;
|
187
|
+
|
188
|
+
@include media-query($on-medium) {
|
189
|
+
grid-template-columns: calc(#{$content-width} * 0.15) 1fr;
|
190
|
+
}
|
191
|
+
|
192
|
+
@include media-query($on-small) {
|
193
|
+
grid-template-columns: 1fr;
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
/**
|
198
|
+
* Site sidebar
|
199
|
+
*/
|
200
|
+
.site-sidebar {
|
201
|
+
padding: $spacing-unit / 2;
|
202
|
+
border-right: 1px solid;
|
203
|
+
@include relative-font-size(0.8);
|
204
|
+
|
205
|
+
@include media-query($on-medium) {
|
206
|
+
@include relative-font-size(0.6);
|
207
|
+
}
|
208
|
+
|
209
|
+
@include media-query($on-small) {
|
210
|
+
display: none;
|
211
|
+
border-right: none;
|
212
|
+
border-bottom: 1px solid;
|
213
|
+
}
|
214
|
+
|
215
|
+
@media screen and (min-width: $on-small) {
|
216
|
+
display: block !important;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
.sidebar-section {
|
221
|
+
padding-bottom: $spacing-unit / 2;
|
222
|
+
border-bottom: 1px solid;
|
223
|
+
margin-bottom: $spacing-unit / 2;
|
224
|
+
|
225
|
+
&:last-child {
|
226
|
+
padding-bottom: 0;
|
227
|
+
border-bottom: 0;
|
228
|
+
margin-bottom: 0;
|
229
|
+
}
|
230
|
+
}
|
231
|
+
|
232
|
+
.sidebar-icon {
|
233
|
+
margin-right: 0.5em;
|
234
|
+
}
|
235
|
+
|
236
|
+
.feed-subscribe {
|
237
|
+
font-weight: bold;
|
238
|
+
text-align: left;
|
239
|
+
}
|
240
|
+
|
241
|
+
.contact-list {
|
242
|
+
list-style: none;
|
243
|
+
margin-left: 0;
|
244
|
+
margin-bottom: 0;
|
245
|
+
}
|
246
|
+
|
247
|
+
.social-icons {
|
248
|
+
list-style: none;
|
249
|
+
margin-left: 0;
|
250
|
+
margin-bottom: 0;
|
251
|
+
text-align: left;
|
252
|
+
display: flex;
|
253
|
+
|
254
|
+
.social-icon {
|
255
|
+
margin: 0.3em;
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
.author-avatar {
|
260
|
+
width: $base-font-size * 9;
|
261
|
+
height: auto;
|
262
|
+
border-radius: 50%;
|
263
|
+
}
|
264
|
+
|
265
|
+
/**
|
266
|
+
* Site main
|
267
|
+
*/
|
268
|
+
.site-main {
|
269
|
+
flex: 1 0 auto;
|
270
|
+
overflow-y: scroll;
|
271
|
+
|
272
|
+
// Hide scrollbar for IE, Edge and Firefox
|
273
|
+
-ms-overflow-style: none; // IE and Edge
|
274
|
+
scrollbar-width: none; // Firefox
|
275
|
+
|
276
|
+
padding-left: $spacing-unit / 2;
|
277
|
+
padding-right: $spacing-unit / 2;
|
278
|
+
|
279
|
+
@include media-query($on-small) {
|
280
|
+
padding-left: 0;
|
281
|
+
padding-right: 0;
|
282
|
+
}
|
283
|
+
}
|
284
|
+
|
285
|
+
// Hide scrollbar for Chrome, Safari and Opera
|
286
|
+
.site-main::-webkit-scrollbar {
|
287
|
+
display: none;
|
288
|
+
}
|
289
|
+
|
152
290
|
/**
|
153
291
|
* Homepage
|
154
292
|
*/
|
@@ -215,19 +353,13 @@
|
|
215
353
|
}
|
216
354
|
}
|
217
355
|
|
218
|
-
/**
|
219
|
-
* Page content
|
220
|
-
*/
|
221
|
-
.page-content {
|
222
|
-
flex: 1 0 auto;
|
223
|
-
}
|
224
|
-
|
225
356
|
/**
|
226
357
|
* Posts
|
227
358
|
*/
|
228
359
|
.post-header {
|
229
|
-
padding-top: $spacing-unit * 2
|
230
|
-
padding-bottom: $spacing-unit
|
360
|
+
padding-top: $spacing-unit * 2;
|
361
|
+
padding-bottom: $spacing-unit / 2;
|
362
|
+
border-bottom: 1px solid;
|
231
363
|
margin-bottom: $spacing-unit * 2;
|
232
364
|
text-align: center;
|
233
365
|
}
|
@@ -376,6 +508,7 @@ figcaption.align-center {
|
|
376
508
|
* Site footer
|
377
509
|
*/
|
378
510
|
.site-footer {
|
511
|
+
margin-top: $spacing-unit * 2;
|
379
512
|
border-top: 1px solid;
|
380
513
|
padding: $spacing-unit 0;
|
381
514
|
@include relative-font-size(0.8);
|
@@ -405,25 +538,3 @@ figcaption.align-center {
|
|
405
538
|
}
|
406
539
|
}
|
407
540
|
}
|
408
|
-
|
409
|
-
.feed-subscribe {
|
410
|
-
font-weight: bold;
|
411
|
-
text-align: left;
|
412
|
-
.feed-icon {
|
413
|
-
margin-right: 0.3em;
|
414
|
-
}
|
415
|
-
}
|
416
|
-
|
417
|
-
.contact-list {
|
418
|
-
list-style: none;
|
419
|
-
margin-left: 0;
|
420
|
-
}
|
421
|
-
|
422
|
-
.social-icons {
|
423
|
-
text-align: center;
|
424
|
-
margin-top: $spacing-unit / 2;
|
425
|
-
|
426
|
-
.social-icon {
|
427
|
-
margin: 0.3em;
|
428
|
-
}
|
429
|
-
}
|
data/_sass/hamilton/skin.scss
CHANGED
@@ -63,10 +63,15 @@ table {
|
|
63
63
|
///////// Layout ///////////
|
64
64
|
|
65
65
|
.site-header {
|
66
|
+
background-color: $background-color;
|
66
67
|
border-top-color: $border-color-dark;
|
67
68
|
border-bottom-color: $border-color-light;
|
68
69
|
}
|
69
70
|
|
71
|
+
.site-sidebar {
|
72
|
+
border-color: $border-color-light;
|
73
|
+
}
|
74
|
+
|
70
75
|
.site-title {
|
71
76
|
color: $text-color;
|
72
77
|
|
@@ -109,7 +114,7 @@ table {
|
|
109
114
|
}
|
110
115
|
|
111
116
|
.post-header {
|
112
|
-
|
117
|
+
border-bottom-color: $border-color-light;
|
113
118
|
}
|
114
119
|
|
115
120
|
.post-meta {
|
@@ -143,6 +148,10 @@ table {
|
|
143
148
|
border-top-color: $border-color-light;
|
144
149
|
}
|
145
150
|
|
151
|
+
.sidebar-section {
|
152
|
+
border-bottom-color: $border-color-light;
|
153
|
+
}
|
154
|
+
|
146
155
|
.feed-subscribe {
|
147
156
|
a {
|
148
157
|
color: $subscribe-color;
|
@@ -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;
|
@@ -8,8 +8,8 @@ $base-line-height: 1.4 !default;
|
|
8
8
|
|
9
9
|
// Layouts
|
10
10
|
$spacing-unit: 2rem !default;
|
11
|
-
$content-width:
|
11
|
+
$content-width: 1200px !default;
|
12
12
|
|
13
|
-
$on-small:
|
14
|
-
$on-medium:
|
15
|
-
$on-large:
|
13
|
+
$on-small: 600px !default;
|
14
|
+
$on-medium: 900px !default;
|
15
|
+
$on-large: 1200px !default;
|
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: 1.
|
4
|
+
version: 1.4.4
|
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-06
|
11
|
+
date: 2020-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- _includes/header.html
|
112
112
|
- _includes/image.html
|
113
113
|
- _includes/mathjax.html
|
114
|
+
- _includes/sidebar.html
|
114
115
|
- _layouts/archive-taxonomies.html
|
115
116
|
- _layouts/archive-years.html
|
116
117
|
- _layouts/default.html
|
@@ -158,5 +159,5 @@ requirements: []
|
|
158
159
|
rubygems_version: 3.0.3
|
159
160
|
signing_key:
|
160
161
|
specification_version: 4
|
161
|
-
summary:
|
162
|
+
summary: A minimal and beautiful Jekyll theme best for writing and note-taking.
|
162
163
|
test_files: []
|