spina-conferences-primer_theme 0.1.15 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/spina_conferences_primer_theme_manifest.js +0 -1
  3. data/app/assets/stylesheets/spina/conferences/primer_theme/_custom_variables.sass +0 -0
  4. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +12 -8
  5. data/app/controllers/spina/conferences/primer_theme/conferences_controller.rb +6 -1
  6. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +3 -14
  7. data/app/views/conferences_primer_theme/pages/about.html.haml +89 -19
  8. data/app/views/conferences_primer_theme/pages/committee.html.haml +41 -9
  9. data/app/views/conferences_primer_theme/pages/events.html.haml +57 -10
  10. data/app/views/conferences_primer_theme/pages/homepage.html.haml +30 -4
  11. data/app/views/conferences_primer_theme/pages/information.html.haml +4 -5
  12. data/app/views/conferences_primer_theme/pages/show.html.haml +1 -1
  13. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -6
  14. data/app/views/spina/application/_cookies.html.haml +1 -1
  15. data/app/views/spina/application/_current_conference_alert.html.haml +1 -1
  16. data/app/views/spina/application/_footer.html.haml +2 -2
  17. data/app/views/spina/application/_footer_content.html.haml +3 -3
  18. data/app/views/spina/application/_list_item.html.haml +1 -1
  19. data/app/views/spina/application/_logo.html.haml +1 -1
  20. data/app/views/spina/application/_mobile_navigation_item.html.haml +12 -11
  21. data/app/views/spina/application/_mobile_navigation_items.html.haml +3 -0
  22. data/app/views/spina/application/_navigation.html.haml +8 -9
  23. data/app/views/spina/application/_navigation_item.html.haml +9 -10
  24. data/app/views/spina/conferences/primer_theme/conferences/_conference.html.haml +4 -4
  25. data/app/views/spina/conferences/primer_theme/conferences/_event.html.haml +4 -4
  26. data/app/views/spina/conferences/primer_theme/conferences/_events.html.haml +1 -1
  27. data/app/views/spina/conferences/primer_theme/conferences/_header.html.haml +34 -15
  28. data/app/views/spina/conferences/primer_theme/conferences/_presentation.html.haml +6 -6
  29. data/app/views/spina/conferences/primer_theme/conferences/_presentations.html.haml +3 -2
  30. data/app/views/spina/conferences/primer_theme/conferences/_submission_flash.html.haml +10 -14
  31. data/app/views/spina/conferences/primer_theme/conferences/index.html.haml +3 -4
  32. data/app/views/spina/conferences/primer_theme/conferences/show.html.haml +17 -18
  33. data/app/views/spina/conferences/primer_theme/kaminari/_gap.html.haml +2 -0
  34. data/app/views/spina/conferences/primer_theme/kaminari/_next_page.html.haml +9 -0
  35. data/app/views/spina/conferences/primer_theme/kaminari/_page.html.haml +10 -0
  36. data/app/views/spina/conferences/primer_theme/kaminari/_paginator.html.haml +17 -0
  37. data/app/views/spina/conferences/primer_theme/kaminari/_prev_page.html.haml +9 -0
  38. data/app/views/spina/conferences/primer_theme/presentations/_attachment.html.haml +1 -1
  39. data/app/views/spina/conferences/primer_theme/presentations/show.html.haml +4 -4
  40. data/config/initializers/primer.rb +1 -1
  41. data/config/initializers/themes/conferences_primer_theme.rb +95 -178
  42. data/config/locales/en.yml +62 -56
  43. data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +17 -0
  44. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  45. metadata +15 -30
  46. data/app/assets/stylesheets/spina/conferences/primer_theme/_admin.sass +0 -4
  47. data/app/assets/stylesheets/spina/conferences/primer_theme/_github.sass +0 -2
  48. data/app/assets/stylesheets/spina/conferences/primer_theme/_primer.sass +0 -4
  49. data/app/assets/stylesheets/spina/conferences/primer_theme/_turbolinks.sass +0 -3
  50. data/app/views/spina/application/_image_collection.html.haml +0 -19
  51. data/app/views/spina/conferences/primer_theme/conferences/_information.html.haml +0 -4
  52. data/app/views/spina/conferences/primer_theme/conferences/_sponsor.html.haml +0 -8
  53. data/app/views/spina/conferences/primer_theme/conferences/_sponsors.html.haml +0 -6
  54. data/app/views/spina/pages/_committee_bio.html.haml +0 -36
  55. data/app/views/spina/pages/_committee_bios.html.haml +0 -7
  56. data/app/views/spina/pages/_constitution.html.haml +0 -12
  57. data/app/views/spina/pages/_contact.html.haml +0 -4
  58. data/app/views/spina/pages/_document.html.haml +0 -13
  59. data/app/views/spina/pages/_documents.html.haml +0 -7
  60. data/app/views/spina/pages/_event.html.haml +0 -18
  61. data/app/views/spina/pages/_events_list.html.haml +0 -19
  62. data/app/views/spina/pages/_homepage_content.html.haml +0 -14
  63. data/app/views/spina/pages/_jumbotron.html.haml +0 -2
  64. data/app/views/spina/pages/_minutes.html.haml +0 -9
  65. data/app/views/spina/pages/_minutes_entry.html.haml +0 -14
  66. data/app/views/spina/pages/_partner_societies.html.haml +0 -10
  67. data/app/views/spina/pages/_partner_society.html.haml +0 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 053a0eb11e7ced4282502df407443f30da98f6efd1499a9800aa3aeff8ca6b13
