spina-conferences-primer_theme 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 647773b8710b54bb05cfd3b9b59d329ff0006a3283d2612694dd2a389c9dc6b9
4
- data.tar.gz: 60cdaba4af25262ad324f15dc4d3b60bacbdd317ed4894c975d65ad3fb17d9c1
3
+ metadata.gz: 665965738e060bd5c6c9f90e5452f9cd84f92456a6e04e6de2fe85b594ecc397
4
+ data.tar.gz: b3a31fb3bb0f867801f9f8fff03265ad9d33ec4cc8bb6acfdbe4b72ec8e8ff8f
5
5
  SHA512:
6
- metadata.gz: 26453a2c8013741ca8fed90e7bbbb7c87591b8e2d5540b57983613260ee9d044c7c01e01e57033eff9c32a1c36c022d49df0edd3fae5b459dbb48af2c533f84a
7
- data.tar.gz: 871d716b6640411450356a993570c7a95a7f1a675eca2f1f8b23a82fd81ec1668a0126e2a26fa274010499f09fac12566fd4750388b136beb00eea055454f950
6
+ metadata.gz: 3e149a65b5ef03f743d3d9249a7cbe6e1b463090d10e1af8f833dbf49cebf416cc97e899d5c1340afc12cc67101a2b202a697d719c4a2ef11c35051d8079d03c
7
+ data.tar.gz: 2fb6e336499d4b36b4cfba6521bd3dace00bc325668a618e97e55e2ac4c79de7f4fac45a3d8baf94ca9291488c5867ff49e2b5e6da77970bde371b1d8e6cd5cc
@@ -42,15 +42,16 @@ module Spina
42
42
  t :'.title', title: current_page.present? ? current_page.seo_title : @title, suffix: current_account.name # rubocop:disable Rails/HelperInstanceVariable
43
43
  end
44
44
 
45
- def partable_for(*parts, parent: current_page)
45
+ def partable_for(*part_names, parent: current_page)
46
46
  association = case parent
47
47
  when Spina::Page then :page_partable
48
48
  when Spina::StructureItem then :structure_partable
49
49
  when Spina::Account then :layout_partable
50
50
  else :partable
51
51
  end
52
- part = parent.parts.find_by(name: parts)
53
- [part, part.try(association)]
52
+ parts = parent.parts.where(name: part_names)
53
+ part_parents = parts.collect { |part| part.try(association) }
54
+ [*parts, *part_parents]
54
55
  end
55
56
 
56
57
  def calendar(name:, &block)
@@ -1,16 +1,15 @@
1
- - cache [conference, conference.institutions, conference.institutions.collect(&:logo)] do
2
- .d-flex.flex-column.flex-md-row-reverse.flex-justify-start.flex-md-justify-between
3
- %ul.list-style-none.d-flex.flex-wrap.flex-md-justify-end.pl-md-2.pb-2.pb-md-0{ class: dom_class(conference.institutions) }
4
- = render partial: 'institution', collection: conference.institutions, cached: -> institution { [institution, institution.logo] }
5
- .flex-auto
6
- %h3.mb-1
7
- = link_to conference.name, frontend_conference_path(conference)
8
- %ul.text-gray.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
9
- %li.mr-sm-3
10
- = octicon 'calendar'
11
- = t :'.dates_html', start_date: time_tag(conference.start_date, format: :date), finish_date: time_tag(conference.finish_date)
12
- - if conference.institutions.any?
13
- %li
14
- = octicon 'location'
15
- %address.d-inline= t :'.locations', institutions: conference.institutions.pluck(:name).to_sentence,
16
- cities: conference.institutions.pluck(:city).uniq.to_sentence
1
+ .d-flex.flex-column.flex-md-row-reverse.flex-justify-start.flex-md-justify-between
2
+ %ul.list-style-none.d-flex.flex-wrap.flex-md-justify-end.pl-md-2.pb-2.pb-md-0{ class: dom_class(conference.institutions) }
3
+ = render partial: 'institution', collection: conference.institutions, cached: -> institution { [institution, institution.logo] }
4
+ .flex-auto
5
+ %h3.mb-1
6
+ = link_to conference.name, frontend_conference_path(conference)
7
+ %ul.text-gray.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
8
+ %li.mr-sm-3
9
+ = octicon 'calendar'
10
+ = t :'.dates_html', start_date: time_tag(conference.start_date, format: :date), finish_date: time_tag(conference.finish_date)
11
+ - if conference.institutions.any?
12
+ %li
13
+ = octicon 'location'
14
+ %address.d-inline= t :'.locations', institutions: conference.institutions.pluck(:name).to_sentence,
15
+ cities: conference.institutions.pluck(:city).uniq.to_sentence
@@ -1,3 +1 @@
1
- <% cache conference do %>
2
1
  <%= conference.to_event.to_ical -%>
3
- <% end %>
@@ -1,12 +1,11 @@
1
- - cache event do
2
- .d-flex.flex-column.flex-sm-row
3
- .flex-shrink-0.mr-sm-3.mb-3.mb-sm-0.col-sm-4
4
- %span.f3-light.mb-1
5
- = octicon 'clock', class: 'v-align-baseline'
6
- = t :'.times_html', start_time: time_tag(event.start_time, format: :short), finish_time: time_tag(event.finish_time, format: :time)
7
- .text-gray
8
- = octicon 'location'
9
- %address.d-inline= event.location
10
- .flex-auto
11
- %h3.mb-1= event.name
12
- .text-gray= event.description.try(:html_safe)
1
+ .d-flex.flex-column.flex-sm-row
2
+ .flex-shrink-0.mr-sm-3.mb-3.mb-sm-0.col-sm-4
3
+ %span.f3-light.mb-1
4
+ = octicon 'clock', class: 'v-align-baseline'
5
+ = t :'.times_html', start_time: time_tag(event.start_time, format: :short), finish_time: time_tag(event.finish_time, format: :time)
6
+ .text-gray
7
+ = octicon 'location'
8
+ %address.d-inline= event.location
9
+ .flex-auto
10
+ %h3.mb-1= event.name
11
+ .text-gray= event.description.try(:html_safe)
@@ -1,3 +1 @@
1
- <% cache event do %>
2
1
  <%= event.to_event.to_ical -%>
