spina-conferences-primer_theme-fork 0.10.0 → 1.0.0.rc4

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -12
  3. data/app/assets/builds/spina/conferences/primer_theme/application.css +25964 -0
  4. data/app/assets/config/spina_conferences_primer_theme_manifest.js +7 -4
  5. data/app/assets/javascripts/spina/conferences/primer_theme/application.js +6 -7
  6. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/application.js +10 -0
  7. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/index.js +5 -0
  8. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/{slideshow_controller.es6 → slideshow_controller.js} +14 -4
  9. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
  10. data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +11 -0
  11. data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +0 -10
  12. data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +0 -15
  13. data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +13 -0
  14. data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +12 -0
  15. data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +13 -7
  16. data/app/controllers/spina/conferences/primer_theme/journal/authors_controller.rb +48 -0
  17. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +11 -4
  18. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +20 -1
  19. data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +13 -0
  20. data/app/views/conferences_primer_theme/pages/about.html.haml +16 -10
  21. data/app/views/conferences_primer_theme/pages/committee.html.haml +8 -6
  22. data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +1 -1
  23. data/app/views/conferences_primer_theme/pages/events.html.haml +11 -5
  24. data/app/views/conferences_primer_theme/pages/information.html.haml +1 -1
  25. data/app/views/conferences_primer_theme/pages/journal_information.html.haml +10 -0
  26. data/app/views/conferences_primer_theme/pages/periodical.html.haml +8 -8
  27. data/app/views/conferences_primer_theme/partials/_event.html.haml +2 -2
  28. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +1 -1
  29. data/app/views/layouts/conferences_primer_theme/application.html.haml +1 -1
  30. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -14
  31. data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +3 -0
  32. data/app/views/layouts/spina/conferences/primer_theme/journal/authors.html.haml +5 -0
  33. data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +3 -0
  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/_cookies.html.haml +8 -7
  38. data/app/views/spina/application/_cookies_footer.html.haml +15 -0
  39. data/app/views/spina/application/_footer.html.haml +21 -13
  40. data/app/views/spina/application/_google_site_verification.html.haml +1 -0
  41. data/app/views/spina/application/_journal_navigation.html.haml +17 -0
  42. data/app/views/spina/application/_mobile_navigation_items.html.haml +0 -3
  43. data/app/views/spina/application/_navigation.html.haml +1 -4
  44. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +5 -3
  45. data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +3 -2
  46. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +5 -3
  47. data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +5 -5
  48. data/app/views/spina/conferences/primer_theme/conferences/conferences/_conference.html.haml +2 -2
  49. data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +3 -3
  50. data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +6 -3
  51. data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +3 -3
  52. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +1 -1
  53. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +9 -6
  54. data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +2 -2
  55. data/app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml +9 -6
  56. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +8 -4
  57. data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +8 -6
  58. data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +7 -7
  59. data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +12 -14
  60. data/app/views/spina/conferences/primer_theme/journal/authors/_author.html.haml +9 -0
  61. data/app/views/spina/conferences/primer_theme/journal/authors/index.html.haml +12 -0
  62. data/app/views/spina/conferences/primer_theme/journal/authors/show.html.haml +22 -0
  63. data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +4 -4
  64. data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +7 -6
  65. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +30 -24
  66. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +33 -21
  67. data/config/initializers/importmap.rb +21 -0
  68. data/config/initializers/primer.rb +1 -1
  69. data/config/initializers/themes/conferences_primer_theme.rb +14 -2
  70. data/config/locales/en.yml +21 -32
  71. data/config/routes.rb +6 -2
  72. data/lib/spina/conferences/primer_theme/engine.rb +6 -2
  73. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  74. data/lib/spina/conferences/primer_theme.rb +10 -2
  75. metadata +53 -25
  76. data/app/views/spina/application/_current_conference_alert.html.haml +0 -4
  77. data/app/views/spina/application/_footer_content.html.haml +0 -13
