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

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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -12
  3. data/app/assets/builds/spina/conferences/primer_theme/application.css +4 -0
  4. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.js +10 -1
  5. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +3 -0
  6. data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +10 -0
  7. data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +0 -8
  8. data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +0 -13
  9. data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +13 -0
  10. data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +12 -0
  11. data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +13 -7
  12. data/app/controllers/spina/conferences/primer_theme/journal/authors_controller.rb +48 -0
  13. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +11 -4
  14. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +10 -1
  15. data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +13 -0
  16. data/app/views/conferences_primer_theme/pages/about.html.haml +14 -8
  17. data/app/views/conferences_primer_theme/pages/committee.html.haml +6 -4
  18. data/app/views/conferences_primer_theme/pages/events.html.haml +9 -3
  19. data/app/views/conferences_primer_theme/pages/homepage.html.haml +1 -1
  20. data/app/views/conferences_primer_theme/pages/journal_information.html.haml +10 -0
  21. data/app/views/conferences_primer_theme/pages/periodical.html.haml +5 -5
  22. data/app/views/conferences_primer_theme/partials/_event.html.haml +1 -1
  23. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +4 -4
  24. data/app/views/layouts/conferences_primer_theme/application.html.haml +1 -1
  25. data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +3 -0
  26. data/app/views/layouts/spina/conferences/primer_theme/journal/authors.html.haml +5 -0
  27. data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +3 -0
  28. data/app/views/spina/application/_cookies.html.haml +8 -7
  29. data/app/views/spina/application/_cookies_footer.html.haml +15 -13
  30. data/app/views/spina/application/_footer.html.haml +2 -2
  31. data/app/views/spina/application/_journal_navigation.html.haml +17 -0
  32. data/app/views/spina/application/_mobile_navigation_items.html.haml +0 -3
  33. data/app/views/spina/application/_navigation.html.haml +1 -4
  34. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +5 -3
  35. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +5 -3
  36. data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +5 -5
  37. data/app/views/spina/conferences/primer_theme/conferences/conferences/_conference.html.haml +2 -2
  38. data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +3 -3
  39. data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +6 -3
  40. data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +3 -3
  41. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +1 -1
  42. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +9 -6
  43. data/app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml +9 -6
  44. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +7 -3
  45. data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +8 -6
  46. data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +3 -3
  47. data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +12 -14
  48. data/app/views/spina/conferences/primer_theme/journal/authors/_author.html.haml +9 -0
  49. data/app/views/spina/conferences/primer_theme/journal/authors/index.html.haml +12 -0
  50. data/app/views/spina/conferences/primer_theme/journal/authors/show.html.haml +22 -0
  51. data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +4 -4
  52. data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +7 -6
  53. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +30 -24
  54. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +33 -21
  55. data/config/initializers/primer.rb +1 -1
  56. data/config/initializers/themes/conferences_primer_theme.rb +12 -2
  57. data/config/locales/en.yml +20 -31
  58. data/config/routes.rb +6 -2
  59. data/lib/spina/conferences/primer_theme/engine.rb +4 -4
  60. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  61. metadata +17 -10
@@ -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
@@ -1,4 +1,4 @@
1
- %div{ data: { slideshow_target: 'slide' } }
1
+ %div{ data: { slideshow_target: 'slide' }, hidden: (index != 0) }
2
2
  - if item.content(:background_image).present?
3
3
  = render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false, style: 'z-index: 1') do
4
4
  = image_tag(main_app.url_for(item.content(:background_image).variant(resize_to_limit: [1680, 1680])),
@@ -9,11 +9,11 @@
9
9
  class: %w[width-full height-full])
10
10
  .container-lg.p-responsive.position-relative.color-text-white.height-full{ style: 'z-index: 3'}
11
11
  = render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
12
- %div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
12
+ %div{ style: 'color: var(--color-scale-white); text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
13
13
  = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) do
14
14
  = item.content(:title)
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::Markdown.new(my: 4)) do
15
+ %div{ style: 'color: var(--color-scale-white); text-shadow: 0 1px 1px #010409bf, 0 1px 25px #010409bf;' }
16
+ = render(Primer::Markdown.new(my: 4, font_size: 3)) do
17
17
  = item.content.html(:description).to_s
18
18
  - if item.content(:url).present?
