spina-conferences-primer_theme-fork 0.9.0 → 1.0.0.rc1

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -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 +5 -2
  13. data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +7 -7
  14. data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +14 -13
  15. data/app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb +2 -1
  16. data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +5 -3
  17. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +2 -1
  18. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +23 -13
  19. data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +10 -2
  20. data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +3 -1
  21. data/app/models/spina/parts/conferences/primer_theme/checkbox.rb +6 -2
  22. data/app/models/spina/parts/conferences/primer_theme.rb +9 -3
  23. data/app/views/conferences_primer_theme/pages/about.html.haml +9 -9
  24. data/app/views/conferences_primer_theme/pages/committee.html.haml +10 -9
  25. data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +2 -2
  26. data/app/views/conferences_primer_theme/pages/events.html.haml +3 -3
  27. data/app/views/conferences_primer_theme/pages/homepage.html.haml +2 -2
  28. data/app/views/conferences_primer_theme/pages/information.html.haml +2 -2
  29. data/app/views/conferences_primer_theme/pages/periodical.html.haml +5 -5
  30. data/app/views/conferences_primer_theme/pages/show.html.haml +1 -1
  31. data/app/views/conferences_primer_theme/partials/_event.html.haml +1 -1
  32. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +2 -2
  33. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -14
  34. data/app/views/spina/application/_admin_bar.html.haml +7 -0
  35. data/app/views/spina/application/_alert.html.haml +4 -0
  36. data/app/views/spina/application/_analytics.html.erb +10 -0
  37. data/app/views/spina/application/{_footer_content.html.haml → _cookies_footer.html.haml} +1 -1
  38. data/app/views/spina/application/_footer.html.haml +20 -12
  39. data/app/views/spina/application/_google_site_verification.html.haml +1 -0
  40. data/app/views/spina/application/_text.html.haml +1 -1
  41. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +1 -1
  42. data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +4 -3
  43. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +1 -1
  44. data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +3 -3
  45. data/app/views/spina/conferences/primer_theme/blog/shared/_sidebar.html.haml +1 -1
  46. data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +3 -3
  47. data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +1 -1
  48. data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +1 -1
  49. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +3 -3
  50. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +1 -1
  51. data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +3 -3
  52. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +5 -5
  53. data/app/views/spina/conferences/primer_theme/conferences/presentations/_abstract.html.haml +1 -1
  54. data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml +1 -1
  55. data/app/views/spina/conferences/primer_theme/conferences/presentations/show.html.haml +3 -3
  56. data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +2 -2
  57. data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +4 -4
  58. data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +15 -15
  59. data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +2 -2
  60. data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +3 -3
  61. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +2 -2
  62. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +3 -3
  63. data/config/initializers/importmap.rb +21 -0
  64. data/config/initializers/mime_types.rb +3 -1
  65. data/config/initializers/themes/conferences_primer_theme.rb +4 -2
  66. data/config/locales/en.yml +5 -2
  67. data/config/routes.rb +1 -1
  68. data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +1 -1
  69. data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +4 -17
  70. data/lib/spina/conferences/primer_theme/engine.rb +4 -0
  71. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  72. data/lib/spina/conferences/primer_theme.rb +10 -3
  73. metadata +55 -33
  74. data/app/views/spina/application/_current_conference_alert.html.haml +0 -4
@@ -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'
@@ -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 }
@@ -1 +1 @@
1
- = render(Primer::MarkdownComponent.new) { text.html_safe }
1
+ = render(Primer::Markdown.new) { text.html_safe }
@@ -1,4 +1,4 @@
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
@@ -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,4 +1,4 @@
1
- = render(Primer::HeadingComponent.new) do
1
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
2
2
  Blog
3
3
 
4
4
  = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
@@ -1,4 +1,4 @@
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
@@ -6,12 +6,12 @@
6
6
  = render(Primer::FlexItemComponent.new(mr: 2)) do