3
- <% end %>
@@ -1,6 +1,5 @@
1
- - cache [institution, institution.logo] do
2
- %li
3
- - if institution.logo.present?
4
- = render partial: 'institution_logo', object: institution.logo, locals: { institution: institution }
5
- - else
6
- = institution.name
1
+ %li
2
+ - if institution.logo.present?
3
+ = render partial: 'institution_logo', object: institution.logo, locals: { institution: institution }
4
+ - else
5
+ = institution.name
@@ -1,3 +1,4 @@
1
- - if institution_logo.file.present?
2
- = image_tag main_app.url_for(institution_logo.file.variant(resize_to_limit: [300, 60])), srcset: srcset(institution_logo.file,
3
- variant: { resize_to_limit: [300, 60] }), alt_description: institution.name, draggable: false, class: 'p-1'
1
+ - cache institution_logo do
2
+ - if institution_logo.file.present?
3
+ = image_tag main_app.url_for(institution_logo.file.variant(resize_to_limit: [300, 60])), srcset: srcset(institution_logo.file,
4
+ variant: { resize_to_limit: [300, 60] }), alt_description: institution.name, draggable: false, class: 'p-1'
@@ -1,14 +1,13 @@
1
- - cache [presentation, presentation.presenters] do
2
- .d-flex.flex-column.flex-sm-row
3
- .flex-shrink-0.mr-sm-3.mb-3.mb-sm-0.col-sm-3
4
- %span.f3-light.mb-1
5
- = octicon 'clock', class: 'v-align-baseline'
6
- = time_tag presentation.start_datetime, format: :short
7
- .text-gray
8
- = octicon 'location'
9
- %address.d-inline= presentation.session.room_name
10
- .flex-auto
11
- %h3.mb-1= link_to presentation.title, frontend_conference_presentation_path(conference, presentation)
12
- .text-gray
13
- = octicon presentation.presenters.many? ? 'people' : 'person'
14
- %address.d-inline= presentation.presenters.collect(&:full_name_and_institution).to_sentence
1
+ .d-flex.flex-column.flex-sm-row
2
+ .flex-shrink-0.mr-sm-3.mb-3.mb-sm-0.col-sm-3
3
+ %span.f3-light.mb-1
4
+ = octicon 'clock', class: 'v-align-baseline'
5
+ = time_tag presentation.start_datetime, format: :short
6
+ .text-gray
7
+ = octicon 'location'
8
+ %address.d-inline= presentation.session.room_name
9
+ .flex-auto
10
+ %h3.mb-1= link_to presentation.title, frontend_conference_presentation_path(conference, presentation)
11
+ .text-gray
12
+ = octicon presentation.presenters.many? ? 'people' : 'person'
13
+ %address.d-inline= presentation.presenters.collect(&:full_name_and_institution).to_sentence
@@ -1,3 +1 @@
1
- <% cache presentation do %>
2
1
  <%= presentation.to_event.to_ical -%>
3
- <% end %>
@@ -1,6 +1,5 @@
1
- - cache [presentation_type, @presentation_type] do
2
- %li
3
- = link_to frontend_conference_url(presentation_type.conference, presentation_type: presentation_type.id, tab: 'presentations'),
4
- class: 'filter-item', aria: { current: @presentation_type == presentation_type ? 'page' : nil } do
5
- = presentation_type.name.pluralize
6
- %span.count{ title: t(:'.results') }= presentation_type.presentations.count
1
+ %li
2
+ = link_to frontend_conference_url(presentation_type.conference, presentation_type: presentation_type.id, tab: 'presentations'),
3
+ class: 'filter-item', aria: { current: @presentation_type == presentation_type ? 'page' : nil } do
4
+ = presentation_type.name.pluralize
5
+ %span.count{ title: t(:'.results') }= presentation_type.presentations.count
@@ -1,9 +1,8 @@
1
- - cache [sponsor, sponsor.structure_parts.collect(&:structure_partable)] do
2
- %li.d-inline-block.m-2.v-align-middle
3
- - if sponsor.has_content?(:logo) && sponsor.content(:logo).file.present?
4
- = link_to sponsor.content(:website) do
5
- = image_tag(main_app.url_for(sponsor.content(:logo).file.variant(resize_to_limit: [200, 60])),
6
- srcset: srcset(sponsor.content(:logo).file, variant: { resize_to_limit: [200, 60] }),
7
- alt_description: sponsor.content(:name), draggable: false)
8
- - else
9
- = link_to sponsor.content(:name), sponsor.content(:website)
1
+ %li.d-inline-block.m-2.v-align-middle
2
+ - if sponsor.has_content?(:logo) && sponsor.content(:logo).file.present?
3
+ = link_to sponsor.content(:website) do
4
+ = image_tag(main_app.url_for(sponsor.content(:logo).file.variant(resize_to_limit: [200, 60])),
5
+ srcset: srcset(sponsor.content(:logo).file, variant: { resize_to_limit: [200, 60] }),
6
+ alt_description: sponsor.content(:name), draggable: false)
7
+ - else
8
+ = link_to sponsor.content(:name), sponsor.content(:website)
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.1.8'
6
+ VERSION = '0.1.9'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina-conferences-primer_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Malčić