4
- data.tar.gz: '08d5f2ccb2616cb2d58b153b2bbb00af4e5ee1e7ce45e4c44e04661c72241c8e'
3
+ metadata.gz: 936083c4293cbc611194be98f61919d3ebafb7fba30657fe953a03b0168b95ef
4
+ data.tar.gz: c278c8c41ec3a012cc6a4e5c6b66c233459b0e3fe3e4a11841f2f2f72e916f1b
5
5
  SHA512:
6
- metadata.gz: 319dac2e50330a0cdfd3faa9f897341f02eee1651825d45a5f917837c7da88d4b0ef223018fe1a23fab54d55fd02d71a7a8f5acf4f4fa0d2b5d0c3bcfe7cd462
7
- data.tar.gz: 35e652f094562c9032877ce59782870fd5211e62cf4b2655f67eac1a4c47873f23480fef0fda1c202b32d693fe0ceb632544d88a6550d3fc253139a037d49d07
6
+ metadata.gz: f3bb1a5ffa62d39071a3afc7d871781e4be937a73e6e860dfed3bd09bd1c63fe776aa705b09b7b83adeeca5bc6865470571ccc9826550891465054ca454e9114
7
+ data.tar.gz: 10a589d62195e08be32b6300842f92ff39dea79ec27d18015c1e2d9bc0bf41f06ef67256c8ab5015d80be0be8de91b1530522a4d931d90296e47c33199fec72f
@@ -4,6 +4,5 @@
4
4
 
5
5
  //= link @github/details-dialog-element/dist/index.js
6
6
  //= link @github/include-fragment-element/dist/index.js
7
- //= link @github/tab-container-element/dist/index.js
8
7
  //= link @github/filter-input-element/dist/index.js
9
8
  //= link @github/details-menu-element/dist/index.js
@@ -1,13 +1,17 @@
1
+ @import "@github/details-dialog-element/dist"
2
+
1
3
  @import spina/conferences/primer_theme/custom
4
+ @import "@primer/css"
5
+ @import "@primer/octicons"
6
+ @import spina/conferences/primer_theme/custom_variables
7
+
8
+ .admin
9
+ @import "spina/admin_editing"
10
+ #admin_bar
11
+ font-family: 'Metropolis', sans-serif
2
12
 
3
- @import primer
4
- @import github
5
- @import turbolinks
6
- @import admin
13
+ .turbo-progress-bar
14
+ background-color: white
7
15
 
8
- img
9
- max-width: 100%
10
- object-fit: cover
11
- object-position: center
12
16
  address
13
17
  font-style: normal
@@ -25,6 +25,7 @@ module Spina
25
25
  presentation_types: [:translations],
26
26
  presentations: [session: [:room], presenters: [:institution]])
27
27
  .find(params[:id])
28
+ @conference.view_context = view_context
28
29
  rescue ActiveRecord::RecordNotFound
29
30
  send_file Rails.root.join('public/404.html'), type: 'text/html; charset=utf-8', status: 404
30
31
  end
@@ -42,7 +43,11 @@ module Spina
42
43
  end
43
44
 
44
45
  def set_presentations
