jekyll-attendease 0.4.9 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -141,9 +141,7 @@ During development, you can create and install local builds:
141
141
 
142
142
  And then install it:
143
143
 
144
- `gem install jekyll-attendease-``cat jekyll-attendease.gemspec|grep s.version|awk '{print $3}'|sed s/\'//g```
145
-
146
- (where `x.x.x` is the version you've defined in the gemspec)
144
+ gem install jekyll-attendease-`cat jekyll-attendease.gemspec|grep s.version|awk '{print $3}'|sed s/\'//g`.gem
147
145
 
148
146
  ## License
149
147
 
@@ -21,6 +21,20 @@ module Jekyll
21
21
  end
22
22
  end
23
23
 
24
+ def self.parameterize(string, sep = '-')
25
+ string.downcase!
26
+ # Turn unwanted chars into the separator
27
+ string.gsub!(/[^a-z0-9\-_]+/, sep)
28
+ unless sep.nil? || sep.empty?
29
+ re_sep = Regexp.escape(sep)
30
+ # No more than one of the separator in a row.
31
+ string.gsub!(/#{re_sep}{2,}/, sep)
32
+ # Remove leading/trailing separator.
33
+ string.gsub!(/^#{re_sep}|#{re_sep}$/, '')
34
+ end
35
+ string
36
+ end
37
+
24
38
  def generate(site)
25
39
  if @attendease_config = site.config['attendease']
26
40
 
@@ -543,16 +557,30 @@ module Jekyll
543
557
 
544
558
  session['filters'] = filters_for_session
545
559
 
560
+ filter_tags = []
561
+ filters_for_session.each do |filter|
562
+ item_names = []
563
+ if !filter['items'].nil?
564
+ filter['items'].each do |item|
565
+ filter_tags << EventData.parameterize('attendease-filter-' + filter['name'] + "-" + item['name'])
566
+ end
567
+ end
568
+ end
569
+ session['filter_tags'] = filter_tags.join(" ")
570
+
546
571
  if s['instances']
547
572
  instances = []
548
573
  s['instances'].each do |i|
549
574
  instance = {
550
575
  'id' => i['id'],
551
- 'time' => i['time'],
552
576
  'date' => i['date'],
553
- 'time_formatted' => i['time_formatted'],
554
- 'date_formatted' => i['date_formatted'],
577
+ 'time' => i['time'],
578
+ 'end_time' => i['end_time'],
555
579
  'duration' => i['duration'],
580
+ 'date_formatted' => i['date_formatted'],
581
+ 'time_formatted' => i['time_formatted'],
582
+ 'end_time_formatted' => i['end_time_formatted'],
583
+ 'duration_formatted' => i['duration_formatted'],
556
584
  'room_id' => i['room_id'],
557
585
  }
558
586
 
@@ -6,7 +6,9 @@
6
6
  {% for presenter in page.presenters %}
7
7
  <div class="attendease-presenter" data-presenter-id="{{ presenter.id }}">
8
8
  <div class="attendease-presenter-profile-image">
9
- <img height="100" src="{{ presenter.profile_url }}">
9
+ <a href="/presenters/{{ presenter.id }}">
10
+ <img height="100" src="{{ presenter.profile_url }}">
11
+ </a>
10
12
  </div>
11
13
 
12
14
  <div class="attendease-presenter-name">
@@ -29,7 +29,7 @@
29
29
  {% endif %}
30
30
 
31
31
  {% for session in page.presenter.sessions %}
32
- <div class="attendease-session-and-instances" data-session-id="{{ session.id }}">
32
+ <div class="attendease-session-and-instances {{ session.filter_tags }}" data-session-id="{{ session.id }}">
33
33
  <div class="attendease-session-name">
34
34
  <h3><a href="/schedule/{{ session.code }}">{{ session.name }}</a></h3>
35
35
  </div>
@@ -42,10 +42,10 @@
42
42
 
43
43
  <div class="attendease-instance-details">
44
44
  <div class="attendease-instance-detail attendease-time-range" data-duration="{{ instance.duration }}" data-start-time="{{ instance.time }}">
45
- {{ instance.time_formatted }}
45
+ {{ instance.time_formatted }} - {{ instance.end_time_formatted}}
46
46
 
47
47
  <div class="attendease-duration" data-duration="{{ instance.duration }}">
48
- {{ instance.duration }} minutes
48
+ {{ instance.duration_formatted }}
49
49
  </div>
50
50
  </div>
51
51
 
@@ -17,7 +17,7 @@
17
17
  </div>
18
18
 
19
19
  {% for instance in page.instances %}
20
- <div class="attendease-session-and-instance" data-instance-id="{{ instance.id }}" data-session-id="{{ instance.session.id }}">
20
+ <div class="attendease-session-and-instance {{ instance.session.filter_tags }}" data-instance-id="{{ instance.id }}" data-session-id="{{ instance.session.id }}">
21
21
  <div class="attendease-name">
22
22
  <h2><a href="/schedule/{{ instance.session.code }}">{{ instance.session.name }}</a></h2>
23
23
  </div>
@@ -38,10 +38,10 @@
38
38
 
39
39
  <div class="attendease-instance-details">
40
40
  <div class="attendease-instance-detail attendease-time-range" data-duration="{{ instance.duration }}" data-start-time="{{ instance.time }}">
41
- {{ instance.time_formatted }}
41
+ {{ instance.time_formatted }} - {{ instance.end_time_formatted}}
42
42
 
43
43
  <div class="attendease-duration" data-duration="{{ instance.duration }}">
44
- {{ instance.duration }} minutes
44
+ {{ instance.duration_formatted }}
45
45
  </div>
46
46
  </div>
47
47
 
@@ -1,4 +1,4 @@
1
- <div class="attendease-session" data-session-id="{{ page.session.id }}">
1
+ <div class="attendease-session {{ page.session.filter_tags }}" data-session-id="{{ page.session.id }}">
2
2
  <div class="attendease-name-and-description">
3
3
  <div class="attendease-name">
4
4
  <h1>{{ page.session.name }}</h1>
@@ -25,9 +25,9 @@
25
25
 
26
26
  <div class="attendease-instance-details">
27
27
  <div class="attendease-instance-detail attendease-time-range" data-duration="{{ instance.duration }}" data-start-time="{{ instance.time }}">
28
- {{ instance.time_formatted }}
28
+ {{ instance.time_formatted }} - {{ instance.end_time_formatted}}
29
29
  <div class="attendease-duration" data-duration="{{ instance.duration }}">
30
- {{ instance.duration }} minutes
30
+ {{ instance.duration_formatted }}
31
31
  </div>
32
32
  </div>
33
33
 
@@ -68,7 +68,7 @@
68
68
  {% for presenter in page.session.presenters %}
69
69
  <div class="attendease-presenter" data-presenter-id="{{ presenter.id }}">
70
70
  <div class="attendease-presenter-profile-image">
71
- <img height="100" src="{{ presenter.profile_url }}">
71
+ <a href="/presenters/{{ presenter.id }}"><img height="100" src="{{ presenter.profile_url }}"></a>
72
72
  </div>
73
73
 
74
74
  <div class="attendease-presenter-name">
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
 
20
20
  {% for session in page.sessions %}
21
- <div class="attendease-session-and-instance" data-session-id="{{ session.id }}">
21
+ <div class="attendease-session-and-instance {{ session.filter_tags }}" data-session-id="{{ session.id }}">
22
22
  <div class="attendease-name">
23
23
  <h2><a href="/schedule/{{ session.code }}">{{ session.name }}</a></h2>
24
24
  </div>
@@ -17,7 +17,7 @@
17
17
 
18
18
  <div class="attendease-venue-map">
19
19
  <div class="attendease-venue-map-image">
20
- <img src="https://maps.google.com/maps/api/staticmap?center={{ venue.address.latitude }},{{ venue.address.longitude }}&zoom=13&size=100x100&sensor=false&markers=color:{{ marker_colour }}%7C{{ venue.address.latitude }},{{ venue.address.longitude }}" width="100" height="100" /">
20
+ <a href="/venues/{{ venue.id }}"><img src="https://maps.google.com/maps/api/staticmap?center={{ venue.address.latitude }},{{ venue.address.longitude }}&zoom=13&size=100x100&sensor=false&markers=color:{{ marker_colour }}%7C{{ venue.address.latitude }},{{ venue.address.longitude }}" width="100" height="100" /"></a>
21
21
  </div>
22
22
  </div>
23
23
  {% endif %}
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-attendease
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.5.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Michael Wood
@@ -10,62 +11,70 @@ authors:
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2014-02-04 00:00:00.000000000 Z
14
+ date: 2014-03-04 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: httparty
17
18
  requirement: !ruby/object:Gem::Requirement
19
+ none: false
18
20
  requirements:
19
- - - '>='
21
+ - - ! '>='
20
22
  - !ruby/object:Gem::Version
21
23
  version: '0'
22
24
  type: :runtime
23
25
  prerelease: false
24
26
  version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
25
28
  requirements:
26
- - - '>='
29
+ - - ! '>='
27
30
  - !ruby/object:Gem::Version
28
31
  version: '0'
29
32
  - !ruby/object:Gem::Dependency
30
33
  name: json
31
34
  requirement: !ruby/object:Gem::Requirement
35
+ none: false
32
36
  requirements:
33
- - - '>='
37
+ - - ! '>='
34
38
  - !ruby/object:Gem::Version
35
39
  version: '0'
36
40
  type: :runtime
37
41
  prerelease: false
38
42
  version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
39
44
  requirements:
40
- - - '>='
45
+ - - ! '>='
41
46
  - !ruby/object:Gem::Version
42
47
  version: '0'
43
48
  - !ruby/object:Gem::Dependency
44
49
  name: i18n
45
50
  requirement: !ruby/object:Gem::Requirement
51
+ none: false
46
52
  requirements:
47
- - - '>='
53
+ - - ! '>='
48
54
  - !ruby/object:Gem::Version
49
55
  version: '0'
50
56
  type: :runtime
51
57
  prerelease: false
52
58
  version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
53
60
  requirements:
54
- - - '>='
61
+ - - ! '>='
55
62
  - !ruby/object:Gem::Version
56
63
  version: '0'
57
64
  - !ruby/object:Gem::Dependency
58
65
  name: redcarpet
59
66
  requirement: !ruby/object:Gem::Requirement
67
+ none: false
60
68
  requirements:
61
- - - '>='
69
+ - - ! '>='
62
70
  - !ruby/object:Gem::Version
63
71
  version: '0'
64
72
  type: :runtime
65
73
  prerelease: false
66
74
  version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
67
76
  requirements:
68
- - - '>='
77
+ - - ! '>='
69
78
  - !ruby/object:Gem::Version
70
79
  version: '0'
71
80
  description: Bring your event data into Jekyll for amazing event websites.
@@ -88,25 +97,26 @@ files:
88
97
  homepage: https://attendease.com/
89
98
  licenses:
90
99
  - MIT
91
- metadata: {}
92
100
  post_install_message:
93
101
  rdoc_options: []
94
102
  require_paths:
95
103
  - lib
96
104
  required_ruby_version: !ruby/object:Gem::Requirement
105
+ none: false
97
106
  requirements:
98
- - - '>='
107
+ - - ! '>='
99
108
  - !ruby/object:Gem::Version
100
109
  version: '0'
101
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
+ none: false
102
112
  requirements:
103
- - - '>='
113
+ - - ! '>='
104
114
  - !ruby/object:Gem::Version
105
115
  version: '0'
106
116
  requirements: []
107
117
  rubyforge_project:
108
- rubygems_version: 2.0.3
118
+ rubygems_version: 1.8.23
109
119
  signing_key:
110
- specification_version: 4
120
+ specification_version: 3
111
121
  summary: Attendease event helper for Jekyll
112
122
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 0eae3c3f25ad6736d4f32786fb5bc1e18ce386a7
4
- data.tar.gz: 0988c6f4717cd235e2e49a7b1de920425aac6470
5
- SHA512:
6
- metadata.gz: c4f755d58baab9b6314e0376de26f395027b51514012cbc84e8d99bfaa52d0d3a5f0430b6627163eb0cc65445d2a6e442236a95ce1252521190cb4b41428cf54
7
- data.tar.gz: 68d7faae6343f9c3d59decb1cef89e270386b34d6821373792291b2a53972ab2c69b98e4e3db95a9e0e52cb5f7d19c30c4c0474b2baaebde765d12cf4611e6c8