jekyll-attendease 0.6.11 → 0.6.12.pre
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/lib/jekyll/attendease_plugin.rb +1 -0
- data/lib/jekyll/attendease_plugin/event_data_generator.rb +0 -18
- data/lib/jekyll/attendease_plugin/event_layout_generator.rb +11 -33
- data/lib/jekyll/attendease_plugin/event_template_generator.rb +101 -0
- data/lib/jekyll/attendease_plugin/filters.rb +3 -0
- data/lib/jekyll/attendease_plugin/helpers.rb +0 -12
- data/lib/jekyll/attendease_plugin/home_page.rb +1 -12
- data/lib/jekyll/attendease_plugin/presenter_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/presenters_index_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/redirect_page.rb +2 -2
- data/lib/jekyll/attendease_plugin/schedule_day_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/schedule_generator.rb +1 -1
- data/lib/jekyll/attendease_plugin/schedule_index_page.rb +1 -11
- data/lib/jekyll/attendease_plugin/schedule_session_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/schedule_sessions_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/sponsors_index_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/venue_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/venues_index_page.rb +1 -10
- data/lib/jekyll/attendease_plugin/version.rb +1 -1
- data/spec/lib/jekyll/attendease_plugin/event_data_generator_spec.rb +2 -10
- data/spec/lib/jekyll/attendease_plugin/event_layout_generator_spec.rb +0 -6
- data/spec/lib/jekyll/attendease_plugin/event_template_generator_spec.rb +17 -0
- data/spec/lib/jekyll/attendease_plugin/home_page_generator_spec.rb +21 -21
- data/templates/attendease/presenters/index.html +22 -4
- data/templates/attendease/presenters/presenter.html +22 -4
- data/templates/attendease/schedule/index.html +1 -18
- data/templates/{attendease/redirect.html → redirect.html} +0 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f00c538a1e0dc7d0c468b18cbee0a55fcb8c5386
|
4
|
+
data.tar.gz: 01b9ae1bb6e21c1906359e89235d5367d734281f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cbff6942e764e5c567debb8cac843c2f082548ddb76a013842f7c8a8596329ce76c579d00247c3bb5d2096962318ef9bbf319ac74012d75583b7f7cdd383113
|
7
|
+
data.tar.gz: 736f856f96b0960cdd2c9b5222679769b8f84bb05ea97ca7e01d894cd8194cef13ed00792495cb585d486243ad2648b6842ab4ed79d9a7831a7ac85a829bfeeb
|
@@ -4,6 +4,7 @@ require 'jekyll/attendease_plugin/schedule_data_parser'
|
|
4
4
|
# Generators:
|
5
5
|
require 'jekyll/attendease_plugin/event_data_generator'
|
6
6
|
require 'jekyll/attendease_plugin/event_layout_generator'
|
7
|
+
require 'jekyll/attendease_plugin/event_template_generator'
|
7
8
|
require 'jekyll/attendease_plugin/home_page_generator'
|
8
9
|
require 'jekyll/attendease_plugin/schedule_generator'
|
9
10
|
require 'jekyll/attendease_plugin/sponsor_generator'
|
@@ -114,24 +114,6 @@ module Jekyll
|
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
|
-
# Generate the template files if they don't yet exist.
|
118
|
-
%w{ schedule presenters venues sponsors}.each do |p|
|
119
|
-
path = File.join(site.source, '_attendease', 'templates', p)
|
120
|
-
FileUtils.mkdir_p(path)
|
121
|
-
raise "Could not create #{path}." unless File.exists?(path)
|
122
|
-
end
|
123
|
-
|
124
|
-
template_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates', 'attendease'))
|
125
|
-
files_to_create_if_they_dont_exist = Dir.chdir(template_path) { Dir.glob('*/**.html') + Dir.glob('*.html') }
|
126
|
-
|
127
|
-
files_to_create_if_they_dont_exist.each do |file|
|
128
|
-
destination_file = File.join(site.source, '_attendease', 'templates', file)
|
129
|
-
FileUtils.cp(File.join(template_path, file), destination_file) unless File.exists?(destination_file)
|
130
|
-
end
|
131
|
-
|
132
|
-
# Override the template files with template data from the Attendease event
|
133
|
-
site.config['attendease']['templates'] = JSON.parse(File.read(File.join(site.config['source'], '_attendease', 'data', 'templates.json')))
|
134
|
-
|
135
117
|
# make the event available to anyone
|
136
118
|
event = JSON.parse(File.read("#{@attendease_data_path}/event.json"))
|
137
119
|
site.config['attendease']['event'] = event
|
@@ -1,3 +1,11 @@
|
|
1
|
+
# Create attendease layouts in `_layouts`.
|
2
|
+
# These layouts will be used in page generators
|
3
|
+
# - /attendease_home.html (Home page)
|
4
|
+
# - /attendease_presenters.html (Presenter pages)
|
5
|
+
# - /attendease_schedule.html (Schedule pages)
|
6
|
+
# - /attendease_sponsors.html (Sponsor pages)
|
7
|
+
# - /attendease_venues.html (Venue pages)
|
8
|
+
|
1
9
|
module Jekyll
|
2
10
|
module AttendeasePlugin
|
3
11
|
class EventLayoutGenerator < Generator
|
@@ -10,16 +18,14 @@ module Jekyll
|
|
10
18
|
|
11
19
|
attendease_precompiled_theme_layouts_path = File.join(site.source, 'attendease_layouts') # These are compiled to the html site.
|
12
20
|
attendease_precompiled_theme_email_layouts_path = File.join(site.source, 'attendease_layouts', 'emails') # These are compiled for email.
|
13
|
-
|
21
|
+
layouts_path = File.join(site.source, '_layouts')
|
14
22
|
|
15
23
|
FileUtils.mkdir_p(attendease_precompiled_theme_layouts_path)
|
16
|
-
FileUtils.mkdir_p(attendease_theme_layouts_path)
|
17
|
-
|
18
24
|
|
19
25
|
# Precompiled layouts for attendease app and jekyll generated pages.
|
20
26
|
base_layout = site.config['attendease']['base_layout'] || 'layout'
|
21
27
|
|
22
|
-
base_layout_file = File.join(
|
28
|
+
base_layout_file = File.join(layouts_path, "#{base_layout}.html")
|
23
29
|
unless File.exists?(base_layout_file)
|
24
30
|
# Generate an extremely simple base layout if it does not exist.
|
25
31
|
File.open(base_layout_file, 'w+') { |f| f.write("{{ content }}") }
|
@@ -39,7 +45,7 @@ module Jekyll
|
|
39
45
|
|
40
46
|
# Precompiled layouts for attendease email
|
41
47
|
base_email_layout = site.config['attendease']['base_email_layout'] || 'email'
|
42
|
-
base_email_layout_file = File.join(
|
48
|
+
base_email_layout_file = File.join(layouts_path, "#{base_email_layout}.html")
|
43
49
|
unless File.exists?(base_email_layout_file)
|
44
50
|
# Generate an extremely simple base email layout if it does not exist.
|
45
51
|
File.open(base_email_layout_file, 'w+') { |f| f.write("{{ content }}") }
|
@@ -52,34 +58,6 @@ module Jekyll
|
|
52
58
|
site.pages << EventLayoutPage.new(site, site.source, 'attendease_layouts/emails', "#{layout}.html", base_email_layout, layout.capitalize)
|
53
59
|
end
|
54
60
|
end
|
55
|
-
|
56
|
-
|
57
|
-
# Layouts to use for page generation. (These layouts do not need to be part of the html output)
|
58
|
-
layouts_for_page_generation = %w{ layout schedule presenters venues sponsors }
|
59
|
-
|
60
|
-
source_template = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates', 'layout.html'))
|
61
|
-
html = Liquid::Template.parse(File.read(source_template)).render('page' => { 'base_layout' => base_layout })
|
62
|
-
|
63
|
-
layouts_for_page_generation.each do |layout|
|
64
|
-
base_layout_path = File.join(site.source, '_layouts', "#{base_layout}.html")
|
65
|
-
|
66
|
-
unless File.exists?(base_layout_path)
|
67
|
-
Jekyll.logger.debug "Could not find _layouts/#{base_layout}.html in your site source. Using the built-in template from jekyll-attendease."
|
68
|
-
|
69
|
-
source_template = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates', 'layout.html'))
|
70
|
-
html = Liquid::Template.parse(File.read(source_template)).render('page' => { 'base_layout' => base_layout })
|
71
|
-
|
72
|
-
File.open(base_layout_path, 'w') { |f| f.write(html) }
|
73
|
-
end
|
74
|
-
|
75
|
-
layout_path = File.join(attendease_theme_layouts_path, "#{layout}.html")
|
76
|
-
|
77
|
-
unless File.exists?(layout_path)
|
78
|
-
#puts "generating #{layout}.html..."
|
79
|
-
File.open(layout_path, 'w') { |f| f.write(html) }
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
61
|
end
|
84
62
|
end
|
85
63
|
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# Create `templates` under `_attendease`.
|
2
|
+
# These templates will be used to generate all the attendease pages
|
3
|
+
# - /index.html (Homepage - if it already doesn't exist)
|
4
|
+
# - /schedule/index.html (Show a schedule index page if `show_schedule_index` is true. Otherwise it will show the first day.)
|
5
|
+
# - /schedule/day.html (Session timeslots for that day)
|
6
|
+
# - /schedule/sessions.html (All sessions)
|
7
|
+
# - /schedule/session.html (An individual session)
|
8
|
+
# - /presenters/index.html (All presenters)
|
9
|
+
# - /presenters/presenter.html (An individual presenter)
|
10
|
+
# - /venues/index.html (All venues)
|
11
|
+
# - /venues/venue.html (An individual venue)
|
12
|
+
# - /sponsors/index.html (All sponsors)
|
13
|
+
|
14
|
+
# These widgets will be used for specific tags
|
15
|
+
# - /schedule/widget.html (A embeddable schedule widget)
|
16
|
+
|
17
|
+
module Jekyll
|
18
|
+
module AttendeasePlugin
|
19
|
+
class EventTemplateGenerator < Generator
|
20
|
+
safe true
|
21
|
+
|
22
|
+
priority :high
|
23
|
+
|
24
|
+
def generate(site)
|
25
|
+
Jekyll.logger.info "[Attendease] Generating theme templates..."
|
26
|
+
|
27
|
+
# Template data from the Attendease event for overriding specific templates
|
28
|
+
templates = JSON.parse(File.read(File.join(site.source, '_attendease', 'data', 'templates.json')))
|
29
|
+
|
30
|
+
site.config['attendease']['templates'] = templates
|
31
|
+
|
32
|
+
# Generate the template files if they don't yet exist.
|
33
|
+
%w{ schedule presenters venues sponsors}.each do |p|
|
34
|
+
path = File.join(site.source, '_attendease', 'templates', p)
|
35
|
+
FileUtils.mkdir_p(path)
|
36
|
+
raise "Could not create #{path}." unless File.exists?(path)
|
37
|
+
end
|
38
|
+
|
39
|
+
template_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates', 'attendease'))
|
40
|
+
|
41
|
+
# Precompiled layouts for attendease app and jekyll generated pages.
|
42
|
+
base_layout = site.config['attendease']['base_layout'] || 'layout'
|
43
|
+
|
44
|
+
front_matter = <<EOF
|
45
|
+
---
|
46
|
+
layout: #{base_layout}
|
47
|
+
---
|
48
|
+
|
49
|
+
EOF
|
50
|
+
|
51
|
+
%w{
|
52
|
+
index
|
53
|
+
schedule/index
|
54
|
+
schedule/day
|
55
|
+
schedule/sessions
|
56
|
+
schedule/session
|
57
|
+
presenters/index
|
58
|
+
presenters/presenter
|
59
|
+
venues/index
|
60
|
+
venues/venue
|
61
|
+
sponsors/index
|
62
|
+
}.each do |page|
|
63
|
+
destination_file = File.join(site.source, '_attendease', 'templates', "#{page}.html")
|
64
|
+
|
65
|
+
if template_data = get_template(templates, page)
|
66
|
+
unless template_data.start_with?('---')
|
67
|
+
template_data = front_matter + template_data
|
68
|
+
end
|
69
|
+
|
70
|
+
File.open(destination_file, 'w+') { |f| f.write(template_data) }
|
71
|
+
else
|
72
|
+
unless File.exists?(destination_file)
|
73
|
+
template_data = front_matter + File.read(File.join(template_path, "#{page}.html"))
|
74
|
+
File.open(destination_file, 'w+') { |f| f.write(template_data) }
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Schedule widget
|
80
|
+
page = 'schedule/widget'
|
81
|
+
|
82
|
+
destination_file = File.join(site.source, '_attendease', 'templates', "#{page}.html")
|
83
|
+
|
84
|
+
unless File.exists?(destination_file)
|
85
|
+
template_data = File.read(File.join(template_path, "#{page}.html"))
|
86
|
+
File.open(destination_file, 'w+') { |f| f.write(template_data) }
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
def get_template(templates, page)
|
93
|
+
template = nil
|
94
|
+
if t = templates.detect{|t| t['page'] == page}
|
95
|
+
template = t['data']
|
96
|
+
end
|
97
|
+
template
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -37,18 +37,6 @@ module Jekyll
|
|
37
37
|
s.encode('ASCII',
|
38
38
|
fallback: lambda { |c| fallback.key?(c) ? fallback[c] : undefined })
|
39
39
|
end
|
40
|
-
|
41
|
-
def self.get_template(site, template_string)
|
42
|
-
template = nil
|
43
|
-
|
44
|
-
if site.config['attendease'] && templates = site.config['attendease']['templates']
|
45
|
-
if t = templates.detect{|t| t['page'] == template_string}
|
46
|
-
template = t['data']
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
template
|
51
|
-
end
|
52
40
|
end
|
53
41
|
end
|
54
42
|
end
|
@@ -9,20 +9,9 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
self.read_yaml(File.join(site.source, '_layouts'), "#{base_layout}.html")
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates'), 'index.html')
|
15
13
|
|
16
14
|
self.data['title'] = site.config['homepage_title'] || 'Welcome'
|
17
|
-
|
18
|
-
# Check if Attendease API has a template for this page
|
19
|
-
if template = Helpers.get_template(site, 'index')
|
20
|
-
# use the template file from the attendease api
|
21
|
-
self.content = template
|
22
|
-
else
|
23
|
-
# use the included template in the gem
|
24
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'index.html'))
|
25
|
-
end
|
26
15
|
end
|
27
16
|
end
|
28
17
|
end
|
@@ -9,7 +9,7 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'presenters'), 'presenter.html')
|
13
13
|
|
14
14
|
presenter_page_title = site.config['presenter_page_title'] ? site.config['presenter_page_title'] : 'Presenter: %s'
|
15
15
|
self.data['title'] = sprintf(presenter_page_title, presenter['first_name'] + ' ' + presenter['last_name'])
|
@@ -23,15 +23,6 @@ module Jekyll
|
|
23
23
|
end
|
24
24
|
|
25
25
|
self.data['presenter'] = presenter
|
26
|
-
|
27
|
-
# Check if Attendease API has a template for this page
|
28
|
-
if template = Helpers.get_template(site, 'presenters/presenter')
|
29
|
-
# use the template file from the attendease api
|
30
|
-
self.content = template
|
31
|
-
else
|
32
|
-
# use the included template in the gem
|
33
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'presenters', 'presenter.html'))
|
34
|
-
end
|
35
26
|
end
|
36
27
|
end
|
37
28
|
end
|
@@ -9,20 +9,11 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'presenters'), 'index.html')
|
13
13
|
|
14
14
|
self.data['title'] = site.config['presenters_index_title'] || 'Presenters'
|
15
15
|
|
16
16
|
self.data['presenters'] = presenters
|
17
|
-
|
18
|
-
# Check if Attendease API has a template for this page
|
19
|
-
if template = Helpers.get_template(site, 'presenters/index')
|
20
|
-
# use the template file from the attendease api
|
21
|
-
self.content = template
|
22
|
-
else
|
23
|
-
# use the included template in the gem
|
24
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'presenters', 'index.html'))
|
25
|
-
end
|
26
17
|
end
|
27
18
|
end
|
28
19
|
end
|
@@ -9,12 +9,12 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
|
12
|
+
|
13
13
|
self.data = {}
|
14
14
|
|
15
15
|
self.data['redirect_url'] = redirect_url
|
16
16
|
|
17
|
-
self.content = File.read(File.join(
|
17
|
+
self.content = File.read(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates', 'redirect.html'))
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -9,7 +9,7 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'schedule'), 'day.html')
|
13
13
|
|
14
14
|
session_day_title_prefix = site.config['schedule_day_title_prefix'] || 'Schedule: '
|
15
15
|
self.data['title'] = "#{session_day_title_prefix}#{day['date_formatted']}"
|
@@ -29,15 +29,6 @@ module Jekyll
|
|
29
29
|
end
|
30
30
|
|
31
31
|
self.data['instances'] = instances.sort{|x,y| [x['time'], x['session']['name']] <=> [y['time'], y['session']['name']]}
|
32
|
-
|
33
|
-
# Check if Attendease API has a template for this page
|
34
|
-
if template = Helpers.get_template(site, 'schedule/day')
|
35
|
-
# use the template file from the attendease api
|
36
|
-
self.content = template
|
37
|
-
else
|
38
|
-
# use the included template in the gem
|
39
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'day.html'))
|
40
|
-
end
|
41
32
|
end
|
42
33
|
end
|
43
34
|
end
|
@@ -16,7 +16,7 @@ module Jekyll
|
|
16
16
|
dir = site.config['attendease']['schedule_path_name']
|
17
17
|
|
18
18
|
unless dir.nil?
|
19
|
-
if (site.config['attendease'] && site.config['attendease']['
|
19
|
+
if (site.config['attendease'] && site.config['attendease']['show_schedule_index'])
|
20
20
|
site.pages << ScheduleIndexPage.new(site, site.source, File.join(dir), @schedule_data.event['dates'])
|
21
21
|
else
|
22
22
|
site.pages << ScheduleDayPage.new(site, site.source, File.join(dir), @schedule_data.event['dates'].first, @schedule_data.sessions, @schedule_data.event['dates'])
|
@@ -9,22 +9,12 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'schedule'), 'index.html')
|
13
13
|
|
14
14
|
self.data['title'] = site.config['schedule_index_title_prefix'] || 'Schedule'
|
15
15
|
|
16
16
|
self.data['dates'] = dates
|
17
|
-
|
18
|
-
# Check if Attendease API has a template for this page
|
19
|
-
if template = Helpers.get_template(site, 'schedule/index')
|
20
|
-
# use the template file from the attendease api
|
21
|
-
self.content = template
|
22
|
-
else
|
23
|
-
# use the included template in the gem
|
24
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'index.html'))
|
25
|
-
end
|
26
17
|
end
|
27
18
|
end
|
28
19
|
end
|
29
20
|
end
|
30
|
-
|
@@ -9,21 +9,12 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'schedule'), 'session.html')
|
13
13
|
|
14
14
|
schedule_session_page_title = site.config['schedule_session_page_title'] || 'Schedule: %s'
|
15
15
|
self.data['title'] = sprintf(schedule_session_page_title, session['name'])
|
16
16
|
|
17
17
|
self.data['session'] = session
|
18
|
-
|
19
|
-
# Check if Attendease API has a template for this page
|
20
|
-
if template = Helpers.get_template(site, 'schedule/session')
|
21
|
-
# use the template file from the attendease api
|
22
|
-
self.content = template
|
23
|
-
else
|
24
|
-
# use the included template in the gem
|
25
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'session.html'))
|
26
|
-
end
|
27
18
|
end
|
28
19
|
end
|
29
20
|
end
|
@@ -9,7 +9,7 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'schedule'), 'sessions.html')
|
13
13
|
|
14
14
|
self.data['title'] = site.config['schedule_sessions_title'] || 'Schedule: Sessions'
|
15
15
|
|
@@ -17,15 +17,6 @@ module Jekyll
|
|
17
17
|
|
18
18
|
self.data['sessions'] = sessions
|
19
19
|
self.data['dates'] = dates
|
20
|
-
|
21
|
-
# Check if Attendease API has a template for this page
|
22
|
-
if template = Helpers.get_template(site, 'schedule/sessions')
|
23
|
-
# use the template file from the attendease api
|
24
|
-
self.content = template
|
25
|
-
else
|
26
|
-
# use the included template in the gem
|
27
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'sessions.html'))
|
28
|
-
end
|
29
20
|
end
|
30
21
|
end
|
31
22
|
end
|
@@ -9,20 +9,11 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'sponsors'), 'index.html')
|
13
13
|
|
14
14
|
self.data['title'] = site.config['sponsors_index_title'] || 'Sponsors'
|
15
15
|
|
16
16
|
self.data['sponsor_levels'] = sponsor_levels
|
17
|
-
|
18
|
-
# Check if Attendease API has a template for this page
|
19
|
-
if template = Helpers.get_template(site, 'sponsors/index')
|
20
|
-
# use the template file from the attendease api
|
21
|
-
self.content = template
|
22
|
-
else
|
23
|
-
# use the included template in the gem
|
24
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'sponsors', 'index.html'))
|
25
|
-
end
|
26
17
|
end
|
27
18
|
end
|
28
19
|
end
|
@@ -9,21 +9,12 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'venues'), 'venue.html')
|
13
13
|
|
14
14
|
venue_page_title = site.config['venue_page_title'] ? site.config['venue_page_title'] : 'Venue: %s'
|
15
15
|
self.data['title'] = sprintf(venue_page_title, venue['name'])
|
16
16
|
|
17
17
|
self.data['venue'] = venue
|
18
|
-
|
19
|
-
# Check if Attendease API has a template for this page
|
20
|
-
if template = Helpers.get_template(site, 'venues/venue')
|
21
|
-
# use the template file from the attendease api
|
22
|
-
self.content = template
|
23
|
-
else
|
24
|
-
# use the included template in the gem
|
25
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'venues', 'venue.html'))
|
26
|
-
end
|
27
18
|
end
|
28
19
|
end
|
29
20
|
end
|
@@ -9,20 +9,11 @@ module Jekyll
|
|
9
9
|
|
10
10
|
self.process(@name)
|
11
11
|
|
12
|
-
self.read_yaml(File.join(base, '_attendease', '
|
12
|
+
self.read_yaml(File.join(base, '_attendease', 'templates', 'venues'), 'index.html')
|
13
13
|
|
14
14
|
self.data['title'] = site.config['venues_index_title'] || 'Venues'
|
15
15
|
|
16
16
|
self.data['venues'] = venues
|
17
|
-
|
18
|
-
# Check if Attendease API has a template for this page
|
19
|
-
if template = Helpers.get_template(site, 'venues/index')
|
20
|
-
# use the template file from the attendease api
|
21
|
-
self.content = template
|
22
|
-
else
|
23
|
-
# use the included template in the gem
|
24
|
-
self.content = File.read(File.join(base, '_attendease', 'templates', 'venues', 'index.html'))
|
25
|
-
end
|
26
17
|
end
|
27
18
|
end
|
28
19
|
end
|
@@ -2,16 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Jekyll::AttendeasePlugin::EventDataGenerator do
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
template_files.each do |template_file|
|
9
|
-
path = File.join(@site.config['source'], '_attendease', 'templates', template_file)
|
10
|
-
|
11
|
-
expect(File.exists?(path)).to eq(true)
|
12
|
-
expect(File.size(path)).to be > 0
|
13
|
-
end
|
14
|
-
end
|
5
|
+
#pending 'downloads data and populates the site.config variable' do
|
6
|
+
#end
|
15
7
|
|
16
8
|
end
|
17
9
|
|
@@ -2,12 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Jekyll::AttendeasePlugin::EventLayoutGenerator do
|
4
4
|
|
5
|
-
it 'creates the generated page layout stubs' do
|
6
|
-
%w{ layout schedule presenters venues sponsors }.each do |layout|
|
7
|
-
expect(File.exists?(File.join(@site.source, '_attendease', 'layouts', "#{layout}.html"))).to eq(true)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
5
|
it 'creates the pre-compiled layout stubs' do
|
12
6
|
%w{ layout register surveys }.each do |layout|
|
13
7
|
expect(File.exists?(File.join(@site.config['destination'], 'attendease_layouts', "#{layout}.html"))).to eq(true)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Jekyll::AttendeasePlugin::EventTemplateGenerator do
|
4
|
+
|
5
|
+
it 'creates the Attendease template files' do
|
6
|
+
template_files = Dir.chdir(File.join(@template_root, 'attendease')) { Dir.glob('**/**.html') }
|
7
|
+
|
8
|
+
template_files.each do |template_file|
|
9
|
+
path = File.join(@site.config['source'], '_attendease', 'templates', template_file)
|
10
|
+
|
11
|
+
expect(File.exists?(path)).to eq(true)
|
12
|
+
expect(File.size(path)).to be > 0
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
@@ -2,27 +2,27 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Jekyll::AttendeasePlugin::HomePageGenerator do
|
4
4
|
|
5
|
-
context 'Using the default homepage template in the gem' do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
5
|
+
#context 'Using the default homepage template in the gem' do
|
6
|
+
# before do
|
7
|
+
# # Ensure no custom templates are being used.
|
8
|
+
# templates_json = File.join(@site.config['source'], '_attendease', 'data', 'templates.json')
|
9
|
+
# File.open(templates_json, 'w') { |file| file.write([].to_json) }
|
10
|
+
# #File.delete(@site.config['source'], '_attendease', 'templates', 'index.html')
|
11
|
+
# @site = build_site
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
# it 'creates the home page' do
|
15
|
+
# template_files = Dir.chdir(@template_root) { Dir.glob('*/**.html') }
|
16
|
+
#
|
17
|
+
# expect(File.exists?(File.join(@site.config['destination'], 'index.html'))).to eq(true)
|
18
|
+
# expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHO</h2>"
|
19
|
+
# expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_host']}</div>"
|
20
|
+
# expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHEN</h2>"
|
21
|
+
# expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_dates']}</div>"
|
22
|
+
# expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHERE</h2>"
|
23
|
+
# expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_location']}</div>"
|
24
|
+
# end
|
25
|
+
#end
|
26
26
|
|
27
27
|
context 'Using a custom homepage template from the Attendease API' do
|
28
28
|
before do
|
@@ -26,16 +26,34 @@
|
|
26
26
|
{% if presenter.social %}
|
27
27
|
<div class="attendease-presenter-social">
|
28
28
|
{% if presenter.social.twitter and presenter.social.twitter != '' %}
|
29
|
-
<a class="social-icon twitter" href="https://twitter.com/{{ presenter.social.twitter }}" target="_blank"
|
29
|
+
<a class="attendease-social-icon twitter" href="https://twitter.com/{{ presenter.social.twitter }}" target="_blank">
|
30
|
+
<i class="fa fa-twitter-square fa-3"></i>
|
31
|
+
<span class="attendease-social-network">Twitter</span>
|
32
|
+
<span class="attendease-social-handle">@{{ presenter.social.twitter }}</span>
|
33
|
+
<span class="attendease-social-url">https://twitter.com/{{ presenter.social.twitter }}</span>
|
34
|
+
</a>
|
30
35
|
{% endif %}
|
31
36
|
{% if presenter.social.facebook and presenter.social.facebook != '' %}
|
32
|
-
<a class="social-icon facebook" href="https://www.facebook.com/{{ presenter.social.facebook }}" target="_blank"
|
37
|
+
<a class="attendease-social-icon facebook" href="https://www.facebook.com/{{ presenter.social.facebook }}" target="_blank">
|
38
|
+
<i class="fa fa-facebook-square fa-3"></i>
|
39
|
+
<span class="attendease-social-network">Facebook</span>
|
40
|
+
<span class="attendease-social-handle">{{ presenter.social.facebook }}</span>
|
41
|
+
<span class="attendease-social-url">https://www.facebook.com/{{ presenter.social.facebook }}</span>
|
42
|
+
</a>
|
33
43
|
{% endif %}
|
34
44
|
{% if presenter.social.linkedin and presenter.social.linkedin != '' %}
|
35
|
-
<a class="social-icon linkedin" href="{{ presenter.social.linkedin }}" target="_blank"
|
45
|
+
<a class="attendease-social-icon linkedin" href="{{ presenter.social.linkedin }}" target="_blank">
|
46
|
+
<i class="fa fa-linkedin-square"></i>
|
47
|
+
<span class="attendease-social-network">LinkedIn</span>
|
48
|
+
<span class="attendease-social-url">{{ presenter.social.linkedin }}</span>
|
49
|
+
</a>
|
36
50
|
{% endif %}
|
37
51
|
{% if presenter.social.googleplus and presenter.social.googleplus != '' %}
|
38
|
-
<a class="social-icon googleplus" href="{{ presenter.social.googleplus }}" target="_blank"
|
52
|
+
<a class="attendease-social-icon googleplus" href="{{ presenter.social.googleplus }}" target="_blank">
|
53
|
+
<i class="fa fa-google-plus-square"></i>
|
54
|
+
<span class="attendease-social-network">Google+</span>
|
55
|
+
<span class="attendease-social-url">{{ presenter.social.googleplus }}</span>
|
56
|
+
</a>
|
39
57
|
{% endif %}
|
40
58
|
</div>
|
41
59
|
{% endif %}
|
@@ -19,16 +19,34 @@
|
|
19
19
|
{% if page.presenter.social %}
|
20
20
|
<div class="attendease-presenter-social">
|
21
21
|
{% if page.presenter.social.twitter and page.presenter.social.twitter != '' %}
|
22
|
-
<a class="social-icon twitter" href="https://twitter.com/{{ page.presenter.social.twitter }}" target="_blank"
|
22
|
+
<a class="attendease-social-icon twitter" href="https://twitter.com/{{ page.presenter.social.twitter }}" target="_blank">
|
23
|
+
<i class="fa fa-twitter-square fa-3"></i>
|
24
|
+
<span class="attendease-social-network">Twitter</span>
|
25
|
+
<span class="attendease-social-handle">@{{ page.presenter.social.twitter }}</span>
|
26
|
+
<span class="attendease-social-url">https://twitter.com/{{ page.presenter.social.twitter }}</span>
|
27
|
+
</a>
|
23
28
|
{% endif %}
|
24
29
|
{% if page.presenter.social.facebook and page.presenter.social.facebook != '' %}
|
25
|
-
<a class="social-icon facebook" href="https://www.facebook.com/{{ page.presenter.social.facebook }}" target="_blank"
|
30
|
+
<a class="attendease-social-icon facebook" href="https://www.facebook.com/{{ page.presenter.social.facebook }}" target="_blank">
|
31
|
+
<i class="fa fa-facebook-square fa-3"></i>
|
32
|
+
<span class="attendease-social-network">Facebook</span>
|
33
|
+
<span class="attendease-social-handle">{{ page.presenter.social.facebook }}</span>
|
34
|
+
<span class="attendease-social-url">https://www.facebook.com/{{ page.presenter.social.facebook }}</span>
|
35
|
+
</a>
|
26
36
|
{% endif %}
|
27
37
|
{% if page.presenter.social.linkedin and page.presenter.social.linkedin != '' %}
|
28
|
-
<a class="social-icon linkedin" href="{{ page.presenter.social.linkedin }}" target="_blank"
|
38
|
+
<a class="attendease-social-icon linkedin" href="{{ page.presenter.social.linkedin }}" target="_blank">
|
39
|
+
<i class="fa fa-linkedin-square"></i>
|
40
|
+
<span class="attendease-social-network">LinkedIn</span>
|
41
|
+
<span class="attendease-social-url">{{ page.presenter.social.linkedin }}</span>
|
42
|
+
</a>
|
29
43
|
{% endif %}
|
30
44
|
{% if page.presenter.social.googleplus and page.presenter.social.googleplus != '' %}
|
31
|
-
<a class="social-icon googleplus" href="{{ page.presenter.social.googleplus }}" target="_blank"
|
45
|
+
<a class="attendease-social-icon googleplus" href="{{ page.presenter.social.googleplus }}" target="_blank">
|
46
|
+
<i class="fa fa-google-plus-square"></i>
|
47
|
+
<span class="attendease-social-network">Google+</span>
|
48
|
+
<span class="attendease-social-url">{{ page.presenter.social.googleplus }}</span>
|
49
|
+
</a>
|
32
50
|
{% endif %}
|
33
51
|
</div>
|
34
52
|
{% endif %}
|
@@ -3,22 +3,5 @@
|
|
3
3
|
<h1>Schedule</h1>
|
4
4
|
</div>
|
5
5
|
|
6
|
-
|
7
|
-
{% for day in page.dates %}
|
8
|
-
<div class="attendease-day">
|
9
|
-
<div class="attendease-date" data-date="{{ day.date }}">
|
10
|
-
<a href="/schedule/{{ day.date }}/">{{ day.date_formatted }}</a>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div class="attendease-times" data-start-time="{{ day.start_time }}" data-end-time="{{ day.end_time }}">
|
14
|
-
{{ day.start_time_formatted }} to {{ day.end_time_formatted }}
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
{% endfor %}
|
18
|
-
</div>
|
19
|
-
|
20
|
-
<div class="attendease-all-sessions">
|
21
|
-
<a href="/schedule/sessions/">Show all</a>
|
22
|
-
</div>
|
23
|
-
|
6
|
+
{% attendease_schedule_widget %}
|
24
7
|
</div>
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-attendease
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.12.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Wood
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- lib/jekyll/attendease_plugin/event_data_generator.rb
|
136
136
|
- lib/jekyll/attendease_plugin/event_layout_generator.rb
|
137
137
|
- lib/jekyll/attendease_plugin/event_layout_page.rb
|
138
|
+
- lib/jekyll/attendease_plugin/event_template_generator.rb
|
138
139
|
- lib/jekyll/attendease_plugin/filters.rb
|
139
140
|
- lib/jekyll/attendease_plugin/helpers.rb
|
140
141
|
- lib/jekyll/attendease_plugin/home_page.rb
|
@@ -157,6 +158,7 @@ files:
|
|
157
158
|
- lib/jekyll/attendease_plugin/version.rb
|
158
159
|
- spec/lib/jekyll/attendease_plugin/event_data_generator_spec.rb
|
159
160
|
- spec/lib/jekyll/attendease_plugin/event_layout_generator_spec.rb
|
161
|
+
- spec/lib/jekyll/attendease_plugin/event_template_generator_spec.rb
|
160
162
|
- spec/lib/jekyll/attendease_plugin/filters_spec.rb
|
161
163
|
- spec/lib/jekyll/attendease_plugin/helpers_spec.rb
|
162
164
|
- spec/lib/jekyll/attendease_plugin/home_page_generator_spec.rb
|
@@ -169,7 +171,6 @@ files:
|
|
169
171
|
- templates/attendease/index.html
|
170
172
|
- templates/attendease/presenters/index.html
|
171
173
|
- templates/attendease/presenters/presenter.html
|
172
|
-
- templates/attendease/redirect.html
|
173
174
|
- templates/attendease/schedule/day.html
|
174
175
|
- templates/attendease/schedule/index.html
|
175
176
|
- templates/attendease/schedule/session.html
|
@@ -179,6 +180,7 @@ files:
|
|
179
180
|
- templates/attendease/venues/index.html
|
180
181
|
- templates/attendease/venues/venue.html
|
181
182
|
- templates/layout.html
|
183
|
+
- templates/redirect.html
|
182
184
|
homepage: https://attendease.com/
|
183
185
|
licenses:
|
184
186
|
- MIT
|
@@ -194,9 +196,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
194
196
|
version: '0'
|
195
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
198
|
requirements:
|
197
|
-
- - "
|
199
|
+
- - ">"
|
198
200
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
201
|
+
version: 1.3.1
|
200
202
|
requirements: []
|
201
203
|
rubyforge_project:
|
202
204
|
rubygems_version: 2.2.2
|
@@ -206,6 +208,7 @@ summary: Attendease event helper for Jekyll
|
|
206
208
|
test_files:
|
207
209
|
- spec/lib/jekyll/attendease_plugin/event_data_generator_spec.rb
|
208
210
|
- spec/lib/jekyll/attendease_plugin/event_layout_generator_spec.rb
|
211
|
+
- spec/lib/jekyll/attendease_plugin/event_template_generator_spec.rb
|
209
212
|
- spec/lib/jekyll/attendease_plugin/filters_spec.rb
|
210
213
|
- spec/lib/jekyll/attendease_plugin/helpers_spec.rb
|
211
214
|
- spec/lib/jekyll/attendease_plugin/home_page_generator_spec.rb
|