7
7
  = render(Primer::OcticonComponent.new('person'))
8
8
  = render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
9
- = render(Primer::TextComponent.new(tag: :div, font_weight: :bold)) { @post.user.name }
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
14
  = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
15
15
  = render(Primer::FlexItemComponent.new(flex_auto: true)) do
16
- = render(Primer::MarkdownComponent.new(tag: :article)) 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,12 +1,12 @@
1
1
  = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
2
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
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
9
  = render Primer::FlexItemComponent.new(flex_auto: true, 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')
@@ -1,15 +1,15 @@
1
1
  = render Primer::FlexComponent.new(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
@@ -16,7 +16,7 @@
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'
@@ -4,15 +4,15 @@
4
4
  - content_for(:header) { render 'header' }
5
5
 
6
6
  = turbo_frame_tag 'conference_tabs' do
7
- = render Primer::UnderlineNavComponent.new(label: t(:'.conference_navigation')) do |component|
7
+ = render Primer::Alpha::UnderlineNav.new(tag: :div, label: t(:'.conference_navigation')) do |component|
8
8
  - component.tab(href: frontend_conference_path(@conference, tab: 'information', presentation_type: @presentation_type&.id),
9
- aria: { selected: (@tab == 'information').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
9
+ selected: (@tab == 'information'), id: 'information') do
10
10
  = t(:'.tabs.information')
11
11
  - component.tab(href: frontend_conference_path(@conference, tab: 'presentations', presentation_type: @presentation_type&.id),
12
- aria: { selected: (@tab == 'presentations').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
12
+ selected: (@tab == 'presentations'), id: 'presentations') do
13
13
  = t(:'.tabs.presentations')
14
14
  - component.tab(href: frontend_conference_path(@conference, tab: 'events', presentation_type: @presentation_type&.id),
15
- aria: { selected: (@tab == 'events').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
15
+ selected: (@tab == 'events'), id: 'events') do
16
16
  = t(:'.tabs.events')
17
17
  - component.actions do
18
18
  = render Primer::ButtonComponent.new(tag: :a, href: frontend_conference_url(@conference, protocol: :webcal, format: :ics),
@@ -23,7 +23,7 @@
23
23
  - when 'information'
24
24
  - cache [@conference, @tab] do
25
25
  - if @conference.content(:text).present?
26
- = render(Primer::MarkdownComponent.new(my: 4)) { @conference.content.html(:text) }
26
+ = render(Primer::Markdown.new(my: 4)) { @conference.content.html(:text).to_s }
27
27
  - else
28
28
  = render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
29
29
  - when 'presentations'
@@ -1,2 +1,2 @@
1
- = render(Primer::MarkdownComponent.new(my: 4)) do
1
+ = render(Primer::Markdown.new(my: 4)) do
2
2
  = abstract
@@ -1,5 +1,5 @@
1
1
  - cache [attachments, attachments.collect(&:attachment)] do
2
2
  - if attachments.any?
3
- = render Primer::ButtonGroupComponent.new(mt: 1) do |component|
3
+ = render Primer::ButtonGroup.new(mt: 1) do |component|
4
4
  = render partial: 'attachment', collection: attachments, cached: -> attachment { [attachment, attachment.attachment] },
5
5
  locals: { component: component }
@@ -1,17 +1,17 @@
1
1
  - cache [@presentation, @presentation.presenters, @presentation.attachments.collect(&:attachment)] do
2
2
  - cache [@presentation, @presentation.presenters] do
3
- = render(Primer::HeadingComponent.new(mb: [1, nil, 2, nil])) { @presentation.title }
3
+ = render(Primer::HeadingComponent.new(tag: :h1, mb: [1, nil, 2, nil])) { @presentation.title }
4
4
  %ul.text-secondary-dark.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(@presentation.presenters.many? ? 'people' : 'person')
7
- = render Primer::TextComponent.new(tag: :address, display: :inline) do
7
+ = render Primer::Beta::Text.new(tag: :address, display: :inline) do
8
8
  = @presentation.presenters.collect(&:full_name_and_institution).to_sentence
9
9
  %li.mr-sm-3.mb-1
10
10
  = render Primer::OcticonComponent.new('clock')
11
11
  = time_tag @presentation.start_datetime, format: :short
12
12
  %li.mb-1
13
13
  = render Primer::OcticonComponent.new('location')
14
- = render Primer::TextComponent.new(tag: :address, display: :inline) do
14
+ = render Primer::Beta::Text.new(tag: :address, display: :inline) do
15
15
  = t :'.room_and_institution', room: @presentation.session.room_name, institution: @presentation.room.institution.name
16
16
 
17
17
  = render partial: 'attachments', object: @presentation.attachments
@@ -2,5 +2,5 @@
2
2
  = render(Primer::FlexItemComponent.new(mr: 2)) do
3
3
  = render(Primer::OcticonComponent.new('person'))
4
4
  = render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
5
- = render(Primer::TextComponent.new(tag: :div, font_weight: :bold)) { authorship.affiliation.name }
6
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) { authorship.affiliation.institution.name }
5
+ = render(Primer::Beta::Text.new(tag: :div, font_weight: :bold)) { authorship.affiliation.name }
6
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) { authorship.affiliation.institution.name }
@@ -2,9 +2,9 @@
2
2
  %link{ rel: 'schema.DC', href: 'http://purl.org/dc/elements/1.1/' }
3
3
  - @article.authorships.sorted_within_article.each do |authorship|
4
4
  %meta{ name: 'DC.Creator.PersonalName', content: authorship.affiliation.name }
5
- %meta{ name: 'DC.Date.created', scheme: 'ISO8601', content: @issue.date.to_s(:iso8601) }
6
- %meta{ name: 'DC.Date.issued', scheme: 'ISO8601', content: @issue.date.to_s(:iso8601) }
7
- %meta{ name: 'DC.Date.modified', scheme: 'ISO8601', content: @issue.date.to_s(:iso8601) }
5
+ %meta{ name: 'DC.Date.created', scheme: 'ISO8601', content: @issue.date.to_formatted_s(:iso8601) }
6
+ %meta{ name: 'DC.Date.issued', scheme: 'ISO8601', content: @issue.date.to_formatted_s(:iso8601) }
7
+ %meta{ name: 'DC.Date.modified', scheme: 'ISO8601', content: @issue.date.to_formatted_s(:iso8601) }
8
8
  - if @article.has_content? :attachment
9
9
  %meta{ name: 'DC.Format', scheme: 'IMT', content: 'application/pdf' }
10
10
  %meta{ name: 'DC.Identifier', content: @article.id }
@@ -31,7 +31,7 @@
31
31
  %meta{ name: 'citation_author', content: authorship.affiliation.name }
32
32
  %meta{ name: 'citation_author_institution', content: authorship.affiliation.institution.name }
33
33
  %meta{ name: 'citation_language', content: 'en' }
34
- %meta{ name: 'citation_date', content: @issue.date.to_s(:iso8601).gsub('-', '/') }
34
+ %meta{ name: 'citation_date', content: @issue.date.to_formatted_s(:iso8601).gsub('-', '/') }
35
35
  %meta{ name: 'citation_volume', content: @issue.volume.number }
36
36
  %meta{ name: 'citation_issue', content: @issue.number }
37
37
  - if @article.has_content? :page_range
@@ -1,7 +1,7 @@
1
1
  - cache [@article, @article.authorships, @article.affiliations, @article.content(:abstract), @article.issue, @article.issue.volume, @article.issue.content(:cover_img)] do
2
2
  = render partial: 'metadata'
3
3
 
4
- = render(Primer::HeadingComponent.new) { @article.title }
4
+ = render(Primer::HeadingComponent.new(tag: :h1)) { @article.title }
5
5
 
6
6
  = render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
7
7
  = render(Primer::FlexItemComponent.new(flex_auto: true, mr: [nil, nil, 4, nil])) do
@@ -11,12 +11,12 @@
11
11
  = render(Primer::FlexItemComponent.new(mr: 2)) do
12
12
  = render(Primer::OcticonComponent.new('person'))
13
13
  = render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
14
- = render(Primer::TextComponent.new(tag: :div, font_weight: :bold)) { affiliation.name }
15
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) { affiliation.institution.name }
14
+ = render(Primer::Beta::Text.new(tag: :div, font_weight: :bold)) { affiliation.name }
15
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) { affiliation.institution.name }
16
16
 
17
17
  - if @article.has_content?(:abstract)
18
18
  = render(Primer::HeadingComponent.new(tag: :h2, mt: 4, font_size: 3)) { t '.abstract' }
19
- = render(Primer::MarkdownComponent.new) { @article.content.html(:abstract) }
19
+ = render(Primer::Markdown.new) { @article.content.html(:abstract) }
20
20
 
21
21
  = render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 20vw')) do |sidebar|
22
22
  - sidebar.body do
@@ -29,28 +29,28 @@
29
29
  = render Primer::OcticonComponent.new('download')
30
30
  = t '.download'
31
31
  - component.row do
32
- = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.published' }
33
- = render(Primer::TextComponent.new) do
32
+ = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.published' }
33
+ = render(Primer::Beta::Text.new) do
34
34
  = time_tag @article.issue.date, format: :long
35
35
  - component.row do
36
- = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.issue' }
37
- = render(Primer::TextComponent.new) do
36
+ = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.issue' }
37
+ = render(Primer::Beta::Text.new) do
38
38
  = link_to t('spina.conferences.primer_theme.journal.volume_issue',
39
39
  volume_number: @article.issue.volume.number,
40
40
  issue_number: @article.issue.number), frontend_issue_path(@article.issue)
41
41
  - unless @article.doi.blank?
42
42
  - component.row do
43
- = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.doi' }
44
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary, mt: 1)) do
43
+ = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.doi' }
44
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 1)) do
45
45
  = link_to nil, @article.doi
