spina-conferences-primer_theme 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spina/conferences/primer_theme/application.js +0 -1
  3. data/app/assets/stylesheets/spina/conferences/primer_theme/_turbolinks.sass +1 -1
  4. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
  5. data/app/controllers/spina/conferences/primer_theme/conferences_controller.rb +8 -6
  6. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +2 -2
  7. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +1 -0
  8. data/app/views/spina/application/_cookies.html.haml +2 -9
  9. data/app/views/spina/application/_footer.html.haml +5 -14
  10. data/app/views/spina/application/_footer_content.html.haml +13 -0
  11. data/app/views/spina/application/_image_collection.html.haml +2 -2
  12. data/app/views/spina/application/_text.html.haml +1 -1
  13. data/app/views/spina/conferences/primer_theme/conferences/_conference.html.haml +8 -8
  14. data/app/views/spina/conferences/primer_theme/conferences/_event.html.haml +10 -10
  15. data/app/views/spina/conferences/primer_theme/conferences/_events.html.haml +14 -13
  16. data/app/views/spina/conferences/primer_theme/conferences/_header.html.haml +27 -0
  17. data/app/views/spina/conferences/primer_theme/conferences/_information.html.haml +2 -2
  18. data/app/views/spina/conferences/primer_theme/conferences/_presentation.html.haml +14 -12
  19. data/app/views/spina/conferences/primer_theme/conferences/_presentations.html.haml +12 -13
  20. data/app/views/spina/conferences/primer_theme/conferences/_sponsor.html.haml +2 -2
  21. data/app/views/spina/conferences/primer_theme/conferences/_sponsors.html.haml +3 -3
  22. data/app/views/spina/conferences/primer_theme/conferences/_submission_flash.html.haml +14 -0
  23. data/app/views/spina/conferences/primer_theme/conferences/index.html.haml +11 -9
  24. data/app/views/spina/conferences/primer_theme/conferences/show.html.haml +33 -63
  25. data/app/views/spina/conferences/primer_theme/presentations/_abstract.html.haml +1 -1
  26. data/app/views/spina/conferences/primer_theme/presentations/_attachment.html.haml +1 -2
  27. data/app/views/spina/conferences/primer_theme/presentations/_attachments.html.haml +3 -2
  28. data/app/views/spina/conferences/primer_theme/presentations/show.html.haml +8 -6
  29. data/app/views/spina/pages/_committee_bio.html.haml +21 -19
  30. data/app/views/spina/pages/_constitution.html.haml +5 -4
  31. data/app/views/spina/pages/_contact.html.haml +1 -1
  32. data/app/views/spina/pages/_document.html.haml +3 -5
  33. data/app/views/spina/pages/_documents.html.haml +1 -1
  34. data/app/views/spina/pages/_event.html.haml +10 -9
  35. data/app/views/spina/pages/_events_list.html.haml +2 -2
  36. data/app/views/spina/pages/_homepage_content.html.haml +13 -14
  37. data/app/views/spina/pages/_jumbotron.html.haml +1 -1
  38. data/app/views/spina/pages/_minutes.html.haml +1 -1
  39. data/app/views/spina/pages/_minutes_entry.html.haml +5 -3
  40. data/app/views/spina/pages/_partner_societies.html.haml +1 -1
  41. data/app/views/spina/pages/_partner_society.html.haml +20 -18
  42. data/config/initializers/primer.rb +3 -0
  43. data/config/locales/en.yml +12 -10
  44. data/lib/spina/conferences/primer_theme.rb +2 -1
  45. data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +2 -2
  46. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  47. metadata +8 -5
  48. data/app/views/spina/conferences/primer_theme/conferences/_tab.html.haml +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 747d8e4bd24f28e085f7f25e067975bded223945166f790a946344366c698604
4
- data.tar.gz: d048d050d8b62c38bc33b831d4fbf6f3426b50b32123bc1d9ec423abdbb26eea
3
+ metadata.gz: 053a0eb11e7ced4282502df407443f30da98f6efd1499a9800aa3aeff8ca6b13
4
+ data.tar.gz: '08d5f2ccb2616cb2d58b153b2bbb00af4e5ee1e7ce45e4c44e04661c72241c8e'
5
5
  SHA512:
6
- metadata.gz: a095e0ddfb8342743f321c5e1b3b79c342e4c6a106a91957d0a94559e13d0e4d1fb587d1c36f6080b012027f194d59ba2e8f9cd19ff739b87cf74dd310f636ad
7
- data.tar.gz: d6f67677691a3183b7b870031552fc7c0c4a9c98a7be245f9997d8f58d7168dfaa41275cf4766d63b8a4de0147c7019bca03310a9928d0c331a80cca2f2701ce
6
+ metadata.gz: 319dac2e50330a0cdfd3faa9f897341f02eee1651825d45a5f917837c7da88d4b0ef223018fe1a23fab54d55fd02d71a7a8f5acf4f4fa0d2b5d0c3bcfe7cd462
7
+ data.tar.gz: 35e652f094562c9032877ce59782870fd5211e62cf4b2655f67eac1a4c47873f23480fef0fda1c202b32d693fe0ceb632544d88a6550d3fc253139a037d49d07
@@ -1,6 +1,5 @@
1
1
  //= require stimulus
2
2
  //= require_directory ./controllers
3
- //= require turbolinks
4
3
 
5
4
  // eslint-disable-next-line no-undef
6
5
  const application = Stimulus.Application.start()
@@ -1,3 +1,3 @@
1
1
  //noinspection CssUnusedSymbol
2
- .turbolinks-progress-bar
2
+ .turbo-progress-bar
3
3
  background-color: white
@@ -8,6 +8,6 @@
8
8
  img
9
9
  max-width: 100%
10
10
  object-fit: cover
11
- object-position: top left
11
+ object-position: center
12
12
  address
13
13
  font-style: normal
@@ -5,7 +5,7 @@ module Spina
5
5
  module PrimerTheme
6
6
  # User-facing controller for conferences, serving both html and ics
7
7
  class ConferencesController < ApplicationController
8
- before_action :set_conference, :set_tab, :set_presentation_type, :set_breadcrumb, only: :show
8
+ before_action :set_conference, :set_tab, :set_presentation_type, :set_presentations, :set_breadcrumb, only: :show
9
9
  before_action :set_metadata
10
10
 
11
11
  def index
@@ -34,13 +34,15 @@ module Spina
34
34
  end
35
35
 
36
36
  def set_presentation_type
37
- @presentation_type = if params[:presentation_type].present?
38
- @conference.presentation_types
37
+ if params[:presentation_type].present?
38
+ @presentation_type = @conference.presentation_types
39
39
  .includes(presentations: [session: [:room], presenters: [:institution]])
40
40
  .find(params[:presentation_type])
41
- else
42
- @conference
43
- end
41
+ end
42
+ end
43
+
44
+ def set_presentations
45
+ @presentations = @presentation_type.present? ? @presentation_type.presentations : @conference.presentations
44
46
  end
45
47
 
46
48
  def set_breadcrumb
@@ -16,9 +16,9 @@ module Spina
16
16
 
17
17
  render Primer::BreadcrumbComponent.new(mb: 4) do |component|
18
18
  current_page.ancestors.each do |ancestor|
19
- component.slot(:item, href: ancestor.materialized_path) { ancestor.menu_title }
19
+ component.item(href: ancestor.materialized_path) { ancestor.menu_title }
20
20
  end
