jekyll-attendease 0.6.13 → 0.6.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/attendease_plugin/schedule_generator.rb +15 -6
- data/lib/jekyll/attendease_plugin/venue_page.rb +6 -3
- data/lib/jekyll/attendease_plugin/version.rb +1 -2
- data/spec/lib/jekyll/attendease_plugin/schedule_generator_spec.rb +23 -14
- data/spec/spec_helper.rb +1 -0
- data/templates/attendease/index.html +1 -1
- data/templates/attendease/presenters/index.html +9 -23
- data/templates/attendease/schedule/day.html +4 -1
- data/templates/attendease/schedule/sessions.html +4 -0
- data/templates/attendease/venues/index.html +43 -7
- data/templates/attendease/venues/venue.html +37 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad344fca9e68ec43954f9852147dfec396ed7d46
|
4
|
+
data.tar.gz: e1afa87f89df1a55d2f9f3f78ab3b20b5806c99c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bdc8a4439d79611459308a002eacbcda1ce2ec4625d0d147c71ac95278476dd84ef334de7bd908bbaebe2e557f4ec41689ae89f86df6531c78ec7afc6edc8ec
|
7
|
+
data.tar.gz: 25948ecbdc9d3a76329af125f5bd7149038d2752669851fd180d21437aed99d673ba688164043871ae34388d8f336909d21cde424fa958ca70701b6a1063f065
|
@@ -47,18 +47,27 @@ module Jekyll
|
|
47
47
|
|
48
48
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
49
49
|
# /venue pages.
|
50
|
-
dir = site.config['attendease']['venues_path_name']
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
|
52
|
+
if @schedule_data.venues.length == 1
|
53
|
+
dir = site.config['attendease']['venue_path_name']
|
54
|
+
|
55
|
+
unless dir.nil?
|
56
|
+
site.pages << VenuePage.new(site, site.source, dir, @schedule_data.venues.first, true)
|
55
57
|
end
|
58
|
+
else
|
59
|
+
dir = site.config['attendease']['venues_path_name']
|
56
60
|
|
57
|
-
|
61
|
+
unless dir.nil?
|
62
|
+
@schedule_data.venues.each do |venue|
|
63
|
+
site.pages << VenuePage.new(site, site.source, dir, venue)
|
64
|
+
end
|
65
|
+
|
66
|
+
site.pages << VenuesIndexPage.new(site, site.source, File.join(dir), @schedule_data.venues)
|
67
|
+
end
|
58
68
|
end
|
59
69
|
end
|
60
70
|
end
|
61
71
|
end
|
62
72
|
end
|
63
73
|
end
|
64
|
-
|
@@ -1,11 +1,15 @@
|
|
1
1
|
module Jekyll
|
2
2
|
module AttendeasePlugin
|
3
3
|
class VenuePage < Page
|
4
|
-
def initialize(site, base, dir, venue)
|
4
|
+
def initialize(site, base, dir, venue, single_venue = false)
|
5
5
|
@site = site
|
6
6
|
@base = base
|
7
7
|
@dir = dir
|
8
|
-
|
8
|
+
if single_venue
|
9
|
+
@name = 'index.html'
|
10
|
+
else
|
11
|
+
@name = venue['slug']
|
12
|
+
end
|
9
13
|
|
10
14
|
self.process(@name)
|
11
15
|
|
@@ -19,4 +23,3 @@ module Jekyll
|
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
22
|
-
|
@@ -24,18 +24,6 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
|
|
24
24
|
expect(File.file?(file)).to eq(true)
|
25
25
|
end
|
26
26
|
|
27
|
-
it 'creates a venue index page' do
|
28
|
-
file = File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], @index_file)
|
29
|
-
expect(File.exists?(file)).to eq(true)
|
30
|
-
expect(File.file?(file)).to eq(true)
|
31
|
-
end
|
32
|
-
|
33
|
-
it 'creates a venue page' do
|
34
|
-
file = File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], @venue_slug)
|
35
|
-
expect(File.exists?(file)).to eq(true)
|
36
|
-
expect(File.file?(file)).to eq(true)
|
37
|
-
end
|
38
|
-
|
39
27
|
it 'creates a schedule index page' do
|
40
28
|
file = File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], @index_file)
|
41
29
|
expect(File.exists?(file)).to eq(true)
|
@@ -71,6 +59,28 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
|
|
71
59
|
end
|
72
60
|
end
|
73
61
|
|
62
|
+
context 'a single venue' do
|
63
|
+
pending 'creates a venue index page' do
|
64
|
+
file = File.join(@site.config['destination'], @site.config['attendease']['venue_path_name'], @index_file)
|
65
|
+
expect(File.exists?(file)).to eq(true)
|
66
|
+
expect(File.file?(file)).to eq(true)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
context 'multiple venues' do
|
71
|
+
it 'creates a venue index page' do
|
72
|
+
file = File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], @index_file)
|
73
|
+
expect(File.exists?(file)).to eq(true)
|
74
|
+
expect(File.file?(file)).to eq(true)
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'creates a venue page' do
|
78
|
+
file = File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], @venue_slug)
|
79
|
+
expect(File.exists?(file)).to eq(true)
|
80
|
+
expect(File.file?(file)).to eq(true)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
74
84
|
context 'presenter social links' do
|
75
85
|
it 'includes the included social links' do
|
76
86
|
expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @index_file))).to include "twitter.com/#{@presenter_social['twitter']}"
|
@@ -134,7 +144,7 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
|
|
134
144
|
end
|
135
145
|
|
136
146
|
it 'no venues folder exists' do
|
137
|
-
@site = build_site({ 'attendease' => { 'venues_path_name' => nil } })
|
147
|
+
@site = build_site({ 'attendease' => { 'venues_path_name' => nil, 'venue_path_name' => nil } })
|
138
148
|
|
139
149
|
expect(File.exists?(File.join(@site.config['destination'], 'venues'))).to eq(false)
|
140
150
|
end
|
@@ -147,4 +157,3 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
|
|
147
157
|
end
|
148
158
|
|
149
159
|
end
|
150
|
-
|
data/spec/spec_helper.rb
CHANGED
@@ -57,6 +57,7 @@ RSpec.configure do |config|
|
|
57
57
|
'schedule_path_name' => 'schedule',
|
58
58
|
'presenters_path_name' => 'presenters',
|
59
59
|
'sponsors_path_name' => 'sponsors',
|
60
|
+
'venue_path_name' => 'venue',
|
60
61
|
'venues_path_name' => 'venues',
|
61
62
|
'base_layout' => 'layout',
|
62
63
|
'generate_schedule_pages' => true,
|
@@ -1,8 +1,12 @@
|
|
1
1
|
<div class="attendease-presenters">
|
2
2
|
<div class="attendease-header">
|
3
|
-
<h1>
|
3
|
+
<h1>{% attendease_t event.lingo.presenters %}</h1>
|
4
4
|
</div>
|
5
5
|
|
6
|
+
{% unless page.presenters.size > 0 %}
|
7
|
+
<p>Sorry, no presenter profiles are available.</p>
|
8
|
+
{% endunless %}
|
9
|
+
|
6
10
|
{% for presenter in page.presenters %}
|
7
11
|
<div class="attendease-presenter" data-presenter-id="{{ presenter.id }}">
|
8
12
|
<div class="attendease-presenter-profile-image">
|
@@ -26,34 +30,16 @@
|
|
26
30
|
{% if presenter.social %}
|
27
31
|
<div class="attendease-presenter-social">
|
28
32
|
{% if presenter.social.twitter and presenter.social.twitter != '' %}
|
29
|
-
<a class="
|
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>
|
33
|
+
<a class="social-icon twitter" href="https://twitter.com/{{ presenter.social.twitter }}" target="_blank"><i class="fa fa-twitter-square fa-3"></i></a>
|
35
34
|
{% endif %}
|
36
35
|
{% if presenter.social.facebook and presenter.social.facebook != '' %}
|
37
|
-
<a class="
|
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>
|
36
|
+
<a class="social-icon facebook" href="https://www.facebook.com/{{ presenter.social.facebook }}" target="_blank"><i class="fa fa-facebook-square fa-3"></i></a>
|
43
37
|
{% endif %}
|
44
38
|
{% if presenter.social.linkedin and presenter.social.linkedin != '' %}
|
45
|
-
<a class="
|
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>
|
39
|
+
<a class="social-icon linkedin" href="{{ presenter.social.linkedin }}" target="_blank"><i class="fa fa-linkedin-square"></i></a>
|
50
40
|
{% endif %}
|
51
41
|
{% if presenter.social.googleplus and presenter.social.googleplus != '' %}
|
52
|
-
<a class="
|
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>
|
42
|
+
<a class="social-icon googleplus" href="{{ presenter.social.googleplus }}" target="_blank"><i class="fa fa-google-plus-square"></i></a>
|
57
43
|
{% endif %}
|
58
44
|
</div>
|
59
45
|
{% endif %}
|
@@ -12,6 +12,10 @@
|
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="attendease-schedule" data-date="{{ page.day.date }}">
|
15
|
+
{% unless page.instances.size > 0 %}
|
16
|
+
<p>No sessions currently scheduled for this day.</p>
|
17
|
+
{% endunless %}
|
18
|
+
|
15
19
|
{% for instance in page.instances %}
|
16
20
|
<div class="attendease-session-and-instance {{ instance.session.filter_tags }}" data-instance-id="{{ instance.id }}" data-session-id="{{ instance.session.id }}">
|
17
21
|
<div class="attendease-name">
|
@@ -69,4 +73,3 @@
|
|
69
73
|
</div>
|
70
74
|
{% endfor %}
|
71
75
|
</div>
|
72
|
-
|
@@ -12,6 +12,10 @@
|
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="attendease-schedule">
|
15
|
+
{% unless page.sessions.size > 0 %}
|
16
|
+
<p>No sessions are currently available.</p>
|
17
|
+
{% endunless %}
|
18
|
+
|
15
19
|
{% for session in page.sessions %}
|
16
20
|
<div class="attendease-session-and-instance {{ session.filter_tags }}" data-session-id="{{ session.id }}">
|
17
21
|
<div class="attendease-name">
|
@@ -26,19 +26,55 @@
|
|
26
26
|
<a href="/venues/{{ venue.slug }}">{{ venue.name }}</a>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
<div class="attendease-venue-address">
|
30
|
+
{% if venue.address.address1 and venue.address.address1 != "" %}
|
31
31
|
<div class="attendease-venue-address-address1">
|
32
32
|
{{ venue.address.address1 }}
|
33
33
|
</div>
|
34
|
+
{% endif %}
|
35
|
+
|
36
|
+
{% if venue.address.address2 and venue.address.address2 != "" %}
|
37
|
+
<div class="attendease-venue-address-address2">
|
38
|
+
{{ venue.address.address2 }}
|
39
|
+
</div>
|
40
|
+
{% endif %}
|
41
|
+
|
42
|
+
<div class="attendease-venue-address-location">
|
43
|
+
{% assign has_state = false %}
|
44
|
+
{% assign has_city = false %}
|
45
|
+
{% assign has_country = false %}
|
46
|
+
|
47
|
+
{% if venue.address.state and venue.address.state != "" %}
|
48
|
+
{% assign has_state = true %}
|
49
|
+
{% endif %}
|
50
|
+
|
51
|
+
{% if venue.address.city and venue.address.city != "" %}
|
52
|
+
{% assign has_city = true %}
|
53
|
+
{% endif %}
|
54
|
+
|
55
|
+
{% if venue.address.country and venue.address.country != "" %}
|
56
|
+
{% assign has_country = true %}
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
{% if has_city %}
|
60
|
+
{{ venue.address.city }}{% if has_state or has_country %},{% endif %}
|
61
|
+
{% endif %}
|
62
|
+
|
63
|
+
{% if has_state %}
|
64
|
+
{{ venue.address.state }}{% if has_country %},{% endif %}
|
65
|
+
{% endif %}
|
34
66
|
|
35
|
-
{% if
|
36
|
-
|
37
|
-
{{ venue.address.address2 }}
|
38
|
-
</div>
|
67
|
+
{% if has_country %}
|
68
|
+
{{ venue.address.country }}
|
39
69
|
{% endif %}
|
40
70
|
</div>
|
41
|
-
|
71
|
+
|
72
|
+
{% if venue.address.zip and venue.address.zip != "" %}
|
73
|
+
<div class="attendease-venue-address-zip">
|
74
|
+
{{ venue.address.zip }}
|
75
|
+
</div>
|
76
|
+
{% endif %}
|
77
|
+
</div>
|
42
78
|
|
43
79
|
</div>
|
44
80
|
{% endfor %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="attendease-venue-profile">
|
2
2
|
<div class="attendease-venue" data-venue-id="{{ page.venue.id }}">
|
3
|
-
{% if page.venue.address.latitude
|
3
|
+
{% if page.venue.address.latitude and page.venue.address.longitude %}
|
4
4
|
|
5
5
|
{% if page.venue.primary %}
|
6
6
|
{% assign marker_colour = 'blue' %}
|
@@ -23,29 +23,51 @@
|
|
23
23
|
<h1>{{ page.venue.name }}</h1>
|
24
24
|
</div>
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
<div class="attendease-venue-address">
|
27
|
+
{% if page.venue.address.address1 and page.venue.address.address1 != "" %}
|
28
28
|
<div class="attendease-venue-address-address1">
|
29
29
|
{{ page.venue.address.address1 }}
|
30
30
|
</div>
|
31
|
+
{% endif %}
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
{% if page.venue.address.address2 and page.venue.address.address2 != "" %}
|
34
|
+
<div class="attendease-venue-address-address2">
|
35
|
+
{{ page.venue.address.address2 }}
|
36
|
+
</div>
|
37
|
+
{% endif %}
|
38
|
+
|
39
|
+
<div class="attendease-venue-address-location">
|
40
|
+
{% if page.venue.address.state and page.venue.address.state != "" %}
|
41
|
+
{% assign has_state = true %}
|
36
42
|
{% endif %}
|
37
43
|
|
38
|
-
|
39
|
-
{
|
40
|
-
|
44
|
+
{% if page.venue.address.city and page.venue.address.city != "" %}
|
45
|
+
{% assign has_city = true %}
|
46
|
+
{% endif %}
|
47
|
+
|
48
|
+
{% if page.venue.address.country and page.venue.address.country != "" %}
|
49
|
+
{% assign has_country = true %}
|
50
|
+
{% endif %}
|
41
51
|
|
42
|
-
{% if
|
43
|
-
|
44
|
-
|
45
|
-
|
52
|
+
{% if has_city %}
|
53
|
+
{{ page.venue.address.city }}{% if has_state or has_country %},{% endif %}
|
54
|
+
{% endif %}
|
55
|
+
|
56
|
+
{% if has_state %}
|
57
|
+
{{ page.venue.address.state }}{% if has_country %},{% endif %}
|
58
|
+
{% endif %}
|
59
|
+
|
60
|
+
{% if has_country %}
|
61
|
+
{{ page.venue.address.country }}
|
46
62
|
{% endif %}
|
47
63
|
</div>
|
48
|
-
|
64
|
+
|
65
|
+
{% if page.venue.address.zip and page.venue.address.zip != "" %}
|
66
|
+
<div class="attendease-venue-address-zip">
|
67
|
+
{{ page.venue.address.zip }}
|
68
|
+
</div>
|
69
|
+
{% endif %}
|
70
|
+
</div>
|
49
71
|
|
50
72
|
</div>
|
51
73
|
</div>
|
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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Wood
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|