spina-conferences-primer_theme 0.1.2 → 0.1.7
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/app/controllers/spina/conferences/primer_theme/conferences_controller.rb +2 -0
- data/app/controllers/spina/conferences/primer_theme/presentations_controller.rb +6 -0
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +2 -2
- data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +5 -0
- data/app/views/conferences_primer_theme/pages/about.html.haml +4 -2
- data/app/views/conferences_primer_theme/pages/committee.html.haml +2 -1
- data/app/views/spina/application/_navigation.html.haml +3 -4
- data/app/views/spina/conferences/primer_theme/conferences/_sponsor.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/_sponsors.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/show.html.haml +6 -5
- data/app/views/spina/pages/_committee_bio.html.haml +31 -29
- data/app/views/spina/pages/_committee_bios.html.haml +2 -1
- data/app/views/spina/pages/_minutes.html.haml +3 -2
- data/app/views/spina/pages/_minutes_entry.html.haml +12 -11
- data/app/views/spina/pages/_partner_societies.html.haml +2 -1
- data/app/views/spina/pages/_partner_society.html.haml +26 -25
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8dee41e60aa7147d342860f3b27648d83ec86e9a8e8fb974af2c19e439cece5
|
4
|
+
data.tar.gz: '094d1c4de640acf1b436cfd76067a2eea513014f3c927915ab99f2662df8ec0e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79fbbcb618450ea7e5bb08f02c07659e2bef8cc1d9570a3c4f2686f296cd79c03329e47bc3359a0e24e9f59dd5b4c304707a81a42baf34916429b762f9f69b37
|
7
|
+
data.tar.gz: a1a2c319add70b944dade73b2ab6b7d99310dd12743964055dc70969599a412ed0bd34df1c5a958c45a1763c8092fca8685450c638e8382a6b7eafa67c6e43d0
|
@@ -25,6 +25,8 @@ module Spina
|
|
25
25
|
presentation_types: [:translations],
|
26
26
|
presentations: [session: [:room], presenters: [:institution]])
|
27
27
|
.find(params[:id])
|
28
|
+
rescue ActiveRecord::RecordNotFound
|
29
|
+
send_file Rails.root.join('public/404.html'), type: 'text/html; charset=utf-8', status: 404
|
28
30
|
end
|
29
31
|
|
30
32
|
def set_tab
|
@@ -9,6 +9,10 @@ module Spina
|
|
9
9
|
|
10
10
|
def show
|
11
11
|
add_breadcrumb @presentation.name
|
12
|
+
respond_to do |format|
|
13
|
+
format.html
|
14
|
+
format.ics { render nothing: true, status: :gone }
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
private
|
@@ -16,6 +20,8 @@ module Spina
|
|
16
20
|
def set_presentation
|
17
21
|
@presentation = Admin::Conferences::Presentation.includes(:presenters, attachments: [attachment_type: [:translations]])
|
18
22
|
.find(params[:id])
|
23
|
+
rescue ActiveRecord::RecordNotFound
|
24
|
+
send_file Rails.root.join('public/404.html'), type: 'text/html; charset=utf-8', status: 404
|
19
25
|
end
|
20
26
|
|
21
27
|
def set_conference
|
@@ -16,11 +16,11 @@ module Spina
|
|
16
16
|
def ancestors
|
17
17
|
return [] if current_page.blank?
|
18
18
|
|
19
|
-
render Primer::BreadcrumbComponent.new(mb: 4) do
|
19
|
+
render Primer::BreadcrumbComponent.new(mb: 4) do |component|
|
20
20
|
current_page.ancestors.each do |ancestor|
|
21
21
|
component.slot(:item, href: 'ancestor.materialized_path') { ancestor.menu_title }
|
22
22
|
end
|
23
|
-
component.slot(:item, selected: true) { menu_title }
|
23
|
+
component.slot(:item, selected: true) { current_page.menu_title }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -8,6 +8,11 @@ module Spina
|
|
8
8
|
METHODS_TO_RESIZE = %i[resize_to_limit resize_to_fit resize_to_fill resize_and_pad].freeze
|
9
9
|
DEFAULT_FACTORS = [1, 2, 3, 4].freeze
|
10
10
|
|
11
|
+
def concat_srcset(image, **options)
|
12
|
+
srcset(image, **options).collect { |src_path, size| "#{src_path} #{size}" }
|
13
|
+
.join ', '
|
14
|
+
end
|
15
|
+
|
11
16
|
def srcset(image, **options)
|
12
17
|
return if image.blank?
|
13
18
|
|
@@ -10,8 +10,10 @@
|
|
10
10
|
.clearfix.gutter
|
11
11
|
- cache partable_for(:constitution) do
|
12
12
|
.mt-4.col-12.col-md-6.float-md-left= render partial: 'constitution', object: content(:constitution)
|
13
|
-
- cache partable_for(:minutes)
|
13
|
+
- cache [partable_for(:minutes), content(:minutes)&.structure_items,
|
14
|
+
content(:minutes)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
14
15
|
.mt-4.col-12.col-md-6.float-md-left= render partial: 'minutes', object: content(:minutes)
|
15
|
-
- cache partable_for(:partner_societies)
|
16
|
+
- cache [partable_for(:partner_societies), content(:partner_societies)&.structure_items,
|
17
|
+
content(:partner_societies)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
16
18
|
- if has_content?(:partner_societies) && content(:partner_societies).structure_items.any?
|
17
19
|
.mt-4= render partial: 'partner_societies', object: content(:partner_societies)
|
@@ -4,6 +4,7 @@
|
|
4
4
|
- cache partable_for(:text) do
|
5
5
|
- if has_content? :text
|
6
6
|
.mt-4= render partial: 'text', object: content(:text)
|
7
|
-
- cache partable_for(:committee_bios)
|
7
|
+
- cache [partable_for(:committee_bios), content(:committee_bios)&.structure_items,
|
8
|
+
content(:committee_bios)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
8
9
|
- if has_content?(:committee_bios) && content(:committee_bios).structure_items.any?
|
9
10
|
.mt-4= render partial: 'committee_bios', object: content(:committee_bios)
|
@@ -1,10 +1,9 @@
|
|
1
1
|
.Header.bg-blue.px-3.px-md-4.px-lg-5
|
2
|
-
.Header-item.
|
2
|
+
.Header-item.mt-n1.mb-n1= link_to render('logo'), root_path, class: 'Header-link'
|
3
3
|
.Header-item.Header-item--full.d-flex.d-lg-none{ aria: { hidden: true } }
|
4
|
-
|
5
|
-
%details.details-reset.text-right
|
4
|
+
%details.details-reset
|
6
5
|
%summary.btn-link.Header-link= octicon 'three-bars', height: 24
|
7
|
-
.
|
6
|
+
.px-3.px-md-4.px-lg-5.bg-blue.Popover.left-0.right-0.mt-3
|
8
7
|
= render partial: 'mobile_navigation_item', collection: main_navigation_items, cached: true
|
9
8
|
= link_to 'Conferences', frontend_conferences_url, class: %w[d-block py-2 border-top border-white-fade text-white]
|
10
9
|
= render partial: 'navigation_item', collection: main_navigation_items, cached: true
|
@@ -1,4 +1,4 @@
|
|
1
|
-
- cache sponsor, sponsor.structure_parts.collect(&:structure_partable) do
|
1
|
+
- cache [sponsor, sponsor.structure_parts.collect(&:structure_partable)] do
|
2
2
|
%li.d-inline-block.m-2.v-align-middle
|
3
3
|
- if sponsor.has_content?(:logo) && sponsor.content(:logo).file.present?
|
4
4
|
= link_to sponsor.content(:website) do
|
@@ -2,5 +2,5 @@
|
|
2
2
|
%h2.Subhead-heading= t :'.title'
|
3
3
|
|
4
4
|
%ul.ml-n2.mr-n2.mb-n2.mt-n2{ class: dom_class(sponsors), id: dom_id(sponsors) }
|
5
|
-
= render partial: 'sponsor', collection: sponsors.structure_items,
|
5
|
+
= render partial: 'sponsor', collection: sponsors.structure_items.sorted_by_structure,
|
6
6
|
cached: -> sponsor { [sponsor, sponsor.structure_parts.collect(&:structure_partable)] }
|
@@ -15,9 +15,9 @@
|
|
15
15
|
%p= @conference.content(:submission_text).html_safe
|
16
16
|
|
17
17
|
- content_for :header do
|
18
|
-
- cache [@conference, @conference.institutions, @conference.content(:gallery)&.images,
|
19
|
-
@conference.
|
20
|
-
@conference.content(:sponsors)&.structure_items&.
|
18
|
+
- cache [@conference, @conference.institutions, @conference.parts.collect(&:partable), @conference.content(:gallery)&.images,
|
19
|
+
@conference.content(:sponsors)&.structure_items,
|
20
|
+
@conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
21
21
|
.container-lg.p-responsive.mb-4{ class: dom_class(@conference), id: dom_id(@conference) }
|
22
22
|
%h1.mb-1.mb-md-2= @conference.name
|
23
23
|
%ul.text-gray-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
@@ -34,10 +34,11 @@
|
|
34
34
|
%ul.list-style-none.d-flex.flex-wrap.mt-4{ class: dom_class(@conference.institutions) }
|
35
35
|
= render partial: 'institution', collection: @conference.institutions,
|
36
36
|
cached: -> institution { [institution, institution.logo] }
|
37
|
-
- cache partable_for(:sponsors, parent: @conference)
|
37
|
+
- cache [partable_for(:sponsors, parent: @conference), @conference.content(:sponsors)&.structure_items,
|
38
|
+
@conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
38
39
|
- if @conference.has_content?(:sponsors) && @conference.content(:sponsors).structure_items.any?
|
39
40
|
= render partial: 'sponsors', object: @conference.content(:sponsors)
|
40
|
-
- cache partable_for(:gallery, parent: @conference) do
|
41
|
+
- cache [partable_for(:gallery, parent: @conference), @conference.content(:gallery)&.images] do
|
41
42
|
- if @conference.has_content? :gallery
|
42
43
|
.mb-4= render partial: 'image_collection', object: @conference.content(:gallery), locals: { controls: true }
|
43
44
|
|
@@ -1,29 +1,31 @@
|
|
1
|
-
|
2
|
-
-
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
=
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
=
|
27
|
-
|
28
|
-
|
29
|
-
|
1
|
+
- cache [committee_bio, committee_bio.structure_parts.collect(&:structure_partable)] do
|
2
|
+
.d-flex.flex-column.flex-md-row.flex-items-start
|
3
|
+
- cache partable_for(:profile_picture, parent: committee_bio) do
|
4
|
+
- if committee_bio.has_content?(:profile_picture) && committee_bio.content(:profile_picture).persisted?
|
5
|
+
.flex-shrink-0
|
6
|
+
= render Primer::AvatarComponent.new(src: src(committee_bio.content(:profile_picture).file, resize_to_fill: [150, 150]),
|
7
|
+
srcset: concat_srcset(committee_bio.content(:profile_picture).file,
|
8
|
+
variant: { resize_to_limit: [150, 150] }),
|
9
|
+
draggable: false, alt: committee_bio.content(:name), size: 150, mr: [nil, nil, 3, nil],
|
10
|
+
mb: [3, nil, 0, nil])
|
11
|
+
.flex-auto
|
12
|
+
.d-flex.flex-column.flex-md-row.mb-1
|
13
|
+
- cache partable_for(:name, :role, parent: committee_bio) do
|
14
|
+
- if committee_bio.has_content?(:name) && committee_bio.has_content?(:role)
|
15
|
+
%h3.flex-auto= t :'.name_and_role', name: committee_bio.content(:name), role: committee_bio.content(:role)
|
16
|
+
- elsif committee_bio.has_content?(:name)
|
17
|
+
%h3.flex-auto= committee_bio.content(:name)
|
18
|
+
.BtnGroup.mt-1.mt-md-0.ml-md-1{ aria: { label: t(:'.contact_buttons') } }
|
19
|
+
- cache partable_for(:twitter_profile, parent: committee_bio) do
|
20
|
+
- if committee_bio.has_content?(:twitter_profile)
|
21
|
+
= render Primer::ButtonComponent.new(tag: :a, href: committee_bio.content(:twitter_profile), group_item: true) do
|
22
|
+
= render Primer::OcticonComponent.new(icon: 'link-external')
|
23
|
+
= t(:'.twitter')
|
24
|
+
- cache partable_for(:facebook_profile, parent: committee_bio) do
|
25
|
+
- if committee_bio.has_content?(:facebook_profile)
|
26
|
+
= render Primer::ButtonComponent.new(tag: :a, href: committee_bio.content(:facebook_profile), group_item: true) do
|
27
|
+
= render Primer::OcticonComponent.new(icon: 'link-external')
|
28
|
+
= t(:'.facebook')
|
29
|
+
- cache partable_for(:bio, parent: committee_bio) do
|
30
|
+
- if committee_bio.has_content?(:bio)
|
31
|
+
.text-gray-light= committee_bio.content(:bio).try(:html_safe)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
- if committee_bios.structure_items.any?
|
2
2
|
%ul{ class: dom_class(committee_bios), id: dom_id(committee_bios) }
|
3
|
-
= render partial: 'committee_bio', collection: committee_bios.structure_items.sorted_by_structure, layout: 'list_item',
|
3
|
+
= render partial: 'committee_bio', collection: committee_bios.structure_items.sorted_by_structure, layout: 'list_item',
|
4
|
+
cached: ->(committee_bio) { [committee_bio, committee_bio.structure_parts.collect(&:structure_partable)] }
|
4
5
|
- else
|
5
6
|
= render Primer::BlankslateComponent.new(title: t(:'.no_bios'), icon: 'file')
|
@@ -2,7 +2,8 @@
|
|
2
2
|
= component.slot(:heading) { t :'.title' }
|
3
3
|
|
4
4
|
- if minutes.present? && minutes.structure_items.any?
|
5
|
-
%ul{ class: dom_class(minutes), id: dom_id(minutes) }
|
6
|
-
|
5
|
+
%ul{ class: dom_class(minutes), id: dom_id(minutes) }
|
6
|
+
= render partial: 'minutes_entry', collection: minutes.structure_items.sorted_by_structure,
|
7
|
+
cached: ->(minutes_entry) { [minutes_entry, minutes_entry.structure_parts.collect(&:structure_partable)] }
|
7
8
|
- else
|
8
9
|
= render Primer::BlankslateComponent.new(title: t(:'.no_minutes'), icon: 'file')
|
@@ -1,11 +1,12 @@
|
|
1
|
-
|
2
|
-
-
|
3
|
-
|
4
|
-
|
5
|
-
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
- cache [minutes_entry, minutes_entry.structure_parts.collect(&:structure_partable)] do
|
2
|
+
%li.list-style-none.py-1.d-flex.flex-items-center
|
3
|
+
- cache partable_for(:date, parent: minutes_entry) do
|
4
|
+
.flex-auto= minutes_entry.has_content?(:date) ? t(:'.minutes_html', date: time_tag(minutes_entry.content(:date))) : t(:'.no_date')
|
5
|
+
- cache partable_for(:attachment, parent: minutes_entry) do
|
6
|
+
- if minutes_entry.has_content?(:attachment) && minutes_entry.content(:attachment).persisted?
|
7
|
+
= render Primer::ButtonComponent.new(tag: :a, ml: 2,
|
8
|
+
href: main_app.rails_blob_path(minutes_entry.content(:attachment), disposition: :attachment)) do
|
9
|
+
= render Primer::OcticonComponent.new(icon: 'desktop-download')
|
10
|
+
= t(:'.download')
|
11
|
+
- else
|
12
|
+
.text-small.text-gray= t :'.no_file'
|
@@ -4,6 +4,7 @@
|
|
4
4
|
- if partner_societies.structure_items.any?
|
5
5
|
%ul{ class: dom_class(partner_societies), id: dom_id(partner_societies) }
|
6
6
|
= render partial: 'partner_society', collection: partner_societies.structure_items.sorted_by_structure,
|
7
|
-
layout: 'list_item',
|
7
|
+
layout: 'list_item',
|
8
|
+
cached: ->(partner_society) { [partner_society, partner_society.structure_parts.collect(&:structure_partable)] }
|
8
9
|
- else
|
9
10
|
= render Primer::BlankslateComponent.new(title: t(:'.no_societies'), icon: 'organization')
|
@@ -1,25 +1,26 @@
|
|
1
|
-
|
2
|
-
.flex-
|
3
|
-
|
4
|
-
-
|
5
|
-
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
|
11
|
-
= render Primer::
|
12
|
-
|
13
|
-
|
14
|
-
-
|
15
|
-
|
16
|
-
= render Primer::
|
17
|
-
|
18
|
-
|
19
|
-
-
|
20
|
-
|
21
|
-
|
22
|
-
-
|
23
|
-
|
24
|
-
|
25
|
-
|
1
|
+
- cache [partner_society, partner_society.structure_parts.collect(&:structure_partable)] do
|
2
|
+
.d-flex.flex-column.flex-md-row-reverse.flex-items-start
|
3
|
+
.flex-auto
|
4
|
+
%h3.d-flex.flex-wrap.mb-1
|
5
|
+
- cache partable_for(:name, parent: partner_society) do
|
6
|
+
- if partner_society.has_content? :name
|
7
|
+
.flex-auto= partner_society.content(:name)
|
8
|
+
.BtnGroup.mt-1.mt-sm-0{ aria: { label: t(:'.contact_buttons') } }
|
9
|
+
- cache partable_for(:website, parent: partner_society) do
|
10
|
+
- if partner_society.has_content? :website
|
11
|
+
= render Primer::ButtonComponent.new(tag: :a, href: partner_society.content(:website), group_item: true) do
|
12
|
+
= render Primer::OcticonComponent.new(icon: 'browser')
|
13
|
+
= t(:'.website')
|
14
|
+
- cache partable_for(:email_address, parent: partner_society) do
|
15
|
+
- if partner_society.has_content? :email_address
|
16
|
+
= render Primer::ButtonComponent.new(tag: :a, href: "mailto:#{partner_society.content(:email_address)}", group_item: true) do
|
17
|
+
= render Primer::OcticonComponent.new(icon: 'mail')
|
18
|
+
= t(:'.email')
|
19
|
+
- cache partable_for(:description, parent: partner_society) do
|
20
|
+
- if partner_society.has_content? :description
|
21
|
+
.text-gray= render partial: 'text', object: partner_society.content(:description)
|
22
|
+
- cache partable_for(:logo, parent: partner_society) do
|
23
|
+
- if partner_society.has_content?(:logo) && partner_society.content(:logo).persisted?
|
24
|
+
= image_tag(main_app.url_for(partner_society.content(:logo).file.variant(resize_to_limit: [200, 150])),
|
25
|
+
srcset: srcset(partner_society.content(:logo).file, variant: { resize_to_limit: [200, 150] }), size: nil,
|
26
|
+
alt_description: partner_society.content(:name), draggable: false, class: %w[mt-4 mt-md-0 mr-md-4])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spina-conferences-primer_theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Malčić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|