@@ -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
@@ -1,30 +1,36 @@
1
- = render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
2
- = render(Primer::FlexComponent.new(direction: :column, flex: :auto)) do
3
- = render(Primer::HeadingComponent.new(tag: :h1)) { @journal.name }
4
- - if @journal.has_content? :description
5
- = render(Primer::Markdown.new(my: 4)) { @journal.content.html(:description) }
6
- = render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 15vw;')) do |sidebar|
7
- - if @journal.has_content? :logo
8
- - sidebar.header(bg: :primary) do
9
- = render(Primer::FlexItemComponent.new(mb: 4)) do
10
- - cache @journal.content(:logo) do
11
- = image_tag main_app.url_for(@journal.content(:logo).variant(resize_to_limit: [300, 150])),
12
- srcset: srcset(@journal.content(:logo), variant: { resize_to_limit: [300, 150] }),
13
- alt_description: t('.logo'),
14
- draggable: false,
15
- class: 'p-1'
16
- - unless @latest_issue.nil?
17
- - sidebar.row do
18
- = render(Primer::HeadingComponent.new(tag: :h2, font_size: 3)) do
19
- = link_to t('.latest_issue', volume_number: @latest_issue.volume.number, issue_number: @latest_issue.number), frontend_issue_path(@latest_issue)
20
- - if @latest_issue.has_content?(:cover_img)
21
- - sidebar.row do
22
- = link_to(frontend_issue_path(@latest_issue)) do
23
- = render partial: 'issue_cover', locals: { issue: @latest_issue, cover_img: @latest_issue.content(:cover_img), size: [150, 300] }
1
+ = render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row])) do
2
+ = render(Primer::BoxComponent.new(display: :flex, direction: :column, col: [nil, nil, nil, 9])) do
3
+ = render(Primer::BoxComponent.new) do
4
+ = render(Primer::HeadingComponent.new(tag: :h1)) { @journal.name }
5
+ - if @journal.has_content? :description
6
+ = render(Primer::Markdown.new(my: 4)) { @journal.content.html(:description).to_s }
7
+ = render Primer::BoxComponent.new(my: 4, col: [12, nil, 6, nil], float: [nil, nil, :left, nil]) do
8
+ - if @journal.has_content?(:documents) && @journal.content(:documents)&.any?
9
+ = render Primer::SubheadComponent.new do |component|
10
+ = component.heading { t :'.documents.title' }
11
+ %ul
12
+ - @journal.content(:documents).each do |document|
13
+ %li.list-style-none.py-1.d-flex.flex-items-center
14
+ = render(Primer::Beta::Text.new(tag: :div, flex: :auto)) { document.content(:name).presence || t(:'.documents.no_name') }
15
+ - if document.content(:attachment).present?
16
+ = render Primer::ButtonComponent.new(tag: :a, ml: 2, href: main_app.url_for(document.content(:attachment)), download: '') do
17
+ = render Primer::OcticonComponent.new('desktop-download')
18
+ = t :'.documents.download'
19
+ - else
20
+ = render(Primer::Beta::Text.new(tag: :div, font_size: 6, color: :muted)) { t :'.documents.no_file' }
21
+
22
+ = render 'journal_navigation'
24
23
 
25
24
  #journal-issues-list
26
25
  = render(Primer::HeadingComponent.new(tag: :h2, mt: 3)) { t '.all_issues' }
27
26
  - if @issues.any?
28
27
  %ul= render partial: 'issue', collection: @issues, layout: 'list_item', cached: true
29
28
  - else
30
- = render Primer::BlankslateComponent.new(title: t(:'.no_issues'), icon: 'mortar-board')
29
+ = render Primer::Beta::Blankslate.new do |blankslate|
30
+ - blankslate.visual_icon(icon: 'mortar-board')
31
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_issues'))
32
+
33
+ - if @journal.has_content?(:issn) && !@journal.content(:issn).empty?
34
+ = render(Primer::BoxComponent.new(mt: 4)) do
35
+ = render(Primer::Beta::Text.new(font_weight: :bold)) do
36
+ = t '.issn', issn: @journal.content(:issn)
@@ -1,27 +1,39 @@
1
1
  - cache [@issue, @issue.volume, @issue.articles, @issue.content(:cover_img), @issue.content(:description)] do
2
- - cache [@issue, @issue.volume] do
3
- = render(Primer::HeadingComponent.new(tag: :h1)) do
4
- = t('spina.conferences.primer_theme.journal.volume_issue',
5
- volume_number: @issue.volume.number,
6
- issue_number: @issue.number)
2
+ = render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row])) do
3
+ = render(Primer::BoxComponent.new(mr: [nil, nil, nil, 4], col: [nil, nil, nil, 8])) do
4
+ - cache [@issue, @issue.volume] do
5
+ = render(Primer::HeadingComponent.new(tag: :h1)) do
6
+ = t('spina.conferences.primer_theme.journal.volume_issue',
7
+ volume_number: @issue.volume.number,
8
+ issue_number: @issue.number)
7
9
 
