jekyll-theme-hamilton 1.2.0 → 1.3.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 +17 -0
- data/_includes/footer.html +4 -5
- data/_includes/header.html +18 -7
- data/_sass/hamilton/base.scss +1 -1
- data/_sass/hamilton/layout.scss +49 -14
- data/_sass/hamilton/skin.scss +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f676e533d624dc9ec9e904e70908b442a9a8e642fb8ac16a446ca30297562d
|
4
|
+
data.tar.gz: 257cf6ccbd3ec2b4ebd2f02ef168e939b412b13d70bd4c69bad99017068247b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2b99330c99b36c56f9c41287a1bd3cf7dfaff135d341047526f233996f00bb76d64cccbc38b6533cc5e36d98f219ddcce3b9859df060902832c73aed6836162
|
7
|
+
data.tar.gz: 9a2f1dc978de613295899c0c3b5f6be6ae13b625cfe209fefe88e52ee19865ac4d33df6b184d0b5b2f096b16e1e4c8dc02cb4c421a7ff19145e47c7bc9092d68
|
data/README.md
CHANGED
@@ -156,6 +156,23 @@ You can create a file `_data/navigation.yml` to configure links to some pages. F
|
|
156
156
|
url: /tags/
|
157
157
|
```
|
158
158
|
|
159
|
+
The navigation bar also supports dropdown submenus:
|
160
|
+
|
161
|
+
```yml
|
162
|
+
- title: About
|
163
|
+
url: /about/
|
164
|
+
- title: Categories
|
165
|
+
url: /categories/
|
166
|
+
- title: Tags
|
167
|
+
url: /tags/
|
168
|
+
- title: More
|
169
|
+
sublinks:
|
170
|
+
- title: FAQ
|
171
|
+
url: /faq/
|
172
|
+
- title: Docs
|
173
|
+
url: /docs/
|
174
|
+
```
|
175
|
+
|
159
176
|
### Social Media
|
160
177
|
|
161
178
|
You can create a file `_data/social.yml` to configure links to your social media. For example,
|
data/_includes/footer.html
CHANGED
@@ -18,6 +18,10 @@
|
|
18
18
|
</ul>
|
19
19
|
</div>
|
20
20
|
|
21
|
+
<div class="footer-col">
|
22
|
+
<p>{{ site.description | escape }}</p>
|
23
|
+
</div>
|
24
|
+
|
21
25
|
<div class="footer-col">
|
22
26
|
<div class="copyright">
|
23
27
|
{% assign year_from = site.posts[-1].date | date: '%Y' %}
|
@@ -35,11 +39,6 @@
|
|
35
39
|
Powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/ngzhio/jekyll-theme-hamilton">Hamilton</a>
|
36
40
|
</p>
|
37
41
|
</div>
|
38
|
-
|
39
|
-
<div class="footer-col">
|
40
|
-
<p>{{ site.description | escape }}</p>
|
41
|
-
</div>
|
42
|
-
|
43
42
|
</div>
|
44
43
|
|
45
44
|
{% if site.data.social %}
|
data/_includes/header.html
CHANGED
@@ -14,13 +14,24 @@
|
|
14
14
|
</span>
|
15
15
|
</label>
|
16
16
|
|
17
|
-
<
|
18
|
-
{
|
19
|
-
{
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
<ul class="trigger">
|
18
|
+
{%- for nav in site.data.navigation -%}
|
19
|
+
{%- if nav.title -%}
|
20
|
+
{% if nav.sublinks %}
|
21
|
+
<li class="dropdown" href="#">
|
22
|
+
<a href="javascript:void(0)" class="dropbtn">{{ nav.title | escape }}</a>
|
23
|
+
<div class="dropdown-content">
|
24
|
+
{%- for link in nav.sublinks %}
|
25
|
+
<a class="{% if page.url == link.url %}current-page{% endif %}" href="{{ link.url | relative_url }}">{{ link.title | escape }}</a>
|
26
|
+
{%- endfor %}
|
27
|
+
</div>
|
28
|
+
</li>
|
29
|
+
{% else %}
|
30
|
+
<li><a class="{% if page.url == nav.url %}current-page{% endif %}" href="{{ nav.url | relative_url }}">{{ nav.title | escape }}</a></li>
|
31
|
+
{% endif %}
|
32
|
+
{%- endif -%}
|
33
|
+
{%- endfor -%}
|
34
|
+
</ul>
|
24
35
|
</nav>
|
25
36
|
{% endif %}
|
26
37
|
</div>
|
data/_sass/hamilton/base.scss
CHANGED
data/_sass/hamilton/layout.scss
CHANGED
@@ -68,16 +68,36 @@
|
|
68
68
|
padding-bottom: 5px;
|
69
69
|
}
|
70
70
|
|
71
|
-
.
|
72
|
-
|
73
|
-
|
74
|
-
padding:
|
71
|
+
ul.trigger {
|
72
|
+
list-style-type: none;
|
73
|
+
margin: 0;
|
74
|
+
padding: 0;
|
75
|
+
overflow: hidden;
|
76
|
+
|
77
|
+
li a {
|
78
|
+
line-height: $base-line-height * $base-font-size * 1.15;
|
79
|
+
display: inline;
|
80
|
+
padding: 5px 10px;
|
81
|
+
margin-left: auto;
|
82
|
+
}
|
83
|
+
|
84
|
+
.dropdown-content {
|
85
|
+
display: none;
|
86
|
+
position: absolute;
|
87
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
88
|
+
z-index: 1;
|
89
|
+
}
|
90
|
+
|
91
|
+
.dropdown-content a {
|
92
|
+
padding: 5px 10px;
|
93
|
+
display: inline-block;
|
94
|
+
text-align: right;
|
95
|
+
margin-left: auto;
|
96
|
+
}
|
75
97
|
|
76
|
-
|
77
|
-
|
78
|
-
margin-right: 0;
|
98
|
+
.dropdown:hover .dropdown-content {
|
99
|
+
display: block;
|
79
100
|
}
|
80
|
-
margin-left: 10px;
|
81
101
|
}
|
82
102
|
|
83
103
|
.current-page {
|
@@ -102,14 +122,29 @@
|
|
102
122
|
display: block;
|
103
123
|
}
|
104
124
|
|
105
|
-
.
|
106
|
-
|
107
|
-
|
125
|
+
ul.trigger {
|
126
|
+
li {
|
127
|
+
float: left;
|
128
|
+
}
|
129
|
+
|
130
|
+
li a {
|
131
|
+
display: inline-block;
|
132
|
+
text-align: center;
|
133
|
+
padding: 5px 5px;
|
134
|
+
|
135
|
+
// Gaps between nav items, but not on the last one
|
136
|
+
&:not(:last-child) {
|
137
|
+
margin-right: 0;
|
138
|
+
}
|
139
|
+
margin-left: 10px;
|
140
|
+
}
|
108
141
|
|
109
|
-
|
110
|
-
|
142
|
+
.dropdown-content a {
|
143
|
+
display: block;
|
144
|
+
text-align: left;
|
145
|
+
padding: 5px 15px 5px 5px;
|
146
|
+
margin-left: 10px;
|
111
147
|
}
|
112
|
-
margin-left: auto;
|
113
148
|
}
|
114
149
|
}
|
115
150
|
}
|
data/_sass/hamilton/skin.scss
CHANGED
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.3.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-06-
|
11
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
|
-
rubygems_version: 3.0.
|
158
|
+
rubygems_version: 3.0.3
|
159
159
|
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: Another minimal style of Jekyll theme for writers
|