spina-conferences-primer_theme-fork 0.9.1 → 1.0.0.rc2

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.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -4
  3. data/Rakefile +6 -0
  4. data/app/assets/builds/spina/conferences/primer_theme/application.css +25964 -0
  5. data/app/assets/config/spina_conferences_primer_theme_manifest.js +7 -4
  6. data/app/assets/javascripts/spina/conferences/primer_theme/application.js +6 -7
  7. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/application.js +10 -0
  8. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/index.js +5 -0
  9. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/{slideshow_controller.es6 → slideshow_controller.js} +4 -3
  10. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
  11. data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +2 -0
  12. data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +0 -2
  13. data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +5 -7
  14. data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +17 -0
  15. data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +14 -13
  16. data/app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb +2 -1
  17. data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +16 -0
  18. data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +15 -7
  19. data/app/controllers/spina/conferences/primer_theme/journal/authors_controller.rb +48 -0
  20. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +12 -5
  21. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +33 -14
  22. data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +10 -2
  23. data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +11 -1
  24. data/app/models/spina/parts/conferences/primer_theme/checkbox.rb +6 -2
  25. data/app/models/spina/parts/conferences/primer_theme.rb +9 -3
  26. data/app/views/conferences_primer_theme/pages/about.html.haml +14 -14
  27. data/app/views/conferences_primer_theme/pages/committee.html.haml +13 -12
  28. data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +2 -2
  29. data/app/views/conferences_primer_theme/pages/events.html.haml +3 -3
  30. data/app/views/conferences_primer_theme/pages/homepage.html.haml +2 -2
  31. data/app/views/conferences_primer_theme/pages/information.html.haml +2 -2
  32. data/app/views/conferences_primer_theme/pages/journal_information.html.haml +10 -0
  33. data/app/views/conferences_primer_theme/pages/periodical.html.haml +10 -10
  34. data/app/views/conferences_primer_theme/pages/show.html.haml +1 -1
  35. data/app/views/conferences_primer_theme/partials/_event.html.haml +2 -2
  36. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +2 -2
  37. data/app/views/layouts/conferences_primer_theme/application.html.haml +1 -1
  38. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -14
  39. data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +3 -0
  40. data/app/views/layouts/spina/conferences/primer_theme/journal/authors.html.haml +5 -0
  41. data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +3 -0
  42. data/app/views/spina/application/_admin_bar.html.haml +7 -0
  43. data/app/views/spina/application/_alert.html.haml +4 -0
  44. data/app/views/spina/application/_analytics.html.erb +10 -0
  45. data/app/views/spina/application/{_footer_content.html.haml → _cookies_footer.html.haml} +1 -1
  46. data/app/views/spina/application/_footer.html.haml +20 -12
  47. data/app/views/spina/application/_google_site_verification.html.haml +1 -0
  48. data/app/views/spina/application/_journal_navigation.html.haml +17 -0
  49. data/app/views/spina/application/_mobile_navigation_items.html.haml +0 -3
  50. data/app/views/spina/application/_navigation.html.haml +0 -3
  51. data/app/views/spina/application/_text.html.haml +1 -1
  52. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +3 -3
  53. data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +4 -3
  54. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +3 -3
  55. data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +8 -8
  56. data/app/views/spina/conferences/primer_theme/blog/shared/_sidebar.html.haml +1 -1
  57. data/app/views/spina/conferences/primer_theme/conferences/conferences/_conference.html.haml +2 -2
  58. data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +6 -6
  59. data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +1 -1
  60. data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +4 -4
  61. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +4 -4
  62. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +4 -4
  63. data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +3 -3
  64. data/app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml +3 -3
  65. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +5 -5
  66. data/app/views/spina/conferences/primer_theme/conferences/presentations/_abstract.html.haml +1 -1
  67. data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml +1 -1
  68. data/app/views/spina/conferences/primer_theme/conferences/presentations/show.html.haml +3 -3
  69. data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +8 -6
  70. data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +7 -7
  71. data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +24 -26
  72. data/app/views/spina/conferences/primer_theme/journal/authors/_author.html.haml +9 -0
  73. data/app/views/spina/conferences/primer_theme/journal/authors/index.html.haml +10 -0
  74. data/app/views/spina/conferences/primer_theme/journal/authors/show.html.haml +20 -0
  75. data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +6 -6
  76. data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +10 -9
  77. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +27 -23
  78. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +31 -21
  79. data/config/initializers/importmap.rb +21 -0
  80. data/config/initializers/mime_types.rb +3 -1
  81. data/config/initializers/primer.rb +1 -1
  82. data/config/initializers/themes/conferences_primer_theme.rb +14 -2
  83. data/config/locales/en.yml +23 -33
  84. data/config/routes.rb +7 -3
  85. data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +1 -1
  86. data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +4 -17
  87. data/lib/spina/conferences/primer_theme/engine.rb +7 -3
  88. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  89. data/lib/spina/conferences/primer_theme.rb +10 -3
  90. metadata +62 -33
  91. data/app/views/spina/application/_current_conference_alert.html.haml +0 -4