19
19
  = link_to t('.more_info'), item.content(:url),
@@ -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',
@@ -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 }
@@ -1,7 +1,8 @@
1
- = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |component|
2
- - component.header do
3
- = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
4
- class: %w[Box-btn-octicon btn-octicon float-right]) do
5
- = render Primer::OcticonComponent.new('x')
6
- .Box-title= t(:'.title')
7
- = component.body { }
1
+ - cache do
2
+ = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |component|
3
+ - component.header do
4
+ = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
5
+ class: %w[Box-btn-octicon btn-octicon float-right]) do
6
+ = render Primer::OcticonComponent.new('x')
7
+ .Box-title= t(:'.title')
8
+ = component.body { }
@@ -1,13 +1,15 @@
1
- = render Primer::DetailsComponent.new(overlay: :dark, reset: true) do |component|
2
- = component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
3
- = render Primer::OcticonComponent.new('info')
4
- = t :'.cookies'
5
- = component.body(tag: :'details-dialog') do
6
- %include-fragment{ src: frontend_cookies_info_path, loading: :lazy }
7
- = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |box_component|
8
- = box_component.body do
9
- = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
10
- class: %w[Box-btn-octicon btn-octicon m-0 position-absolute right-0 top-0]) do
11
- = render Primer::OcticonComponent.new('x')
12
- = render Primer::BlankslateComponent.new(title: t('.loading')) do |blankslate_component|
13
- = blankslate_component.spinner(size: :large)
1
+ - cache frontend_cookies_info_path do
2
+ = render Primer::DetailsComponent.new(overlay: :dark, reset: true) do |component|
3
+ = component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
4
+ = render Primer::OcticonComponent.new('info')
5
+ = t :'.cookies'
6
+ = component.body(tag: :'details-dialog') do
7
+ %include-fragment{ src: frontend_cookies_info_path, loading: :lazy }
8
+ = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |box_component|
9
+ = box_component.body do
10
+ = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
11
+ class: %w[Box-btn-octicon btn-octicon m-0 position-absolute right-0 top-0]) do
12
+ = render Primer::OcticonComponent.new('x')
13
+ = render Primer::Beta::Blankslate.new(title: t('.loading')) do |blankslate_component|
14
+ = blankslate_component.visual_spinner(size: :large)
15
+ = blankslate_component.heading(tag: :h3).with_content(t('.loading'))
@@ -1,4 +1,4 @@
1
- - cache [footer_navigation_items, current_account] do
1
+ - cache [all_navigation_items, current_account] do
2
2
  = render Primer::BoxComponent.new(position: :relative, display: :flex,
3
3
  flex_wrap: :wrap,
4
4
  direction: [:column_reverse, nil, :row, nil],
@@ -9,7 +9,7 @@
9
9
  %div
10
10
  = render(Primer::Beta::Text.new(tag: :span, color: :muted, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
11
11
  = t :'.copyright', name: current_account.name, year: Date.today.year
12
- - cache footer_navigation_items do
12
+ - cache all_navigation_items do
13
13
  %ul.list-style-none.d-flex.flex-wrap.flex-1.flex-justify-center.flex-lg-justify-around.mb-2.mb-lg-0
14
14
  - footer_navigation_items.each do |item|
15
15
  - cache item do
@@ -0,0 +1,17 @@
1
+ - cache [current_page, controller_name, 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]
@@ -1,4 +1,4 @@
1
- - cache main_navigation_items do
1
+ - cache all_navigation_items do
2
2
  .Header.px-3.px-md-4.px-lg-5.flex-wrap.flex-lg-nowrap
3
3
  .Header-item.mt-n1.mb-n1= link_to render('logo'), root_path, class: 'Header-link'
4
4
  %details.details-reset.d-lg-none{ style: 'display: contents' }
@@ -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]
@@ -3,10 +3,12 @@
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
11
- = render Primer::BlankslateComponent.new(title: t(:'.no_posts'), icon: 'mortar-board')
11
+ = render Primer::Beta::Blankslate.new do |blankslate|
12
+ - blankslate.visual_icon(icon: 'mortar-board')
13
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_posts'))
12
14
  = render 'spina/conferences/primer_theme/blog/shared/sidebar'
@@ -1,11 +1,13 @@
1
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
9
- = render Primer::BlankslateComponent.new(title: t(:'.no_posts'), icon: 'mortar-board')
9
+ = render Primer::Beta::Blankslate.new do |blankslate|
10
+ - blankslate.visual_icon(icon: 'mortar-board')
11
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_posts'))
10
12
  = render 'spina/conferences/primer_theme/blog/shared/sidebar'
11
13
 
@@ -2,16 +2,16 @@
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
8
+ = render(Primer::BoxComponent.new(display: :flex, tag: :address, direction: :column)) do
9
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
14
+ = render(Primer::BoxComponent.new(display: :flex, flex: :auto, direction: [:column, nil, :row, nil])) do
15
+ = render(Primer::BoxComponent.new(flex: :auto)) do
16
16
  = render(Primer::Markdown.new(tag: :article)) do
17
17
  = @post.content.html_safe
@@ -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
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
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
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
11
  = render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
12
12
  = event.description
@@ -11,6 +11,9 @@
11
11
  %ul{ data: { filter: { list: true } } }
12
12
  = render partial: 'event', collection: events.sorted, layout: 'list_item', cached: true
13
13
  - else
14
- = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
15
- = render Primer::BlankslateComponent.new(title: t(:'.no_matching_events'), icon: 'calendar', hidden: true,
16
- data: { 'filter-empty-state': true })
14
+ = render Primer::Beta::Blankslate.new do |blankslate|
15
+ - blankslate.visual_icon(icon: 'calendar')
16
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_events'))
17
+ = render Primer::Beta::Blankslate.new(data: { 'filter-empty-state': true }) do |blankslate|
18
+ - blankslate.visual_icon(icon: 'calendar')
19
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_matching_events'))
@@ -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,4 +1,4 @@
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
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)
@@ -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,7 +10,7 @@
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
@@ -24,6 +24,9 @@
24
24
  locals: { conference: @conference }, cached: -> presentation { [presentation, presentation.presenters] }
25
25
  = paginate @presentations.sorted, views_prefix: 'spina/conferences/primer_theme/conferences'
26
26
  - else
27
- = render Primer::BlankslateComponent.new(title: t(:'.no_presentations'), icon: 'mortar-board')
28
- = render Primer::BlankslateComponent.new(title: t(:'.no_matching_presentations'), icon: 'mortar-board', hidden: true,
29
- data: { 'filter-empty-state': true })
27
+ = render Primer::Beta::Blankslate.new do |blankslate|
28
+ - blankslate.visual_icon(icon: 'mortar-board')
29
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_presentations'))
30
+ = render Primer::Beta::Blankslate.new(data: { 'filter-empty-state': true }, hidden: true) do |blankslate|
31
+ - blankslate.visual_icon(icon: 'mortar-board')
32
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_matching_presentations'))
@@ -1,12 +1,12 @@
1
- = render Primer::FlexComponent.new(direction: [:column_reverse, nil, :row, nil]) do
2
- = render Primer::FlexItemComponent.new(flex_auto: true, mb: [4, nil, 0, nil]) do
1
+ = render Primer::BoxComponent.new(display: :flex, direction: [:column_reverse, nil, :row, nil]) do
2
+ = render Primer::BoxComponent.new(flex: :auto, mb: [4, nil, 0, nil]) do
3
3
  %filter-input{ aria: { owns: 'conference_list' } }
4
4
  - if @conferences.any?
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
8
  = render Primer::OcticonComponent.new('search', classes: 'subnav-search-icon')
9
- = render Primer::FlexItemComponent.new(mb: [4, nil, 0, nil]) do
9
+ = render Primer::BoxComponent.new(mb: [4, nil, 0, nil]) do
10
10
  = render Primer::ButtonComponent.new(tag: :a, href: frontend_conferences_url(protocol: :webcal, format: :ics), button_type: :primary,
11
11
  ml: [0, nil, 6, nil]) do
12
12
  = render Primer::OcticonComponent.new('calendar')
@@ -18,6 +18,9 @@
18
18
  = render partial: 'conference', collection: @conferences, layout: 'list_item',
19
19
  cached: -> conference { [conference, conference.institutions, conference.institutions.collect(&:logo)] }
20
20
  - else
21
- = render Primer::BlankslateComponent.new(title: t(:'.no_conferences'), icon: 'mortar-board')
22
- = render Primer::BlankslateComponent.new(title: t(:'.no_matching_conferences'), icon: 'mortar-board', hidden: true,
23
- data: { 'filter-empty-state': true })
21
+ = render Primer::Beta::Blankslate.new do |blankslate|
22
+ - blankslate.visual_icon(icon: 'mortar-board')
23
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_conferences'))
24
+ = render Primer::Beta::Blankslate.new(data: { 'filter-empty-state': true }, hidden: true) do |blankslate|
25
+ - blankslate.visual_icon(icon: 'mortar-board')
26
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_matching_conferences'))
@@ -25,7 +25,9 @@
25
25
  - if @conference.content(:text).present?
26
26
  = render(Primer::Markdown.new(my: 4)) { @conference.content.html(:text).to_s }
27
27
  - else
28
- = render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
28
+ = render Primer::Beta::Blankslate.new(my: 4) do |blankslate|
29
+ - blankslate.visual_icon(icon: 'info')
30
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_information'))
29
31
  - when 'presentations'
30
32
  - cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
31
33
  = render partial: 'presentations'
@@ -33,5 +35,7 @@
33
35
  - cache [@conference.events, @tab] do
34
36
  = render partial: 'events', locals: { events: @conference.events }
35
37
  - else
36
- = render Primer::BlankslateComponent.new(title: t('.no_tab'), description: t('.tab_does_not_exist', tab: @tab), icon: 'x-circle',
37
- my: 4)
38
+ = render Primer::Beta::Blankslate.new(my: 4) do |blankslate|
39
+ - blankslate.visual_icon(icon: 'x-circle')
40
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_tab'))
41
+ - blankslate.description { t('.tab_does_not_exist', tab: @tab) }
@@ -1,6 +1,8 @@
1
- = render(Primer::FlexComponent.new(tag: :li, mr: 4, align_items: :center)) do
2
- = render(Primer::FlexItemComponent.new(mr: 2)) do
3
- = render(Primer::OcticonComponent.new('person'))
4
- = render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
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 }
1
+ %li
2
+ = link_to frontend_author_path(authorship.affiliation.author) do
3
+ = render(Primer::BoxComponent.new(display: :flex, tag: :li, mr: 4, align_items: :center)) do
4
+ = render(Primer::BoxComponent.new(mr: 2)) do
5
+ = render(Primer::OcticonComponent.new('person'))
6
+ = render(Primer::BoxComponent.new(display: :flex, tag: :address, direction: :column)) do
7
+ = render(Primer::Beta::Text.new(tag: :div, font_weight: :bold)) { authorship.affiliation.name }
8
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) { authorship.affiliation.institution.name }
@@ -8,7 +8,7 @@
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 }
11
- %meta{ name: 'DC.Identifier.URI', content: frontend_issue_article_url(@issue.id, @article.id) }
11
+ %meta{ name: 'DC.Identifier.URI', content: frontend_volume_issue_article_url(@volume.number, @issue.number, @article.number) }
12
12
  - if @article.has_content? :page_range