45
- @presentations = @presentation_type.present? ? @presentation_type.presentations : @conference.presentations
46
+ @presentations = if @presentation_type.present?
47
+ @presentation_type.presentations.page(params[:page]).per(15)
48
+ else
49
+ @conference.presentations.page(params[:page]).per(15)
50
+ end
46
51
  end
47
52
 
48
53
  def set_breadcrumb
@@ -7,8 +7,9 @@ module Spina
7
7
  module ApplicationHelper
8
8
  include Spina::PagesHelper
9
9
 
10
- def latest_conference
11
- Spina::Admin::Conferences::Conference.sorted.first
10
+ # Because the upper bound is exclusive a conference is current the day after it ends
11
+ def current_conference
12
+ Spina::Admin::Conferences::Conference.order(dates: :asc).find_by('upper(dates) >= ?', Date.today)
12
13
  end
13
14
 
14
15
  def ancestors
@@ -22,18 +23,6 @@ module Spina
22
23
  end
23
24
  end
24
25
 
25
- def partable_for(*part_names, parent: current_page)
26
- association = case parent
27
- when Spina::Page then :page_partable
28
- when Spina::StructureItem then :structure_partable
29
- when Spina::Account then :layout_partable
30
- else :partable
31
- end
32
- parts = parent.parts.where(name: part_names)
33
- partables = parts.collect { |part| part.try(association) }
34
- [*parts, *partables]
35
- end
36
-
37
26
  def calendar(name:, &block)
38
27
  # noinspection SpellCheckingInspection
39
28
  block ||= proc { '' }
@@ -1,22 +1,92 @@
1
1
  - cache current_page do
2
- %h1= current_page.title
2
+ = render(Primer::HeadingComponent.new) { current_page.title }
3
+
4
+ - if content(:text).present?
5
+ = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
6
+ - if content(:contact).present?
7
+ = render Primer::SubheadComponent.new(mt: 4) do |component|
8
+ = component.heading { t :'.contact.title' }
9
+ = render(Primer::MarkdownComponent.new) { content.html(:contact) }
3
10
 
4
- - cache partable_for(:text) do
5
- - if has_content? :text
6
- .mt-4= render partial: 'text', object: content(:text)
7
- - cache partable_for(:contact) do
8
- - if has_content? :contact
9
- .mt-4= render partial: 'contact', object: content(:contact)
10
11
  .clearfix.gutter
