spina-conferences-primer_theme-fork 0.9.2 → 1.0.0.rc3
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.
- checksums.yaml +4 -4
- data/README.md +16 -4
- data/Rakefile +6 -0
- data/app/assets/builds/spina/conferences/primer_theme/application.css +25964 -0
- data/app/assets/config/spina_conferences_primer_theme_manifest.js +7 -4
- data/app/assets/javascripts/spina/conferences/primer_theme/application.js +6 -7
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/application.js +10 -0
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/index.js +5 -0
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/{slideshow_controller.es6 → slideshow_controller.js} +14 -4
- data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
- data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +12 -0
- data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +0 -10
- data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +5 -20
- data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +12 -0
- data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +14 -13
- data/app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb +2 -1
- data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +11 -0
- data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +15 -7
- data/app/controllers/spina/conferences/primer_theme/journal/authors_controller.rb +48 -0
- data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +12 -5
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +33 -14
- data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +10 -2
- data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +11 -1
- data/app/models/spina/parts/conferences/primer_theme/checkbox.rb +6 -2
- data/app/models/spina/parts/conferences/primer_theme.rb +9 -3
- data/app/views/conferences_primer_theme/pages/about.html.haml +14 -14
- data/app/views/conferences_primer_theme/pages/committee.html.haml +13 -12
- data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/events.html.haml +3 -3
- data/app/views/conferences_primer_theme/pages/homepage.html.haml +1 -1
- data/app/views/conferences_primer_theme/pages/information.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/journal_information.html.haml +10 -0
- data/app/views/conferences_primer_theme/pages/periodical.html.haml +10 -10
- data/app/views/conferences_primer_theme/pages/show.html.haml +1 -1
- data/app/views/conferences_primer_theme/partials/_event.html.haml +2 -2
- data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +2 -2
- data/app/views/layouts/conferences_primer_theme/application.html.haml +1 -1
- data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -14
- data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +3 -0
- data/app/views/layouts/spina/conferences/primer_theme/journal/authors.html.haml +5 -0
- data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +3 -0
- data/app/views/spina/application/_admin_bar.html.haml +7 -0
- data/app/views/spina/application/_alert.html.haml +4 -0
- data/app/views/spina/application/_analytics.html.erb +10 -0
- data/app/views/spina/application/{_footer_content.html.haml → _cookies_footer.html.haml} +1 -1
- data/app/views/spina/application/_footer.html.haml +20 -12
- data/app/views/spina/application/_google_site_verification.html.haml +1 -0
- data/app/views/spina/application/_journal_navigation.html.haml +17 -0
- data/app/views/spina/application/_mobile_navigation_items.html.haml +0 -3
- data/app/views/spina/application/_navigation.html.haml +0 -3
- data/app/views/spina/application/_text.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +4 -3
- data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +8 -8
- data/app/views/spina/conferences/primer_theme/blog/shared/_sidebar.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_conference.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +6 -6
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +4 -4
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +4 -4
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +4 -4
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +5 -5
- data/app/views/spina/conferences/primer_theme/conferences/presentations/_abstract.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/presentations/show.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +8 -6
- data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +7 -7
- data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +24 -26
- data/app/views/spina/conferences/primer_theme/journal/authors/_author.html.haml +9 -0
- data/app/views/spina/conferences/primer_theme/journal/authors/index.html.haml +10 -0
- data/app/views/spina/conferences/primer_theme/journal/authors/show.html.haml +20 -0
- data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +6 -6
- data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +10 -9
- data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +27 -23
- data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +31 -21
- data/config/initializers/importmap.rb +21 -0
- data/config/initializers/mime_types.rb +3 -1
- data/config/initializers/primer.rb +1 -1
- data/config/initializers/themes/conferences_primer_theme.rb +14 -2
- data/config/locales/en.yml +23 -33
- data/config/routes.rb +7 -3
- data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +1 -1
- data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +4 -17
- data/lib/spina/conferences/primer_theme/engine.rb +7 -3
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- data/lib/spina/conferences/primer_theme.rb +10 -3
- metadata +62 -33
- data/app/views/spina/application/_current_conference_alert.html.haml +0 -4
@@ -1,6 +1,6 @@
|
|
1
1
|
- cache [@conference, @conference.institutions] do
|
2
2
|
.container-lg.p-responsive.mb-4
|
3
|
-
= render(Primer::HeadingComponent.new( mb: [1, nil, 2, nil])) { @conference.name }
|
3
|
+
= render(Primer::HeadingComponent.new(tag: :h1, mb: [1, nil, 2, nil])) { @conference.name }
|
4
4
|
%ul.text-secondary.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
5
5
|
%li.mr-sm-3.mb-1
|
6
6
|
= render Primer::OcticonComponent.new('calendar')
|
@@ -19,9 +19,9 @@
|
|
19
19
|
- if @conference.content(:sponsors).present?
|
20
20
|
= render Primer::SubheadComponent.new(spacious: true) do |component|
|
21
21
|
= component.heading(tag: :h2) { t :'.sponsors.title' }
|
22
|
-
= render Primer::
|
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::
|
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::
|
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' },
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
= render Primer::
|
1
|
+
= render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil]) do
|
2
2
|
= render Primer::BaseComponent.new(tag: :div, flex_shrink: 0, mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 3, nil]) do
|
3
|
-
= render Primer::
|
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::
|
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::
|
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
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
- cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
|
2
|
-
= render Primer::
|
3
|
-
= render Primer::
|
2
|
+
= render Primer::BoxComponent.new(display: :flex, direction: [:column, nil, nil, :row], my: 4) do
|
3
|
+
= render Primer::BoxComponent.new(pr: [nil, nil, nil, 4], mb: [4, nil, nil, 0], col: [12, nil, nil, 3]) do
|
4
4
|
%ul.filter-list
|
5
5
|
- cache [@conference.presentations, @presentation_type] do
|
6
6
|
%li
|
@@ -10,13 +10,13 @@
|
|
10
10
|
%span.count{ title: t(:'.results') }= @conference.presentations.count
|
11
11
|
= render partial: 'presentation_type', collection: @conference.presentation_types.sorted,
|
12
12
|
cached: -> presentation_type { [presentation_type, @presentation_type] }
|
13
|
-
= render Primer::
|
13
|
+
= render Primer::BoxComponent.new(col: [12, nil, nil, 9]) do
|
14
14
|
- if @presentations.any?
|
15
15
|
%filter-input{ aria: { owns: 'presentation_list' } }
|
16
16
|
.subnav.subnav-flush
|
17
17
|
.subnav-search.float-left.ml-0
|
18
18
|
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
19
|
-
=
|
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 } } }
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
= render Primer::FlashComponent.new(variant: :warning, full: true, icon: 'clock') do |component|
|
2
|
-
= render Primer::
|
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::
|
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'
|
@@ -1,12 +1,12 @@
|
|
1
|
-
= render Primer::
|
2
|
-
= render Primer::
|
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::
|
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')
|
@@ -4,15 +4,15 @@
|
|
4
4
|
- content_for(:header) { render 'header' }
|
5
5
|
|
6
6
|
= turbo_frame_tag 'conference_tabs' do
|
7
|
-
= render Primer::
|
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
|
-
|
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
|
-
|
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
|
-
|
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::
|
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::
|
1
|
+
= render(Primer::Markdown.new(my: 4)) do
|
2
2
|
= abstract
|
data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
- cache [attachments, attachments.collect(&:attachment)] do
|
2
2
|
- if attachments.any?
|
3
|
-
= render Primer::
|
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::
|
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::
|
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
|
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
=
|
3
|
-
= render(Primer::
|
4
|
-
|
5
|
-
|
6
|
-
|
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 }
|
@@ -2,13 +2,13 @@
|
|
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.
|
6
|
-
%meta{ name: 'DC.Date.issued', scheme: 'ISO8601', content: @issue.date.
|
7
|
-
%meta{ name: 'DC.Date.modified', scheme: 'ISO8601', content: @issue.date.
|
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 }
|
11
|
-
%meta{ name: 'DC.Identifier.URI', content:
|
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' }
|
@@ -31,11 +31,11 @@
|
|
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.
|
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
|
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:
|
41
|
-
%meta{ name: 'citation_pdf_url', content:
|
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' }
|
@@ -1,56 +1,54 @@
|
|
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
|
-
= render(Primer::
|
7
|
-
= render(Primer::
|
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
|
-
|
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::TextComponent.new(tag: :div, font_weight: :bold)) { affiliation.name }
|
15
|
-
= render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) { 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::
|
13
|
+
= render(Primer::Markdown.new) { @article.content.html(:abstract).to_s }
|
20
14
|
|
21
|
-
= render(Primer::BorderBoxComponent.new(ml: [nil, nil,
|
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:
|
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
|
32
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
33
|
-
= render(Primer::
|
26
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.published' }
|
27
|
+
= render(Primer::Beta::Text.new) do
|
34
28
|
= time_tag @article.issue.date, format: :long
|
35
29
|
- component.row do
|
36
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
37
|
-
= render(Primer::
|
30
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.issue' }
|
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),
|
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
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
44
|
-
= render(Primer::
|
37
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.doi' }
|
38
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 1)) do
|
45
39
|
= link_to nil, @article.doi
|
46
40
|
- unless @article.url.blank?
|
47
41
|
- component.row do
|
48
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
49
|
-
= render(Primer::
|
42
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.url' }
|
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::
|
53
|
-
|
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
|
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?
|
56
54
|
- cache [@licence, @licence.content(:logo), @licence.content(:url)] do
|
@@ -63,8 +61,8 @@
|
|
63
61
|
class: 'py-1'
|
64
62
|
- unless @licence.nil?
|
65
63
|
- cache [@licence, @licence.content(:text)] do
|
66
|
-
= @licence.has_content?(:text) && render(Primer::
|
64
|
+
= @licence.has_content?(:text) && render(Primer::Beta::Text.new(mt: 1)) { @licence.content(:text) }
|
67
65
|
|
68
66
|
- if @article.draft?
|
69
67
|
- component.row do
|
70
|
-
= render(Primer::
|
68
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :danger, font_weight: :bold)) { t '.draft' }
|
@@ -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,10 @@
|
|
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::BlankslateComponent.new(title: t(:'.no_authors'), icon: 'mortar-board')
|
10
|
+
= render 'journal_navigation'
|
@@ -0,0 +1,20 @@
|
|
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::BlankslateComponent.new(title: t(:'.no_articles'), icon: 'mortar-board')
|
19
|
+
|
20
|
+
= render 'journal_navigation'
|
@@ -1,15 +1,15 @@
|
|
1
|
-
= render(Primer::
|
2
|
-
= render(Primer::
|
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,
|
5
|
-
= render(Primer::
|
4
|
+
= link_to article.title, frontend_volume_issue_article_path(article.issue.volume.number, article.issue.number, article.number)
|
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::
|
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:
|
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,17 +1,18 @@
|
|
1
|
-
= render(Primer::
|
1
|
+
= render(Primer::BoxComponent.new(display: :flex, direction: [:column, nil, :row, nil])) do
|
2
2
|
- if issue.content(:cover_img).present?
|
3
|
-
= render(Primer::
|
4
|
-
=
|
5
|
-
|
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),
|
10
|
+
issue_number: issue.number), frontend_volume_issue_path(issue.volume.number, issue.number)
|
10
11
|
- unless issue.title.blank?
|
11
|
-
= render(Primer::HeadingComponent.new(tag: :h4, color: :
|
12
|
+
= render(Primer::HeadingComponent.new(tag: :h4, color: :muted, mb: 1)) do
|
12
13
|
= issue.title
|
13
|
-
= render(Primer::
|
14
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, font_weight: :bold)) do
|
14
15
|
= time_tag issue.date, format: :long
|
15
16
|
- if issue.has_content?(:description)
|
16
|
-
= render(Primer::
|
17
|
-
= issue.content.html(:description)
|
17
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 2)) do
|
18
|
+
= issue.content.html(:description).to_s
|
@@ -1,26 +1,25 @@
|
|
1
|
-
= render(Primer::
|
2
|
-
= render(Primer::
|
3
|
-
= render(Primer::
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
= render
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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' }
|
@@ -28,3 +27,8 @@
|
|
28
27
|
%ul= render partial: 'issue', collection: @issues, layout: 'list_item', cached: true
|
29
28
|
- else
|
30
29
|
= render Primer::BlankslateComponent.new(title: t(:'.no_issues'), icon: 'mortar-board')
|
30
|
+
|
31
|
+
- if @journal.has_content?(:issn) && !@journal.content(:issn).empty?
|
32
|
+
= render(Primer::BoxComponent.new(mt: 4)) do
|
33
|
+
= render(Primer::Beta::Text.new(font_weight: :bold)) do
|
34
|
+
= t '.issn', issn: @journal.content(:issn)
|
@@ -1,27 +1,37 @@
|
|
1
1
|
- cache [@issue, @issue.volume, @issue.articles, @issue.content(:cover_img), @issue.content(:description)] do
|
2
|
-
|
3
|
-
= render(Primer::
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
9
|
-
|
10
|
+
- unless @issue.title.blank?
|
11
|
+
= render(Primer::HeadingComponent.new(tag: :h2, color: :muted, mb: 2)) { @issue.title }
|
10
12
|
|
11
|
-
|
12
|
-
|
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::MarkdownComponent.new(my: 4)) do
|
16
|
-
= @issue.content.html(:description)
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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::BlankslateComponent.new(title: t(:'.no_articles'), icon: 'mortar-board')
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
= render(Primer::BorderBoxComponent.new(ml: [nil, nil, nil, 4], col: [nil, nil, nil, 4])) do |sidebar|
|
25
|
+
- sidebar.body do
|
26
|
+
- if @issue.has_content?(:cover_img)
|
27
|
+
= render partial: 'spina/conferences/primer_theme/journal/issues/issue_cover', locals: { issue: @issue, cover_img: @issue.content(:cover_img), size: [300, 600] }
|
28
|
+
= render(Primer::BorderBoxComponent.new) do |component|
|
29
|
+
- component.row do
|
30
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.published' }
|
31
|
+
= render(Primer::Beta::Text.new) do
|
32
|
+
= time_tag @issue.date, format: :long
|
33
|
+
- if @issue.has_content?(:attachment)
|
34
|
+
- component.row do
|
35
|
+
= render(Primer::ButtonComponent.new(tag: :a, scheme: :primary, href: main_app.url_for(@issue.content(:attachment)), my: 2, download: '')) do
|
36
|
+
= render Primer::OcticonComponent.new('download')
|
37
|
+
= 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
|