46
46
  - unless @article.url.blank?
47
47
  - component.row do
48
- = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.url' }
49
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary, mt: 1)) do
48
+ = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.url' }
49
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 1)) do
50
50
  = link_to nil, @article.url
51
51
  - component.row do
52
52
  = render(Primer::FlexComponent.new(direction: :column)) do
53
- = render(Primer::TextComponent.new(mb: 2)) do
53
+ = render(Primer::Beta::Text.new(mb: 2)) do
54
54
  Copyright © #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}
55
55
  - unless @licence.nil?
56
56
  - cache [@licence, @licence.content(:logo), @licence.content(:url)] do
@@ -63,8 +63,8 @@
63
63
  class: 'py-1'
64
64
  - unless @licence.nil?
65
65
  - cache [@licence, @licence.content(:text)] do
66
- = @licence.has_content?(:text) && render(Primer::TextComponent.new(mt: 1)) { @licence.content(:text) }
66
+ = @licence.has_content?(:text) && render(Primer::Beta::Text.new(mt: 1)) { @licence.content(:text) }
67
67
 
68
68
  - if @article.draft?
69
69
  - component.row do
70
- = render(Primer::TextComponent.new(tag: :div, color: :text_danger, font_weight: :bold)) { t '.draft' }
70
+ = render(Primer::Beta::Text.new(tag: :div, color: :danger, font_weight: :bold)) { t '.draft' }
@@ -2,12 +2,12 @@
2
2
  = render(Primer::FlexItemComponent.new(flex_auto: true)) do