@@ -1,22 +1,23 @@
1
1
  - cache current_page do
2
- = render(Primer::HeadingComponent.new) { current_page.title }
2
+ = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
6
 
7
7
  - if content(:committee_bios).present?
8
8
  %ul.mt-4
9
9
  - repeater(:committee_bios) do |committee_bio|
10
10
  %li.list-style-none.py-4.border-bottom
11
- = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
11
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil], align_items: :flex_start) do
12
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
13
+ -# TODO: create helper to replace this, because Primer::Beta::Avatar limits size to 80 sadly
14
+ %img.avatar.circle.mr-md-3.mb-3.mb-md-0.flex-shrink-0{src: committee_bio.content.image_url(:profile_picture, resize_to_fill: [150, 150]),
15
+ srcset: srcset_string(committee_bio.content(:profile_picture),
16
+ variant: { resize_to_fill: [150, 150] }),
17
+ draggable: false,
18
+ alt: committee_bio.content(:profile_picture).alt}
19
+ = render Primer::BoxComponent.new(flex: :auto) do
20
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil], mb: 1) do
20
21
  = render Primer::BoxComponent.new do
21
22
  - if committee_bio.content(:name).present?
22
23
  = render(Primer::HeadingComponent.new(tag: :h3)) do
@@ -26,7 +27,7 @@
26
27
  = committee_bio.content(:name)
27
28
  - if committee_bio.content(:institution).present?
28
29
  = 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
+ = render Primer::ButtonGroup.new(mt: [1, nil, 0, nil], ml: [nil, nil, 1, nil],
30
31
  aria: { label: t(:'.contact_buttons') }) do |component|
31
32
  - if committee_bio.content(:twitter_profile).present?
32
33
  = component.button(tag: :a, href: committee_bio.content(:twitter_profile)) do
@@ -37,6 +38,6 @@
37
38
  = render Primer::OcticonComponent.new('link-external')
38
39
  = t(:'.facebook')
39
40
  - if committee_bio.content(:bio).present?
40
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) { committee_bio.content.html(:bio) }
41
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) { committee_bio.content.html(:bio).to_s }
41
42
  - else
42
43
  = render Primer::BlankslateComponent.new(title: t(:'.no_bios'), icon: 'file')
@@ -1,8 +1,8 @@
1
1
  - cache current_page do
2
- = render(Primer::HeadingComponent.new) { current_page.title }
2
+ = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
6
 
7
7
  - if content(:embed_url).present?
8
8
  = render Primer::BoxComponent.new(mt: 4, col: 12) do
@@ -1,8 +1,8 @@
1
1
  - cache current_page do
2
- = render(Primer::HeadingComponent.new) { current_page.title }
2
+ = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
6
 
7
7
  - if content(:events_list).present?
8
8
  = render Primer::SubheadComponent.new(mt: 4) do |component|
@@ -12,7 +12,7 @@
12
12
  - else
13
13
  = t :'.upcoming'
14
14
 
15
- - content(:events_list).filter do |event|
15
+ - content(:events_list).filter do |event|
16
16
  - (event.content(:start_date).blank? || event.content(:start_date) >= Date.today) && event.content(:is_archived) != Spina::Parts::Conferences::PrimerTheme::Checkbox::CHECKED_VALUE
17
17
  - end.then do |events|
18
18
  - if events.any?
@@ -8,8 +8,8 @@
8
8
  - content(:carousel).each_with_index do |carousel_item, index|
9
9
  = render partial: 'conferences_primer_theme/partials/homepage_item', locals: { item: carousel_item }
10
10
  - if content(:carousel).many?
11
- .container-lg.height-full.d-flex.flex-column-reverse.mb-8
12
- = render(Primer::ButtonGroupComponent.new) do |component|
11
+ .container-lg.height-full.d-flex.flex-column-reverse.mb-8{ style: 'z-index: 5' }
12
+ = render(Primer::ButtonGroup.new) do |component|
13
13
  = component.button(data: { action: :'slideshow#previous' }) do