8
- - unless @issue.title.blank?
9
- = render(Primer::HeadingComponent.new(tag: :h2, color: :muted, mb: 2)) { @issue.title }
10
+ - unless @issue.title.blank?
11
+ = render(Primer::HeadingComponent.new(tag: :h2, color: :muted, mb: 2)) { @issue.title }
10
12
 
11
- - if @issue.has_content?(:cover_img)
12
- = render partial: 'issue_cover', locals: { issue: @issue, cover_img: @issue.content(:cover_img), size: [300, 600] }
13
+ - if @issue.has_content?(:description)
14
+ = render(Primer::Markdown.new(my: 4)) do
15
+ = @issue.content.html(:description).to_s
13
16
 
14
- - if @issue.has_content?(:description)
15
- = render(Primer::Markdown.new(my: 4)) do
16
- = @issue.content.html(:description)
17
17
 
18
- - if @issue.has_content?(:attachment)
19
- = render(Primer::ButtonComponent.new(tag: :a, scheme: :primary, href: main_app.url_for(@issue.content(:attachment)), my: 2, download: '')) do
20
- = render Primer::OcticonComponent.new('download')
21
- = t '.download'
18
+ %div#journal-articles-list.border-top
19
+ - if @articles.any?
20
+ %ul= render partial: 'article', collection: @articles.sorted_asc, layout: 'list_item', cached: true
21
+ - else
22
+ = render Primer::Beta::Blankslate.new do |blankslate|
23
+ - blankslate.visual_icon(icon: 'mortar-board')
24
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_articles'))
22
25
 
23
- %div#journal-articles-list.border-top
24
- - if @articles.any?
25
- %ul= render partial: 'article', collection: @articles.sorted_asc, layout: 'list_item', cached: true
26
- - else
27
- = render Primer::BlankslateComponent.new(title: t(:'.no_articles'), icon: 'mortar-board')
26
+ = render(Primer::BorderBoxComponent.new(ml: [nil, nil, nil, 4], col: [nil, nil, nil, 4])) do |sidebar|
27
+ - sidebar.body do
28
+ - if @issue.has_content?(:cover_img)
29
+ = render partial: 'spina/conferences/primer_theme/journal/issues/issue_cover', locals: { issue: @issue, cover_img: @issue.content(:cover_img), size: [300, 600] }
30
+ = render(Primer::BorderBoxComponent.new) do |component|
31
+ - component.row do
32
+ = render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.published' }
33
+ = render(Primer::Beta::Text.new) do
34
+ = time_tag @issue.date, format: :long
35
+ - if @issue.has_content?(:attachment)
36
+ - component.row do
37
+ = render(Primer::ButtonComponent.new(tag: :a, scheme: :primary, href: main_app.url_for(@issue.content(:attachment)), my: 2, download: '')) do
38
+ = render Primer::OcticonComponent.new('download')
39
+ = t '.download'
@@ -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,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Rails.application.config.primer_view_components.silence_deprecations = true
3
+ Rails.application.config.primer_view_components.silence_deprecations = false
@@ -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
  }, {
@@ -235,6 +235,11 @@
235
235
  title: 'Information',
236
236
  description: 'Contains general information',
237
237
  parts: %w[text]
238
+ }, {
239
+ name: 'journal_information',
240
+ title: 'Information (Journal)',
241
+ description: 'An information page specifically for the journal section',
242
+ parts: %w[text]
238
243
  }, {
239
244
  name: 'committee',
240
245
  title: 'Committee',
@@ -288,5 +293,12 @@
288
293
  label: 'Footer'
289
294
  }]
290
295
 
296
+ theme.resources = [{
297
+ name: 'journal',
298
+ label: 'Journal',
299
+ slug: 'journal',
300
+ view_template: 'journal_information'
301
+ }]
302
+
291
303
  theme.plugins = %w[conferences journal conferences-blog]
292
304
  end
