trusty-festivity-extension 2.3.10 → 2.3.11g

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc684bbca1daf60494d469936f1052aa9be513c9
4
- data.tar.gz: 8608b78d593da59473ee0548504d7805db27f06e
3
+ metadata.gz: 41410e300ec494f9320936b8875d2bd6fbce7c41
4
+ data.tar.gz: 4de5aca565adf82abb81952a19543b0904c3982e
5
5
  SHA512:
6
- metadata.gz: 5595efad9e4ab46b8f1efd095cccf74bfe45657893327d50ad289f8e07a9b6ec6dff348ffd8b61833a26f754b4dd43c540dcc55fba85c7f2d390e4e9ccd06570
7
- data.tar.gz: d8d82308a8074aa1e84d6b53d08f6ae9c9eebac85390f466c9313562d33df3f6fc74cc731bff122ba73817a71b5667f65a4e0d039d066096410213b64fa2048a
6
+ metadata.gz: 1c8ca30469f6a4a9d2d3d094bfd037dbe2da3b666678af72d279f6560b6bd96a18c12308947227625a8171863dff60cc3df6c9c1b435cfbaebcb76e6b7796c5b
7
+ data.tar.gz: 79a66463b069ba97ba5daa7c1ee5e0af821cb6f6b2d9576d2bd5f92e8348b70a49fd984b48428ce6260a665f186a79c7c6ef08bd4115fb6183f87f7a290d28fc
@@ -47,8 +47,8 @@ Festivity.Filters = {
47
47
  Festivity.Filters.queryEvents();
48
48
  });
49
49
 