14
14
  = render Primer::OcticonComponent.new('arrow-left')
15
15
  = component.button(data: { action: :'slideshow#next' }) do
@@ -1,5 +1,5 @@
1
1
  - cache current_page do
2
- = render(Primer::HeadingComponent.new) { current_page.title }
2
+ = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
@@ -0,0 +1,10 @@
1
+ - cache [current_page, journal_navigation_items] do
2
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row]) do
3
+ - cache current_page do
4
+ = render Primer::BoxComponent.new(col: [nil, nil, nil, 9]) do
5
+ = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
6
+
7
+ - if content(:text).present?
8
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
9
+
10
+ = render 'journal_navigation'
@@ -1,23 +1,23 @@
1
1
  - cache current_page do
2
- = render(Primer::HeadingComponent.new) { current_page.title }
2
+ = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
6
-
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
+
7
7
  - if content(:periodical_issues).present?
8
8
  %ul.mt-4
9
9
  - repeater(:periodical_issues) do |issue|
10
10
  %li.list-style-none.py-4.border-bottom
11
- = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
11
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil], align_items: :flex_start) do
12
12
  - if issue.content(:cover_img).present?
13
- = render Primer::FlexItemComponent.new(mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], flex_shrink: 0) do
13
+ = render Primer::BoxComponent.new(mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], flex_shrink: 0) do
14
14
  = render Primer::LinkComponent.new(href: issue.content(:url)) do
15
15
  = image_tag(issue.content.image_url(:cover_img, resize_to_limit: [300, 300]),
16
16
  srcset: srcset_string(issue.content(:cover_img),
17
17
  variant: { resize_to_limit: [300, 300] }),
18
18
  alt: issue.content(:cover_img).alt)
19
- = render Primer::FlexItemComponent.new(flex_auto: true) do
20
- = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], mb: 1) do
19
+ = render Primer::BoxComponent.new(flex: :auto) do
20
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil], mb: 1) do
21
21
  = render Primer::BoxComponent.new do
22
22
  - if issue.content(:name).present?
23
23
  = render Primer::HeadingComponent.new(tag: :h2) do
@@ -26,9 +26,9 @@
26
26
  = render Primer::HeadingComponent.new(tag: :h4) do
27
27
  = time_tag issue.content(:date), format: :long_ordinal
28
28
  - if issue.content(:description).present?
29
- = render Primer::MarkdownComponent.new(tag: :div, color: :text_secondary) do
30
- = issue.content.html(:description)
31
- = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
29
+ = render Primer::Markdown.new(tag: :div, color: :muted) do
30
+ = issue.content.html(:description).to_s
31
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil], align_items: :flex_start) do
32
32
  - if issue.content(:url).present?
33
33
  = render Primer::ButtonComponent.new(scheme: :primary, tag: :a, href: issue.content(:url), mt: 2, mr: 2) do
34
34
  = render Primer::OcticonComponent.new('link-external')
@@ -1,2 +1,2 @@
1
1
  - cache current_page do
2
- = render(Primer::HeadingComponent.new) { current_page.title }
2
+ = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
@@ -1,5 +1,5 @@
1
1
  %li.list-style-none.py-4.border-bottom
2
- = render Primer::FlexComponent.new(direction: :column, align_items: :start) do
2
+ = render Primer::BoxComponent.new(display: :flex, direction: :column, align_items: :flex_start) do
3
3
  - if event.content(:name).present?
4
4
  = render(Primer::HeadingComponent.new(tag: :h3, flex: :auto)) { event.content(:name) }
5
5
  = render Primer::HeadingComponent.new(tag: :h4, flex: :auto) do
@@ -21,7 +21,7 @@
21
21
  = render Primer::HeadingComponent.new(tag: :h5, flex: :auto) do
22
22
  = event.content(:location).presence
23
23
  - if event.content(:description).present?
24
- = render(Primer::MarkdownComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
24
+ = render(Primer::Markdown.new(mt: 1, color: :muted)) { event.content.html(:description).to_s }
25
25
  - if event.content(:url).present?
26
26
  = render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
27
27
  = render Primer::OcticonComponent.new('link-external')
@@ -13,8 +13,8 @@
13
13
  = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) do
14
14
  = item.content(:title)
15
15
  %div{ style: 'text-shadow: 0 1px 1px rgba(var(--color-scale-black), 0.25), 0 1px 25px rgba(var(--color-scale-black), 0.75);' }