13
13
  %meta{ name: 'DC.Identifier.pageNumber', content: "#{@article.content(:page_range).first_page}-#{@article.content(:page_range).last_page}" }
14
14
  %meta{ name: 'DC.Language', scheme: 'ISO639-1', content: 'en' }
@@ -37,5 +37,5 @@
37
37
  - if @article.has_content? :page_range
38
38
  %meta{ name: 'citation_firstpage', content: @article.content(:page_range).first_page }
39
39
  %meta{ name: 'citation_lastpage', content: @article.content(:page_range).last_page }
40
- %meta{ name: 'citation_abstract_html_url', content: frontend_issue_article_url(@issue.id, @article.id) }
41
- %meta{ name: 'citation_pdf_url', content: frontend_issue_article_url(@issue.id, @article.id) + '.pdf' }
40
+ %meta{ name: 'citation_abstract_html_url', content: frontend_volume_issue_article_url(@volume.number, @issue.number, @article.number) }
41
+ %meta{ name: 'citation_pdf_url', content: frontend_volume_issue_article_url(@volume.number, @issue.number, @article.number) + '.pdf' }
@@ -3,29 +3,23 @@
3
3
 
4
4
  = render(Primer::HeadingComponent.new(tag: :h1)) { @article.title }
5
5
 