3
3
  = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) do
4
4
  = link_to article.title, frontend_issue_article_path(article.issue, article)
5
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
5
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
6
6
  = render(Primer::OcticonComponent.new(article.affiliations.many? ? 'people' : 'person'))
7
7
  = render(Primer::BaseComponent.new(tag: :address, display: :inline)) do
8
8
  = article.authorships.sorted_within_article.collect { |authorship| authorship.affiliation.name }.to_sentence
9
9
  - unless article.doi.blank?
10
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
10
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
11
11
  = link_to nil, article.doi
12
12
  - if article.has_content?(:attachment)
13
13
  = render(Primer::ButtonComponent.new(tag: :a, href: frontend_issue_article_path(article.issue, article, format: :pdf), mt: 2, download: '')) do
@@ -8,10 +8,10 @@
8
8
  volume_number: issue.volume.number,
9
9
  issue_number: issue.number), frontend_issue_path(issue)
10
10
  - unless issue.title.blank?
11
- = render(Primer::HeadingComponent.new(tag: :h4, color: :text_secondary, mb: 1)) do
11
+ = render(Primer::HeadingComponent.new(tag: :h4, color: :muted, mb: 1)) do
12
12
  = issue.title
13
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary, font_weight: :bold)) do
13
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted, font_weight: :bold)) do
14
14
  = time_tag issue.date, format: :long