16
- = render(Primer::MarkdownComponent.new(my: 4)) do
17
- = item.content(:description).html_safe
16
+ = render(Primer::Markdown.new(my: 4)) do
17
+ = item.content.html(:description).to_s
18
18
  - if item.content(:url).present?
19
19
  = link_to t('.more_info'), item.content(:url),
20
20
  class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
@@ -1,5 +1,5 @@
1
1
  - content_for :breadcrumbs do
2
- - if current_page.ancestors.any?
2
+ - if current_page.ancestors.any? || current_page.resource&.name == 'journal'
3
3
  = ancestors
4
4
 
5
5
  = render template: 'layouts/spina/conferences/primer_theme/application',
@@ -11,22 +11,17 @@
11
11
  %base{ target: '_blank' }
12
12
  = csrf_meta_tags
13
13
  %title= t(:'.title', title: seo_title, suffix: current_account.name)
14
- = render 'spina/shared/google_site_verification'
15
- = render 'spina/shared/analytics'
16
- = stylesheet_link_tag 'spina/conferences/primer_theme/application', media: 'all', data: { turbolinks_track: true }
17
- = javascript_include_tag 'spina/conferences/primer_theme/application', data: { turbolinks_track: true }
18
- = javascript_include_tag 'turbo', type: 'module'
19
- %script{ type: 'module', src: asset_path('@github/details-dialog-element/dist/index.js') }
20
- %script{ type: 'module', src: asset_path('@github/include-fragment-element/dist/index.js') }
21
- %script{ type: 'module', src: asset_path('@github/filter-input-element/dist/index.js') }
22
- %script{ type: 'module', src: asset_path('@github/details-menu-element/dist/index.js') }
14
+ = render 'google_site_verification'
15
+ = render 'analytics'
16
+ = stylesheet_link_tag 'spina/conferences/primer_theme/application', media: 'all', data: { turbo_track: true }
17
+ = primer_theme_importmap_tags
23
18
  = yield :head
24
19
  %body
25
20
  - if current_spina_user.present?
26
- .admin= render 'spina/shared/admin_bar'
21
+ .admin= render 'admin_bar'
27
22
  %header= render 'navigation'
28
23
  - unless local_assigns[:hide_alert]
29
- = render 'current_conference_alert'
24
+ = render 'alert'
30
25
  - if content_for? :flash
31
26
  .flash-messages= yield :flash
32
27
  %main
@@ -35,6 +30,4 @@
35
30
  .container-lg.p-responsive.mt-4= yield :breadcrumbs
36
31
  = yield :header
37
32
  .container-lg.p-responsive.mt-4= yield
38
- %footer
39
- .container-lg.p-responsive.py-4= render 'footer'
40
- = render 'spina/shared/social'
33
+ %footer.footer.width-full.container-lg.p-responsive= render 'footer'
@@ -1,2 +1,5 @@
1
+ - content_for :breadcrumbs do
2
+ = render_breadcrumbs(builder: Spina::Conferences::PrimerTheme::Breadcrumbs::Builder)
3
+
1
4
  = render template: 'layouts/spina/conferences/primer_theme/application',
2
5
  locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: false }
@@ -0,0 +1,5 @@
1
+ - content_for :breadcrumbs do
2
+ = render_breadcrumbs(builder: Spina::Conferences::PrimerTheme::Breadcrumbs::Builder)
3
+
4
+ = render template: 'layouts/spina/conferences/primer_theme/application',
5
+ locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: false }
@@ -1,2 +1,5 @@
1
+ - content_for :breadcrumbs do
2
+ = render_breadcrumbs(builder: Spina::Conferences::PrimerTheme::Breadcrumbs::Builder)
3
+
1
4
  = render template: 'layouts/spina/conferences/primer_theme/application',
2
5
  locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: false }
@@ -0,0 +1,7 @@
1
+ - if current_spina_user.present?
2
+ #admin_bar
3
+ = render Primer::BoxComponent.new(bg: :accent, p: 3, text_align: :right) do
4
+ = render Primer::LinkComponent.new(href: spina.admin_root_path, mr: 3, data: { turbo: false }, classes: 'btn') do
5
+ = t 'spina.edit_website'
6
+ = render Primer::LinkComponent.new(href: spina.admin_logout_path, classes: 'btn') do
7
+ = t 'spina.logout'
@@ -0,0 +1,4 @@
1
+ - content_for :flash do
2
+ - cache current_account do
3
+ - if current_account.has_content? :alert
4
+ = render(Primer::FlashComponent.new(full: true, variant: :warning)) { current_account.content(:alert).html_safe }
@@ -0,0 +1,10 @@
1
+ <script type="text/javascript">
2
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6
+
7
+ ga('create', '<%= current_account.google_analytics %>', 'auto');
8
+ ga('set', 'anonymizeIp', true);
9
+ ga('send', 'pageview');
10
+ </script>
@@ -1,4 +1,4 @@
1
- = render Primer::DetailsComponent.new(overlay: :dark, reset: true, mb: [2, 0, nil, nil], mr: [nil, 2, nil, nil]) do |component|
1
+ = render Primer::DetailsComponent.new(overlay: :dark, reset: true) do |component|
2
2
  = component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