6
- = render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
7
- = render(Primer::FlexItemComponent.new(flex_auto: true, mr: [nil, nil, 4, nil])) do
6
+ = render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row])) do
7
+ = render(Primer::BoxComponent.new(flex: :auto, mr: [nil, nil, nil, 4], col: [nil, nil, nil, 8])) do
8
8
  %ul.list-style-none.d-flex.flex-column.flex-sm-row.my-2
9
- - @article.affiliations.each do |affiliation|
10
- = render(Primer::FlexComponent.new(tag: :li, mr: 4, align_items: :center)) do
11
- = render(Primer::FlexItemComponent.new(mr: 2)) do
12
- = render(Primer::OcticonComponent.new('person'))
13
- = render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
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 }
9
+ = render partial: 'authorship', collection: @article.authorships.sorted_within_article
16
10
 
17
11
  - if @article.has_content?(:abstract)
18
12
  = render(Primer::HeadingComponent.new(tag: :h2, mt: 4, font_size: 3)) { t '.abstract' }
19
- = render(Primer::Markdown.new) { @article.content.html(:abstract) }
13
+ = render(Primer::Markdown.new) { @article.content.html(:abstract).to_s }
20
14
 
21
- = render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 20vw')) do |sidebar|
15
+ = render(Primer::BorderBoxComponent.new(ml: [nil, nil, nil, 4], col: [nil, nil, nil, 4])) do |sidebar|
22
16
  - sidebar.body do