11
- - cache partable_for(:constitution) do
12
- .mt-4.col-12.col-md-6.float-md-left= render partial: 'constitution', object: content(:constitution)
13
- - cache [partable_for(:minutes), content(:minutes)&.structure_items,
14
- content(:minutes)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
15
- .mt-4.col-12.col-md-6.float-md-left= render partial: 'minutes', object: content(:minutes)
16
- - cache [partable_for(:documents), content(:documents)&.structure_items,
17
- content(:documents)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
18
- .mt-4.col-12.col-md-12.float-md-left= render partial: 'documents', object: content(:documents)
19
- - cache [partable_for(:partner_societies), content(:partner_societies)&.structure_items,
20
- content(:partner_societies)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
21
- - if has_content?(:partner_societies) && content(:partner_societies).structure_items.any?
22
- .mt-4= render partial: 'partner_societies', object: content(:partner_societies)
12
+ = render Primer::BoxComponent.new(mt: 4, col: [12, nil, 6, nil], float: [nil, nil, :left, nil]) do
13
+ = render Primer::SubheadComponent.new do |component|
14
+ = component.heading { t :'.constitution.title' }
15
+ - if content(:constitution).present?
16
+ = render Primer::FlexComponent.new(align_items: :center, py: 1) do
17
+ = render Primer::FlexItemComponent.new(flex_auto: true, pr: 1) do
18
+ = t :'.constitution.uploaded',
19
+ date: l(Spina::Attachment.find(content(:constitution).attachment_id).created_at.to_date, format: :long)
20
+ = render Primer::ButtonComponent.new(tag: :a, href: content.attachment_url(:constitution), ml: 2, download: '') do
21
+ = render Primer::OcticonComponent.new('desktop-download')
22
+ = t :'.constitution.download'
23
+ - else
24
+ = render Primer::BlankslateComponent.new(title: t(:'.constitution.no_constitution'), icon: 'law')
25
+
26
+ = render Primer::BoxComponent.new(mt: 4, col: [12, nil, 6, nil], float: [nil, nil, :left, nil]) do
27
+ = render Primer::SubheadComponent.new do |component|
28
+ = component.heading { t :'.minutes.title' }
29
+ - if content(:minutes).present?
30
+ %ul
31
+ - repeater :minutes do |minutes_entry|
32
+ %li.list-style-none.py-1.d-flex.flex-items-center
33
+ = render Primer::FlexItemComponent.new(flex_auto: true) do
34
+ - if minutes_entry.content(:date).present?
35
+ = t(:'.minutes.minutes_for_html', date: time_tag(minutes_entry.content(:date)))
36
+ - else
37
+ = t(:'.minutes.no_date')
38
+ - if minutes_entry.content(:attachment).present?
39
+ = render Primer::ButtonComponent.new(tag: :a, ml: 2, href: minutes_entry.content.attachment_url(:attachment),
40
+ download: '') do
41
+ = render Primer::OcticonComponent.new('desktop-download')
42
+ = t(:'.minutes.download')
43
+ - else
44
+ = render(Primer::TextComponent.new(color: :text_secondary, font_size: 6)) { t :'.minutes.no_file' }
45
+ - else
46
+ = render Primer::BlankslateComponent.new(title: t(:'.minutes.no_minutes'), icon: 'file')
47
+
48
+ = render Primer::BoxComponent.new(mt: 4, col: [12, nil, 6, nil], float: [nil, nil, :left, nil]) do
49
+ - if content(:documents).present?
50
+ = render Primer::SubheadComponent.new do |component|
51
+ = component.heading { t :'.documents.title' }
52
+ %ul
53
+ - repeater :documents do |document|
54
+ %li.list-style-none.py-1.d-flex.flex-items-center
55
+ = render(Primer::TextComponent.new(tag: :div, flex: :auto)) { document.content(:name).presence || t(:'.documents.no_name') }
56
+ - if document.content(:attachment).present?
57
+ = render Primer::ButtonComponent.new(tag: :a, ml: 2, href: document.content.attachment_url(:attachment), download: '') do
58
+ = render Primer::OcticonComponent.new('desktop-download')
59
+ = t :'.documents.download'
60
+ - else
61
+ = render(Primer::TextComponent.new(tag: :div, font_size: 6, color: :text_secondary)) { t :'.documents.no_file' }
62
+
63
+ = render Primer::SubheadComponent.new(mt: 4) do |component|
64
+ = component.heading { t :'.partner_societies.title' }
65
+ - if content(:partner_societies).present?
66
+ %ul
67
+ - repeater :partner_societies do |partner_society|
68
+ %li.list-style-none.py-4.border-bottom
69
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil], align_items: :start) do
70
+ = render Primer::BaseComponent.new(tag: :div, flex: :auto) do
71
+ = render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
72
+ = render Primer::FlexComponent.new(flex_wrap: true, justify_content: :space_between) do
73
+ - if partner_society.content(:name).present?
74
+ = render(Primer::TextComponent.new(tag: :div)) { partner_society.content(:name) }
75
+ = render Primer::ButtonGroupComponent.new(aria: { label: t(:'.partner_societies.contact_buttons') }) do |component|
76
+ - if partner_society.content(:website).present?
77
+ = component.button(tag: :a, href: partner_society.content(:website)) do
78
+ = render Primer::OcticonComponent.new('browser')
79
+ = t(:'.partner_societies.website')
80
+ - if partner_society.content(:email_address).present?
81
+ = component.button(tag: :a, href: "mailto:#{partner_society.content(:email_address)}") do
82
+ = render Primer::OcticonComponent.new('mail')
83
+ = t(:'.partner_societies.email')
84
+ - if partner_society.content(:description).present?
85
+ = render Primer::MarkdownComponent.new(color: :text_secondary) do
86
+ = partner_society.content(:description).try(:html_safe)
87
+ - if partner_society.content(:logo).present?
88
+ = partner_society.content.image_tag(:logo, { resize_to_limit: [200, 150] }, size: nil, draggable: false,
89
+ srcset: srcset(partner_society.content(:logo), variant: { resize_to_limit: [200, 150] }),
90
+ class: %w[mt-4 mt-md-0 mr-md-4])
91
+ - else
92
+ = render Primer::BlankslateComponent.new(title: t(:'.partner_societies.no_societies'), icon: 'organization')
@@ -1,10 +1,42 @@
1
1
  - cache current_page do
2
- %h1= current_page.title
3
-
4
- - cache partable_for(:text) do
5
- - if has_content? :text
6
- .mt-4= render partial: 'text', object: content(:text)
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
9
- - if has_content?(:committee_bios) && content(:committee_bios).structure_items.any?
10
- .mt-4= render partial: 'committee_bios', object: content(:committee_bios)
2
+ = render(Primer::HeadingComponent.new) { current_page.title }
3
+
4
+ - if content(:text).present?
5
+ = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
6
+
7
+ - if content(:committee_bios).present?
8
+ %ul.mt-4
9
+ - repeater(:committee_bios) do |committee_bio|
10
+ %li.list-style-none.py-4.border-bottom
11
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
12
+ - if committee_bio.content(:profile_picture).present?
13
+ = render Primer::AvatarComponent.new(src: committee_bio.content.image_url(:profile_picture, resize_to_fill: [150, 150]),
14
+ srcset: srcset_string(committee_bio.content(:profile_picture),
15
+ variant: { resize_to_fill: [150, 150] }),
16
+ draggable: false, alt: committee_bio.content(:profile_picture).alt, size: 150,
17
+ mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], flex_shrink: 0)
18
+ = render Primer::FlexItemComponent.new(flex_auto: true) do
19
+ = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], mb: 1) do
20
+ = render Primer::BoxComponent.new do
21
+ - if committee_bio.content(:name).present?
22
+ = render(Primer::HeadingComponent.new(tag: :h3)) do
23
+ - if committee_bio.content(:role).present?
24
+ = t :'.name_and_role', name: committee_bio.content(:name), role: committee_bio.content(:role)
25
+ - else
26
+ = committee_bio.content(:name)
27
+ - if committee_bio.content(:institution).present?
28
+ = render(Primer::HeadingComponent.new(tag: :h4)) { committee_bio.content(:institution) }
29
+ = render Primer::ButtonGroupComponent.new(mt: [1, nil, 0, nil], ml: [nil, nil, 1, nil],
30
+ aria: { label: t(:'.contact_buttons') }) do |component|
31
+ - if committee_bio.content(:twitter_profile).present?
32
+ = component.button(tag: :a, href: committee_bio.content(:twitter_profile)) do
33
+ = render Primer::OcticonComponent.new('link-external')
34
+ = t(:'.twitter')
35
+ - if committee_bio.content(:facebook_profile).present?
36
+ = component.button(tag: :a, href: committee_bio.content(:facebook_profile)) do
37
+ = render Primer::OcticonComponent.new('link-external')
38
+ = t(:'.facebook')
39
+ - if committee_bio.content(:bio).present?
40
+ = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) { committee_bio.content.html(:bio) }
41
+ - else
42
+ = render Primer::BlankslateComponent.new(title: t(:'.no_bios'), icon: 'file')
@@ -1,12 +1,59 @@
1
1
  - cache current_page do