3
3
  = render Primer::OcticonComponent.new('info')
4
4
  = t :'.cookies'
@@ -1,17 +1,25 @@
1
1
  - cache [footer_navigation_items, current_account] do
2
- = render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil], align_items: :center) do
3
- = render Primer::FlexComponent.new(direction: [:column, :row, nil, nil], mb: [4, nil, 0, nil], flex: :auto) do
4
- - cache footer_navigation_items do
5
- %ul.list-style-none.flex-auto.mb-2.mb-sm-0.mr-sm-2
6
- - footer_navigation_items.each do |item|
7
- - cache item do
8
- %li
9
- = render Primer::ButtonComponent.new(tag: :a, href: item.materialized_path, variant: :small) { item.menu_title }
10
- = render 'footer_content'
2
+ = render Primer::BoxComponent.new(position: :relative, display: :flex,
3
+ flex_wrap: :wrap,
4
+ direction: [:column_reverse, nil, :row, nil],
5
+ align_items: :center,
6
+ justify_content: :space_between,
7
+ mt: 6, pt: 6, pb: 2, mb: 6,
8
+ font_size: 6, color: :muted, border: :top, border_color: :muted) do
9
+ %div
10
+ = render(Primer::Beta::Text.new(tag: :span, color: :muted, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
11
+ = t :'.copyright', name: current_account.name, year: Date.today.year
12
+ - cache footer_navigation_items do
13
+ %ul.list-style-none.d-flex.flex-wrap.flex-1.flex-justify-center.flex-lg-justify-around.mb-2.mb-lg-0
14
+ - footer_navigation_items.each do |item|
15
+ - cache item do
16
+ %li.mr-3.mr-lg-0
17
+ = render Primer::LinkComponent.new(href: item.materialized_path) do
18
+ = item.menu_title
19
+ = render Primer::BoxComponent.new(display: :flex, mb: [2, nil, 0, nil]) do
20
+ = render 'cookies_footer'
11
21
  - if current_account.has_content? :github_url
12
22
  = render Primer::ButtonComponent.new(tag: :a, href: current_account.content(:github_url), button_type: :outline, variant: :small,
13
- display: :inline_block) do
23
+ display: :inline_block, ml: 2) do
14
24
  = render Primer::OcticonComponent.new('mark-github')
15
25
  = t :'.find_on_github'
16
- = render(Primer::TextComponent.new(tag: :small, color: :text_secondary, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
17
- = t :'.copyright', name: current_account.name, year: Date.today.year
@@ -0,0 +1 @@
1
+ %meta{ name: 'google-site-verification' , content: current_account.google_site_verification }
@@ -0,0 +1,17 @@
1
+ - cache [current_page, journal_navigation_items] do
2
+ = render Primer::MenuComponent.new(ml: [0, nil, nil, 4], mt: [4, 0, nil, nil], col: [nil, nil, nil, 3]) do |component|
3
+ - component.heading(tag: :h2) do
4
+ = Spina::Admin::Journal::Journal.instance.name
5
+
6
+ - component.item(selected: controller_name == 'issues', href: frontend_issues_path) do
7
+ = t '.issues'
8
+ - component.item(selected: controller_name == 'authors', href: frontend_authors_path) do
9
+ = t '.authors'
10
+
11
+ - journal_navigation_items.each do |page|
12
+ - component.item(selected: page == current_page, href: page.materialized_path) do
13
+ = page.menu_title
14
+ - if page.children&.in_menu.live.any?
15
+ - page.children.in_menu.live.sorted.each do |sub_page|
16
+ - component.item(selected: sub_page == current_page, href: sub_page.materialized_path, pl: 5) do
17
+ = sub_page.menu_title
@@ -1,5 +1,2 @@
1
1
  %nav.d-flex.flex-column.flex-self-stretch
2
2
  = render partial: 'mobile_navigation_item', collection: main_navigation_items, as: :navigation_item, cache: -> navigation_item { [navigation_item, navigation_item.children] }
3
- .Header-item.mr-0.border-top.border-white-fade-15= link_to 'Blog', frontend_blog_root_path, class: %w[Header-link py-2 py-lg-0]
4
- .Header-item.mr-0.border-top.border-white-fade-15= link_to 'Journal', frontend_issues_path, class: %w[Header-link py-2 py-lg-0]
5
- .Header-item.mr-0.border-top.border-white-fade-15= link_to 'Conferences', frontend_conferences_path, class: %w[Header-link py-2 py-lg-0]
@@ -7,6 +7,3 @@
7
7
  .Header-item.Header-item--full.flex-column.width-full.flex-order-1.mr-0.mt-3
8
8
  = render partial: 'mobile_navigation_items'
9
9
  = render partial: 'navigation_item', collection: main_navigation_items, cache: -> navigation_item { [navigation_item, navigation_item.children] }
10
- .Header-item.d-none.d-lg-flex= link_to 'Blog', frontend_blog_root_path, class: %w[Header-link]
11
- .Header-item.d-none.d-lg-flex= link_to 'Journal', frontend_issues_path, class: %w[Header-link]
12
- .Header-item.d-none.d-lg-flex= link_to 'Conferences', frontend_conferences_path, class: %w[Header-link]
@@ -1 +1 @@
1
- = render(Primer::MarkdownComponent.new) { text.html_safe }
1
+ = render(Primer::Markdown.new) { text.html_safe }
@@ -1,10 +1,10 @@
1
- = render(Primer::HeadingComponent.new) do
1
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
2
2
  Blog
3
3
  = render(Primer::HeadingComponent.new(tag: :h2)) do
4
4
  = t '.category', name: @category.name
5
5
 
6
- = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
7
- = render(Primer::FlexItemComponent.new(flex_auto: true)) do
6
+ = render(Primer::BoxComponent.new(display: :flex, flex: :auto, direction: [:column, nil, :row, nil])) do
7
+ = render(Primer::BoxComponent.new(flex: :auto)) do
8
8
  - if @posts.any?
9
9
  %ul= render collection: @posts, partial: 'spina/conferences/primer_theme/blog/posts/post', layout: 'list_item', cached: true
10
10
  - else
@@ -4,7 +4,8 @@
4
4
  = link_to post.title, frontend_blog_post_path(post)
5
5
  = render(Primer::HeadingComponent.new(tag: :h4)) do
6
6
  = time_tag post.published_at, format: :ordinal_datetime_with_year
7
- = render(Primer::MarkdownComponent.new(color: :text_secondary)) do
8
- = post.excerpt.html_safe
9
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
7
+ - if post.excerpt.present?
8
+ = render(Primer::Markdown.new(color: :muted)) do
9
+ = post.excerpt.html_safe
10
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
10
11
  = t '.category_html', name: link_to(post.category.name, frontend_blog_category_path(post.category))
@@ -1,8 +1,8 @@
1
- = render(Primer::HeadingComponent.new) do
1
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
2
2
  Blog
3
3
 
4
- = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
5
- = render(Primer::FlexItemComponent.new(flex_auto: true)) do
4
+ = render(Primer::BoxComponent.new(display: :flex, flex: :auto, direction: [:column, nil, :row, nil])) do
5
+ = render(Primer::BoxComponent.new(flex: :auto)) do
6
6
  - if @posts.any?
7
7
  %ul= render collection: @posts, partial: 'post', layout: 'list_item', cached: true
8
8
  - else
@@ -1,17 +1,17 @@
1
- = render(Primer::HeadingComponent.new) do
1
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
2
2
  = @post.title
3
3
 
4
4
  %ul.list-style-none.d-flex.flex-column.flex-sm-row.my-2
5
- = render(Primer::FlexComponent.new(tag: :li, mr: 4, align_items: :center)) do
6
- = render(Primer::FlexItemComponent.new(mr: 2)) do
5
+ = render(Primer::BoxComponent.new(display: :flex, tag: :li, mr: 4, align_items: :center)) do
6
+ = render(Primer::BoxComponent.new(mr: 2)) do
7
7
  = render(Primer::OcticonComponent.new('person'))
8
- = render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
9
- = render(Primer::TextComponent.new(tag: :div, font_weight: :bold)) { @post.user.name }
8
+ = render(Primer::BoxComponent.new(display: :flex, tag: :address, direction: :column)) do
9
+ = render(Primer::Beta::Text.new(tag: :div, font_weight: :bold)) { @post.user.name }
10
10
 
11
11
  - if @post.image
12
12
  = image_tag main_app.url_for(@post.image.file)
13
13
 
14
- = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
15
- = render(Primer::FlexItemComponent.new(flex_auto: true)) do
16
- = render(Primer::MarkdownComponent.new(tag: :article)) do
14
+ = render(Primer::BoxComponent.new(display: :flex, flex: :auto, direction: [:column, nil, :row, nil])) do
15
+ = render(Primer::BoxComponent.new(flex: :auto)) do
16
+ = render(Primer::Markdown.new(tag: :article)) do
17
17
  = @post.content.html_safe
@@ -3,7 +3,7 @@
3
3
  = render(Primer::HeadingComponent.new(tag: :h3)) do
4
4
  = t '.categories'
5
5
  - sidebar.row do
6
- = render(Primer::MarkdownComponent.new(tag: :div, font_weight: :bold)) do
6
+ = render(Primer::Markdown.new(tag: :div, font_weight: :bold)) do
7
7
  %ul
8
8
  - Spina::Admin::Conferences::Blog::Category.all.each do |cat|
9
9
  %li= link_to cat.name, frontend_blog_category_path(cat)
@@ -1,7 +1,7 @@
1
- = render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil]) do
1
+ = render Primer::BoxComponent.new(display: :flex, 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
3
3
  = render partial: 'institution', collection: conference.institutions, cached: -> institution { [institution, institution.logo] }
4
- = render Primer::FlexItemComponent.new(flex_auto: true) do
4
+ = render Primer::BoxComponent.new(flex: :auto) do
5
5
  = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { link_to conference.name, frontend_conference_path(conference) }
6
6
  %ul.text-secondary.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
7
7
  %li.mr-sm-3
@@ -1,12 +1,12 @@
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
1
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil]) do
2
+ = render Primer::BoxComponent.new(mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 4, nil]) do
3
+ = render Primer::Beta::Text.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
4
4
  = render Primer::OcticonComponent.new('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
- = render Primer::TextComponent.new(tag: :div, color: :text_secondary) do
6
+ = render Primer::Beta::Text.new(tag: :div, color: :muted) do
7
7
  = render Primer::OcticonComponent.new('location')
8
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
9
+ = render Primer::BoxComponent.new(flex: :auto, col: [nil, nil, 8, nil]) do
10
10
  = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { event.name }
11
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
11
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
12
12
  = event.description
@@ -5,7 +5,7 @@
5
5
  .subnav.subnav-flush
6
6
  .subnav-search.float-left.ml-0
7
7
  = search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
8
- = octicon 'search', class: 'subnav-search-icon'
8
+ = render Primer::OcticonComponent.new('search', class: 'subnav-search-icon')
9
9
  %div{ id: 'event_list' }
10
10
  - if events.any?
11
11
  %ul{ data: { filter: { list: true } } }
@@ -1,6 +1,6 @@
1
1
  - cache [@conference, @conference.institutions] do
2
2
  .container-lg.p-responsive.mb-4
3
- = render(Primer::HeadingComponent.new( mb: [1, nil, 2, nil])) { @conference.name }
3
+ = render(Primer::HeadingComponent.new(tag: :h1, mb: [1, nil, 2, nil])) { @conference.name }
4
4
  %ul.text-secondary.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
5
5
  %li.mr-sm-3.mb-1
6
6
  = render Primer::OcticonComponent.new('calendar')
@@ -19,9 +19,9 @@
19
19
  - if @conference.content(:sponsors).present?
20
20
  = render Primer::SubheadComponent.new(spacious: true) do |component|
21
21
  = component.heading(tag: :h2) { t :'.sponsors.title' }
22
- = render Primer::FlexComponent.new(flex_wrap: true, ml: -2, mr: -2, mt: -2, mb: -2) do
22
+ = render Primer::BoxComponent.new(display: :flex, flex_wrap: :wrap, ml: -2, mr: -2, mt: -2, mb: -2) do
23
23
  - repeater @conference.content(:sponsors) do |sponsor|
24
- = render Primer::FlexItemComponent.new(m: 2, vertical_align: :middle) do
24
+ = render Primer::BoxComponent.new(m: 2, vertical_align: :middle) do
25
25
  - if sponsor.content(:logo).present?
26
26
  = link_to sponsor.content(:website) do
27
27
  = sponsor.content.image_tag(:logo, { resize_to_limit: [200, 60] }, draggable: false,
@@ -30,7 +30,7 @@
30
30
  = render(Primer::LinkComponent.new(href: sponsor.content(:website) || '')) { sponsor.content(:name) }
31
31
 
32
32
  - if @conference.content(:gallery).present?
33
- = render Primer::FlexComponent.new(flex_direction: :column, justify_content: :center, align_items: :center, mb: 4, position: :relative,
33
+ = render Primer::BoxComponent.new(display: :flex, flex_direction: :column, justify_content: :center, align_items: :center, mb: 4, position: :relative,
34
34
  data: { controller: :slideshow, slideshow_incrementer: 0, slideshow_advance: true }) do
35
35
  - @conference.content(:gallery).each_with_index do |image, index|
36
36
  = @conference.content.image_tag(image, { resize_to_fill: [1680, 600] }, draggable: false, data: { 'slideshow-target': 'slide' },
@@ -1,15 +1,15 @@
1
- = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
1
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil]) do
2
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
3
+ = render Primer::Beta::Text.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
4
4
  = render Primer::OcticonComponent.new('clock', vertical_align: :baseline)
5
5
  = time_tag presentation.start_datetime, format: :short
6
- = render Primer::TextComponent.new(tag: :div, color: :text_secondary) do
6
+ = render Primer::Beta::Text.new(tag: :div, color: :muted) do
7
7
  = render Primer::OcticonComponent.new('location')
8
8
  = render(Primer::BaseComponent.new(tag: :address, display: :inline)) { presentation.session.room_name }
9
9
  = render Primer::BaseComponent.new(tag: :div, flex: :auto) do
10
10
  = render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
11
11
  = render(Primer::LinkComponent.new(href: frontend_conference_presentation_path(conference, presentation), data: { turbo_frame: '_top' })) { presentation.title }
12
- = render Primer::TextComponent.new(tag: :div, color: :text_secondary) do
12
+ = render Primer::Beta::Text.new(tag: :div, color: :muted) do
13
13
  = render Primer::OcticonComponent.new(presentation.presenters.many? ? 'people' : 'person')
14
14
  = render Primer::BaseComponent.new(tag: :address, display: :inline) do
15
15
  = presentation.presenters.collect(&:full_name_and_institution).to_sentence
@@ -1,6 +1,6 @@
1
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
2
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row], my: 4) do
3
+ = render Primer::BoxComponent.new(pr: [nil, nil, nil, 4], mb: [4, nil, nil, 0], col: [12, nil, nil, 3]) do
4
4
  %ul.filter-list