15
15
  - if issue.has_content?(:description)
16
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary, mt: 2)) do
16
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 2)) do
17
17
  = issue.content.html(:description)
@@ -1,8 +1,8 @@
1
1
  = render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
2
2
  = render(Primer::FlexComponent.new(direction: :column, flex: :auto)) do
3
- = render(Primer::HeadingComponent.new) { @journal.name }
3
+ = render(Primer::HeadingComponent.new(tag: :h1)) { @journal.name }
4
4
  - if @journal.has_content? :description
5
- = render(Primer::MarkdownComponent.new(my: 4)) { @journal.content.html(:description) }
5
+ = render(Primer::Markdown.new(my: 4)) { @journal.content.html(:description) }
6
6
  = render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 15vw;')) do |sidebar|
7
7
  - if @journal.has_content? :logo
8
8
  - sidebar.header(bg: :primary) do
@@ -1,18 +1,18 @@
1
1
  - cache [@issue, @issue.volume, @issue.articles, @issue.content(:cover_img), @issue.content(:description)] do
2
2
  - cache [@issue, @issue.volume] do
3
- = render(Primer::HeadingComponent.new) do
3
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
4
4
  = t('spina.conferences.primer_theme.journal.volume_issue',
5
5
  volume_number: @issue.volume.number,
6
6
  issue_number: @issue.number)
7
7
 
8
8
  - unless @issue.title.blank?
9
- = render(Primer::HeadingComponent.new(tag: :h2, color: :text_secondary, mb: 2)) { @issue.title }
9
+ = render(Primer::HeadingComponent.new(tag: :h2, color: :muted, mb: 2)) { @issue.title }
10
10
 
11
11
  - if @issue.has_content?(:cover_img)
12
12
  = render partial: 'issue_cover', locals: { issue: @issue, cover_img: @issue.content(:cover_img), size: [300, 600] }
13
13
 
14
14
  - if @issue.has_content?(:description)
15
- = render(Primer::MarkdownComponent.new(my: 4)) do
15
+ = render(Primer::Markdown.new(my: 4)) do
16
16
  = @issue.content.html(:description)
17
17
 
