jekyll-theme-switch 0.5.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/_data/i18n.yaml +42 -0
- data/_includes/date.html +1 -4
- data/_includes/footer.html +42 -13
- data/_includes/footer_text.html +5 -0
- data/_includes/head.html +37 -40
- data/_includes/month.html +7 -14
- data/_includes/page_title.html +1 -0
- data/_includes/paginator_nav.html +24 -0
- data/_includes/post_item.html +34 -0
- data/_includes/post_list.html +7 -0
- data/_includes/post_meta.html +9 -0
- data/_includes/post_nav.html +22 -0
- data/_includes/rss/channel.html +3 -0
- data/_includes/rss/post.html +1 -1
- data/_includes/youtube.html +1 -1
- data/_layouts/archive.html +1 -1
- data/_layouts/category_page.html +2 -37
- data/_layouts/default.html +2 -0
- data/_layouts/home.html +2 -69
- data/_layouts/monthly_archive.html +2 -2
- data/_layouts/post.html +1 -22
- data/_layouts/rss.html +1 -2
- data/_layouts/series_post.html +2 -2
- data/_layouts/tag_page.html +2 -36
- data/_layouts/yearly_archive.html +2 -1
- data/_sass/jekyll-theme-switch/_base.scss +61 -40
- data/_sass/jekyll-theme-switch/_dark.scss +5 -1
- data/_sass/jekyll-theme-switch/_image-effects.scss +1 -1
- data/_sass/jekyll-theme-switch/_layout.scss +53 -12
- metadata +16 -16
- data/_plugins/blog_series_plugin.rb +0 -16
- data/_plugins/category_tag_filter.rb +0 -36
- data/_plugins/filesize_filter.rb +0 -13
- data/_plugins/normalize_whitespace_filter.rb +0 -10
- data/_plugins/songlink_tag_plugin.rb +0 -18
- data/_plugins/video_tag_plugin.rb +0 -62
- data/_plugins/vimeo_tag_plugin.rb +0 -23
- data/_plugins/yearly_archive_plugin.rb +0 -81
@@ -1,23 +0,0 @@
|
|
1
|
-
|
2
|
-
class VimeoEmbed < Liquid::Tag
|
3
|
-
|
4
|
-
def initialize(tagName, content, tokens)
|
5
|
-
super
|
6
|
-
@content = content
|
7
|
-
content[/([0-9]+)/]
|
8
|
-
@vimeo_id = $1
|
9
|
-
end
|
10
|
-
|
11
|
-
def render(context)
|
12
|
-
tmpl_path = File.join Dir.pwd, "_includes", "vimeo.html"
|
13
|
-
if File.exist?(tmpl_path)
|
14
|
-
tmpl = File.read tmpl_path
|
15
|
-
site = context.registers[:site]
|
16
|
-
tmpl = (Liquid::Template.parse tmpl).render site.site_payload.merge!({"vimeo_id" => @vimeo_id})
|
17
|
-
else
|
18
|
-
%Q{<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'> <iframe title="vimeo video player" width="640" height="390" src="//www.vimeo.com/embed/#{ @vimeo_id }" frameborder="0" allowfullscreen></iframe></div>}
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
Liquid::Template.register_tag "vimeo", self
|
23
|
-
end
|
@@ -1,81 +0,0 @@
|
|
1
|
-
# Jekyll Module to create yearly archive pages
|
2
|
-
#
|
3
|
-
# Shigeya Suzuki, November 2013
|
4
|
-
# Copyright notice (MIT License) attached at the end of this file
|
5
|
-
#
|
6
|
-
|
7
|
-
#
|
8
|
-
# This code is based on the following works:
|
9
|
-
# https://gist.github.com/ilkka/707909
|
10
|
-
# https://gist.github.com/ilkka/707020
|
11
|
-
# https://gist.github.com/nlindley/6409459
|
12
|
-
#
|
13
|
-
|
14
|
-
#
|
15
|
-
# Archive will be written as #{archive_path}/#{year}/#{month}/index.html
|
16
|
-
# archive_path can be configured in 'path' key in 'yearly_archive' of
|
17
|
-
# site configuration file. 'path' is default null.
|
18
|
-
#
|
19
|
-
|
20
|
-
module Jekyll
|
21
|
-
|
22
|
-
module YearlyArchiveUtil
|
23
|
-
def self.archive_base(site)
|
24
|
-
site.config['yearly_archive'] && site.config['yearly_archive']['path'] || ''
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
# Generator class invoked from Jekyll
|
29
|
-
class YearlyArchiveGenerator < Generator
|
30
|
-
def generate(site)
|
31
|
-
posts_by_year = posts_group_by_year(site)
|
32
|
-
site.pages << ArchivePage.new(site, YearlyArchiveUtil.archive_base(site), posts_by_year)
|
33
|
-
end
|
34
|
-
|
35
|
-
def posts_group_by_year(site)
|
36
|
-
site.posts.docs.each.group_by { |post| post.date.year }
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
class ArchivePage < Page
|
42
|
-
def initialize(site, dir, posts_by_year)
|
43
|
-
@site = site
|
44
|
-
@dir = dir
|
45
|
-
@years = posts_by_year
|
46
|
-
@layout = 'archive'
|
47
|
-
self.ext = '.html'
|
48
|
-
self.basename = 'archive'
|
49
|
-
self.data = {
|
50
|
-
'layout' => @layout,
|
51
|
-
'type' => 'archive',
|
52
|
-
'title' => 'Archieven',
|
53
|
-
'site_header' => 'Archieven',
|
54
|
-
'years' => @years,
|
55
|
-
'url' => File.join('/', YearlyArchiveUtil.archive_base(site), 'archives.html')
|
56
|
-
}
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# The MIT License (MIT)
|
62
|
-
#
|
63
|
-
# Copyright (c) 2013 Shigeya Suzuki
|
64
|
-
#
|
65
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
66
|
-
# of this software and associated documentation files (the "Software"), to deal
|
67
|
-
# in the Software without restriction, including without limitation the rights
|
68
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
69
|
-
# copies of the Software, and to permit persons to whom the Software is
|
70
|
-
# furnished to do so, subject to the following conditions:
|
71
|
-
#
|
72
|
-
# The above copyright notice and this permission notice shall be included in all
|
73
|
-
# copies or substantial portions of the Software.
|
74
|
-
#
|
75
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
76
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
77
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
78
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
79
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
80
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
81
|
-
# SOFTWARE.
|