21
- component.slot(:item, selected: true) { current_page.menu_title }
21
+ component.item(selected: true) { current_page.menu_title }
22
22
  end
23
23
  end
24
24
 
@@ -15,6 +15,7 @@
15
15
  = render 'spina/shared/analytics'
16
16
  = stylesheet_link_tag 'spina/conferences/primer_theme/application', media: 'all', data: { turbolinks_track: true }
17
17
  = javascript_include_tag 'spina/conferences/primer_theme/application', data: { turbolinks_track: true }
18
+ = javascript_include_tag 'turbo', type: 'module'
18
19
  %script{ type: 'module', src: asset_path('@github/details-dialog-element/dist/index.js') }
19
20
  %script{ type: 'module', src: asset_path('@github/include-fragment-element/dist/index.js') }
20
21
  %script{ type: 'module', src: asset_path('@github/tab-container-element/dist/index.js') }
@@ -1,14 +1,7 @@
1
1
  = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |component|
2
- = component.slot :header do
2
+ - component.header do
3
3
  = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
4
4
  class: %w[Box-btn-octicon btn-octicon float-right]) do
5
5
  = render Primer::OcticonComponent.new(icon: 'x')
6
6
  .Box-title= t(:'.title')
7
- = component.slot(:body) { t(:'.purpose') }
8
- = component.slot :row do
9
- = t :'.used.rails_html', cookie: tag.code(Rails.application.config.session_options[:key])
10
- = component.slot :row do
11
- - ga_cookie_names = %w[_ga _gat _gid].collect{ |cookie| tag.code(cookie) }.to_sentence.html_safe
12
- - ga_cookie_info_url = 'https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage'
13
- = t :'.used.google_analytics_html', cookies: link_to(ga_cookie_names, ga_cookie_info_url)
14
- = t :'.no_advertising'
7
+ = component.body { }
@@ -1,24 +1,15 @@
1
- .d-flex.flex-column.flex-md-row-reverse.flex-md-items-baseline
2
- .flex-auto.d-flex.flex-column.flex-sm-row.flex-items-baseline.mb-4.mb-md-0
1
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil], align_items: :center) do
2
+ = render Primer::FlexComponent.new(direction: [:column, :row, nil, nil], mb: [4, nil, 0, nil], flex: :auto) do
3
3
  %ul.list-style-none.flex-auto.mb-2.mb-sm-0.mr-sm-2
4
4
  - footer_navigation_items.each do |item|
5
5
  - cache item do
6
6
  %li
7
7
  = render Primer::ButtonComponent.new(tag: :a, href: item.materialized_path, variant: :small) { item.menu_title }
8
- %details.details-reset.details-overlay.details-overlay-dark.mb-2.mb-sm-0.mr-sm-2
9
- %summary.btn.btn-outline.btn-sm{ aria: { haspopup: 'dialog' } }
10
- = octicon 'info'
11
- = t :'.cookies'
12
- %details-dialog
13
- %include-fragment{ src: frontend_cookies_info_path }
14
- .Box.Box--overlay.d-flex.flex-column
15
- = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
16
- class: %w[Box-btn-octicon btn-octicon m-0 position-absolute right-0 top-0]) do
17
- = render Primer::OcticonComponent.new(icon: 'x')
18
- = render(Primer::SpinnerComponent.new(my: 6, mx: :auto))
8
+ = render 'footer_content'
19
9
  - if current_account.has_content? :github_url
20
10
  = render Primer::ButtonComponent.new(tag: :a, href: current_account.content(:github_url), button_type: :outline, variant: :small,
21
11
  display: :inline_block) do
22
12
  = render Primer::OcticonComponent.new(icon: 'mark-github')
23
13
  = t :'.find_on_github'
24
- %small.flex-auto.mr-sm-2.text-small.text-gray= t :'.copyright', name: Spina::Account.first.name, year: Date.today.year
14
+ = render(Primer::TextComponent.new(tag: :small, color: :gray, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
15
+ = t :'.copyright', name: Spina::Account.first.name, year: Date.today.year
@@ -0,0 +1,13 @@
1
+ = render Primer::DetailsComponent.new(overlay: :dark, reset: true, mb: [2, 0, nil, nil], mr: [nil, 2, nil, nil]) do |component|
2
+ = component.summary(button: true, button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }) do
3
+ = render Primer::OcticonComponent.new(icon: 'info')
4
+ = t :'.cookies'
5
+ = component.body(tag: :'details-dialog') do
6
+ %include-fragment{ src: frontend_cookies_info_path, loading: :lazy }
7
+ = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |box_component|
8
+ = box_component.body do
9
+ = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
10
+ class: %w[Box-btn-octicon btn-octicon m-0 position-absolute right-0 top-0]) do
11
+ = render Primer::OcticonComponent.new(icon: 'x')
12
+ = render Primer::BlankslateComponent.new(title: t('.loading')) do |blankslate_component|
13
+ = blankslate_component.spinner(size: :large)
@@ -5,9 +5,9 @@
5
5
  - if image.file.present?
6
6
  = image_tag(main_app.url_for(image.file.variant(resize_to_fill: [1680, 600])), alt_description: image.file.name, draggable: false,
7
7
  srcset: srcset(image.file, variant: { resize_to_fill: [1680, 600] }), hidden: index != 0,
8
- data: { 'slideshow-target': 'slide' })
8
+ data: { 'slideshow-target': 'slide' }, class: %w[d-block mx-auto])
9
9
  .position-absolute.top-0.left-0.right-0.bottom-0.container-lg.p-responsive{ class: ('position-absolute top-0' if local_assigns[:controls]) }
10
- - if local_assigns[:controls]
10
+ - if local_assigns[:controls] && image_collection.images.many?
11
11
  .d-none.d-sm-flex.flex-justify-between.flex-items-center.height-full
12
12
  = render Primer::ButtonComponent.new(data: { action: :'slideshow#previous' }) do
13
13
  = render Primer::OcticonComponent.new(icon: 'arrow-left')
@@ -1 +1 @@
1
- .markdown-body= text.html_safe
1
+ = render(Primer::MarkdownComponent.new) { text.html_safe }
@@ -1,15 +1,15 @@
1
- .d-flex.flex-column.flex-md-row-reverse.flex-justify-start.flex-md-justify-between
1
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil]) do
2
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
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)
4
+ = render Primer::FlexItemComponent.new(flex_auto: true) do
5
+ = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { link_to conference.name, frontend_conference_path(conference) }
7
6
  %ul.text-gray.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
8
7
  %li.mr-sm-3
9
- = octicon 'calendar'
8
+ = render Primer::OcticonComponent.new(icon: 'calendar')
10
9
  = t :'.dates_html', start_date: time_tag(conference.start_date, format: :date), finish_date: time_tag(conference.finish_date)
11
10
  - if conference.institutions.any?
12
11
  %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
12
+ = render Primer::OcticonComponent.new(icon: 'location')
13
+ = render Primer::BaseComponent.new(tag: :address, display: :inline) do
14
+ = t :'.locations', institutions: conference.institutions.pluck(:name).to_sentence,
15
+ cities: conference.institutions.pluck(:city).uniq.to_sentence
@@ -1,11 +1,11 @@
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'
1
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
2
+ = render Primer::FlexItemComponent.new(mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 4, nil]) do
3
+ = render Primer::TextComponent.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
4
+ = render Primer::OcticonComponent.new(icon: 'clock', vertical_align: :baseline)
5
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)
6
+ = render Primer::TextComponent.new(tag: :div, color: :gray) do
7
+ = render Primer::OcticonComponent.new(icon: 'location')
8
+ = render(Primer::BaseComponent.new(tag: :address, display: :inline)) { event.location }
9
+ = render Primer::FlexItemComponent.new(flex_auto: true, col: [nil, nil, 8, nil]) do
10
+ = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { event.name }
11
+ = render(Primer::TextComponent.new(tag: :div, color: :gray)) { event.description.try(:html_safe) }
@@ -1,15 +1,16 @@
1
1
  - cache [events, @tab] do
