spina-conferences-primer_theme 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +1 -0
- data/app/views/spina/application/_mobile_navigation_item.html.haml +12 -13
- data/app/views/spina/application/_mobile_navigation_items.html.haml +1 -1
- data/app/views/spina/application/_navigation.html.haml +1 -1
- data/app/views/spina/application/_navigation_item.html.haml +11 -12
- data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +56 -46
- data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +26 -6
- data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +23 -14
- data/config/locales/en.yml +4 -0
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8a85cdf19e437cc1bcfbbac3a0410c9936c7937e0fad5cfd43b69d50e220142
|
4
|
+
data.tar.gz: e61eb65c953c3c0f960594b433bbc053a0d6e3c4f78968bd61cfb60f01e11d14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e79f15190f9f206e35e50d073d88e1db00ee4b7b7fe68b890df6f0912e439a449a2ab74d14b1847b9d16348e4704778102b9391aa143d67366310ca7bae0598e
|
7
|
+
data.tar.gz: b7d8086273db0c61bf6734c3ef2bb299b46539f634e2b1dafcf2dd730c7e343baee10b1199bb3c7efdc766ef268b3451465b5c1b1c72c9aeb27259fcb0f75b4a
|
@@ -1,13 +1,12 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
-
|
4
|
-
%
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
class: %w[Header-link py-2]
|
1
|
+
.Header-item.mr-0.border-top.border-white-fade-15.flex-column.flex-items-stretch
|
2
|
+
- if navigation_item.has_children?
|
3
|
+
%details.details-reset
|
4
|
+
%summary.Header-link.py-2
|
5
|
+
= navigation_item.menu_title
|
6
|
+
= render Primer::OcticonComponent.new('chevron-down')
|
7
|
+
%ul.list-style-none
|
8
|
+
- navigation_item.children.each do |child|
|
9
|
+
%li= link_to child.menu_title, child.materialized_path, class: %w[d-block py-2 pl-3 border-top border-white-fade color-text-white]
|
10
|
+
- elsif navigation_item.is_root?
|
11
|
+
= link_to navigation_item.menu_title, navigation_item.materialized_path,
|
12
|
+
class: %w[Header-link py-2]
|
@@ -1,3 +1,3 @@
|
|
1
1
|
%nav.d-flex.flex-column.flex-self-stretch
|
2
|
-
= render partial: 'mobile_navigation_item', collection: main_navigation_items,
|
2
|
+
= render partial: 'mobile_navigation_item', collection: main_navigation_items, as: :navigation_item, cache: -> navigation_item { [navigation_item, navigation_item.children] }
|
3
3
|
.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]
|
@@ -6,6 +6,6 @@
|
|
6
6
|
= render Primer::OcticonComponent.new('three-bars', height: 24)
|
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
|
-
= render partial: 'navigation_item', collection: main_navigation_items,
|
9
|
+
= render partial: 'navigation_item', collection: main_navigation_items, cache: -> navigation_item { [navigation_item, navigation_item.children] }
|
10
10
|
.Header-item.d-none.d-lg-flex= link_to 'Journal', frontend_issues_path, class: %w[Header-link]
|
11
11
|
.Header-item.d-none.d-lg-flex= link_to 'Conferences', frontend_conferences_path, class: %w[Header-link]
|
@@ -1,12 +1,11 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
-
|
4
|
-
%
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
= link_to navigation_item.menu_title, navigation_item.materialized_path, class: %w[Header-link]
|
1
|
+
.Header-item.position-relative.d-none.d-lg-flex
|
2
|
+
- if navigation_item.has_children? && navigation_item.children.regular_pages.in_menu.live.sorted.any?
|
3
|
+
%details.details-reset.details-overlay
|
4
|
+
%summary.Header-link{ role: 'button', aria: { haspopup: 'menu' } }
|
5
|
+
= navigation_item.menu_title
|
6
|
+
= render Primer::OcticonComponent.new('chevron-down')
|
7
|
+
%ul.dropdown-menu.dropdown-menu-sw
|
8
|
+
- navigation_item.children.regular_pages.in_menu.live.sorted.each do |child|
|
9
|
+
%li= link_to child.menu_title, child.materialized_path, class: 'dropdown-item'
|
10
|
+
- elsif navigation_item.is_root?
|
11
|
+
= link_to navigation_item.menu_title, navigation_item.materialized_path, class: %w[Header-link]
|
@@ -1,50 +1,60 @@
|
|
1
|
-
|
1
|
+
- cache [@article, @article.authorships, @article.affiliations, @article.content(:abstract), @article.issue, @article.issue.volume, @article.issue.content(:cover_img)] do
|
2
|
+
= render(Primer::HeadingComponent.new) { @article.title }
|
2
3
|
|
3
|
-
= render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
= render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
|
5
|
+
= render(Primer::FlexItemComponent.new(flex_auto: true, mr: [nil, nil, 4, nil])) do
|
6
|
+
%ul.list-style-none.d-flex.flex-column.flex-sm-row.my-2
|
7
|
+
- @article.affiliations.each do |affiliation|
|
8
|
+
= render(Primer::FlexComponent.new(tag: :li, mr: 4, align_items: :center)) do
|
9
|
+
= render(Primer::FlexItemComponent.new(mr: 2)) do
|
10
|
+
= render(Primer::OcticonComponent.new('person'))
|
11
|
+
= render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
|
12
|
+
= render(Primer::TextComponent.new(tag: :div, font_weight: :bold)) { affiliation.name }
|
13
|
+
= render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) { affiliation.institution.name }
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
- if @article.has_content?(:abstract)
|
16
|
+
= render(Primer::HeadingComponent.new(tag: :h2, mt: 4, font_size: 3)) { t '.abstract' }
|
17
|
+
= render(Primer::MarkdownComponent.new) { @article.content.html(:abstract) }
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
= render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 20vw')) do |sidebar|
|
20
|
+
- sidebar.body do
|
21
|
+
- if @article.issue.has_content?(:cover_img)
|
22
|
+
= render partial: 'spina/conferences/primer_theme/journal/issues/issue_cover', locals: { issue: @article.issue, cover_img: @article.issue.content(:cover_img), size: [200, 400] }
|
23
|
+
= render(Primer::BorderBoxComponent.new) do |component|
|
24
|
+
- if @article.has_content?(:attachment)
|
25
|
+
- component.row do
|
26
|
+
= render(Primer::ButtonComponent.new(tag: :a, href: main_app.url_for(@article.content(:attachment)), download: '', scheme: :primary)) do
|
27
|
+
= render Primer::OcticonComponent.new('download')
|
28
|
+
= t '.download'
|
24
29
|
- component.row do
|
25
|
-
= render(Primer::
|
26
|
-
|
27
|
-
=
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
=
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
= render(Primer::
|
47
|
-
=
|
48
|
-
|
49
|
-
|
50
|
-
|
30
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.published' }
|
31
|
+
= render(Primer::TextComponent.new) do
|
32
|
+
= time_tag @article.issue.date, format: :long
|
33
|
+
- component.row do
|
34
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.issue' }
|
35
|
+
= render(Primer::TextComponent.new) do
|
36
|
+
= link_to t('spina.conferences.primer_theme.journal.volume_issue',
|
37
|
+
volume_number: @article.issue.volume.number,
|
38
|
+
issue_number: @article.issue.number), frontend_issue_path(@article.issue)
|
39
|
+
- unless @article.doi.blank?
|
40
|
+
- component.row do
|
41
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.doi' }
|
42
|
+
= render(Primer::TextComponent.new(tag: :div, color: :text_secondary, mt: 1)) do
|
43
|
+
= link_to nil, @article.doi
|
44
|
+
- unless @article.url.blank?
|
45
|
+
- component.row do
|
46
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :text_secondary)) { t '.url' }
|
47
|
+
= render(Primer::TextComponent.new(tag: :div, color: :text_secondary, mt: 1)) do
|
48
|
+
= link_to nil, @article.url
|
49
|
+
- component.row do
|
50
|
+
-# TODO: allow user to select licence
|
51
|
+
= render(Primer::FlexComponent.new(direction: :column)) do
|
52
|
+
= render(Primer::TextComponent.new(mb: 2)) do
|
53
|
+
Copyright #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}
|
54
|
+
%a{ rel: 'licence', href: 'https://creativecommons.org/licenses/by/4.0/' }
|
55
|
+
%img{ alt: 'Creative Commons Attribution 4.0 International Licence', src: '//i.creativecommons.org/l/by/4.0/88x31.png' }
|
56
|
+
= render(Primer::TextComponent.new(mt: 1)) { t '.cc_by_licence_html' }
|
57
|
+
|
58
|
+
- if @article.draft?
|
59
|
+
- component.row do
|
60
|
+
= render(Primer::TextComponent.new(tag: :div, color: :text_danger, font_weight: :bold)) { t '.draft' }
|
@@ -3,12 +3,12 @@
|
|
3
3
|
= render(Primer::FlexItemComponent.new(mr: 4)) do
|
4
4
|
= render partial: 'issue_cover', locals: { issue: issue, cover_img: issue.content(:cover_img), size: [150, 300] }
|
5
5
|
= render(Primer::FlexItemComponent.new(flex_auto: true)) do
|
6
|
-
= render(Primer::HeadingComponent.new(tag: :
|
6
|
+
= render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) do
|
7
7
|
= link_to t('spina.conferences.primer_theme.journal.volume_issue',
|
8
8
|
volume_number: issue.volume.number,
|
9
9
|
issue_number: issue.number), frontend_issue_path(issue)
|
10
10
|
- unless issue.title.blank?
|
11
|
-
= render(Primer::HeadingComponent.new(tag: :
|
11
|
+
= render(Primer::HeadingComponent.new(tag: :h4, color: :text_secondary, mb: 1)) do
|
12
12
|
= issue.title
|
13
13
|
= render(Primer::TextComponent.new(tag: :div, color: :text_secondary, font_weight: :bold)) do
|
14
14
|
= time_tag issue.date, format: :long
|
@@ -1,10 +1,30 @@
|
|
1
|
-
= render(Primer::
|
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) { @journal.name }
|
4
|
+
- if @journal.has_content? :description
|
5
|
+
= render(Primer::MarkdownComponent.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] }
|
2
24
|
|
3
|
-
-
|
4
|
-
= render(Primer::
|
5
|
-
|
6
|
-
%div#journal-issues-list.border-top
|
25
|
+
#journal-issues-list
|
26
|
+
= render(Primer::HeadingComponent.new(tag: :h2, mt: 3)) { t '.all_issues' }
|
7
27
|
- if @issues.any?
|
8
|
-
%ul= render partial: 'issue', collection: @issues, layout: 'list_item'
|
28
|
+
%ul= render partial: 'issue', collection: @issues, layout: 'list_item', cached: true
|
9
29
|
- else
|
10
30
|
= render Primer::BlankslateComponent.new(title: t(:'.no_issues'), icon: 'mortar-board')
|
@@ -1,18 +1,27 @@
|
|
1
|
-
|
2
|
-
|
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) do
|
4
|
+
= t('spina.conferences.primer_theme.journal.volume_issue',
|
5
|
+
volume_number: @issue.volume.number,
|
6
|
+
issue_number: @issue.number)
|
3
7
|
|
4
|
-
- unless @issue.title.blank?
|
5
|
-
|
8
|
+
- unless @issue.title.blank?
|
9
|
+
= render(Primer::HeadingComponent.new(tag: :h2, color: :text_secondary, mb: 2)) { @issue.title }
|
6
10
|
|
7
|
-
- if @issue.has_content?(:cover_img)
|
8
|
-
|
11
|
+
- if @issue.has_content?(:cover_img)
|
12
|
+
= render partial: 'issue_cover', locals: { issue: @issue, cover_img: @issue.content(:cover_img), size: [300, 600] }
|
9
13
|
|
10
|
-
- if @issue.has_content?(:description)
|
11
|
-
|
12
|
-
|
14
|
+
- if @issue.has_content?(:description)
|
15
|
+
= render(Primer::MarkdownComponent.new(my: 4)) do
|
16
|
+
= @issue.content.html(:description)
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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'
|
22
|
+
|
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')
|
data/config/locales/en.yml
CHANGED
@@ -167,8 +167,11 @@ en:
|
|
167
167
|
index:
|
168
168
|
no_issues: This journal has no issues.
|
169
169
|
logo: Journal logo
|
170
|
+
all_issues: All Issues
|
171
|
+
latest_issue: "Latest Issue (Vol. %{volume_number} Issue %{issue_number})"
|
170
172
|
show:
|
171
173
|
no_articles: This issue has no articles.
|
174
|
+
download: Full Issue PDF
|
172
175
|
article:
|
173
176
|
download: PDF
|
174
177
|
articles:
|
@@ -180,6 +183,7 @@ en:
|
|
180
183
|
published: Published
|
181
184
|
issue: Issue
|
182
185
|
draft: THIS ARTICLE IS A DRAFT
|
186
|
+
cc_by_licence_html: This work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
|
183
187
|
|
184
188
|
languages:
|
185
189
|
en-GB: British English
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spina-conferences-primer_theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Malčić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.4.
|
117
|
+
version: 0.4.2
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.4.
|
124
|
+
version: 0.4.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: capybara
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|