@@ -1,34 +1,3 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t(:'hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # The following keys must be escaped otherwise they will not be retrieved by
20
- # the default I18n backend:
21
- #
22
- # true, false, on, off, yes, no
23
- #
24
- # Instead, surround them with single quotes.
25
- #
26
- # en:
27
- # 'true': 'foo'
28
- #
29
- # To learn more, please read the Rails Internationalization guide
30
- # available at http://guides.rubyonrails.org/i18n.html.
31
-
32
1
  en:
33
2
  layouts:
34
3
  spina:
@@ -98,9 +67,12 @@ en:
98
67
  footer:
99
68
  copyright: © %{name} %{year}
100
69
  find_on_github: Find us on GitHub
101
- footer_content:
70
+ cookies_footer:
102
71
  cookies: About cookies
103
72
  loading: Loading…
73
+ journal_navigation:
74
+ issues: View issues
75
+ authors: View authors
104
76
 
105
77
  conferences:
106
78
  primer_theme:
@@ -175,6 +147,12 @@ en:
175
147
  logo: Journal logo
176
148
  all_issues: All Issues
177
149
  latest_issue: "Latest Issue (Vol. %{volume_number} Issue %{issue_number})"
150
+ issn: "ISSN: %{issn}"
151
+ documents:
152
+ title: Useful documents
153
+ download: Download
154
+ no_file: No file uploaded.
155
+ no_name: No name.
178
156
  show:
179
157
  no_articles: This issue has no articles.
180
158
  download: Full Issue PDF
@@ -185,11 +163,22 @@ en:
185
163
  download: PDF
186
164
  doi: DOI
187
165
  url: URL
166
+ permalink: Permalink
188
167
  abstract: Abstract
189
168
  published: Published
190
169
  issue: Issue
191
170
  draft: THIS ARTICLE IS A DRAFT
192
171
  licence_logo: Licence logo
172
+ authors:
173
+ index:
174
+ authors: Authors
175
+ no_authors: This journal has no authors.
176
+ show:
177
+ authors: Authors
178
+ articles: Articles
179
+ aka: "Also known as:"
180
+ name_institution: "%{name} (%{institution})"
181
+
193
182
  blog:
194
183
  posts:
195
184
  index:
data/config/routes.rb CHANGED
@@ -10,9 +10,13 @@ Spina::Engine.routes.draw do
10
10
  end
11
11
 
12
12
  namespace :frontend, path: 'journal', module: 'conferences/primer_theme/journal' do
13
- resources :issues, only: %i[index show] do
14
- resources :articles, only: %i[show]
13
+ resources :issues, only: :index
14
+ resources :volumes, only: [], param: :number do
15
+ resources :issues, only: :show, param: :number do
16
+ resources :articles, only: %i[show], param: :number
17
+ end
15
18
  end
19
+ resources :authors, only: %i[index show]
16
20
  end
17
21
 
18
22
  namespace :frontend, as: 'frontend_blog', path: 'blog', module: 'conferences/primer_theme/blog' do
@@ -5,13 +5,17 @@ module Spina
5
5
  module PrimerTheme
6
6
  # Registers the frontend controller and page parts with Spina.
7
7
  class Engine < ::Rails::Engine
8
- config.after_initialize do
9
- Spina::Part.register(Spina::Parts::Conferences::PrimerTheme::Checkbox)
8
+ initializer 'spina.conferences.primer_theme.importmap', before: 'importmap' do |app|
9
+ app.config.importmap.cache_sweepers << Engine.root.join('app/assets/javascripts')
10
10
  end
11
11
 
12
12
  config.to_prepare do
13
13
  ::Spina::PagesController.helper 'spina/conferences/primer_theme/application'
14
14
  end
15
+
16
+ config.after_initialize do
17
+ Spina::Part.register(Spina::Parts::Conferences::PrimerTheme::Checkbox)
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.10.0'
6
+ VERSION = '1.0.0.rc4'
7
7
  end
8
8
  end
9
9
  end
@@ -9,9 +9,17 @@ require 'spina/admin/conferences/blog'
9
9
  require 'view_component'
10
10
  require 'primer/view_components'
11
11
  require 'icalendar'
12
+ require 'cssbundling-rails'
12
13
 
13
14
  module Spina
14
- # A Primer-based frontend theme for Spina.
15
- module PrimerTheme
15
+ module Conferences
16
+ # A Primer-based frontend theme for Spina.
17
+ module PrimerTheme
18
+ include ActiveSupport::Configurable
19
+
20
+ config_accessor :importmap
21
+
22
+ self.importmap = Importmap::Map.new
23
+ end
16
24
  end
17
25
  end