50
- $(".sort-control").change(function(e){
51
- $(".sort-control").val(e.currentTarget.value);
50
+ $("#sort").change(function(e){
51
+ $("#sort").val(e.currentTarget.value);
52
52
  Festivity.Filters.queryEvents();
53
53
  });
54
54
 
@@ -1,4 +1,4 @@
1
- (function(){
1
+ $(document).ready(function() {
2
2
  imagesLoaded('.home.first-night', function() {
3
3
  $('.social-posts').masonry({
4
4
  itemSelector: '.social-posts article',
@@ -6,4 +6,4 @@
6
6
  percentPosition: true
7
7
  });
8
8
  });
9
- }());
9
+ });
@@ -1,10 +1,9 @@
1
- var $menuTrigger = $('.menu-trigger'),
1
+
2
+ function toggleNavWrapper() {
3
+ var $menuTrigger = $('.menu-trigger'),
2
4
  $navWrapper = $('.nav-wrapper'),
3
- $primaryMenu = $('.primary-navigation'),
4
- $utilityMenu = $('.utility-navigation'),
5
5
  $iconMenuButton = $('.iconmenu-button');
6
6
 
7
- function toggleNavWrapper() {
8
7
  $menuTrigger.on("click", function(e) {
9
8
  $menuTrigger.toggleClass('is-active');
10
9
  $iconMenuButton.toggleClass('open');
@@ -12,24 +11,32 @@ function toggleNavWrapper() {
12
11
  });
13
12
  };
14
13
 
14
+ $(document).ready(function(){
15
+ var $menuTrigger = $('.menu-trigger'),
16
+ $navWrapper = $('.nav-wrapper'),
17
+ $primaryMenu = $('.primary-navigation'),
18
+ $utilityMenu = $('.utility-navigation'),
19
+ $iconMenuButton = $('.iconmenu-button');
15
20
  // Fixes broken navigation when changing states on mobile then expanding to desktop
16
- jRes.addFunc({
17
- breakpoint: 'nav',
18
- enter: function() {
19
- $primaryClone = $primaryMenu.clone().addClass('clone');
20
- $primaryMenu.hide();
21
- $primaryClone.insertBefore($utilityMenu);
22
- },
23
- exit: function(){
24
- $navWrapper.removeClass('is-visible').removeAttr('style');
25
- $menuTrigger.removeClass('is-active');
26
- $iconMenuButton.removeClass('open');
27
- $primaryClone.remove();
21
+ jRes.addFunc({
22
+ breakpoint: 'nav',
23
+ enter: function() {
24
+ $primaryClone = $primaryMenu.clone().addClass('clone');
25
+ $primaryMenu.hide();
26
+ $primaryClone.insertBefore($utilityMenu);
27
+ },
28
+ exit: function(){
29
+ $navWrapper.removeClass('is-visible').removeAttr('style');
30
+ $menuTrigger.removeClass('is-active');
31
+ $iconMenuButton.removeClass('open');
32
+ $primaryClone.remove();
28
33
 
29
- if (!$primaryMenu.is(':visible')) {
30
- $primaryMenu.show();
34
+ if (!$primaryMenu.is(':visible')) {
35
+ $primaryMenu.show();
36
+ }
31
37
  }
32
- }
38
+ });
39
+ toggleNavWrapper();
33
40
  });
34
41
 
35
- toggleNavWrapper();
42
+
@@ -381,16 +381,17 @@
381
381
  width: 3.25%;
382
382
  }
383
383
  .instagram-post {
384
- background: url(image-path('/fn-instagram-bg.svg')) no-repeat $link-color;
384
+ background: url(image-path('fn-instagram-bg.svg')) no-repeat $link-color;
385
385
  background-position: 90% 93%;
386
386
  background-size: 35px auto;
387
387
  }
388
388
  .twitter-post {
389
- background: url(image-path('/fn-twitter-bg.svg')) no-repeat $homepage-featured-background;
389
+ background: url(image-path('fn-twitter-bg.svg')) no-repeat $homepage-featured-background;
390
390
  background-position: 90% 85%;
391
391
  background-size: 38px 31px;
392
392
  }
393
393
  .post-text {
394
+ overflow: hidden;
394
395
  padding: 1.5em;
395
396
  .user-account, time {
396
397
  max-width: 85%;
@@ -3,10 +3,11 @@ class FestivityEventsController < ApplicationController
3
3
  no_login_required
4
4
  trusty_layout 'base'
5
5
 
6
- caches_action :index, cache_path: proc { |c| c.params.except(:_).merge(format: request.xhr?).merge(domain: current_site.base_domain)}
6
+ caches_action :index, cache_path: proc { |c| c.params.except(:_).merge(format: request.xhr?).merge(base_domain: current_site.base_domain)}
7
7
  caches_action :show
8
8
 
9
9
  def index
10
+
10
11
  order_by = params[:sort] ? params[:sort] : "start_date"
11
12
  @title = "#{current_site.festivity_festival_name}: Events"
12
13
  @filter_type = current_site.festivity_filter_type
@@ -1,5 +1,5 @@
1
1
  %section.events-group
2
- - cache(@events) do
2
+ - cache(@events, base_domain: current_site.base_domain) do
3
3
  - @events.each do |event|
4
- - cache(event) do
4
+ - cache(event, base_domain: current_site.base_domain) do
5
5
  = render partial: 'event', locals: {event: event, show_dates: true}
@@ -12,7 +12,7 @@
12
12
  .toggler-content.filters-list{aria: {hidden: "true"}}
13
13
  %ul.date-filters
14
14
  - current_site.festival_datetimes.each do |datetime|
15
- - checked = @selected_dates.any? {|selected_date| selected_date == datetime}
15
+ - checked = selected_dates.any? {|selected_date| selected_date == datetime}
16
16
  %li
17
17
  %label{for: datetime.to_s}
18
18
  %input.input-checkbox{type: "checkbox", id: datetime.to_s, value: datetime.to_s, checked: checked, data: {filter: "Date", sort: datetime.to_s}}
@@ -32,7 +32,7 @@
32
32
  .toggler-content.filters-list{aria: {hidden: "true"}}
33
33
  %ul.category-filters
34
34
  - type.parent_categories.each do |parent|
35
- - checked = @selected_categories.include? parent.id.to_s
35
+ - checked = selected_categories.include? parent.id.to_s
36
36
  %li
37
37
  %label{for: parent.id}
38
38
  %input.input-checkbox{type: "checkbox", id: parent.id, value: parent.id, data: {filter: type.name, sort: parent.name.downcase}, checked: checked}
@@ -41,8 +41,10 @@
41
41
  - if parent.children.any?
42
42
  %ul
43
43
  - parent.children.each do |child|
44
- - checked = @selected_categories.include? child.id.to_s
44
+ - checked = selected_categories.include? child.id.to_s
45
45
  %li
46
46
  %label{for: child.id}
47
47
  %input.input-checkbox{type: "checkbox", id: child.id, value: child.id, data: {filter: type.name, sort: child.name.downcase}, checked: checked}
48
- = child.name
48
+ = child.name
49
+ %a.cancel-filters Cancel
50
+ %a.submit-filters Filter
@@ -1,7 +1,7 @@
1
1
  %input#events-url{type: "hidden", value: "#{events_url}"}
2
2
  .content-wrapper
3
3
  %aside.secondary-content
4
- = render partial: 'filters'
4
+ = render partial: 'filters', locals: {selected_dates: @selected_dates, selected_categories: @selected_categories}
5
5
 
6
6
  %section.primary-content
7
7
  %a.button.show-filters-trigger{href: '#'} Show Filters
@@ -1,29 +1,27 @@
1
1
  - cache(@area) do
2
- .container
3
- .row
4
- .landing-page-header.col-xs-12.location-landing-page-header{style: "background-image: url('#{@area.image}')"}
5
- %h1.landing-page-header__title
6
- = @area.title
7
-
8
- .row
9
- .col-xs-12.col-md-12
10
- %h2.landing-page-intro
11
- = @area.body
12
-
2
+ %header.page-header
3
+ %h1.page-title
4
+ = @area.title
5
+ .content-wrapper
6
+ %section.primary-content
7
+ .event-media
8
+ %img{src: @area.image, alt: "Lead Image"}
9
+ .event-body
10
+ = @area.body
11
+ %section.related-events
13
12
  - @area.children.each do |location|
13
+ %article.event
14
+ - if location.image
15
+ .event-media
16
+ = image_tag location.image
14
17
 
15
- .col-xs-12.col-md-4.landing-page-plug
16
- .map-thumb
17
- %a{href:location_path(location.slug)}
18
- %img{src: location.image, alt: location.title}
19
- %h3.strong
20
- %a{href:location_path(location.slug)}
21
- = location.title
22
- %p
23
- = location.festivity_address
24
- %br
25
- = "#{location.festivity_city}, #{location.festivity_state} #{location.festivity_zip}"
26
- %p
27
- = location.short_description
28
- %a.btn.btn-default{href: location_path(location.slug) }
29
- Events and Directions
18
+ .event-body
19
+ %h3.event-title
20
+ = link_to location_path(location.slug) do
21
+ = location.title
22
+ %h4.event-subtitle
23
+ = location.festivity_address
24
+ %br
25
+ = "#{location.festivity_city}, #{location.festivity_state} #{location.festivity_zip}"
26
+ %h4.event-subtitle
27
+ = link_to "Events and Directions", location_path(location.slug), class: 'btn btn-default', target: '_blank'
@@ -1,66 +1,27 @@
1
- - cache(@location) do
2
- .container
3
- .row
4
- .col-xs-12.location-landing-page-header{style: "background-image: url('#{@location.image}')"}
5
- %h1
6
- = @location.title
7
- %p
8
- =link_to area_path(id: @location.parent.slug) do
9
- = @location.parent.title
1
+ - cache(@location, base_domain: current_site.base_domain) do
2
+ %header.page-header
3
+ %h1.page-title
4
+ = @location.title
5
+ %h3.page-subtitle
6
+ =link_to area_path(id: @location.parent.slug) do
7
+ = @location.parent.title
8
+ .content-wrapper
9
+ %section.primary-content
10
+ %h4.tertiary-title
11
+ = @location.festivity_address
12
+ %br
13
+ = "#{@location.festivity_city}, #{@location.festivity_state} #{@location.festivity_zip}"
14
+ - unless @location.festivity_directions_url.blank?
10
15
  %p
11
- = @location.festivity_address
12
- %br
13
- = "#{@location.festivity_city}, #{@location.festivity_state} #{@location.festivity_zip}"
14
- - unless @location.festivity_directions_url.blank?
15
16
  = link_to "Directions", "#{@location.festivity_directions_url}", class: 'btn btn-default', target: '_blank'
16
- .col-xs-12
17
- %h2
18
- Events at
19
- = @location.title
20
- .event-list
21
- - cache(@location_events) do
22
- - @location_events.events.each do |event|
23
- .row.event-list-item{data:{genre: event.categories.first.name.to_slug, date: event.performances.first.start_date, location: @location.slug}, class: event.title.to_slug}
24
- %hr
25
- .event-list-item__photo.col-xs-12.col-md-2
26
- .photo
27
- = link_to event_path(event.id) do
28
- %img.img-responsive{ src: "#{event.image}"}
29
- - if event.featured_item
30
- .event_list-item__photo-featured-item
31
- Featured Event!
32
- .event-list-item__info.col-xs-12.col-md-8
33
- = link_to event_path(event.id) do
34
- %h2
35
- = event.title
36
- %h3
37
- %span.strong
38
- = event.title
39
- %span.light
40
- = event.header
41
- - if event.performances.count > 1
42
- %p
43
- Multiple dates and times&nbsp;
44
- %button.btn.btn-sm.btn-default.btn-popover{type: "button", data: {content: date_time_popover(event.performances), html: "true", placement:"top", toggle: "popover"}, title:"All Dates and Times"}
45
- Show all
46
- - else
47
- - event.performances.each do |perf|
48
- %p
49
- = perf.start_date.strftime("%A, %B %d")
50
- = ", "
51
- = perf.start_date.strftime("%I:%M%p").downcase
52
- = " - "
53
- = perf.end_date.strftime('%I:%M%p').downcase
54
- -#- for c in e.event_categories do
55
- p
56
- a.strong(href="#")= c
57
- .more-dates.hidden
58
- ul
59
- / - e.event_dates_and_times.each do |date,index|
60
- / li = "#{date.date}, #{date.time}"
61
- .event-list-item__button-group.col-xs-12.col-md-2
62
- %p
63
- = link_to "Details", event_path(event.id), class: 'btn btn-default'
64
- - unless event.buy_url.blank?
65
- %p
66
- =link_to "Tickets", "#{event.buy_url}", class: 'btn btn-default', target: '_blank'
17
+ .event-media
18
+ %img{src: @location.image, alt: "Lead Image"}
19
+
20
+ - if @location_events.events.any?
21
+ %section.related-events
22
+ %h3
23
+ Events at
24
+ = @location.title
25
+ - cache(@location_events.events, base_domain: current_site.base_domain) do
26
+ - @location_events.events.each do |event|
27
+ = render partial: 'festivity_events/event', locals: {event: event}
File without changes
@@ -1,4 +1,19 @@
1
- .social-posts
2
- - posts.each do |post|
3
- "BUTTS"
4
- = post.text
1
+ %section.social-feed
2
+ .section-wrapper
3
+ %h3.section-title
4
+ Photo Album
5
+ %a
6
+ FirstNightPGH
7
+ .social-posts
8
+ .grid-sizer
9
+ - posts.each do |post|
10
+ %article.instagram-post
11
+ = link_to post.url do
12
+ = image_tag post.standard_res_image_url, class: "insta-image", alt: "Lead Image"
13
+ .post-text
14
+ %p.post
15
+ = post.text
16
+ %span.user-account
17
+ = "@#{post.user_username}"
18
+ %time
19
+ = time_ago_in_words(post.created_time)
@@ -22,6 +22,7 @@ class FestivityExtension < TrustyCms::Extension
22
22
  SitesHelper.send :include, Festivity::Extensions::PagesHelperExtensions
23
23
  Page.send :include, Tags::NavigationTags
24
24
  Page.send :include, Tags::HeaderTags
25
+ Page.send :include, Tags::FilterAndMenuTags
25
26
  Page.send :include, Tags::SocialFeedTags
26
27
  end
27
28
 
@@ -0,0 +1,16 @@
1
+ module Tags::FilterAndMenuTags
2
+ include TrustyCms::Taggable
3
+
4
+ desc "Meta Tags"
5
+ tag "festivity_mobile_menus" do |tag|
6
+ if request.env["action_controller.instance"].class == FestivityEventsController && request.env["action_controller.instance"].action_name == "index"
7
+ selected_dates = request.env["action_controller.instance"].params["dates"] ? FestivityDatetimeFilterPresenter.parse(request.env["action_controller.instance"].params["dates"].split(","), Page.current_site.festivity_filter_type) : []
8
+ selected_categories = request.env["action_controller.instance"].params["categories"] ? request.env["action_controller.instance"].params["categories"].split(",") : []
9
+ request.env["action_controller.instance"].render_to_string :partial => "festivity_events/filters",
10
+ :locals => {:selected_dates => selected_dates,
11
+ :selected_categories => selected_categories}
12
+ end
13
+
14
+
15
+ end
16
+ end
@@ -6,8 +6,9 @@ module Tags::SocialFeedTags
6
6
  *Usage:*
7
7
  <pre><code><r:instagram_posts tag="culturaltrust">/code></pre>}
8
8
  tag "instagram_posts" do |tag|
9
-
10
- posts = InstagramFeedService.new.get_feed_for_tag(tag.attr['tag'])
9
+ posts = Rails.cache.fetch("instagram_posts/#{tag.attr['tag']}", expires_in: 5.minutes) do
10
+ InstagramFeedService.new.get_feed_for_tag(tag.attr['tag'])
11
+ end
11
12
  request.env["action_controller.instance"].render_to_string :partial => "social/instagram_posts",
12
13
  :locals => {:posts => posts}
13
14
 
@@ -1,5 +1,5 @@
1
1
  module TrustyFestivityExtension
2
- VERSION = "2.3.10"
2
+ VERSION = "2.3.11g"
3
3
  SUMMARY = "Festival microsite engine for Trusty CMS"
4
4
  DESCRIPTION = "Event management for arts festivals."
5
5
  URL = "http://github.com/pgharts/trusty-festivity-extension"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-festivity-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.10
4
+ version: 2.3.11g
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Sipple
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-28 00:00:00.000000000 Z
11
+ date: 2015-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trusty-cms
@@ -616,6 +616,7 @@ files:
616
616
  - app/views/festivity_location_areas/show.html.haml
617
617
  - app/views/festivity_locations/show.html.haml
618
618
  - app/views/header/_meta_tags.html.haml
619
+ - app/views/navigation/_mobile_menus.html.haml
619
620
  - app/views/navigation/_subnav_one_column.html.haml
620
621
  - app/views/navigation/_subnav_three_column.html.haml
621
622
  - app/views/navigation/_three_column_item.html.haml
@@ -658,6 +659,7 @@ files:
658
659
  - lib/festivity/extensions/paperclipped_extensions.rb
659
660
  - lib/festivity/extensions/site_extensions.rb
660
661
  - lib/festivity/mixins/not_found.rb
662
+ - lib/tags/filter_and_menu_tags.rb
661
663
  - lib/tags/header_tags.rb
662
664
  - lib/tags/navigation_tags.rb
663
665
  - lib/tags/social_feed_tags.rb
@@ -4821,9 +4823,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
4821
4823
  version: '0'
4822
4824
  required_rubygems_version: !ruby/object:Gem::Requirement
4823
4825
  requirements:
4824
- - - ">="
4826
+ - - ">"
4825
4827
  - !ruby/object:Gem::Version
4826
- version: '0'
4828
+ version: 1.3.1
4827
4829
  requirements: []
4828
4830
  rubyforge_project:
4829
4831
  rubygems_version: 2.4.8