2
- - if events.any?
3
- %filter-input.d-flex.flex-sm-justify-start{ aria: { owns: 'event_list' } }
4
- .subnav.subnav-flush
5
- .subnav-search.m-0.width-full
6
- = search_field_tag 'search', nil, class: %w[form-control subnav-search-input width-full], aria: { label: t(:'.search') }
7
- = octicon 'search', class: 'subnav-search-icon'
8
- %div{ id: 'event_list' }
2
+ = render Primer::BaseComponent.new(tag: :div, my: 4) do
9
3
  - if events.any?
10
- %ul{ class: dom_class(events), data: { filter: { list: true } } }
11
- = render partial: 'event', collection: events.sorted, layout: 'list_item', cached: true
12
- - else
13
- = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
14
- = render Primer::BlankslateComponent.new(title: t(:'.no_matching_events'), icon: 'calendar', hidden: true,
15
- data: { 'filter-empty-state': true })
4
+ %filter-input{ aria: { owns: 'event_list' } }
5
+ .subnav.subnav-flush
6
+ .subnav-search.float-left.ml-0
7
+ = search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
8
+ = octicon 'search', class: 'subnav-search-icon'
9
+ %div{ id: 'event_list' }
10
+ - if events.any?
11
+ %ul{ class: dom_class(events), data: { filter: { list: true } } }
12
+ = render partial: 'event', collection: events.sorted, layout: 'list_item', cached: true
13
+ - else
14
+ = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
15
+ = render Primer::BlankslateComponent.new(title: t(:'.no_matching_events'), icon: 'calendar', hidden: true,
16
+ data: { 'filter-empty-state': true })
@@ -0,0 +1,27 @@
1
+ - cache [@conference, @conference.institutions, @conference.parts.collect(&:partable), @conference.content(:gallery)&.images,
2
+ @conference.content(:sponsors)&.structure_items,
3
+ @conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
4
+ .container-lg.p-responsive.mb-4{ class: dom_class(@conference), id: dom_id(@conference) }
5
+ = render(Primer::HeadingComponent.new( mb: [1, nil, 2, nil])) { @conference.name }
6
+ %ul.text-gray-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
7
+ %li.mr-sm-3.mb-1
8
+ = render Primer::OcticonComponent.new(icon: 'calendar')
9
+ = t :'.dates_html', start_date: time_tag(@conference.start_date, format: :date), finish_date: time_tag(@conference.finish_date)
10
+ - if @conference.institutions.any?
11
+ - cache @conference.institutions do
12
+ %li.mb-1
13
+ = render Primer::OcticonComponent.new(icon: 'location')
14
+ = render Primer::BaseComponent.new(tag: :address, display: :inline) do
15
+ = t :'.locations', institutions: @conference.institutions.pluck(:name).to_sentence,
16
+ cities: @conference.institutions.pluck(:city).uniq.to_sentence
17
+ - if @conference.institutions.any?
18
+ %ul.list-style-none.d-flex.flex-wrap.mt-4{ class: dom_class(@conference.institutions) }
19
+ = render partial: 'institution', collection: @conference.institutions,
20
+ cached: -> institution { [institution, institution.logo] }
21
+ - cache [partable_for(:sponsors, parent: @conference), @conference.content(:sponsors)&.structure_items,
22
+ @conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
23
+ - if @conference.has_content?(:sponsors) && @conference.content(:sponsors).structure_items.any?
24
+ = render partial: 'sponsors', object: @conference.content(:sponsors)
25
+ - cache [partable_for(:gallery, parent: @conference), @conference.content(:gallery)&.images] do
26
+ - if @conference.has_content? :gallery
27
+ .mb-4= render partial: 'image_collection', object: @conference.content(:gallery), locals: { controls: true }
@@ -1,4 +1,4 @@
1
1
  - if text.present?
2
- .markdown-body= text.try(:html_safe)
2
+ = render(Primer::MarkdownComponent.new(my: 4)) { text.try(:html_safe) }
3
3
  - else
4
- = render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info')
4
+ = render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
@@ -1,13 +1,15 @@
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'
1
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
2
+ = render Primer::BaseComponent.new(tag: :div, flex_shrink: 0, mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 3, nil]) do
3
+ = render Primer::TextComponent.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
4
+ = render Primer::OcticonComponent.new(icon: 'clock', vertical_align: :baseline)
5
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
6
+ = render Primer::TextComponent.new(tag: :div, color: :gray) do
7
+ = render Primer::OcticonComponent.new(icon: 'location')
8
+ = render(Primer::BaseComponent.new(tag: :address, display: :inline)) { presentation.session.room_name }
9
+ = render Primer::BaseComponent.new(tag: :div, flex: :auto) do
10
+ = render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
11
+ = render(Primer::LinkComponent.new(href: frontend_conference_presentation_path(conference, presentation))) { presentation.title }
12
+ = render Primer::TextComponent.new(tag: :div, color: :gray) do
13
+ = render Primer::OcticonComponent.new(icon: presentation.presenters.many? ? 'people' : 'person')
14
+ = render Primer::BaseComponent.new(tag: :address, display: :inline) do
15
+ = presentation.presenters.collect(&:full_name_and_institution).to_sentence
@@ -1,27 +1,26 @@
1
- - cache [@conference.presentations, @presentation_type, @presentation_type.presentations,
2
- @presentation_type.presentations.collect(&:presenters), @tab] do
3
- .d-flex.flex-column.flex-lg-row
4
- .col-12.col-lg-3.pr-lg-4.mb-4.mb-lg-0
1
+ - cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
2
+ = render Primer::FlexComponent.new(direction: [:column, nil, nil, :row], my: 4) do
3
+ = render Primer::FlexItemComponent.new(pr: [nil, nil, nil, 4], mb: [4, nil, nil, 0], col: [12, nil, nil, 3]) do
5
4
  %ul.filter-list
6
5
  - cache [@conference.presentations, @presentation_type] do
7
6
  %li
8
7
  = link_to frontend_conference_url(@conference, tab: 'presentations'),
9
- class: 'filter-item', aria: { current: @presentation_type == @conference ? 'page' : nil } do
8
+ class: 'filter-item', aria: { current: ('page' if @presentation_type.blank?) } do
10
9
  = t('.all_presentation_types')
11
10
  %span.count{ title: t(:'.results') }= @conference.presentations.count
12
11
  = render partial: 'presentation_type', collection: @conference.presentation_types.sorted,
13
12
  cached: -> presentation_type { [presentation_type, @presentation_type] }
14
- .flex-auto.col-12.col-lg-8
15
- - if @presentation_type.presentations.any?
16
- %filter-input.d-flex.flex-sm-justify-start{ aria: { owns: 'presentation_list' } }
13
+ = render Primer::FlexItemComponent.new(col: [12, nil, nil, 9]) do
14
+ - if @presentations.any?
15
+ %filter-input{ aria: { owns: 'presentation_list' } }
17
16
  .subnav.subnav-flush
18
- .subnav-search.m-0.width-full
19
- = search_field_tag 'search', nil, class: %w[form-control subnav-search-input width-full], aria: { label: t(:'.search') }
17
+ .subnav-search.float-left.ml-0
18
+ = search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
20
19
  = octicon 'search', class: 'subnav-search-icon'
21
20
  %div{ id: 'presentation_list' }
22
- - if @presentation_type.presentations.any?
23
- %ul{ class: dom_class(@presentation_type.presentations), data: { filter: { list: true } } }
24
- = render partial: 'presentation', collection: @presentation_type.presentations.sorted, layout: 'list_item',
21
+ - if @presentations.any?
22
+ %ul{ class: dom_class(@presentations), data: { filter: { list: true } } }
23
+ = render partial: 'presentation', collection: @presentations.sorted, layout: 'list_item',
25
24
  locals: { conference: @conference }, cached: -> presentation { [presentation, presentation.presenters] }
26
25
  - else
27
26
  = render Primer::BlankslateComponent.new(title: t(:'.no_presentations'), icon: 'mortar-board')
@@ -1,8 +1,8 @@
1
- %li.d-inline-block.m-2.v-align-middle
1
+ = render Primer::FlexItemComponent.new(m: 2, vertical_align: :middle) do
2
2
  - if sponsor.has_content?(:logo) && sponsor.content(:logo).file.present?
3
3
  = link_to sponsor.content(:website) do
4
4
  = image_tag(main_app.url_for(sponsor.content(:logo).file.variant(resize_to_limit: [200, 60])),
5
5
  srcset: srcset(sponsor.content(:logo).file, variant: { resize_to_limit: [200, 60] }),
6
6
  alt_description: sponsor.content(:name), draggable: false)
7
7
  - else
8
- = link_to sponsor.content(:name), sponsor.content(:website)
8
+ = render(Primer::LinkComponent.new(href: sponsor.content(:website) || '')) { sponsor.content(:name) }
@@ -1,6 +1,6 @@
1
- .Subhead.Subhead--spacious
2
- %h2.Subhead-heading= t :'.title'
1
+ = render Primer::SubheadComponent.new(spacious: true) do |component|
2
+ = component.heading(tag: :h2) { t :'.title' }
3
3
 
4
- %ul.ml-n2.mr-n2.mb-n2.mt-n2{ class: dom_class(sponsors), id: dom_id(sponsors) }
4
+ = render Primer::FlexComponent.new(flex_wrap: true, classes: dom_class(sponsors), ml: -2, mr: -2, mt: -2, mb: -2) do
5
5
  = render partial: 'sponsor', collection: sponsors.structure_items.sorted_by_structure,
6
6
  cached: -> sponsor { [sponsor, sponsor.structure_parts.collect(&:structure_partable)] }
@@ -0,0 +1,14 @@
1
+ - cache partable_for(:submission_url, :submission_date, :submission_text, parent: @conference) do
2
+ = render Primer::FlashComponent.new(variant: :warning, full: true, icon: 'clock', classes: dom_class(@conference)) do |component|
3
+ - cache partable_for(:submission_date, parent: @conference) do
4
+ = render Primer::TextComponent.new(tag: :div, display: :inline) do
5
+ = t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
6
+ - cache partable_for(:submission_text, parent: @conference) do
7
+ - if @conference.content(:submission_text).present?
8
+ = render(Primer::TextComponent.new(tag: :div, color: :gray, display: :inline)) { @conference.content(:submission_text).html_safe }
9
+ - cache partable_for(:submission_url, parent: @conference) do
10
+ - if @conference.content(:submission_url).present?
11
+ - component.action do
12
+ = render Primer::ButtonComponent.new(tag: :a, href: @conference.content(:submission_url), button_type: :primary,
13
+ variant: :small) do
14
+ = t :'.submit_abstract'
@@ -1,15 +1,17 @@
1
- .d-flex.flex-column-reverse.flex-sm-row
2
- %filter-input.col-12.col-sm-8.mb-4.mb-sm-0.d-flex.flex-sm-justify-start{ aria: { owns: 'conference_list' } }
3
- - if @conferences.any?
4
- .subnav.subnav-flush
5
- .subnav-search.m-0.width-full
6
- = search_field_tag 'search', nil, class: %w[form-control subnav-search-input width-full], aria: { label: t(:'.search') }
7
- = octicon 'search', class: 'subnav-search-icon'
8
- .col-12.col-sm-4.mb-4.mb-sm-0.d-flex.flex-sm-justify-end
1
+ = render Primer::FlexComponent.new(direction: [:column_reverse, nil, :row, nil]) do
2
+ = render Primer::FlexItemComponent.new(flex_auto: true, mb: [4, nil, 0, nil]) do
3
+ %filter-input{ aria: { owns: 'conference_list' } }
4
+ - if @conferences.any?
5
+ .subnav.subnav-flush
6
+ .subnav-search.float-left.ml-0
7
+ = search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
8
+ = render Primer::OcticonComponent.new(icon: 'search', classes: 'subnav-search-icon')
9
+ = render Primer::FlexItemComponent.new(mb: [4, nil, 0, nil]) do
9
10
  = render Primer::ButtonComponent.new(tag: :a, href: frontend_conferences_url(protocol: :webcal, format: :ics), button_type: :primary,
10
- ml: [0, 6, nil, nil]) do
11
+ ml: [0, nil, 6, nil]) do
11
12
  = render Primer::OcticonComponent.new(icon: 'calendar')