18
18
  - if @issue.has_content?(:attachment)
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ Spina::Conferences::PrimerTheme.config.importmap.draw do
4
+ # Stimulus & Turbo, as included with spina
5
+ pin '@hotwired/stimulus', to: 'stimulus.js'
6
+ pin '@hotwired/stimulus-loading', to: 'stimulus-loading.js'
7
+ pin '@hotwired/turbo-rails', to: 'turbo.js'
8
+
9
+ # GitHub Primer
10
+ pin '@github/details-dialog-element', to: '@github/details-dialog-element/dist/index.js'
11
+ pin '@github/include-fragment-element', to: '@github/include-fragment-element/dist/index.js'
12
+ pin '@github/filter-input-element', to: '@github/filter-input-element/dist/index.js'
13
+ pin '@github/details-menu-element', to: '@github/details-menu-element/dist/index.js'
14
+
15
+ # Frontend entrypoint
16
+ pin 'application', to: 'spina/conferences/primer_theme/application.js'
17
+
18
+ pin_all_from Spina::Conferences::PrimerTheme::Engine.root.join('app/assets/javascripts/spina/conferences/primer_theme/controllers'), # rubocop:disable Layout/LineLength
19
+ under: 'controllers',
20
+ to: 'spina/conferences/primer_theme/controllers'
21
+ end
@@ -1 +1,3 @@
1
- Mime::Type.register "application/pdf", :pdf
1
+ # frozen_string_literal: true
2
+
3
+ Mime::Type.register 'application/pdf', :pdf
@@ -4,7 +4,7 @@
4
4
  theme.name = 'conferences_primer_theme'
5
5
  theme.title = 'Conferences Primer theme'
6
6
 
7
- theme.layout_parts = %w[current_conference_alert]
7
+ theme.layout_parts = %w[alert github_url]
8
8
 
9
9
  theme.parts = [{
10
10
  name: 'text',
@@ -87,7 +87,7 @@
87
87
  part_type: 'Spina::Parts::Repeater',
88
88
  parts: %w[name start_date finish_date start_time application_deadline location is_archived description url]
89
89
  }, {
90
- name: 'current_conference_alert',
90
+ name: 'alert',
91
91
  title: 'Alert',
92
92
  part_type: 'Spina::Parts::Text'
93
93
  }, {
@@ -286,6 +286,8 @@
286
286
  }, {
287
287
  name: 'footer',
288
288
  label: 'Footer'
289
+ }, {
290
+ name: 'journal'
289
291
  }]
290
292
 
291
293
  theme.plugins = %w[conferences journal conferences-blog]
@@ -98,7 +98,7 @@ en:
98
98
  footer:
99
99
  copyright: © %{name} %{year}
100
100
  find_on_github: Find us on GitHub
101
- footer_content:
101
+ cookies_footer:
102
102
  cookies: About cookies
103
103
  loading: Loading…
104
104
 
@@ -192,13 +192,16 @@ en:
192
192
  licence_logo: Licence logo
193
193
  blog:
194
194
  posts:
195
+ index:
196
+ blog: Blog
197
+ no_posts: There are no posts.
195
198
  post:
196
199
  category_html: "Category: %{name}"
197
200
  categories:
198
201
  show:
199
202
  category: "Category: %{name}"
200
203
  shared:
201
- siebar:
204
+ sidebar:
202
205
  categories: Categories
203
206
 
204
207
 
data/config/routes.rb CHANGED
@@ -22,7 +22,7 @@ Spina::Engine.routes.draw do
22
22
 
23
23
  # Redirects for old sites that used the old blog path
24
24
  get 'posts/', to: redirect('/blog'), as: :old_index
25
- get 'posts/:id', to: redirect('/blog/%{id}'), as: :old_post
25
+ get 'posts/:id', to: redirect('/blog/%{id}'), as: :old_post # rubocop:disable Style/FormatStringToken
26
26
 
27
27
  get 'feed.atom', to: 'posts#index', as: :rss_feed, defaults: { format: :atom }
28
28
  get 'categories/:id', to: 'categories#show', as: :category
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class ChangeCurrentConferenceAlertToText < ActiveRecord::Migration[6.0]
3
+ class ChangeCurrentConferenceAlertToText < ActiveRecord::Migration[6.0] # :nodoc:
4
4
  def up
5
5
  Spina::LayoutPart.where(name: 'current_conference_alert', layout_partable_type: 'Spina::Line').each do |layout_part|
6
6
  if layout_part.partable.present?