5
5
  - cache [@conference.presentations, @presentation_type] do
6
6
  %li
@@ -10,13 +10,13 @@
10
10
  %span.count{ title: t(:'.results') }= @conference.presentations.count
11
11
  = render partial: 'presentation_type', collection: @conference.presentation_types.sorted,
12
12
  cached: -> presentation_type { [presentation_type, @presentation_type] }
13
- = render Primer::FlexItemComponent.new(col: [12, nil, nil, 9]) do
13
+ = render Primer::BoxComponent.new(col: [12, nil, nil, 9]) do
14
14
  - if @presentations.any?
15
15
  %filter-input{ aria: { owns: 'presentation_list' } }
16
16
  .subnav.subnav-flush
17
17
  .subnav-search.float-left.ml-0
18
18
  = search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
19
- = octicon 'search', class: 'subnav-search-icon'
19
+ = render Primer::OcticonComponent.new('search', class: 'subnav-search-icon')
20
20
  %div{ id: 'presentation_list' }
21
21
  - if @presentations.any?
22
22
  %ul{ data: { filter: { list: true } } }
@@ -1,10 +1,10 @@
1
1
  = render Primer::FlashComponent.new(variant: :warning, full: true, icon: 'clock') do |component|
2
- = render Primer::TextComponent.new(tag: :div, display: :inline) do
2
+ = render Primer::Beta::Text.new(tag: :div, display: :inline) do
3
3
  = t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
4
4
  - if @conference.content(:submission_text).present?
5
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary, display: :inline)) { @conference.content.html(:submission_text) }
5
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted, display: :inline)) { @conference.content.html(:submission_text).to_s }
6
6
  - if @conference.content(:submission_url).present?
7
7
  - component.action do
8
- = render Primer::ButtonComponent.new(tag: :a, href: @conference.content.html(:submission_url), button_type: :primary,
8
+ = render Primer::ButtonComponent.new(tag: :a, href: @conference.content.html(:submission_url).to_s, button_type: :primary,
9
9
  variant: :small) do
10
10
  = t :'.submit_abstract'