23
17
  - if @article.issue.has_content?(:cover_img)
24
18
  = render partial: 'spina/conferences/primer_theme/journal/issues/issue_cover', locals: { issue: @article.issue, cover_img: @article.issue.content(:cover_img), size: [200, 400] }
25
19
  = render(Primer::BorderBoxComponent.new) do |component|
26
20
  - if @article.has_content?(:attachment)
27
21
  - component.row do
28
- = render(Primer::ButtonComponent.new(tag: :a, href: frontend_issue_article_path(@issue, @article, format: :pdf), download: '', scheme: :primary)) do
22
+ = render(Primer::ButtonComponent.new(tag: :a, href: frontend_volume_issue_article_path(@issue.volume.number, @issue.number, @article.number, format: :pdf), download: '', scheme: :primary)) do
29
23
  = render Primer::OcticonComponent.new('download')
30
24
  = t '.download'
31
25
  - component.row do
@@ -37,7 +31,7 @@
37
31
  = render(Primer::Beta::Text.new) do
38
32
  = link_to t('spina.conferences.primer_theme.journal.volume_issue',
39
33
  volume_number: @article.issue.volume.number,
40
- issue_number: @article.issue.number), frontend_issue_path(@article.issue)
34
+ issue_number: @article.issue.number), frontend_volume_issue_path(@article.issue.volume.number, @article.issue.number)
41
35
  - unless @article.doi.blank?
42
36
  - component.row do
43
37
  = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.doi' }
@@ -49,7 +43,11 @@
49
43
  = render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 1)) do
50
44
  = link_to nil, @article.url
51
45
  - component.row do
52
- = render(Primer::FlexComponent.new(direction: :column)) do
46
+ = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.permalink' }
47
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 1)) do
48
+ = link_to nil, frontend_volume_issue_article_url(@volume.number, @issue.number, @article.number)
49
+ - component.row do
50
+ = render(Primer::BoxComponent.new(display: :flex, direction: :column)) do
53
51
  = render(Primer::Beta::Text.new(mb: 2)) do
54
52
  Copyright © #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}
55
53
  - unless @licence.nil?