2
- %h1= current_page.title
2
+ = render(Primer::HeadingComponent.new) { current_page.title }
3
3
 
4
- - cache partable_for(:text) do
5
- - if has_content? :text
6
- .mt-4= render partial: 'text', object: content(:text)
7
- - cache [partable_for(:events_list), content(:events_list)&.structure_items,
8
- content(:events_list)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
9
- - if has_content?(:events_list) && content(:events_list).structure_items.any?
10
- .mt-2= render partial: 'events_list', object: content(:events_list)
11
- - else
12
- = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
4
+ - if content(:text).present?
5
+ = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
6
+
7
+ - if content(:events_list).present?
8
+ = render Primer::SubheadComponent.new(mt: 4) do |component|
9
+ = component.heading { t :'.upcoming' }
10
+ - content(:events_list).filter { |event| event.content(:start_time).blank? || event.content(:start_time) >= Time.now }.then do |events|
11
+ - if events.any?
12
+ %ul
13
+ - repeater(events) do |event|
14
+ %li.list-style-none.py-4.border-bottom
15
+ = render Primer::FlexComponent.new(direction: :column, align_items: :start) do
16
+ - if event.content(:name).present?
17
+ = render(Primer::HeadingComponent.new(tag: :h3, flex: :auto)) { event.content(:name) }
18
+ = render Primer::HeadingComponent.new(tag: :h4, flex: :auto) do
19
+ - if event.content(:start_time).present?
20
+ = t(:'.time_and_place_html',
21
+ time: time_tag(event.content(:start_time), format: :ordinal_datetime_with_year),
22
+ place: event.content(:location).presence || t('.location_tbc'))
23
+ - else
24
+ = t(:'.time_and_place_html', time: t('.time_tbc'), place: event.content(:location).presence || t('.location_tbc'))
25
+ - if event.content(:description).present?
26
+ = render(Primer::TextComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
27
+ - if event.content(:url).present?
28
+ = render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
29
+ = render Primer::OcticonComponent.new('link-external')
30
+ = t :'.more_info'
31
+ - else
32
+ = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
33
+ = render Primer::SubheadComponent.new(mt: 4) do |component|
34
+ = component.heading { t :'.past' }
35
+ - content(:events_list).filter { |event| event.content(:start_time).present? && event.content(:start_time) < Time.now }.then do |events|
36
+ - if events.any?
37
+ %ul
38
+ - repeater(events) do |event|
39
+ %li.list-style-none.py-4.border-bottom
40
+ = render Primer::FlexComponent.new(direction: :column, align_items: :start) do
41
+ - if event.content(:name).present?
42
+ = render(Primer::HeadingComponent.new(tag: :h3, flex: :auto)) { event.content(:name) }
43
+ = render Primer::HeadingComponent.new(tag: :h4, flex: :auto) do
44
+ - if event.content(:start_time).present?
45
+ = t(:'.time_and_place_html',
46
+ time: time_tag(event.content(:start_time), format: :ordinal_datetime_with_year),
47
+ place: event.content(:location).presence || t('.location_tbc'))
48
+ - else
49
+ = t(:'.time_and_place_html', time: t('.time_tbc'), place: event.content(:location).presence || t('.location_tbc'))
50
+ - if event.content(:description).present?
51
+ = render(Primer::TextComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
52
+ - if event.content(:url).present?
53
+ = render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
54
+ = render Primer::OcticonComponent.new('link-external')
55
+ = t :'.more_info'
56
+ - else
57
+ = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
58
+ - else
59
+ = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
@@ -1,5 +1,31 @@
1
1
  - content_for :hero do
2
- - cache [current_page, partable_for(:gallery), latest_conference] do
3
- = render partial: 'homepage_content',
4
- layout: has_content?(:gallery) && content(:gallery).images.any? ? 'image_collection' : 'jumbotron',
5
- locals: { conference: latest_conference, advance: true, image_collection: content(:gallery) }
2
+ - cache [current_page, current_conference] do
3
+ = render Primer::BoxComponent.new(position: :relative, style: 'height: 639px') do
4
+ = render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false,
5
+ style: 'background-color: var(--color-scale-blue-9)')
6
+ - if content(:gallery).present?
7
+ = render Primer::FlexComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false, style: 'z-index: 1',
8
+ flex_direction: :column, justify_content: :center, align_items: :center,
9
+ data: { controller: :slideshow, slideshow_incrementer: 0, slideshow_advance: true }) do
10
+ - content(:gallery).each_with_index do |image, index|
11
+ = content.image_tag(image, { resize_to_limit: [1680, 1680] }, draggable: false, hidden: index != 0,
12
+ srcset: srcset(image, variant: { resize_to_limit: [1680, 1680] }),
13
+ style: 'object-fit: cover; max-width: max-content; max-height: max-content',
14
+ data: { slideshow_target: 'slide' }, class: %w[width-full height-full])
15
+ .container-lg.p-responsive.position-relative.color-text-white.height-full{ style: 'z-index: 2' }
16
+ = render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
17
+ %div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
18
+ - if current_conference.present?
19
+ = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { current_conference.name }
20
+ = render Primer::TextComponent.new(tag: :address, classes: 'f2-light') do
21
+ = current_conference.institutions.collect(&:name).to_sentence
22
+ = render(Primer::TextComponent.new(tag: :time, classes: 'f2-light')) do
23
+ = t :'.dates_html', start_date: time_tag(current_conference.start_date, format: :day_and_month),
24
+ finish_date: time_tag(current_conference.finish_date, format: :day_and_month)
25
+ - else
26
+ = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { Spina::Account.first.name }
27
+ - if current_conference.present? && current_conference.finish_date >= Date.today
28
+ = link_to t('.more_info'), frontend_conference_path(current_conference),
29
+ class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
30
+ %div{ style: 'text-shadow: 0 1px 1px rgba(var(--color-scale-black), 0.25), 0 1px 25px rgba(var(--color-scale-black), 0.75);' }
31
+ = render(Primer::MarkdownComponent.new(my: 4)) { content(:text).try(:html_safe) }
@@ -1,6 +1,5 @@
1
1
  - cache current_page do
2
- %h1= current_page.title
3
-
4
- - cache partable_for(:text) do
5
- - if has_content? :text
6
- .mt-4= render partial: 'text', object: content(:text)
2
+ = render(Primer::HeadingComponent.new) { current_page.title }
3
+
4
+ - if content(:text).present?
5
+ = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
@@ -1,2 +1,2 @@
1
1
  - cache current_page do
2
- %h1= current_page.title
2
+ = render(Primer::HeadingComponent.new) { current_page.title }
@@ -1,5 +1,5 @@
1
1
  !!!
2
- %html.height-full{ lang: I18n.locale }
2
+ %html{ lang: I18n.locale, data: { color_mode: 'auto', light_theme: 'light', dark_theme: 'dark' } }
3
3
  %head
4
4
  %meta{ charset: 'utf-8' }
5
5
  %meta{ name: 'author', content: author }
@@ -18,21 +18,22 @@
18
18
  = javascript_include_tag 'turbo', type: 'module'
19
19
  %script{ type: 'module', src: asset_path('@github/details-dialog-element/dist/index.js') }
20
20
  %script{ type: 'module', src: asset_path('@github/include-fragment-element/dist/index.js') }
21
- %script{ type: 'module', src: asset_path('@github/tab-container-element/dist/index.js') }
22
21
  %script{ type: 'module', src: asset_path('@github/filter-input-element/dist/index.js') }
23
22
  %script{ type: 'module', src: asset_path('@github/details-menu-element/dist/index.js') }
24
23
  = yield :head
25
24
  %body
26
- .admin= render 'spina/shared/admin_bar'
25
+ - if current_spina_user.present?
26
+ .admin= render 'spina/shared/admin_bar'
27
27
  %header= render 'navigation'
28
28
  = render 'current_conference_alert'
29
+ - if content_for? :flash
30
+ .flash-messages= yield :flash
29
31
  %main
30
- - if content_for? :flash
31
- .flash-messages= yield :flash
32
32
  = yield :hero
33
33
  - if content_for? :breadcrumbs
34
34
  .container-lg.p-responsive.mt-4= yield :breadcrumbs
35
35
  = yield :header
36
36
  .container-lg.p-responsive.mt-4= yield
37
- %footer.container-lg.p-responsive.py-4= render 'footer'
37
+ %footer
38
+ .container-lg.p-responsive.py-4= render 'footer'
38
39
  = render 'spina/shared/social'
@@ -2,6 +2,6 @@
2
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
- = render Primer::OcticonComponent.new(icon: 'x')
5
+ = render Primer::OcticonComponent.new('x')
6
6
  .Box-title= t(:'.title')
7
7
  = component.body { }
@@ -1,4 +1,4 @@
1
1
  - content_for :flash do
2
- - cache partable_for(:current_conference_alert, parent: current_account) do
2
+ - cache current_account do
3
3
  - if current_account.has_content? :current_conference_alert
4
4
  = render(Primer::FlashComponent.new(full: true, variant: :warning)) { current_account.content(:current_conference_alert).html_safe }
@@ -9,7 +9,7 @@
9
9
  - if current_account.has_content? :github_url
10
10
  = render Primer::ButtonComponent.new(tag: :a, href: current_account.content(:github_url), button_type: :outline, variant: :small,
11
11
  display: :inline_block) do
12
- = render Primer::OcticonComponent.new(icon: 'mark-github')
12
+ = render Primer::OcticonComponent.new('mark-github')
13
13
  = t :'.find_on_github'
14
- = render(Primer::TextComponent.new(tag: :small, color: :gray, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
14
+ = render(Primer::TextComponent.new(tag: :small, color: :text_secondary, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
15
15
  = t :'.copyright', name: Spina::Account.first.name, year: Date.today.year