12
13
  = t(:'.subscribe')
14
+
13
15
  %div{ id: 'conference_list' }
14
16
  - if @conferences.any?
15
17
  %ul{ class: dom_class(@conferences), data: { filter: { list: true } } }
@@ -1,68 +1,38 @@
1
1
  - if @conference.has_content?(:submission_date) && @conference.content(:submission_date) >= Date.today
2
- - content_for :flash do
3
- - cache partable_for(:submission_url, :submission_date, :submission_text, parent: @conference) do
4
- = render Primer::FlashComponent.new(variant: :warning, full: true, classes: dom_class(@conference)) do
5
- - cache partable_for(:submission_url, parent: @conference) do
6
- - if @conference.content(:submission_url).present?
7
- = link_to t(:'.submit_abstract'), @conference.content(:submission_url),
8
- class: %i[btn btn-primary flash-action]
9
- - cache partable_for(:submission_date, parent: @conference) do
10
- %p
11
- = octicon('clock')
12
- = t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
13
- - cache partable_for(:submission_text, parent: @conference) do
14
- - if @conference.content(:submission_text).present?
15
- %p= @conference.content(:submission_text).html_safe
2
+ - content_for(:flash) { render 'submission_flash' }
16
3
 
17
- - content_for :header do
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
- .container-lg.p-responsive.mb-4{ class: dom_class(@conference), id: dom_id(@conference) }
22
- %h1.mb-1.mb-md-2= @conference.name
23
- %ul.text-gray-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
24
- %li.mr-sm-3.mb-1
25
- = octicon 'calendar'
26
- = t :'.dates_html', start_date: time_tag(@conference.start_date, format: :date), finish_date: time_tag(@conference.finish_date)
27
- - if @conference.institutions.any?
28
- - cache @conference.institutions do
29
- %li.mb-1
30
- = octicon 'location'
31
- %address.d-inline= t :'.locations', institutions: @conference.institutions.pluck(:name).to_sentence,
32
- cities: @conference.institutions.pluck(:city).uniq.to_sentence
33
- - if @conference.institutions.any?
34
- %ul.list-style-none.d-flex.flex-wrap.mt-4{ class: dom_class(@conference.institutions) }
35
- = render partial: 'institution', collection: @conference.institutions,
36
- cached: -> institution { [institution, institution.logo] }
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
39
- - if @conference.has_content?(:sponsors) && @conference.content(:sponsors).structure_items.any?
40
- = render partial: 'sponsors', object: @conference.content(:sponsors)
41
- - cache [partable_for(:gallery, parent: @conference), @conference.content(:gallery)&.images] do
42
- - if @conference.has_content? :gallery
43
- .mb-4= render partial: 'image_collection', object: @conference.content(:gallery), locals: { controls: true }
4
+ - content_for(:header) { render 'header' }
44
5
 