@@ -0,0 +1,9 @@
1
+ = render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil], align_items: [:flex_start, nil, nil, :center])) do
2
+ = render(Primer::BoxComponent.new(mr: 2)) do
3
+ = render(Primer::OcticonComponent.new('person'))
4
+ = render(Primer::BoxComponent.new(flex: :auto)) do
5
+ = link_to frontend_author_path(author) do
6
+ = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) do
7
+ = author.primary_affiliation.name
8
+ = render(Primer::HeadingComponent.new(tag: :h4, color: :muted, mb: 1)) do
9
+ = author.primary_affiliation.institution.name
@@ -0,0 +1,12 @@
1
+ = render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row])) do
2
+ = render(Primer::BoxComponent.new(col: [nil, nil, nil, 9])) do
3
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
4
+ = @journal.name
5
+ = render(Primer::HeadingComponent.new(tag: :h2, mt: 3)) { t '.authors' }
6
+ - if @authors.any?
7
+ %ul= render partial: 'author', collection: @authors, layout: 'list_item', cached: true
8
+ - else
9
+ = render Primer::Beta::Blankslate.new do |blankslate|
10
+ - blankslate.visual_icon(icon: 'mortar-board')
11
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_authors'))
12
+ = render 'journal_navigation'
@@ -0,0 +1,22 @@
1
+ = render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row])) do
2
+ = render(Primer::BoxComponent.new(col: [nil, nil, nil, 9])) do
3
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
4
+ = @journal.name
5
+ = render(Primer::HeadingComponent.new(tag: :h2, mt: 2)) do
6
+ = t '.name_institution', name: @author.primary_affiliation.name, institution: @author.primary_affiliation.institution.name
7
+ - if @author.affiliations.count > 1
8
+ = render(Primer::BoxComponent.new) do
9
+ = render(Primer::Beta::Text.new) do
10
+ = t '.aka'
11
+ = @author.affiliations.not_primary.map { |affiliation| t('.name_institution', name: affiliation.name, institution: affiliation.institution.name) }.join(', ')
12
+
13
+ = render(Primer::HeadingComponent.new(tag: :h3, mt: 3)) { t '.articles' }
14
+
15
+ - if @author.articles.any?
16
+ %ul= render partial: 'spina/conferences/primer_theme/journal/issues/article', collection: @author.articles.sorted_asc, layout: 'list_item', cached: true
17
+ - else
18
+ = render Primer::Beta::Blankslate.new do |blankslate|
19
+ - blankslate.visual_icon(icon: 'mortar-board')
20
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_articles'))
21
+
22
+ = render 'journal_navigation'
@@ -1,7 +1,7 @@
1
- = render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
2
- = render(Primer::FlexItemComponent.new(flex_auto: true)) do
1
+ = render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil])) do
2
+ = render(Primer::BoxComponent.new(flex: :auto)) do
3
3
  = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) do
4
- = link_to article.title, frontend_issue_article_path(article.issue, article)
4
+ = link_to article.title, frontend_volume_issue_article_path(article.issue.volume.number, article.issue.number, article.number)
5
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
@@ -10,6 +10,6 @@
10
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
- = render(Primer::ButtonComponent.new(tag: :a, href: frontend_issue_article_path(article.issue, article, format: :pdf), mt: 2, download: '')) do
13
+ = render(Primer::ButtonComponent.new(tag: :a, href: frontend_volume_issue_article_path(article.issue.volume.number, article.issue.number, article.number, format: :pdf), mt: 2, download: '')) do
14
14
  = render Primer::OcticonComponent.new('download')
15
15
  = t '.download'
@@ -1,12 +1,13 @@
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
  - if issue.content(:cover_img).present?
3
- = render(Primer::FlexItemComponent.new(mr: 4)) do
4
- = render partial: 'issue_cover', locals: { issue: issue, cover_img: issue.content(:cover_img), size: [150, 300] }
5
- = render(Primer::FlexItemComponent.new(flex_auto: true)) do
3
+ = render(Primer::BoxComponent.new(mr: 4)) do
4
+ = link_to frontend_volume_issue_path(issue.volume.number, issue.number) do
5
+ = render partial: 'issue_cover', locals: { issue: issue, cover_img: issue.content(:cover_img), size: [150, 300] }
6
+ = render(Primer::BoxComponent.new(flex: :auto)) do
6
7
  = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) do
7
8
  = link_to t('spina.conferences.primer_theme.journal.volume_issue',
8
9
  volume_number: issue.volume.number,
9
- issue_number: issue.number), frontend_issue_path(issue)
10
+ issue_number: issue.number), frontend_volume_issue_path(issue.volume.number, issue.number)
10
11
  - unless issue.title.blank?
11
12
  = render(Primer::HeadingComponent.new(tag: :h4, color: :muted, mb: 1)) do
12
13
  = issue.title
@@ -14,4 +15,4 @@
14
15
  = time_tag issue.date, format: :long
15
16
  - if issue.has_content?(:description)
16
17
  = render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 2)) do
17
- = issue.content.html(:description)
18
+ = issue.content.html(:description).to_s