jekyll-theme-wapiti 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.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/jekyll-theme-wapiti.gemspec +34 -0
- data/lib/.gitignore +2 -0
- data/lib/404.html +25 -0
- data/lib/LICENSE +21 -0
- data/lib/README.md +20 -0
- data/lib/_config.yml +74 -0
- data/lib/_includes/footer.html +219 -0
- data/lib/_includes/head.html +37 -0
- data/lib/_includes/nav.html +85 -0
- data/lib/_layouts/default.html +17 -0
- data/lib/_layouts/page.html +199 -0
- data/lib/_layouts/post.html +205 -0
- data/lib/_posts/2017-03-25-markdown-test.md +19 -0
- data/lib/_posts/2017-03-26-catalog-test.md +24 -0
- data/lib/about.md +9 -0
- data/lib/css/backtop.css +23 -0
- data/lib/css/bootstrap.min.css +5 -0
- data/lib/css/clean-blog.min.css +1 -0
- data/lib/css/material.min.css +9 -0
- data/lib/css/print.css +15 -0
- data/lib/css/style.css +1091 -0
- data/lib/css/syntax.css +84 -0
- data/lib/feed.xml +30 -0
- data/lib/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/fonts/glyphicons-halflings-regular.svg +288 -0
- data/lib/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/lib/img/avatar.png +0 -0
- data/lib/img/favicon.png +0 -0
- data/lib/img/index.jpg +0 -0
- data/lib/index.html +42 -0
- data/lib/jekyll/theme/wapiti/version.rb +7 -0
- data/lib/jekyll/theme/wapiti.rb +9 -0
- data/lib/js/animatescroll.min.js +2 -0
- data/lib/js/bootstrap.min.js +7 -0
- data/lib/js/jquery.js +9205 -0
- data/lib/js/jquery.min.js +4 -0
- data/lib/js/jquery.nav.js +224 -0
- data/lib/js/jquery.tagcloud.js +81 -0
- data/lib/js/js.js +84 -0
- data/lib/js/js.min.js +1 -0
- data/lib/js/material.min.js +10 -0
- data/lib/less/hux-blog.less +1028 -0
- data/lib/less/mixins.less +52 -0
- data/lib/less/side-catalog.less +81 -0
- data/lib/less/sidebar.less +58 -0
- data/lib/less/variables.less +8 -0
- data/lib/offline.html +25 -0
- data/lib/package.json +22 -0
- data/lib/pwa/icons/192.png +0 -0
- data/lib/pwa/manifest.json +17 -0
- data/lib/sw.js +146 -0
- data/lib/tags.html +53 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a521f6674b38ba619dcbb5d8c94ac2f249dd9c48
|
4
|
+
data.tar.gz: 93990da8497b0a98174ec5c0191b2e86e9a96a14
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 74198626f3ce47ab626fb576c4167481607e45ffa7452048043e56218c11ae8d1515688eb51fc462035546436a220bb91a0a0795a0cf2895530f62e82d5edd04
|
7
|
+
data.tar.gz: 5b052120a48f01b7e09fb58048de25de727a6ec426669d9ec23afeb26da0cf63c4b2472150e19f713e9cb99404bc19fe42fdf07bf858eedd56427f4a0b40221d
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Jekyll::Theme::Wapiti
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jekyll/theme/wapiti`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'jekyll-theme-wapiti'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install jekyll-theme-wapiti
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll-theme-wapiti.
|
36
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "jekyll/theme/wapiti"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'jekyll/theme/wapiti/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "jekyll-theme-wapiti"
|
8
|
+
spec.version = Jekyll::Theme::Wapiti::VERSION
|
9
|
+
spec.authors = ["AngusChen"]
|
10
|
+
spec.email = ["hiaiokr@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Jekyll-theme-wapiti}
|
13
|
+
spec.description = %q{a better for jekyll}
|
14
|
+
spec.homepage = "https://aiokr.github.io/jekyll-theme-wapiti/"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
#if spec.respond_to?(:metadata)
|
19
|
+
#spec.metadata['allowed_push_host'] = "http://mygemserver.com"
|
20
|
+
#else
|
21
|
+
#raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
#"public gem pushes."
|
23
|
+
#end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
f.match(%r{^(test|spec|features)/})
|
27
|
+
end
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
end
|
data/lib/.gitignore
ADDED
data/lib/404.html
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
description: "404"
|
4
|
+
header-img: "img/404-bg.jpg"
|
5
|
+
permalink: /offline.html
|
6
|
+
---
|
7
|
+
|
8
|
+
|
9
|
+
<!-- Page Header -->
|
10
|
+
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
|
11
|
+
<div class="container">
|
12
|
+
<div class="row">
|
13
|
+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
14
|
+
<div class="site-heading" id="tag-heading">
|
15
|
+
<h1>Offline</h1>
|
16
|
+
<span class="subheading">{{ page.description }}</span>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</header>
|
22
|
+
|
23
|
+
<script>
|
24
|
+
document.body.classList.add('page-fullscreen');
|
25
|
+
</script>
|
data/lib/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/lib/README.md
ADDED
data/lib/_config.yml
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Site settings
|
2
|
+
title: wapiti
|
3
|
+
SEOTitle: wapiti
|
4
|
+
header-img: "img/index.jpg"
|
5
|
+
tagline: "cn"
|
6
|
+
description: "a batter theme for jekyll"
|
7
|
+
baseurl: ""
|
8
|
+
url: "https://aiokr.github.io/jekyll-theme-wapiti"
|
9
|
+
baseurl: ""
|
10
|
+
|
11
|
+
# About/contact
|
12
|
+
owner:
|
13
|
+
name: " aiokr"
|
14
|
+
email: hiaiokr@gmail.com
|
15
|
+
bio: ""
|
16
|
+
|
17
|
+
# Data
|
18
|
+
gavatar: img/favicon.png
|
19
|
+
favicon: img/favicon.png
|
20
|
+
|
21
|
+
douban_username:
|
22
|
+
twitter_username:
|
23
|
+
github_username:
|
24
|
+
facebook_username:
|
25
|
+
weibo_username:
|
26
|
+
zhihu_username: "starkchen"
|
27
|
+
|
28
|
+
# Build settings
|
29
|
+
# use Github Flavored Markdown !important
|
30
|
+
# document: http://jekyllrb.com/docs/configuration/#kramdown
|
31
|
+
markdown: kramdown
|
32
|
+
highlighter: rouge
|
33
|
+
permalink: pretty
|
34
|
+
paginate: 15
|
35
|
+
exclude: ["less","node_modules","Gruntfile.js","package.json","README.md"]
|
36
|
+
|
37
|
+
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
38
|
+
timezone: Asia/Shanghai
|
39
|
+
|
40
|
+
# Defaults for posts
|
41
|
+
defaults:
|
42
|
+
scope:
|
43
|
+
path: ""
|
44
|
+
type: "posts"
|
45
|
+
values:
|
46
|
+
layout: "post"
|
47
|
+
author: "aiokr"
|
48
|
+
header-img: "img/green.jpg" # We don't want posts without a header image, that whould mean white on white
|
49
|
+
|
50
|
+
# Comments
|
51
|
+
# Disqus settings
|
52
|
+
disqus_username: aiokr
|
53
|
+
|
54
|
+
# Progressive Web Apps
|
55
|
+
chrome-tab-theme-color: "#607D8B"
|
56
|
+
service-worker: true
|
57
|
+
|
58
|
+
# Sidebar settings
|
59
|
+
sidebar: true # whether or not using Sidebar.
|
60
|
+
sidebar-about-description: "侧边栏标语"
|
61
|
+
sidebar-avatar: /img/avatar.png # use absolute URL, seeing it's used in both `/` and `/about/`
|
62
|
+
|
63
|
+
# Featured Tags
|
64
|
+
featured-tags: true # whether or not using Feature-Tags
|
65
|
+
featured-condition-size: 1 # A tag will be featured if the size of it is more than this condition value
|
66
|
+
|
67
|
+
|
68
|
+
# Friends link
|
69
|
+
friends: [
|
70
|
+
{
|
71
|
+
title: "aiokr",
|
72
|
+
href: "https://aiokr.github.ios/"
|
73
|
+
},
|
74
|
+
]
|
@@ -0,0 +1,219 @@
|
|
1
|
+
<!-- Footer -->
|
2
|
+
<footer>
|
3
|
+
<div class="container">
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
6
|
+
<ul class="print-hide list-inline text-center">
|
7
|
+
{% if site.RSS %}
|
8
|
+
<li>
|
9
|
+
<a href="{{ "/feed.xml" | prepend: site.baseurl }}">
|
10
|
+
<span class="fa-stack fa-lg">
|
11
|
+
<i class="fa fa-circle fa-stack-2x"></i>
|
12
|
+
<i class="fa fa-rss fa-stack-1x fa-inverse"></i>
|
13
|
+
</span>
|
14
|
+
</a>
|
15
|
+
</li>
|
16
|
+
{% endif %}
|
17
|
+
{% if site.twitter_username %}
|
18
|
+
<li>
|
19
|
+
<a href="https://twitter.com/{{ site.twitter_username }}">
|
20
|
+
<span class="fa-stack fa-lg">
|
21
|
+
<i class="fa fa-circle fa-stack-2x"></i>
|
22
|
+
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
23
|
+
</span>
|
24
|
+
</a>
|
25
|
+
</li>
|
26
|
+
{% endif %}
|
27
|
+
|
28
|
+
{% if site.zhihu_username %}
|
29
|
+
<li>
|
30
|
+
<a target="_blank" href="https://www.zhihu.com/people/{{ site.zhihu_username }}">
|
31
|
+
<span class="fa-stack fa-lg">
|
32
|
+
<i class="fa fa-circle fa-stack-2x"></i>
|
33
|
+
<i class="fa fa-stack-1x fa-inverse">知</i>
|
34
|
+
</span>
|
35
|
+
</a>
|
36
|
+
</li>
|
37
|
+
{% endif %}
|
38
|
+
{% if site.weibo_username %}
|
39
|
+
<li>
|
40
|
+
<a target="_blank" href="http://weibo.com/{{ site.weibo_username }}">
|
41
|
+
<span class="fa-stack fa-lg">
|
42
|
+
<i class="fa fa-circle fa-stack-2x"></i>
|
43
|
+
<i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
|
44
|
+
</span>
|
45
|
+
</a>
|
46
|
+
</li>
|
47
|
+
{% endif %}
|
48
|
+
|
49
|
+
|
50
|
+
{% if site.facebook_username %}
|
51
|
+
<li>
|
52
|
+
<a target="_blank" href="https://www.facebook.com/{{ site.facebook_username }}">
|
53
|
+
<span class="fa-stack fa-lg">
|
54
|
+
<i class="fa fa-circle fa-stack-2x"></i>
|
55
|
+
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
|
56
|
+
</span>
|
57
|
+
</a>
|
58
|
+
</li>
|
59
|
+
{% endif %}
|
60
|
+
{% if site.github_username %}
|
61
|
+
<li>
|
62
|
+
<a target="_blank" href="https://github.com/{{ site.github_username }}">
|
63
|
+
<span class="fa-stack fa-lg">
|
64
|
+
<i class="fa fa-circle fa-stack-2x"></i>
|
65
|
+
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
66
|
+
</span>
|
67
|
+
</a>
|
68
|
+
</li>
|
69
|
+
{% endif %}
|
70
|
+
{% if site.linkedin_username %}
|
71
|
+
<li>
|
72
|
+
<a target="_blank" href="https://www.linkedin.com/in/{{ site.linkedin_username }}">
|
73
|
+
<span class="fa-stack fa-lg">
|
74
|
+
<i class="fa fa-circle fa-stack-2x"></i>
|
75
|
+
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
|
76
|
+
</span>
|
77
|
+
</a>
|
78
|
+
</li>
|
79
|
+
{% endif %}
|
80
|
+
</ul>
|
81
|
+
<p class="print-hide copyright text-muted">
|
82
|
+
Copyright © {{ site.title }} {{ site.time | date: '%Y' }}
|
83
|
+
<br>
|
84
|
+
<a href="https://github.com/aiokr/aiokr.github.io">Wapiti</a>
|
85
|
+
<br>
|
86
|
+
Theme by <a href="https://www.aiokr.space">aiokr</a> | Power by <a href="https://jekyllrb.com/">Jekyll</a>
|
87
|
+
</p>
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
</footer>
|
92
|
+
|
93
|
+
<!-- jQuery -->
|
94
|
+
<script src="{{ "/js/jquery.min.js " | prepend: site.baseurl }}"></script>
|
95
|
+
|
96
|
+
<!-- Bootstrap Core JavaScript -->
|
97
|
+
<script src="{{ "/js/bootstrap.min.js " | prepend: site.baseurl }}"></script>
|
98
|
+
|
99
|
+
<!-- Custom Theme JavaScript -->
|
100
|
+
<script src="{{ "/js/js.min.js " | prepend: site.baseurl }}"></script>
|
101
|
+
|
102
|
+
<!-- Service Worker -->
|
103
|
+
{% if site.service-worker %}
|
104
|
+
<script type="text/javascript">
|
105
|
+
if(navigator.serviceWorker){
|
106
|
+
// For security reasons, a service worker can only control the pages that are in the same directory level or below it. That's why we put sw.js at ROOT level.
|
107
|
+
navigator.serviceWorker
|
108
|
+
.register('/sw.js')
|
109
|
+
.then((registration) => {console.log('Service Worker Registered. ', registration)})
|
110
|
+
.catch((error) => {console.log('ServiceWorker registration failed: ', error)})
|
111
|
+
}
|
112
|
+
</script>
|
113
|
+
{% endif %}
|
114
|
+
|
115
|
+
|
116
|
+
<!-- async load function -->
|
117
|
+
<script>
|
118
|
+
function async(u, c) {
|
119
|
+
var d = document, t = 'script',
|
120
|
+
o = d.createElement(t),
|
121
|
+
s = d.getElementsByTagName(t)[0];
|
122
|
+
o.src = u;
|
123
|
+
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
|
124
|
+
s.parentNode.insertBefore(o, s);
|
125
|
+
}
|
126
|
+
</script>
|
127
|
+
|
128
|
+
<!-- jquery.tagcloud.js -->
|
129
|
+
<script>
|
130
|
+
// only load tagcloud.js in tag.html
|
131
|
+
if($('#tag_cloud').length !== 0){
|
132
|
+
async('{{ "/js/jquery.tagcloud.js" | prepend: site.baseurl }}',function(){
|
133
|
+
$.fn.tagcloud.defaults = {
|
134
|
+
//size: {start: 1, end: 1, unit: 'em'},
|
135
|
+
color: {start: '#bbbbee', end: '#0085a1'},
|
136
|
+
};
|
137
|
+
$('#tag_cloud a').tagcloud();
|
138
|
+
})
|
139
|
+
}
|
140
|
+
</script>
|
141
|
+
|
142
|
+
<!--fastClick.js -->
|
143
|
+
<script>
|
144
|
+
async("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function(){
|
145
|
+
var $nav = document.querySelector("nav");
|
146
|
+
if($nav) FastClick.attach($nav);
|
147
|
+
})
|
148
|
+
</script>
|
149
|
+
|
150
|
+
|
151
|
+
<!-- Google Analytics -->
|
152
|
+
{% if site.ga_track_id %}
|
153
|
+
<script>
|
154
|
+
// dynamic User by Hux
|
155
|
+
var _gaId = '{{ site.ga_track_id }}';
|
156
|
+
var _gaDomain = '{{ site.ga_domain }}';
|
157
|
+
|
158
|
+
// Originial
|
159
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
160
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
161
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
162
|
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
163
|
+
|
164
|
+
ga('create', _gaId, _gaDomain);
|
165
|
+
ga('send', 'pageview');
|
166
|
+
</script>
|
167
|
+
{% endif %}
|
168
|
+
|
169
|
+
|
170
|
+
<!-- Side Catalog -->
|
171
|
+
{% if page.catalog %}
|
172
|
+
<script type="text/javascript">
|
173
|
+
function generateCatalog (selector) {
|
174
|
+
var P = $('div.post-container'),a,n,t,l,i,c;
|
175
|
+
a = P.find('h1,h2,h3,h4,h5,h6');
|
176
|
+
a.each(function () {
|
177
|
+
n = $(this).prop('tagName').toLowerCase();
|
178
|
+
i = "#"+$(this).prop('id');
|
179
|
+
t = $(this).text();
|
180
|
+
c = $('<a href="'+i+'" rel="nofollow">'+t+'</a>');
|
181
|
+
l = $('<li class="'+n+'_nav"></li>').append(c);
|
182
|
+
$(selector).append(l);
|
183
|
+
});
|
184
|
+
return true;
|
185
|
+
}
|
186
|
+
|
187
|
+
generateCatalog(".catalog-body");
|
188
|
+
|
189
|
+
// toggle side catalog
|
190
|
+
$(".catalog-toggle").click((function(e){
|
191
|
+
e.preventDefault();
|
192
|
+
$('.side-catalog').toggleClass("fold")
|
193
|
+
}))
|
194
|
+
|
195
|
+
/*
|
196
|
+
* Doc: https://github.com/davist11/jQuery-One-Page-Nav
|
197
|
+
* Fork by Hux to support padding
|
198
|
+
*/
|
199
|
+
async("{{ '/js/jquery.nav.js' | prepend: site.baseurl }}", function () {
|
200
|
+
$('.catalog-body').onePageNav({
|
201
|
+
currentClass: "active",
|
202
|
+
changeHash: !1,
|
203
|
+
easing: "swing",
|
204
|
+
filter: "",
|
205
|
+
scrollSpeed: 700,
|
206
|
+
scrollOffset: 0,
|
207
|
+
scrollThreshold: .2,
|
208
|
+
begin: null,
|
209
|
+
end: null,
|
210
|
+
scrollChange: null,
|
211
|
+
padding: 80
|
212
|
+
});
|
213
|
+
});
|
214
|
+
</script>
|
215
|
+
{% endif %}
|
216
|
+
|
217
|
+
<script type="text/javascript">
|
218
|
+
console.log('jekyll-theme-wapiti');
|
219
|
+
</script>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<head>
|
2
|
+
<meta charset="utf-8">
|
3
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
5
|
+
<meta name="description" content="{{ site.description }}">
|
6
|
+
<meta name="keywords" content="{{ site.keyword }}">
|
7
|
+
<meta name="theme-color" content="{{ site.chrome-tab-theme-color }}">
|
8
|
+
<title>{% if page.title %}{{ page.title }} - {{ site.SEOTitle }}{% else %}{{ site.SEOTitle }}{% endif %}</title>
|
9
|
+
|
10
|
+
<!-- Web App Manifest -->
|
11
|
+
<link rel="manifest" href="{{ site.baseurl }}/pwa/manifest.json">
|
12
|
+
|
13
|
+
<!-- Favicon -->
|
14
|
+
<link rel="shortcut icon" href="{{ site.baseurl }}/img/favicon.png">
|
15
|
+
|
16
|
+
<!-- Canonical URL -->
|
17
|
+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
18
|
+
|
19
|
+
<!-- Bootstrap Core CSS -->
|
20
|
+
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}">
|
21
|
+
|
22
|
+
<!-- Custom CSS -->
|
23
|
+
<link rel="stylesheet" href="{{ "/css/style.css" | prepend: site.baseurl }}">
|
24
|
+
|
25
|
+
<!-- Pygments Github CSS -->
|
26
|
+
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl }}">
|
27
|
+
|
28
|
+
<!-- Print CSS -->
|
29
|
+
<link rel="stylesheet" media="print" type="text/css" href="{{ "/css/print.css" | prepend: site.baseurl }}">
|
30
|
+
|
31
|
+
<!-- qiniu cdn -->
|
32
|
+
<link href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
33
|
+
|
34
|
+
|
35
|
+
<!-- ga & ba script hoook -->
|
36
|
+
<script></script>
|
37
|
+
</head>
|
@@ -0,0 +1,85 @@
|
|
1
|
+
<!-- Navigation -->
|
2
|
+
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
|
3
|
+
<div class="container-fluid">
|
4
|
+
<!-- Brand and toggle get grouped for better mobile display -->
|
5
|
+
<div class="navbar-header page-scroll">
|
6
|
+
<button type="button" class="navbar-toggle">
|
7
|
+
<span class="sr-only">Toggle navigation</span>
|
8
|
+
<span class="icon-bar"></span>
|
9
|
+
<span class="icon-bar"></span>
|
10
|
+
<span class="icon-bar"></span>
|
11
|
+
</button>
|
12
|
+
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<!-- Collect the nav links, forms, and other content for toggling -->
|
16
|
+
<div id="huxblog_navbar">
|
17
|
+
<div class="navbar-collapse">
|
18
|
+
<ul class="nav navbar-nav navbar-right">
|
19
|
+
<li>
|
20
|
+
<a href="{{ site.baseurl }}/">Home</a>
|
21
|
+
</li>
|
22
|
+
{% for page in site.pages %}{% if page.title %}
|
23
|
+
<li>
|
24
|
+
<a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
|
25
|
+
</li>
|
26
|
+
{% endif %}{% endfor %}
|
27
|
+
</ul>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<!-- /.navbar-collapse -->
|
31
|
+
</div>
|
32
|
+
<!-- /.container -->
|
33
|
+
</nav>
|
34
|
+
<script>
|
35
|
+
// Drop Bootstarp low-performance Navbar
|
36
|
+
// Use customize navbar with high-quality material design animation
|
37
|
+
// in high-perf jank-free CSS3 implementation
|
38
|
+
var $body = document.body;
|
39
|
+
var $toggle = document.querySelector('.navbar-toggle');
|
40
|
+
var $navbar = document.querySelector('#huxblog_navbar');
|
41
|
+
var $collapse = document.querySelector('.navbar-collapse');
|
42
|
+
|
43
|
+
var __HuxNav__ = {
|
44
|
+
close: function(){
|
45
|
+
$navbar.className = " ";
|
46
|
+
// wait until animation end.
|
47
|
+
setTimeout(function(){
|
48
|
+
// prevent frequently toggle
|
49
|
+
if($navbar.className.indexOf('in') < 0) {
|
50
|
+
$collapse.style.height = "0px"
|
51
|
+
}
|
52
|
+
},400)
|
53
|
+
},
|
54
|
+
open: function(){
|
55
|
+
$collapse.style.height = "auto"
|
56
|
+
$navbar.className += " in";
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// Bind Event
|
61
|
+
$toggle.addEventListener('click', function(e){
|
62
|
+
if ($navbar.className.indexOf('in') > 0) {
|
63
|
+
__HuxNav__.close()
|
64
|
+
}else{
|
65
|
+
__HuxNav__.open()
|
66
|
+
}
|
67
|
+
})
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Since Fastclick is used to delegate 'touchstart' globally
|
71
|
+
* to hack 300ms delay in iOS by performing a fake 'click',
|
72
|
+
* Using 'e.stopPropagation' to stop 'touchstart' event from
|
73
|
+
* $toggle/$collapse will break global delegation.
|
74
|
+
*
|
75
|
+
* Instead, we use a 'e.target' filter to prevent handler
|
76
|
+
* added to document close HuxNav.
|
77
|
+
*
|
78
|
+
* Also, we use 'click' instead of 'touchstart' as compromise
|
79
|
+
*/
|
80
|
+
document.addEventListener('click', function(e){
|
81
|
+
if(e.target == $toggle) return;
|
82
|
+
if(e.target.className == 'icon-bar') return;
|
83
|
+
__HuxNav__.close();
|
84
|
+
})
|
85
|
+
</script>
|