spina-conferences-primer_theme-fork 0.6.1 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.es6 +21 -1
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +8 -0
- data/app/models/spina/parts/conferences/primer_theme/checkbox.rb +15 -0
- data/app/models/spina/parts/conferences/primer_theme.rb +7 -0
- data/app/views/conferences_primer_theme/pages/events.html.haml +22 -38
- data/app/views/conferences_primer_theme/pages/homepage.html.haml +12 -30
- data/app/views/conferences_primer_theme/pages/periodical.html.haml +39 -0
- data/app/views/conferences_primer_theme/partials/_event.html.haml +28 -0
- data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +20 -0
- data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +1 -1
- data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +1 -1
- data/app/views/spina/admin/parts/conferences/primer_theme/checkboxes/_form.html.haml +2 -0
- data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +6 -1
- data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/journal/issues/_issue_cover.html.haml +1 -1
- data/config/initializers/themes/conferences_primer_theme.rb +58 -3
- data/config/locales/en.rb +3 -2
- data/config/locales/en.yml +11 -5
- data/db/migrate/20210907142118_create_spina_parts_conferences_primer_theme_checkboxes.rb +7 -0
- data/lib/spina/conferences/primer_theme/engine.rb +5 -0
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- metadata +12 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eeeecc259280f962b1f0e54454b87884adbbcf02d7bccd976096489e48b7d6a
|
4
|
+
data.tar.gz: 0e9baa272b17486a1888d7103da11c22563c90208b62e625a245d7be90ef94bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5916e3b6065d2f4c5d4bef963ce35915c6666e99363001de02585536a8b8133860f7899f7bdf9851fa318d7f2aea9597f41e9b072b7cd3ca21c56f1998d38abd
|
7
|
+
data.tar.gz: 8473988d364a83fdba70e3a10d4c476f12df2fbd0b58c666bee88fec6e4686112f9dd67443102b48b4afc3d483ad1d9b89bce43e8f67e687ad8482b5e62414ce
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# PrimerTheme
|
2
2
|
A plugin for `Spina` that provides a frontend for `Spina::Admin::Conferences` using components from `Primer::ViewComponents`.
|
3
3
|
|
4
|
+
This fork provides an updated version of the plugin, as the main repo is currently stale.
|
5
|
+
|
4
6
|
## Usage
|
5
7
|
See the README for `Spina::Admin::Conferences`. Also make sure to ensure compilation of the assets for this gem by adding the following line to your
|
6
8
|
`manifest.js` file.
|
@@ -13,7 +15,7 @@ See the README for `Spina::Admin::Conferences`. Also make sure to ensure compila
|
|
13
15
|
Add this line to your application's Gemfile:
|
14
16
|
|
15
17
|
```ruby
|
16
|
-
gem 'spina-conferences-primer_theme'
|
18
|
+
gem 'spina-conferences-primer_theme-fork', require: 'spina/conferences/primer_theme'
|
17
19
|
```
|
18
20
|
|
19
21
|
And then execute:
|
@@ -23,7 +25,7 @@ $ bundle
|
|
23
25
|
|
24
26
|
Or install it yourself as:
|
25
27
|
```bash
|
26
|
-
$ gem install spina-conferences-primer_theme
|
28
|
+
$ gem install spina-conferences-primer_theme-fork
|
27
29
|
```
|
28
30
|
|
29
31
|
## Contributing
|
data/app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.es6
CHANGED
@@ -29,6 +29,26 @@ class SlideshowController extends Stimulus.Controller {
|
|
29
29
|
this.showSlide()
|
30
30
|
}
|
31
31
|
|
32
|
+
/**
|
33
|
+
* Returns the delay between slide transitions.
|
34
|
+
* @private
|
35
|
+
* @return {Number} The value for the delay.
|
36
|
+
*/
|
37
|
+
get delay() {
|
38
|
+
return this.data.has('delay')
|
39
|
+
? Number.parseInt(this.data.get('delay'))
|
40
|
+
: 10000
|
41
|
+
}
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Sets the delay between slide transitions.
|
45
|
+
* @private
|
46
|
+
* @param value {Number} The new value for the delay.
|
47
|
+
*/
|
48
|
+
set delay(value) {
|
49
|
+
this.data.set('delay', value.toString())
|
50
|
+
}
|
51
|
+
|
32
52
|
/**
|
33
53
|
* Hook to start advancing the slides if necessary.
|
34
54
|
* @private
|
@@ -36,7 +56,7 @@ class SlideshowController extends Stimulus.Controller {
|
|
36
56
|
connect() {
|
37
57
|
this.showSlide()
|
38
58
|
if (this.data.has('advance')) {
|
39
|
-
setInterval(() => this.next(),
|
59
|
+
setInterval(() => this.next(), this.delay)
|
40
60
|
}
|
41
61
|
}
|
42
62
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Spina
|
2
|
+
module Parts
|
3
|
+
module Conferences
|
4
|
+
module PrimerTheme
|
5
|
+
class Checkbox < Spina::Parts::Base
|
6
|
+
# Booleans don't work nicely with Spina page parts, so we have this mess
|
7
|
+
CHECKED_VALUE = "1"
|
8
|
+
UNCHECKED_VALUE = "0"
|
9
|
+
|
10
|
+
attr_json :content, :string, default: UNCHECKED_VALUE
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -6,53 +6,37 @@
|
|
6
6
|
|
7
7
|
- if content(:events_list).present?
|
8
8
|
= render Primer::SubheadComponent.new(mt: 4) do |component|
|
9
|
-
= component.heading
|
10
|
-
|
9
|
+
= component.heading do
|
10
|
+
- if content(:current_section_title).present?
|
11
|
+
= content(:current_section_title)
|
12
|
+
- else
|
13
|
+
= t :'.upcoming'
|
14
|
+
|
15
|
+
- content(:events_list).filter do |event|
|
16
|
+
- (event.content(:start_date).blank? || event.content(:start_date) >= Date.today) && event.content(:is_archived) != Spina::Parts::Conferences::PrimerTheme::Checkbox::CHECKED_VALUE
|
17
|
+
- end.then do |events|
|
11
18
|
- if events.any?
|
12
19
|
%ul
|
13
20
|
- repeater(events) do |event|
|
14
|
-
|
15
|
-
= render Primer::FlexComponent.new(direction: :column, align_items: :start) do
|
16
|
-
- if event.content(:name).present?
|
17
|
-
= render(Primer::HeadingComponent.new(tag: :h3, flex: :auto)) { event.content(:name) }
|
18
|
-
= render Primer::HeadingComponent.new(tag: :h4, flex: :auto) do
|
19
|
-
- if event.content(:start_time).present?
|
20
|
-
= t(:'.time_and_place_html',
|
21
|
-
time: time_tag(event.content(:start_time), format: :ordinal_datetime_with_year),
|
22
|
-
place: event.content(:location).presence || t('.location_tbc'))
|
23
|
-
- else
|
24
|
-
= t(:'.time_and_place_html', time: t('.time_tbc'), place: event.content(:location).presence || t('.location_tbc'))
|
25
|
-
- if event.content(:description).present?
|
26
|
-
= render(Primer::TextComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
|
27
|
-
- if event.content(:url).present?
|
28
|
-
= render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
|
29
|
-
= render Primer::OcticonComponent.new('link-external')
|
30
|
-
= t :'.more_info'
|
21
|
+
= render 'conferences_primer_theme/partials/event', event: event
|
31
22
|
- else
|
32
23
|
= render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
|
24
|
+
|
25
|
+
|
33
26
|
= render Primer::SubheadComponent.new(mt: 4) do |component|
|
34
|
-
= component.heading
|
35
|
-
|
27
|
+
= component.heading do
|
28
|
+
- if content(:past_section_title).present?
|
29
|
+
= content(:past_section_title)
|
30
|
+
- else
|
31
|
+
= t :'.past'
|
32
|
+
|
33
|
+
- content(:events_list).filter do |event|
|
34
|
+
- (event.has_content?(:is_archived) && event.content(:is_archived) == Spina::Parts::Conferences::PrimerTheme::Checkbox::CHECKED_VALUE) || (event.content(:start_date).present? && event.content(:start_date) < Date.today)
|
35
|
+
- end.then do |events|
|
36
36
|
- if events.any?
|
37
37
|
%ul
|
38
38
|
- repeater(events) do |event|
|
39
|
-
|
40
|
-
= render Primer::FlexComponent.new(direction: :column, align_items: :start) do
|
41
|
-
- if event.content(:name).present?
|
42
|
-
= render(Primer::HeadingComponent.new(tag: :h3, flex: :auto)) { event.content(:name) }
|
43
|
-
= render Primer::HeadingComponent.new(tag: :h4, flex: :auto) do
|
44
|
-
- if event.content(:start_time).present?
|
45
|
-
= t(:'.time_and_place_html',
|
46
|
-
time: time_tag(event.content(:start_time), format: :ordinal_datetime_with_year),
|
47
|
-
place: event.content(:location).presence || t('.location_tbc'))
|
48
|
-
- else
|
49
|
-
= t(:'.time_and_place_html', time: t('.time_tbc'), place: event.content(:location).presence || t('.location_tbc'))
|
50
|
-
- if event.content(:description).present?
|
51
|
-
= render(Primer::TextComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
|
52
|
-
- if event.content(:url).present?
|
53
|
-
= render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
|
54
|
-
= render Primer::OcticonComponent.new('link-external')
|
55
|
-
= t :'.more_info'
|
39
|
+
= render 'conferences_primer_theme/partials/event', event: event
|
56
40
|
- else
|
57
41
|
= render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
|
58
42
|
- else
|
@@ -2,33 +2,15 @@
|
|
2
2
|
- cache [current_page, current_conference] do
|
3
3
|
= render Primer::BoxComponent.new(position: :relative, style: 'height: 639px') do
|
4
4
|
= render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false,
|
5
|
-
style: 'background-color:
|
6
|
-
- if content(:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
- content(:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
%div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
|
18
|
-
- if current_conference.present?
|
19
|
-
= render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { current_conference.name }
|
20
|
-
= render Primer::TextComponent.new(tag: :address, classes: 'f2-light') do
|
21
|
-
= current_conference.institutions.collect(&:name).to_sentence
|
22
|
-
= render(Primer::TextComponent.new(tag: :time, classes: 'f2-light')) do
|
23
|
-
= t :'.dates_html', start_date: time_tag(current_conference.start_date, format: :day_and_month),
|
24
|
-
finish_date: time_tag(current_conference.finish_date, format: :day_and_month)
|
25
|
-
- else
|
26
|
-
= render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { Spina::Account.first.name }
|
27
|
-
- if current_conference.present? && current_conference.finish_date >= Date.today
|
28
|
-
= link_to t('.more_info'), frontend_conference_path(current_conference),
|
29
|
-
class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
|
30
|
-
- else
|
31
|
-
= link_to t('.more_info'), Spina::Page.find_by(name: 'about').materialized_path,
|
32
|
-
class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
|
33
|
-
%div{ style: 'text-shadow: 0 1px 1px rgba(var(--color-scale-black), 0.25), 0 1px 25px rgba(var(--color-scale-black), 0.75);' }
|
34
|
-
= render(Primer::MarkdownComponent.new(my: 4)) { content(:text).try(:html_safe) }
|
5
|
+
style: 'background-color: #057fab; z-index: 0')
|
6
|
+
- if content(:carousel).present?
|
7
|
+
.height-full.d-flex.flex-column.flex-justify-between{data: { controller: :slideshow, slideshow_incrementer: 0, slideshow_advance: true, slideshow_delay: 20000} }
|
8
|
+
- content(:carousel).each_with_index do |carousel_item, index|
|
9
|
+
= render partial: 'conferences_primer_theme/partials/homepage_item', locals: { item: carousel_item }
|
10
|
+
- if content(:carousel).many?
|
11
|
+
.container-lg.height-full.d-flex.flex-column-reverse.mb-8
|
12
|
+
= render(Primer::ButtonGroupComponent.new) do |component|
|
13
|
+
= component.button(data: { action: :'slideshow#previous' }) do
|
14
|
+
= render Primer::OcticonComponent.new('arrow-left')
|
15
|
+
= component.button(data: { action: :'slideshow#next' }) do
|
16
|
+
= render Primer::OcticonComponent.new('arrow-right')
|
@@ -0,0 +1,39 @@
|
|
1
|
+
- cache current_page do
|
2
|
+
= render(Primer::HeadingComponent.new) { current_page.title }
|
3
|
+
|
4
|
+
- if content(:text).present?
|
5
|
+
= render(Primer::MarkdownComponent.new(mt: 4)) { content.html(:text) }
|
6
|
+
|
7
|
+
- if content(:periodical_issues).present?
|
8
|
+
%ul.mt-4
|
9
|
+
- repeater(:periodical_issues) do |issue|
|
10
|
+
%li.list-style-none.py-4.border-bottom
|
11
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
|
12
|
+
- if issue.content(:cover_img).present?
|
13
|
+
= render Primer::FlexItemComponent.new(mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], flex_shrink: 0) do
|
14
|
+
= render Primer::LinkComponent.new(href: issue.content(:url)) do
|
15
|
+
= image_tag(issue.content.image_url(:cover_img, resize_to_limit: [300, 300]),
|
16
|
+
srcset: srcset_string(issue.content(:cover_img),
|
17
|
+
variant: { resize_to_limit: [300, 300] }),
|
18
|
+
alt: issue.content(:cover_img).alt)
|
19
|
+
= render Primer::FlexItemComponent.new(flex_auto: true) do
|
20
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], mb: 1) do
|
21
|
+
= render Primer::BoxComponent.new do
|
22
|
+
- if issue.content(:name).present?
|
23
|
+
= render Primer::HeadingComponent.new(tag: :h2) do
|
24
|
+
= issue.content(:name)
|
25
|
+
- if issue.content(:date).present?
|
26
|
+
= render Primer::HeadingComponent.new(tag: :h4) do
|
27
|
+
= time_tag issue.content(:date), format: :long_ordinal
|
28
|
+
- if issue.content(:description).present?
|
29
|
+
= render Primer::MarkdownComponent.new(tag: :div, color: :text_secondary) do
|
30
|
+
= issue.content.html(:description)
|
31
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
|
32
|
+
- if issue.content(:url).present?
|
33
|
+
= render Primer::ButtonComponent.new(scheme: :primary, tag: :a, href: issue.content(:url), mt: 2, mr: 2) do
|
34
|
+
= render Primer::OcticonComponent.new('link-external')
|
35
|
+
= t '.more_info'
|
36
|
+
- if issue.content(:attachment).present?
|
37
|
+
= render Primer::ButtonComponent.new(tag: :a, mt: 2, href: issue.content.attachment_url(:attachment), download: '') do
|
38
|
+
= render Primer::OcticonComponent.new('desktop-download')
|
39
|
+
= t '.download'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
%li.list-style-none.py-4.border-bottom
|
2
|
+
= render Primer::FlexComponent.new(direction: :column, align_items: :start) do
|
3
|
+
- if event.content(:name).present?
|
4
|
+
= render(Primer::HeadingComponent.new(tag: :h3, flex: :auto)) { event.content(:name) }
|
5
|
+
= render Primer::HeadingComponent.new(tag: :h4, flex: :auto) do
|
6
|
+
- if event.content(:start_date).present?
|
7
|
+
- if event.content(:finish_date).present?
|
8
|
+
- if event.content(:start_time).present?
|
9
|
+
= t('.dates_html',
|
10
|
+
start_date: time_tag(generate_datetime(event.content(:start_date), event.content(:start_time)), format: :ordinal_datetime_with_year),
|
11
|
+
finish_date: time_tag(event.content(:finish_date), format: :long_ordinal))
|
12
|
+
- else
|
13
|
+
= t('.dates_html',
|
14
|
+
start_date: time_tag(event.content(:start_date), format: :long_ordinal),
|
15
|
+
finish_date: time_tag(event.content(:finish_date), format: :long_ordinal))
|
16
|
+
- else
|
17
|
+
- if event.content(:start_time).present?
|
18
|
+
= time_tag(generate_datetime(event.content(:start_date), event.content(:start_time)), format: :ordinal_datetime_with_year)
|
19
|
+
- else
|
20
|
+
= time_tag(event.content(:start_date), format: :long_ordinal)
|
21
|
+
= render Primer::HeadingComponent.new(tag: :h5, flex: :auto) do
|
22
|
+
= event.content(:location).presence
|
23
|
+
- if event.content(:description).present?
|
24
|
+
= render(Primer::MarkdownComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
|
25
|
+
- if event.content(:url).present?
|
26
|
+
= render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
|
27
|
+
= render Primer::OcticonComponent.new('link-external')
|
28
|
+
= t '.more_info'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
%div{ data: { slideshow_target: 'slide' } }
|
2
|
+
- if item.content(:background_image).present?
|
3
|
+
= render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false, style: 'z-index: 1') do
|
4
|
+
= image_tag(main_app.url_for(item.content(:background_image).variant(resize_to_limit: [1680, 1680])),
|
5
|
+
draggable: false,
|
6
|
+
srcset: srcset(item.content(:background_image),
|
7
|
+
variant: { resize_to_limit: [1680, 1680] }),
|
8
|
+
style: 'object-fit: cover;',
|
9
|
+
class: %w[width-full height-full])
|
10
|
+
.container-lg.p-responsive.position-relative.color-text-white.height-full{ style: 'z-index: 3'}
|
11
|
+
= render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
|
12
|
+
%div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
|
13
|
+
= render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) do
|
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::MarkdownComponent.new(my: 4)) do
|
17
|
+
= item.content(:description).html_safe
|
18
|
+
- if item.content(:url).present?
|
19
|
+
= link_to t('.more_info'), item.content(:url),
|
20
|
+
class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
|
@@ -1,2 +1,2 @@
|
|
1
1
|
= render template: 'layouts/spina/conferences/primer_theme/application',
|
2
|
-
locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert:
|
2
|
+
locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: false }
|
@@ -1,2 +1,2 @@
|
|
1
1
|
= render template: 'layouts/spina/conferences/primer_theme/application',
|
2
|
-
locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert:
|
2
|
+
locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: false }
|
@@ -9,8 +9,10 @@
|
|
9
9
|
%meta{ name: 'DC.Format', scheme: 'IMT', content: 'application/pdf' }
|
10
10
|
%meta{ name: 'DC.Identifier', content: @article.id }
|
11
11
|
%meta{ name: 'DC.Identifier.URI', content: frontend_issue_article_url(@issue.id, @article.id) }
|
12
|
+
- if @article.has_content? :page_range
|
13
|
+
%meta{ name: 'DC.Identifier.pageNumber', content: "#{@article.content(:page_range).first_page}-#{@article.content(:page_range).last_page}" }
|
12
14
|
%meta{ name: 'DC.Language', scheme: 'ISO639-1', content: 'en' }
|
13
|
-
%meta{ name: 'DC.Rights', content: "Copyright #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}" }
|
15
|
+
%meta{ name: 'DC.Rights', content: "Copyright © #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}" }
|
14
16
|
- if @licence && @licence.has_content?(:url) && !@licence.content(:url).blank?
|
15
17
|
%meta{ name: 'DC.Rights', content: @licence.content(:url) }
|
16
18
|
%meta{ name: 'DC.Source', content: @journal.name }
|
@@ -32,5 +34,8 @@
|
|
32
34
|
%meta{ name: 'citation_date', content: @issue.date.to_s(:iso8601).gsub('-', '/') }
|
33
35
|
%meta{ name: 'citation_volume', content: @issue.volume.number }
|
34
36
|
%meta{ name: 'citation_issue', content: @issue.number }
|
37
|
+
- if @article.has_content? :page_range
|
38
|
+
%meta{ name: 'citation_firstpage', content: @article.content(:page_range).first_page }
|
39
|
+
%meta{ name: 'citation_lastpage', content: @article.content(:page_range).last_page }
|
35
40
|
%meta{ name: 'citation_abstract_html_url', content: frontend_issue_article_url(@issue.id, @article.id) }
|
36
41
|
%meta{ name: 'citation_pdf_url', content: frontend_issue_article_url(@issue.id, @article.id) + '.pdf' }
|
@@ -51,7 +51,7 @@
|
|
51
51
|
- component.row do
|
52
52
|
= render(Primer::FlexComponent.new(direction: :column)) do
|
53
53
|
= render(Primer::TextComponent.new(mb: 2)) do
|
54
|
-
Copyright #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}
|
54
|
+
Copyright © #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}
|
55
55
|
- unless @licence.nil?
|
56
56
|
- cache [@licence, @licence.content(:logo), @licence.content(:url)] do
|
57
57
|
%a{ rel: 'licence', href: @licence.content(:url) }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- cache cover_img do
|
2
2
|
= image_tag main_app.url_for(cover_img.variant(resize_to_limit: size)),
|
3
3
|
srcset: srcset(cover_img, variant: { resize_to_limit: size }),
|
4
|
-
|
4
|
+
alt: t('spina.conferences.primer_theme.journal.volume_issue', volume_number: issue.volume.number, issue_number: issue.number),
|
5
5
|
draggable: false,
|
6
6
|
class: 'p-1'
|
@@ -85,7 +85,7 @@
|
|
85
85
|
name: 'events_list',
|
86
86
|
title: 'Events',
|
87
87
|
part_type: 'Spina::Parts::Repeater',
|
88
|
-
parts: %w[name start_time location description url]
|
88
|
+
parts: %w[name start_date finish_date start_time application_deadline location is_archived description url]
|
89
89
|
}, {
|
90
90
|
name: 'current_conference_alert',
|
91
91
|
title: 'Alert',
|
@@ -118,6 +118,18 @@
|
|
118
118
|
name: 'date',
|
119
119
|
title: 'Date',
|
120
120
|
part_type: 'Spina::Parts::Admin::Conferences::Date'
|
121
|
+
}, {
|
122
|
+
name: 'start_date',
|
123
|
+
title: 'Start Date',
|
124
|
+
part_type: 'Spina::Parts::Admin::Conferences::Date'
|
125
|
+
}, {
|
126
|
+
name: 'finish_date',
|
127
|
+
title: 'Finish Date',
|
128
|
+
part_type: 'Spina::Parts::Admin::Conferences::Date'
|
129
|
+
}, {
|
130
|
+
name: 'application_deadline',
|
131
|
+
title: 'Application Deadline',
|
132
|
+
part_type: 'Spina::Parts::Admin::Conferences::Date'
|
121
133
|
}, {
|
122
134
|
name: 'attachment',
|
123
135
|
title: 'Attachment',
|
@@ -174,12 +186,50 @@
|
|
174
186
|
name: 'journal_abbreviation',
|
175
187
|
title: 'Journal Abbreviation',
|
176
188
|
part_type: 'Spina::Parts::Line'
|
189
|
+
}, {
|
190
|
+
name: 'issn',
|
191
|
+
title: 'ISSN',
|
192
|
+
part_type: 'Spina::Parts::Line'
|
193
|
+
}, {
|
194
|
+
name: 'page_range',
|
195
|
+
title: 'Page Range',
|
196
|
+
part_type: 'Spina::Parts::Admin::Journal::PageRange'
|
197
|
+
}, {
|
198
|
+
name: 'is_archived',
|
199
|
+
title: 'Archived?',
|
200
|
+
part_type: 'Spina::Parts::Conferences::PrimerTheme::Checkbox'
|
201
|
+
}, {
|
202
|
+
name: 'current_section_title',
|
203
|
+
title: 'Title for \'Current\' section',
|
204
|
+
part_type: 'Spina::Parts::Line'
|
205
|
+
}, {
|
206
|
+
name: 'past_section_title',
|
207
|
+
title: 'Title for \'Archive\' section',
|
208
|
+
part_type: 'Spina::Parts::Line'
|
209
|
+
}, {
|
210
|
+
name: 'periodical_issues',
|
211
|
+
title: 'Periodical Issues',
|
212
|
+
part_type: 'Spina::Parts::Repeater',
|
213
|
+
parts: %w[name date description cover_img attachment url]
|
214
|
+
}, {
|
215
|
+
name: 'title',
|
216
|
+
title: 'Title',
|
217
|
+
part_type: 'Spina::Parts::Line'
|
218
|
+
}, {
|
219
|
+
name: 'background_image',
|
220
|
+
title: 'Background Image',
|
221
|
+
part_type: 'Spina::Parts::Image'
|
222
|
+
}, {
|
223
|
+
name: 'carousel',
|
224
|
+
title: 'Carousel',
|
225
|
+
part_type: 'Spina::Parts::Repeater',
|
226
|
+
parts: %w[title description url background_image]
|
177
227
|
}]
|
178
228
|
|
179
229
|
theme.view_templates = [{
|
180
230
|
name: 'homepage',
|
181
231
|
title: 'Homepage',
|
182
|
-
parts: %w[
|
232
|
+
parts: %w[carousel text]
|
183
233
|
}, {
|
184
234
|
name: 'information',
|
185
235
|
title: 'Information',
|
@@ -199,7 +249,12 @@
|
|
199
249
|
name: 'events',
|
200
250
|
title: 'Events',
|
201
251
|
description: 'Contains details of past and upcoming events',
|
202
|
-
parts: %w[text events_list]
|
252
|
+
parts: %w[text current_section_title past_section_title events_list]
|
253
|
+
}, {
|
254
|
+
name: 'periodical',
|
255
|
+
title: 'Periodical',
|
256
|
+
description: 'Can be used to store archives of things like newsletters and magazine issues',
|
257
|
+
parts: %w[text periodical_issues]
|
203
258
|
}, {
|
204
259
|
name: 'embedded_form',
|
205
260
|
title: 'Embedded form',
|
data/config/locales/en.rb
CHANGED
@@ -4,12 +4,13 @@
|
|
4
4
|
en: {
|
5
5
|
date: {
|
6
6
|
formats: {
|
7
|
-
full: ->(
|
7
|
+
full: ->(date, _) { "%A, #{date.day.ordinalize} %B %Y" },
|
8
|
+
long_ordinal: ->(date, _) { "#{date.day.ordinalize} %B %Y" }
|
8
9
|
}
|
9
10
|
},
|
10
11
|
time: {
|
11
12
|
formats: {
|
12
|
-
ordinal_datetime_with_year: ->(time, _) { "#{time.day.ordinalize} %
|
13
|
+
ordinal_datetime_with_year: ->(time, _) { "#{time.day.ordinalize} %B %Y, %R" }
|
13
14
|
}
|
14
15
|
}
|
15
16
|
}
|
data/config/locales/en.yml
CHANGED
@@ -72,16 +72,22 @@ en:
|
|
72
72
|
name_and_role: "%{name}, %{role}"
|
73
73
|
contact_buttons: Contact buttons
|
74
74
|
events:
|
75
|
-
no_events: No
|
75
|
+
no_events: No listings.
|
76
76
|
upcoming: Upcoming events
|
77
77
|
past: Past events
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
more_info: More information
|
78
|
+
periodical:
|
79
|
+
more_info: View online
|
80
|
+
download: Download PDF
|
82
81
|
homepage:
|
83
82
|
more_info: More info
|
84
83
|
dates_html: "%{start_date}–%{finish_date}"
|
84
|
+
partials:
|
85
|
+
event:
|
86
|
+
dates_html: "%{start_date} – %{finish_date}"
|
87
|
+
more_info: More information
|
88
|
+
homepage_item:
|
89
|
+
more_info: Find out more
|
90
|
+
|
85
91
|
|
86
92
|
spina:
|
87
93
|
show: Show
|
@@ -4,6 +4,11 @@ module Spina
|
|
4
4
|
module Conferences
|
5
5
|
module PrimerTheme
|
6
6
|
class Engine < ::Rails::Engine
|
7
|
+
|
8
|
+
config.after_initialize do
|
9
|
+
Spina::Part.register(Spina::Parts::Conferences::PrimerTheme::Checkbox)
|
10
|
+
end
|
11
|
+
|
7
12
|
config.to_prepare do
|
8
13
|
::Spina::PagesController.helper 'spina/conferences/primer_theme/application'
|
9
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spina-conferences-primer_theme-fork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Malčić
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: babel-transpiler
|
@@ -115,14 +115,14 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.
|
118
|
+
version: 0.6.0
|
119
119
|
type: :runtime
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.
|
125
|
+
version: 0.6.0
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: capybara
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -303,13 +303,18 @@ files:
|
|
303
303
|
- app/helpers/spina/conferences/primer_theme/application_helper.rb
|
304
304
|
- app/helpers/spina/conferences/primer_theme/asset_helper.rb
|
305
305
|
- app/helpers/spina/conferences/primer_theme/navigations_helper.rb
|
306
|
+
- app/models/spina/parts/conferences/primer_theme.rb
|
307
|
+
- app/models/spina/parts/conferences/primer_theme/checkbox.rb
|
306
308
|
- app/views/conferences_primer_theme/pages/about.html.haml
|
307
309
|
- app/views/conferences_primer_theme/pages/committee.html.haml
|
308
310
|
- app/views/conferences_primer_theme/pages/embedded_form.html.haml
|
309
311
|
- app/views/conferences_primer_theme/pages/events.html.haml
|
310
312
|
- app/views/conferences_primer_theme/pages/homepage.html.haml
|
311
313
|
- app/views/conferences_primer_theme/pages/information.html.haml
|
314
|
+
- app/views/conferences_primer_theme/pages/periodical.html.haml
|
312
315
|
- app/views/conferences_primer_theme/pages/show.html.haml
|
316
|
+
- app/views/conferences_primer_theme/partials/_event.html.haml
|
317
|
+
- app/views/conferences_primer_theme/partials/_homepage_item.html.haml
|
313
318
|
- app/views/layouts/conferences_primer_theme/application.html.haml
|
314
319
|
- app/views/layouts/spina/conferences/primer_theme/application.html.haml
|
315
320
|
- app/views/layouts/spina/conferences/primer_theme/conferences/conferences.html.haml
|
@@ -317,6 +322,7 @@ files:
|
|
317
322
|
- app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml
|
318
323
|
- app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml
|
319
324
|
- app/views/spina/admin/layout_partables/texts/_form.html.haml
|
325
|
+
- app/views/spina/admin/parts/conferences/primer_theme/checkboxes/_form.html.haml
|
320
326
|
- app/views/spina/application/_cookies.html.haml
|
321
327
|
- app/views/spina/application/_current_conference_alert.html.haml
|
322
328
|
- app/views/spina/application/_footer.html.haml
|
@@ -365,6 +371,7 @@ files:
|
|
365
371
|
- config/locales/en.yml
|
366
372
|
- config/routes.rb
|
367
373
|
- db/migrate/20210206170704_change_current_conference_alert_to_text.rb
|
374
|
+
- db/migrate/20210907142118_create_spina_parts_conferences_primer_theme_checkboxes.rb
|
368
375
|
- lib/spina/conferences/primer_theme.rb
|
369
376
|
- lib/spina/conferences/primer_theme/breadcrumbs/builder.rb
|
370
377
|
- lib/spina/conferences/primer_theme/engine.rb
|
@@ -389,7 +396,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
389
396
|
- !ruby/object:Gem::Version
|
390
397
|
version: '0'
|
391
398
|
requirements: []
|
392
|
-
rubygems_version: 3.1.
|
399
|
+
rubygems_version: 3.1.6
|
393
400
|
signing_key:
|
394
401
|
specification_version: 4
|
395
402
|
summary: Spina::Admin::Conferences frontend theme.
|