45
- %tab-container
46
- %nav.UnderlineNav
47
- .container-lg.p-responsive.d-flex.flex-justify-between.flex-auto
48
- .UnderlineNav-body{ role: 'tablist' }
49
- = button_tag t(:'.tabs.information'), aria: { selected: (@tab == 'information').to_s }, class: 'UnderlineNav-item', role: 'tab',
50
- type: 'button'
51
- = button_tag t(:'.tabs.presentations'), aria: { selected: (@tab == 'presentations').to_s }, class: 'UnderlineNav-item',
52
- role: 'tab', type: 'button'
53
- = button_tag t(:'.tabs.events'), aria: { selected: (@tab == 'events').to_s }, class: 'UnderlineNav-item', role: 'tab',
54
- type: 'button'
55
- .UnderlineNav-actions
56
- = render Primer::ButtonComponent.new(tag: :a, href: frontend_conference_url(@conference, protocol: :webcal, format: :ics),
57
- button_type: :primary, variant: :small) do
58
- = render Primer::OcticonComponent.new(icon: 'calendar')
59
- = t(:'.subscribe')
60
- .container-lg.p-responsive
6
+ = turbo_frame_tag 'conference_tabs' do
7
+ = render Primer::UnderlineNavComponent.new do |component|
8
+ - component.body(role: 'tablist') do
9
+ = render Primer::LinkComponent.new(href: frontend_conference_url(@conference, tab: 'information',
10
+ presentation_type: @presentation_type&.id),
11
+ aria: { selected: (@tab == 'information').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
12
+ = t(:'.tabs.information')
13
+ = render Primer::LinkComponent.new(href: frontend_conference_url(@conference, tab: 'presentations',
14
+ presentation_type: @presentation_type&.id),
15
+ aria: { selected: (@tab == 'presentations').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
16
+ = t(:'.tabs.presentations')
17
+ = render Primer::LinkComponent.new(href: frontend_conference_url(@conference, tab: 'events',
18
+ presentation_type: @presentation_type&.id),
19
+ aria: { selected: (@tab == 'events').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
20
+ = t(:'.tabs.events')
21
+ - component.actions do
22
+ = render Primer::ButtonComponent.new(tag: :a, href: frontend_conference_url(@conference, protocol: :webcal, format: :ics),
23
+ button_type: :primary, variant: :small) do
24
+ = render Primer::OcticonComponent.new(icon: 'calendar')
25
+ = t(:'.subscribe')
26
+ - case @tab
27
+ - when 'information'
61
28
  - cache [partable_for(:text, parent: @conference), @tab] do
62
- = render partial: 'information', layout: 'tab',
63
- locals: { text: (@conference.content(:text) if @conference.has_content? :text), hidden: @tab != 'information' }
64
- - cache [@conference.presentations, @presentation_type, @presentation_type.presentations,
65
- @presentation_type.presentations.collect(&:presenters), @tab] do
66
- = render partial: 'presentations', layout: 'tab', locals: { hidden: @tab != 'presentations' }
29
+ = render partial: 'information', locals: { text: (@conference.content(:text) if @conference.has_content? :text) }
30
+ - when 'presentations'
31
+ - cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
32
+ = render partial: 'presentations'
33
+ - when 'events'
67
34
  - cache [@conference.events, @tab] do
68
- = render partial: 'events', layout: 'tab', locals: { events: @conference.events, hidden: @tab != 'events' }
35
+ = render partial: 'events', locals: { events: @conference.events }
36
+ - else
37
+ = render Primer::BlankslateComponent.new(title: t('.no_tab'), description: t('.tab_does_not_exist', tab: @tab), icon: 'x-circle',
38
+ my: 4)
@@ -1 +1 @@
1
- .markdown-body.my-4= abstract.html_safe
1
+ = render(Primer::MarkdownComponent.new(my: 4)) { abstract.html_safe }
@@ -1,6 +1,5 @@
1
1
  - cache [attachment, attachment.attachment] do
2
2
  - unless attachment.attachment.blank?
3
- = render Primer::ButtonComponent.new(tag: :a, group_item: true,
4
- href: main_app.rails_blob_path(attachment.attachment.file, disposition: :attachment)) do
3
+ = component.button(tag: :a, href: main_app.rails_blob_path(attachment.attachment.file, disposition: :attachment)) do
5
4
  = render Primer::OcticonComponent.new(icon: 'download')
6
5
  = attachment.name
@@ -1,4 +1,5 @@
1
1
  - cache [attachments, attachments.collect(&:attachment)] do
2
2
  - if attachments.any?
3
- .BtnGroup.mt-1
4
- = render partial: 'attachment', collection: attachments, cached: -> attachment { [attachment, attachment.attachment] }
3
+ = render Primer::ButtonGroupComponent.new(mt: 1) do |component|
4
+ = render partial: 'attachment', collection: attachments, cached: -> attachment { [attachment, attachment.attachment] },
5
+ locals: { component: component }
@@ -1,16 +1,18 @@
1
1
  - cache [@presentation, @presentation.presenters, @presentation.attachments.collect(&:attachment)] do
2
2
  - cache [@presentation, @presentation.presenters] do
3
- %h1.mb-1.mb-md-2= @presentation.title
3
+ = render(Primer::HeadingComponent.new(mb: [1, nil, 2, nil])) { @presentation.title }
4
4
  %ul.text-gray-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
5
5
  %li.mr-sm-3.mb-1
6
- = octicon @presentation.presenters.many? ? 'people' : 'person'
7
- %address.d-inline= @presentation.presenters.collect(&:full_name_and_institution).to_sentence
6
+ = render Primer::OcticonComponent.new(icon: @presentation.presenters.many? ? 'people' : 'person')
7
+ = render Primer::TextComponent.new(tag: :address, display: :inline) do
8
+ = @presentation.presenters.collect(&:full_name_and_institution).to_sentence
8
9
  %li.mr-sm-3.mb-1
9
- = octicon 'clock'
10
+ = render Primer::OcticonComponent.new(icon: 'clock')
10
11
  = time_tag @presentation.start_datetime, format: :short
11
12
  %li.mb-1
12
- = octicon 'location'
13
- %address.d-inline= t :'.room_and_institution', room: @presentation.session.room_name, institution: @presentation.room.institution.name
13
+ = render Primer::OcticonComponent.new(icon: 'location')
14
+ = render Primer::TextComponent.new(tag: :address, display: :inline) do
15
+ = t :'.room_and_institution', room: @presentation.session.room_name, institution: @presentation.room.institution.name
14
16
 
15
17
  = render partial: 'attachments', object: @presentation.attachments
16
18
  = render partial: 'abstract', object: @presentation.abstract
@@ -1,34 +1,36 @@
1
1
  - cache [committee_bio, committee_bio.structure_parts.collect(&:structure_partable)] do
2
- .d-flex.flex-column.flex-md-row.flex-items-start
2
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
3
3
  - cache partable_for(:profile_picture, parent: committee_bio) do
4
4
  - if committee_bio.has_content?(:profile_picture) && committee_bio.content(:profile_picture).persisted? && committee_bio.content(:profile_picture).file.present?
5
- .flex-shrink-0
6
- = render Primer::AvatarComponent.new(src: main_app.url_for(committee_bio.content(:profile_picture).file.variant(resize_to_fill: [150, 150])),
7
- srcset: srcset_string(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
5
+ = render Primer::AvatarComponent.new(src: main_app.url_for(committee_bio.content(:profile_picture).file.variant(resize_to_fill: [150, 150])),
6
+ srcset: srcset_string(committee_bio.content(:profile_picture).file,
7
+ variant: { resize_to_limit: [150, 150] }),
8
+ draggable: false, alt: committee_bio.content(:name), size: 150, mr: [nil, nil, 3, nil],
9
+ mb: [3, nil, 0, nil], flex_shrink: 0)
10
+ = render Primer::FlexItemComponent.new(flex_auto: true) do
11
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], mb: 1) do
13
12
  - cache partable_for(:name, :role, :institution, parent: committee_bio) do
14
- .flex-column
15
- - if committee_bio.has_content?(:name) && committee_bio.has_content?(:role)
16
- %h3.flex-auto= t :'.name_and_role', name: committee_bio.content(:name), role: committee_bio.content(:role)
17
- - elsif committee_bio.has_content?(:name)
18
- %h3.flex-auto= committee_bio.content(:name)
13
+ = render Primer::BoxComponent.new do
14
+ - if committee_bio.has_content?(:name)
15
+ = render(Primer::HeadingComponent.new(tag: :h3)) do
16
+ - if committee_bio.has_content?(:role)
17
+ = t :'.name_and_role', name: committee_bio.content(:name), role: committee_bio.content(:role)
18
+ - else
19
+ = committee_bio.content(:name)
19
20
  - if committee_bio.has_content?(:institution)
20
- %h4.flex-auto= committee_bio.content(:institution)
21
- .BtnGroup.mt-1.mt-md-0.ml-md-1{ aria: { label: t(:'.contact_buttons') } }
21
+ = render(Primer::HeadingComponent.new(tag: :h4)) { committee_bio.content(:institution) }
22
+ = render Primer::ButtonGroupComponent.new(mt: [1, nil, 0, nil], ml: [nil, nil, 1, nil],
23
+ aria: { label: t(:'.contact_buttons') }) do |component|
22
24
  - cache partable_for(:twitter_profile, parent: committee_bio) do
23
25
  - if committee_bio.has_content?(:twitter_profile)
24
- = render Primer::ButtonComponent.new(tag: :a, href: committee_bio.content(:twitter_profile), group_item: true) do
26
+ = component.button(tag: :a, href: committee_bio.content(:twitter_profile)) do
25
27
  = render Primer::OcticonComponent.new(icon: 'link-external')
26
28
  = t(:'.twitter')
27
29
  - cache partable_for(:facebook_profile, parent: committee_bio) do
28
30
  - if committee_bio.has_content?(:facebook_profile)
29
- = render Primer::ButtonComponent.new(tag: :a, href: committee_bio.content(:facebook_profile), group_item: true) do
31
+ = component.button(tag: :a, href: committee_bio.content(:facebook_profile)) do
30
32
  = render Primer::OcticonComponent.new(icon: 'link-external')
31
33
  = t(:'.facebook')
32
34
  - cache partable_for(:bio, parent: committee_bio) do
33
35
  - if committee_bio.has_content?(:bio)
34
- .text-gray-light= committee_bio.content(:bio).try(:html_safe)
36
+ = render(Primer::TextComponent.new(tag: :div, color: :gray_light)) { committee_bio.content(:bio).try(:html_safe) }
@@ -1,11 +1,12 @@
1
1
  = render Primer::SubheadComponent.new do |component|
2
- = component.slot(:heading) { t :'.title' }
2
+ = component.heading { t :'.title' }
3
3
 
4
4
  - if constitution.present?
5
- .py-1.d-flex.flex-items-center
6
- .flex-auto.pr-1= t :'.uploaded', date: l(constitution.created_at.to_date, format: :long)
5
+ = render Primer::FlexComponent.new(align_items: :center, py: 1) do
6
+ = render Primer::FlexItemComponent.new(flex_auto: true, pr: 1) do
7
+ = t :'.uploaded', date: l(constitution.created_at.to_date, format: :long)
7
8
  = render Primer::ButtonComponent.new(tag: :a, href: main_app.rails_blob_path(constitution, disposition: :attachment), ml: 2) do
8
9
  = render Primer::OcticonComponent.new(icon: 'desktop-download')
9
- = t(:'.download')
10
+ = t :'.download'
10
11
  - else
11
12
  = render Primer::BlankslateComponent.new(title: t(:'.no_constitution'), icon: 'law')
@@ -1,4 +1,4 @@
1
1
  = render Primer::SubheadComponent.new do |component|
2
- = component.slot(:heading) { t :'.title' }
2
+ = component.heading { t :'.title' }
3
3
 
4
4
  = render partial: 'text', object: contact
@@ -1,10 +1,8 @@
1
1
  - cache [document, document.structure_parts.collect(&:structure_partable)] do
2
2
  %li.list-style-none.py-1.d-flex.flex-items-center
3
3
  - cache partable_for(:name, parent: document) do
4
- - if(document.has_content?(:name))
5
- %h3.flex-auto= document.content(:name)
6
- - else
7
- %h3.flex-auto= t :'.no_name'
4
+ = render Primer::TextComponent.new(tag: :div, flex: :auto) do
5
+ = document.has_content?(:name) ? document.content(:name) : :'.no_name'
8
6
  - cache partable_for(:attachment, parent: document) do
9
7
  - if document.has_content?(:attachment) && document.content(:attachment).persisted?
10
8
  = render Primer::ButtonComponent.new(tag: :a, ml: 2,
@@ -12,4 +10,4 @@
12
10
  = render Primer::OcticonComponent.new(icon: 'desktop-download')
13
11
  = t(:'.download')
14
12
  - else
15
- .text-small.text-gray= t :'.no_file'
13
+ = render(Primer::TextComponent.new(tag: :div, font_size: 6, color: :gray)) { t :'.no_file' }
@@ -1,6 +1,6 @@
1
1
  - if documents.present? && documents.structure_items.any?
2
2
  = render Primer::SubheadComponent.new do |component|
3
- = component.slot(:heading) { t :'.title' }
3
+ = component.heading { t :'.title' }
4
4
 
5
5
  %ul{ class: dom_class(documents), id: dom_id(documents) }
6
6
  = render partial: 'document', collection: documents.structure_items.sorted_by_structure,
@@ -1,17 +1,18 @@
1
1
  - cache [event, event.structure_parts.collect(&:structure_partable)] do
2
- .d-flex.flex-column.flex-items-start
2
+ = render Primer::FlexComponent.new(direction: :column, align_items: :start) do
3
3
  - cache partable_for(:name, parent: event) do
4
4
  - if event.has_content?(:name)
5
- %h3.flex-auto= event.content(:name)
5
+ = render(Primer::HeadingComponent.new(tag: :h3, flex: :auto)) { event.content(:name) }
6
6
  - cache partable_for(:location, :start_time, parent: event) do
7
- %h4.flex-auto= t(:'.time_and_place', time: event.has_content?(:start_time) ? time_tag(event.content(:start_time), format: :ordinal_datetime_with_year) : t('.time_tbc'),
8
- place: event.has_content?(:location) ? event.content(:location) : t('.location_tbc')).try(:html_safe)
7
+ = render Primer::HeadingComponent.new(tag: :h4, flex: :auto) do
8
+ = t(:'.time_and_place_html',
9
+ time: event.has_content?(:start_time) ? time_tag(event.content(:start_time), format: :ordinal_datetime_with_year) : t('.time_tbc'),
10
+ place: event.has_content?(:location) ? event.content(:location) : t('.location_tbc'))
9
11
  - cache partable_for(:description, parent: event) do
10
12
  - if event.has_content?(:description)
11
- .mt-1.text-gray-light= event.content(:description).try(:html_safe)
13
+ = render(Primer::TextComponent.new(mt: 1, color: :gray_light)) { event.content(:description).try(:html_safe) }
12
14
  - cache partable_for(:url, parent: event) do
13
15
  - if event.has_content?(:url)
14
- .mt-2
15
- = render Primer::ButtonComponent.new(tag: :a, href: event.content(:url)) do
16
- = render Primer::OcticonComponent.new(icon: 'link-external')
17
- = t :'.more_info'
16
+ = render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
17
+ = render Primer::OcticonComponent.new(icon: 'link-external')
18
+ = t :'.more_info'
@@ -1,6 +1,6 @@
1
1
  %div{ class: dom_class(events_list), id: dom_id(events_list) }
2
2
  = render Primer::SubheadComponent.new(mt: 4) do |component|
3
- = component.slot(:heading) { t :'.upcoming' }
3
+ = component.heading { t :'.upcoming' }
4
4
  - events_list.structure_items.sorted_by_structure.filter { |item| item.has_content?(:start_time) && item.content(:start_time) >= Time.now }.then do |events|
5
5
  - if events.any?
6
6
  %ul
@@ -9,7 +9,7 @@
9
9
  - else
10
10
  = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
11
11
  = render Primer::SubheadComponent.new(mt: 4) do |component|
12
- = component.slot(:heading) { t :'.past' }
12
+ = component.heading { t :'.past' }
13
13
  - events_list.structure_items.sorted_by_structure.filter { |item| item.has_content?(:start_time) && item.content(:start_time) < Time.now }.then do |events|
14
14
  - if events.any?
15
15
  %ul
@@ -1,15 +1,14 @@
1
- .py-3.py-lg-6
1
+ = render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
2
+ .text-shadow-dark
3
+ - if latest_conference.present? && latest_conference.finish_date >= Date.today
4
+ = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { conference.name }
5
+ = render(Primer::TextComponent.new(tag: :address, classes: 'f2-light')) { conference.institutions.collect(&:name).to_sentence }
6
+ = render(Primer::TextComponent.new(tag: :time, classes: 'f2-light')) do
7
+ = t :'.dates_html', start_date: time_tag(conference.start_date, format: :day_and_month),
8
+ finish_date: time_tag(conference.finish_date, format: :day_and_month)
9
+ - else
10
+ = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { Spina::Account.first.name }
2
11
  - if latest_conference.present? && latest_conference.finish_date >= Date.today
3
- .text-shadow-dark
4
- %h1.h000-mktg.lh-condensed-ultra= conference.name
5
- %address.f2-light= conference.institutions.collect(&:name).to_sentence
6
- %time.f2-light= t(:'.dates_html', start_date: time_tag(conference.start_date, format: :day_and_month),
7
- finish_date: time_tag(conference.finish_date, format: :day_and_month))
8
- .markdown-body.my-4= content(:text).try(:html_safe)
9
- .d-block.mt-4
10
- = link_to t('.more_info'), frontend_conference_path(conference), class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3]
11
- - else
12
- .text-shadow-dark
13
- %h1.h000-mktg.lh-condensed-ultra= Spina::Account.first.name
14
- .markdown-body.my-4= content(:text).try(:html_safe)
15
-
12
+ = link_to t('.more_info'), frontend_conference_path(conference), class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
13
+ .text-shadow-dark
14
+ = render(Primer::MarkdownComponent.new(my: 4)) { content(:text).try(:html_safe) }
@@ -1,2 +1,2 @@
1
- .bg-blue
1
+ = render Primer::BoxComponent.new(bg: :blue) do
2
2
  .container-lg.p-responsive.text-white= yield
@@ -1,5 +1,5 @@
1
1
  = render Primer::SubheadComponent.new do |component|
2
- = component.slot(:heading) { t :'.title' }
2
+ = component.heading { t :'.title' }
3
3
 
4
4
  - if minutes.present? && minutes.structure_items.any?
5
5
  %ul{ class: dom_class(minutes), id: dom_id(minutes) }
@@ -1,12 +1,14 @@
1
1
  - cache [minutes_entry, minutes_entry.structure_parts.collect(&:structure_partable)] do
2
2
  %li.list-style-none.py-1.d-flex.flex-items-center{ id: dom_id(local_assigns[:minutes_entry]) }
3
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')
4
+ = render Primer::FlexItemComponent.new(flex_auto: true) do
5
+ = minutes_entry.has_content?(:date) ? t(:'.minutes_html', date: time_tag(minutes_entry.content(:date))) : t(:'.no_date')
5
6
  - cache partable_for(:attachment, parent: minutes_entry) do
6
7
  - if minutes_entry.has_content?(:attachment) && minutes_entry.content(:attachment).persisted?
7
8
  = render Primer::ButtonComponent.new(tag: :a, ml: 2,
8
- href: main_app.rails_blob_path(minutes_entry.content(:attachment), disposition: :attachment)) do
9
+ href: main_app.rails_blob_path(minutes_entry.content(:attachment),
10
+ disposition: :attachment)) do
9
11
  = render Primer::OcticonComponent.new(icon: 'desktop-download')
10
12
  = t(:'.download')
11
13
  - else
12
- .text-small.text-gray= t :'.no_file'
14
+ = render(Primer::TextComponent.new(color: :gray, font_size: 6)) { t :'.no_file' }
@@ -1,5 +1,5 @@
1
1
  = render Primer::SubheadComponent.new do |component|
2
- = component.slot(:heading) { t :'.title' }
2
+ = component.heading { t :'.title' }
3
3
 
4
4
  - if partner_societies.structure_items.any?
5
5
  %ul{ class: dom_class(partner_societies), id: dom_id(partner_societies) }
@@ -1,24 +1,26 @@
1
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')
2
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil], align_items: :start) do
3
+ = render Primer::BaseComponent.new(tag: :div, flex: :auto) do
4
+ = render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
5
+ = render Primer::FlexComponent.new(flex_wrap: true, justify_content: :space_between) do
6
+ - cache partable_for(:name, parent: partner_society) do
7
+ - if partner_society.has_content? :name
8
+ = render(Primer::TextComponent.new(tag: :div)) { partner_society.content(:name) }
9
+ = render Primer::ButtonGroupComponent.new(aria: { label: t(:'.contact_buttons') }) do |component|
10
+ - cache partable_for(:website, parent: partner_society) do
11
+ - if partner_society.has_content? :website
12
+ = component.button(tag: :a, href: partner_society.content(:website)) do
13
+ = render Primer::OcticonComponent.new(icon: 'browser')
14
+ = t(:'.website')
15
+ - cache partable_for(:email_address, parent: partner_society) do
16
+ - if partner_society.has_content? :email_address
17
+ = component.button(tag: :a, href: "mailto:#{partner_society.content(:email_address)}") do
18
+ = render Primer::OcticonComponent.new(icon: 'mail')
19
+ = t(:'.email')
19
20
  - cache partable_for(:description, parent: partner_society) do
20
21
  - if partner_society.has_content? :description
21
- .text-gray= render partial: 'text', object: partner_society.content(:description)
22
+ = render Primer::MarkdownComponent.new(color: :gray) do
23
+ = partner_society.content(:description).try(:html_safe)
22
24
  - cache partable_for(:logo, parent: partner_society) do
23
25
  - if partner_society.has_content?(:logo) && partner_society.content(:logo).persisted? && partner_society.content(:logo).file.present?
24
26
  = image_tag(main_app.url_for(partner_society.content(:logo).file.variant(resize_to_limit: [200, 150])),
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.config.primer_view_components.force_functional_colors = false
@@ -43,15 +43,12 @@ en:
43
43
  application:
44
44
  cookies:
45
45
  title: About cookies
46
- purpose: We use cookies for security, functionality, and analytics purposes.
47
- no_advertising: We do not use Google Analytics Advertising features.
48
- used:
49
- rails_html: We use the %{cookie} cookie to track sessions.
50
- google_analytics_html: Google Analytics sets the %{cookies} cookies for analytics purposes.
51
46
  footer:
52
47
  copyright: © %{name} %{year}
53
48
  find_on_github: Find us on GitHub
49
+ footer_content:
54
50
  cookies: About cookies
51
+ loading: Loading…
55
52
  image_collection:
56
53
  previous: Previous
57
54
  next: Next
@@ -84,6 +81,7 @@ en:
84
81
  no_date: No date specified.
85
82
  documents:
86
83
  title: Documents
84
+ document:
87
85
  download: Download
88
86
  no_file: No file uploaded.
89
87
  no_name: No name.
@@ -101,7 +99,7 @@ en:
101
99
  past: Past events
102
100
  no_events: No events.
103
101
  event:
104
- time_and_place: "%{place}, %{time}"
102
+ time_and_place_html: "%{place}, %{time}"
105
103
  time_tbc: Time TBC
106
104
  location_tbc: Location TBC
107
105
  more_info: More information
@@ -115,18 +113,16 @@ en:
115
113
  search: Search
116
114
  no_matching_conferences: No matching conferences.
117
115
  show:
118
- dates_html: "%{start_date}–%{finish_date}"
119
- submit_by_html: Submit abstracts by %{date}
120
- submit_abstract: Submit an abstract
121
116
  information: Information
122
117
  presentations: Presentations
123
118
  events: Events
124
119
  subscribe: Subscribe
125
- locations: "%{institutions}, %{cities}"
126
120
  tabs:
127
121
  information: Information
128
122
  presentations: Presentations
129
123
  events: Events
124
+ no_tab: No tab.
125
+ tab_does_not_exist: "The tab '%{tab}' does not exist."
130
126
  presentations:
131
127
  all_presentation_types: All
132
128
  results: Results
@@ -148,6 +144,12 @@ en:
148
144
  conference:
149
145
  dates_html: "%{start_date}–%{finish_date}"
150
146
  locations: "%{institutions}, %{cities}"
147
+ submission_flash:
148
+ submit_by_html: Submit abstracts by %{date}
149
+ submit_abstract: Submit an abstract
150
+ header:
151
+ dates_html: "%{start_date}–%{finish_date}"
152
+ locations: "%{institutions}, %{cities}"
151
153
  presentations:
152
154
  show:
153
155
  room_and_institution: "%{room}, %{institution}"
@@ -4,9 +4,10 @@ require 'spina'
4
4
  require 'spina/conferences/primer_theme/engine'
5
5
  require 'spina/conferences/primer_theme/breadcrumbs/builder'
6
6
  require 'spina/admin/conferences'
7
+ require 'octicons_helper'
8
+ require 'view_component'
7
9
  require 'primer/view_components'
8
10
  require 'icalendar'
9
- require 'octicons_helper'
10
11
 
11
12
  module Spina
12
13
  module Conferences
@@ -22,9 +22,9 @@ module Spina
22
22
  def render_element(component, element)
23
23
  url = compute_path(element)
24
24
  if @context.current_page? url
25
- component.slot(:item, selected: true, **element.options) { compute_name(element) }
25
+ component.item(selected: true, **element.options) { compute_name(element) }
26
26
  else
27
- component.slot(:item, href: compute_path(element), **element.options) { compute_name(element) }
27
+ component.item(href: compute_path(element), **element.options) { compute_name(element) }
28
28
  end
29
29
  end
30
30
  end
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.1.14'
6
+ VERSION = '0.1.15'
7
7
  end
8
8
  end
9
9
  end
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.14
4
+ version: 0.1.15
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: 2021-02-19 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.0.19
61
+ version: 0.0.30
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.0.19
68
+ version: 0.0.30
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -315,6 +315,7 @@ files:
315
315
  - app/views/spina/application/_cookies.html.haml
316
316
  - app/views/spina/application/_current_conference_alert.html.haml
317
317
  - app/views/spina/application/_footer.html.haml
318
+ - app/views/spina/application/_footer_content.html.haml
318
319
  - app/views/spina/application/_image_collection.html.haml
319
320
  - app/views/spina/application/_list_item.html.haml
320
321
  - app/views/spina/application/_logo.html.haml
@@ -327,6 +328,7 @@ files:
327
328
  - app/views/spina/conferences/primer_theme/conferences/_event.html.haml
328
329
  - app/views/spina/conferences/primer_theme/conferences/_event.ics.erb
329
330
  - app/views/spina/conferences/primer_theme/conferences/_events.html.haml
331
+ - app/views/spina/conferences/primer_theme/conferences/_header.html.haml
330
332
  - app/views/spina/conferences/primer_theme/conferences/_information.html.haml
331
333
  - app/views/spina/conferences/primer_theme/conferences/_institution.html.haml
332
334
  - app/views/spina/conferences/primer_theme/conferences/_institution_logo.html.haml
@@ -336,7 +338,7 @@ files:
336
338
  - app/views/spina/conferences/primer_theme/conferences/_presentations.html.haml
337
339
  - app/views/spina/conferences/primer_theme/conferences/_sponsor.html.haml
338
340
  - app/views/spina/conferences/primer_theme/conferences/_sponsors.html.haml
339
- - app/views/spina/conferences/primer_theme/conferences/_tab.html.haml
341
+ - app/views/spina/conferences/primer_theme/conferences/_submission_flash.html.haml
340
342
  - app/views/spina/conferences/primer_theme/conferences/index.html.haml
341
343
  - app/views/spina/conferences/primer_theme/conferences/index.ics.erb
342
344
  - app/views/spina/conferences/primer_theme/conferences/show.html.haml
@@ -360,6 +362,7 @@ files:
360
362
  - app/views/spina/pages/_partner_societies.html.haml
361
363
  - app/views/spina/pages/_partner_society.html.haml
362
364
  - config/initializers/assets.rb
365
+ - config/initializers/primer.rb
363
366
  - config/initializers/themes/conferences_primer_theme.rb
364
367
  - config/locales/en.rb
365
368
  - config/locales/en.yml
@@ -1 +0,0 @@
1
- .my-4{ role: 'tabpanel', hidden: hidden }= yield