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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -17
  3. data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +1 -0
  4. data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +1 -0
  5. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +1 -0
  6. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +1 -1
  7. data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +5 -0
  8. data/app/views/conferences_primer_theme/pages/about.html.haml +9 -3
  9. data/app/views/conferences_primer_theme/pages/committee.html.haml +3 -1
  10. data/app/views/conferences_primer_theme/pages/events.html.haml +9 -3
  11. data/app/views/spina/application/_cookies.html.haml +8 -7
  12. data/app/views/spina/application/_cookies_footer.html.haml +15 -13
  13. data/app/views/spina/application/_footer.html.haml +2 -2
  14. data/app/views/spina/application/_navigation.html.haml +1 -1
  15. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +3 -1
  16. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +3 -1
  17. data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +6 -3
  18. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +6 -3
  19. data/app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml +6 -3
  20. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +7 -3
  21. data/app/views/spina/conferences/primer_theme/journal/authors/index.html.haml +3 -1
  22. data/app/views/spina/conferences/primer_theme/journal/authors/show.html.haml +3 -1
  23. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +3 -1
  24. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +3 -1
  25. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  26. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b41121814204870d40e05f0f24a4903d2a90065a6c4e22f0bb9f35fbfc5cc6d
4
- data.tar.gz: 407fa16213cc79508555b859dc426de75c632e19d1ddb8ab0f496fafb38132d6
3
+ metadata.gz: 3f6a7caf015d10b4b0c43b0e99fa682a26da63c770b2d93ef4b11891e30b48c8
4
+ data.tar.gz: 4d95d757a0e0e4ee920e70ef564cd8729e223ba61091a8f464571791fb8d5df4
5
5
  SHA512:
6
- metadata.gz: b23678f53c4f7b7009dee49c4bf677067ac366498debf71db357c1013f75fc7aec1a1d328568f0c299ef64521545ebb09c3363841956fee86cdc0589efa5f01a
7
- data.tar.gz: 322fa3813cdd79f002781ce44ee5ae5fbb33e745a3e3f44efbfe679a835318c3643e60a540b8f059a029ca3ca02fbaf4cd24dbb20ef927d5cd5641cd6ea73bc0
6
+ metadata.gz: f031b0f95f0f83b6740c7ac27f34b7d30c38c5fef26b96a17b10e7c592efff88362276d1733c69da93de6c2a3a42f17d1196f32565298edf1b4020e49ecbf55c
7
+ data.tar.gz: 1b0b5603a18de7dcf81f060b6ff8a27df9e08ca62e7527d41c87c71d455ad4a8b6b7d4849571119a9691bac18f4922000c81e2dd28202541f217318a963961bc
data/README.md CHANGED
@@ -1,24 +1,39 @@
1
- # PrimerTheme: frontend for Spina
1
+ # PrimerTheme for Spina
2
+
3
+ PrimerTheme is a theme for Spina that uses [GitHub's Primer design system](https://primer.style/). It provides frontends for Spina pages, as well as for the following Spina plugins:
4
+
5
+ - [Conferences](https://github.com/louis-vs/spina-admin-conferences-fork/)
6
+ - [Journal](https://github.com/louis-vs/spina-admin-journal)
7
+ - [Blog (fork)](https://github.com/louis-vs/spina-admin-conferences-blog)
8
+
9
+ All of these plugins will be automatically installed with PrimerTheme, but you can use any selection of them that you wish. PrimerTheme provides you with an easy-to-setup Spina theme with a wide array of options, extending the core Spina setup.
10
+
11
+ PrimerTheme was originally designed for the Undergraduate Linguistics Association of Britain's website, which you can [view here](https://www.ulab.org.uk/) if you want to see the theme in action.
12
+
13
+ **NB:** Please use this fork, rather than the original. This fork provides a stable, updated release, whilst the old repo is no longer maintained.
2
14
 
3
15
  ![Rails tests](https://github.com/louis-vs/spina-conferences-primer_theme-fork/workflows/Verify/badge.svg?branch=master&event=push)
4
16
  [![codecov](https://codecov.io/gh/louis-vs/spina-conferences-primer_theme-fork/branch/master/graph/badge.svg?token=9TZ9QGGLAH)](https://codecov.io/gh/louis-vs/spina-conferences-primer_theme-fork)
5
17
  [![CodeFactor](https://www.codefactor.io/repository/github/louis-vs/spina-conferences-primer_theme-fork/badge)](https://www.codefactor.io/repository/github/louis-vs/spina-conferences-primer_theme-fork)
6
18
  [![Inline docs](http://inch-ci.org/github/louis-vs/spina-conferences-primer_theme-fork.svg?branch=master)](http://inch-ci.org/github/louis-vs/spina-conferences-primer_theme-fork)
7
19
 
8
- A plugin for `Spina` that provides a frontend for `Spina::Admin::Conferences`, `Spina::Admin::Journal`, and `Spina::Admin::Conferences::Blog` using components from `Primer::ViewComponents`.
20
+ ## Features
9
21
 
10
- This fork provides an updated version of the plugin, as the main repo is currently badly outdated.
22
+ The plugin's main goal is to provide frontends for Spina core and the three plugins listed above, using Primer. It also provides a number of useful page templates for use with Spina.
11
23
 
12
24
  ## Usage
13
- See the READMEs for the conference plugin, the journal plugin, and the bog plugin, respectively, for more information on what kind of content this frontend allows you to create and how to do so within the admin interface. Also make sure to ensure compilation of the assets for this gem by adding the following line to your
14
- `manifest.js` file.
15
25
 
16
- ```js
17
- //= link spina_conferences_primer_theme_manifest.js
18
- ```
26
+ See the READMEs for the conference plugin, the journal plugin, and the blog plugin, respectively, for more information on what kind of content this frontend allows you to create and how to do so within the admin interface.
27
+
28
+ You can customise Primer by overriding the `_custom.sass` and `_custom_variables.sass` files. See the [ULAB Website](https://github.com/ulab-committee/ulab-website) repo for an example.
19
29
 
20
30
  ## Installation
21
- Add this line to your application's Gemfile:
31
+
32
+ Make sure you have a working installation of Ruby on Rails 7. You can find a setup guide [here](https://guides.rubyonrails.org/getting_started.html).
33
+
34
+ You then need to install Spina, following the guide [on the Spina website](https://spinacms.com/docs).
35
+
36
+ To install the plugin, add this line to your application's Gemfile:
22
37
 
23
38
  ```ruby
24
39
  gem 'spina-conferences-primer_theme-fork', require: 'spina/conferences/primer_theme'
@@ -29,19 +44,46 @@ And then execute:
29
44
  $ bundle
30
45
  ```
31
46
 
32
- Or install it yourself as:
47
+ You will also need to configure Yarn. Add this repo as a dependency, so that your `package.json` resembles the following:
48
+
49
+ ```json
50
+ {
51
+ "name": "website_name",
52
+ "private": true,
53
+ "dependencies": {
54
+ "spina-conferences-primer-theme-fork": "louis-vs/spina-conferences-primer_theme-fork"
55
+ }
56
+ }
57
+ ```
58
+
59
+ You will then need to install and run the migrations from all of the plugins that come bundled with PrimerTheme:
60
+
33
61
  ```bash
34
- $ gem install spina-conferences-primer_theme-fork
62
+ $ bin/rails spina_admin_journal:install:migrations
63
+ $ bin/rails spina_admin_conferences:install:migrations
64
+ $ bin/rails spina_admin_conferences_blog:install:migrations
65
+ $ bin/rails spina_conferences_primer_theme:install:migrations
66
+ $ bin/rails db:migrate
67
+ ```
68
+
69
+ Also make sure to ensure compilation of the assets for this gem by adding the following line to your `manifest.js` file.
70
+
71
+ ```js
72
+ //= link spina_conferences_primer_theme_manifest.js
35
73
  ```
36
74
 
37
- The first thing you will probably want to do is add three pages using the 'blank' template, and add
38
- forwarding URLs as follows:
39
- * Conferences to `/conferences/conferences`
40
- * Journal to `/journal/issues`
41
- * Blog to `/blog`
75
+ Finally, start the server with:
76
+
77
+ ```bash
78
+ $ bin/rails s
79
+ ```
80
+
81
+ If you want to customise Primer, you will need to add `_custom.sass` and/or `_custom_variables.sass` into `app/assets/stylesheets/spina/conferences/primer_theme`. You will also need to override the CSS build rake task so that it finds your new files - an example of this can be found in the ULAB website [here](https://github.com/ulab-committee/ulab-website/blob/master/lib/tasks/ulab_website_tasks.rake).
42
82
 
43
83
  ## Contributing
44
- Contributions welcome, open an issue first please.
84
+
85
+ Bug reports and feature requests are welcome in the [Issues](https://github.com/louis-vs/spina-conferences-primer_theme-fork/issues) section. Translations are also very welcome!
45
86
 
46
87
  ## License
88
+
47
89
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -19,6 +19,7 @@ module Spina
19
19
  page.title = 'Conferences'
20
20
  page.link_url = '/conferences/conferences'
21
21
  page.deletable = false
22
+ page.active = true
22
23
  end
23
24
  end
24
25
  end
@@ -15,6 +15,7 @@ module Spina
15
15
  page.title = 'Journal'
16
16
  page.link_url = '/journal/issues'
17
17
  page.deletable = false
18
+ page.active = true
18
19
  end
19
20
  end
20
21
  end
@@ -22,6 +22,7 @@ module Spina
22
22
 
23
23
  def show
24
24
  @articles = current_spina_user.present? ? @issue.articles : @issue.articles.visible
25
+ add_breadcrumb helpers.journal_abbreviation_or_name(@journal), frontend_issues_path
25
26
  add_breadcrumb t('spina.conferences.primer_theme.journal.volume_issue',
26
27
  volume_number: @issue.volume.number, issue_number: @issue.number)
27
28
  end
@@ -13,7 +13,7 @@ module Spina
13
13
  end
14
14
 
15
15
  def journal_abbreviation_or_name(journal)
16
- journal.content(:journal_abbreviation) && journal.content(:journal_abbreviation).empty? ? journal.name : journal.content(:journal_abbreviation) # rubocop:disable Layout/LineLength
16
+ journal.content(:journal_abbreviation).nil? || journal.content(:journal_abbreviation).blank? ? journal.name : journal.content(:journal_abbreviation) # rubocop:disable Layout/LineLength
17
17
  end
18
18
 
19
19
  def ancestors # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
@@ -17,6 +17,11 @@ module Spina
17
17
  @journal_navigation_items ||= live_resource_navigation_items('journal')
18
18
  end
19
19
 
20
+ # Use this for caching, since pages are not touched when navigation position is updated.
21
+ def all_navigation_items
22
+ @all_navigation_items ||= ::Spina::NavigationItem.all
23
+ end
24
+
20
25
  private
21
26
 
22
27
  def live_navigation_items(name)
@@ -21,7 +21,9 @@
21
21
  = render Primer::OcticonComponent.new('desktop-download')
22
22
  = t :'.constitution.download'
23
23
  - else
24
- = render Primer::BlankslateComponent.new(title: t(:'.constitution.no_constitution'), icon: 'law')
24
+ = render Primer::Beta::Blankslate.new do |blankslate|
25
+ - blankslate.visual_icon(icon: 'law')
26
+ - blankslate.heading(tag: :h3).with_content(t(:'.constitution.no_constitution'))
25
27
 
26
28
  = render Primer::BoxComponent.new(mt: 4, col: [12, nil, 6, nil], float: [nil, nil, :left, nil]) do
27
29
  = render Primer::SubheadComponent.new do |component|
@@ -43,7 +45,9 @@
43
45
  - else
44
46
  = render(Primer::Beta::Text.new(color: :muted, font_size: 6)) { t :'.minutes.no_file' }
45
47
  - else
46
- = render Primer::BlankslateComponent.new(title: t(:'.minutes.no_minutes'), icon: 'file')
48
+ = render Primer::Beta::Blankslate.new do |blankslate|
49
+ - blankslate.visual_icon(icon: 'file')
50
+ - blankslate.heading(tag: :h3).with_content(t(:'.minutes.no_minutes'))
47
51
 
48
52
  = render Primer::BoxComponent.new(mt: 4, col: [12, nil, 6, nil], float: [nil, nil, :left, nil]) do
49
53
  - if content(:documents).present?
@@ -89,4 +93,6 @@
89
93
  srcset: srcset(partner_society.content(:logo), variant: { resize_to_limit: [200, 150] }),
90
94
  class: %w[mt-4 mt-md-0 mr-md-4])
91
95
  - else
92
- = render Primer::BlankslateComponent.new(title: t(:'.partner_societies.no_societies'), icon: 'organization')
96
+ = render Primer::Beta::Blankslate.new do |blankslate|
97
+ - blankslate.visual_icon(icon: 'organization')
98
+ - blankslate.heading(tag: :h3).with_content(t(:'.partner_societies.no_societies'))
@@ -40,4 +40,6 @@
40
40
  - if committee_bio.content(:bio).present?
41
41
  = render(Primer::Beta::Text.new(tag: :div, color: :muted)) { committee_bio.content.html(:bio).to_s }
42
42
  - else
43
- = render Primer::BlankslateComponent.new(title: t(:'.no_bios'), icon: 'file')
43
+ = render Primer::Beta::Blankslate.new do |blankslate|
44
+ - blankslate.visual_icon(icon: 'file')
45
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_bios'))
@@ -20,7 +20,9 @@
20
20
  - repeater(events) do |event|
21
21
  = render 'conferences_primer_theme/partials/event', event: event
22
22
  - else
23
- = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
23
+ = render Primer::Beta::Blankslate.new do |blankslate|
24
+ - blankslate.visual_icon(icon: 'calendar')
25
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_events'))
24
26
 
25
27
 
26
28
  = render Primer::SubheadComponent.new(mt: 4) do |component|
@@ -38,6 +40,10 @@
38
40
  - repeater(events) do |event|
39
41
  = render 'conferences_primer_theme/partials/event', event: event
40
42
  - else
41
- = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
43
+ = render Primer::Beta::Blankslate.new do |blankslate|
44
+ - blankslate.visual_icon(icon: 'calendar')
45
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_events'))
42
46
  - else
43
- = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
47
+ = render Primer::Beta::Blankslate.new do |blankslate|
48
+ - blankslate.visual_icon(icon: 'calendar')
49
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_events'))
@@ -1,7 +1,8 @@
1
- = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |component|
2
- - component.header do
3
- = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
4
- class: %w[Box-btn-octicon btn-octicon float-right]) do
5
- = render Primer::OcticonComponent.new('x')
6
- .Box-title= t(:'.title')
7
- = component.body { }
1
+ - cache do
2
+ = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |component|
3
+ - component.header do
4
+ = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
5
+ class: %w[Box-btn-octicon btn-octicon float-right]) do
6
+ = render Primer::OcticonComponent.new('x')
7
+ .Box-title= t(:'.title')
8
+ = component.body { }
@@ -1,13 +1,15 @@
1
- = render Primer::DetailsComponent.new(overlay: :dark, reset: true) do |component|
2
- = component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
3
- = render Primer::OcticonComponent.new('info')
4
- = t :'.cookies'
5
- = component.body(tag: :'details-dialog') do
6
- %include-fragment{ src: frontend_cookies_info_path, loading: :lazy }
7
- = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |box_component|
8
- = box_component.body do
9
- = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
10
- class: %w[Box-btn-octicon btn-octicon m-0 position-absolute right-0 top-0]) do
11
- = render Primer::OcticonComponent.new('x')
12
- = render Primer::BlankslateComponent.new(title: t('.loading')) do |blankslate_component|
13
- = blankslate_component.spinner(size: :large)
1
+ - cache frontend_cookies_info_path do
2
+ = render Primer::DetailsComponent.new(overlay: :dark, reset: true) do |component|
3
+ = component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
4
+ = render Primer::OcticonComponent.new('info')
5
+ = t :'.cookies'
6
+ = component.body(tag: :'details-dialog') do
7
+ %include-fragment{ src: frontend_cookies_info_path, loading: :lazy }
8
+ = render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |box_component|
9
+ = box_component.body do
10
+ = button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
11
+ class: %w[Box-btn-octicon btn-octicon m-0 position-absolute right-0 top-0]) do
12
+ = render Primer::OcticonComponent.new('x')
13
+ = render Primer::Beta::Blankslate.new(title: t('.loading')) do |blankslate_component|
14
+ = blankslate_component.visual_spinner(size: :large)
15
+ = blankslate_component.heading(tag: :h3).with_content(t('.loading'))
@@ -1,4 +1,4 @@
1
- - cache [footer_navigation_items, current_account] do
1
+ - cache [all_navigation_items, current_account] do
2
2
  = render Primer::BoxComponent.new(position: :relative, display: :flex,
3
3
  flex_wrap: :wrap,
4
4
  direction: [:column_reverse, nil, :row, nil],
@@ -9,7 +9,7 @@
9
9
  %div
10
10
  = render(Primer::Beta::Text.new(tag: :span, color: :muted, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
11
11
  = t :'.copyright', name: current_account.name, year: Date.today.year
12
- - cache footer_navigation_items do
12
+ - cache all_navigation_items do
13
13
  %ul.list-style-none.d-flex.flex-wrap.flex-1.flex-justify-center.flex-lg-justify-around.mb-2.mb-lg-0
14
14
  - footer_navigation_items.each do |item|
15
15
  - cache item do
@@ -1,4 +1,4 @@
1
- - cache main_navigation_items do
1
+ - cache all_navigation_items do
2
2
  .Header.px-3.px-md-4.px-lg-5.flex-wrap.flex-lg-nowrap
3
3
  .Header-item.mt-n1.mb-n1= link_to render('logo'), root_path, class: 'Header-link'
4
4
  %details.details-reset.d-lg-none{ style: 'display: contents' }
@@ -8,5 +8,7 @@
8
8
  - if @posts.any?
9
9
  %ul= render collection: @posts, partial: 'spina/conferences/primer_theme/blog/posts/post', layout: 'list_item', cached: true
10
10
  - else
11
- = render Primer::BlankslateComponent.new(title: t(:'.no_posts'), icon: 'mortar-board')
11
+ = render Primer::Beta::Blankslate.new do |blankslate|
12
+ - blankslate.visual_icon(icon: 'mortar-board')
13
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_posts'))
12
14
  = render 'spina/conferences/primer_theme/blog/shared/sidebar'
@@ -6,6 +6,8 @@
6
6
  - if @posts.any?
7
7
  %ul= render collection: @posts, partial: 'post', layout: 'list_item', cached: true
8
8
  - else
9
- = render Primer::BlankslateComponent.new(title: t(:'.no_posts'), icon: 'mortar-board')
9
+ = render Primer::Beta::Blankslate.new do |blankslate|
10
+ - blankslate.visual_icon(icon: 'mortar-board')
11
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_posts'))
10
12
  = render 'spina/conferences/primer_theme/blog/shared/sidebar'
11
13
 
@@ -11,6 +11,9 @@
11
11
  %ul{ data: { filter: { list: true } } }
12
12
  = render partial: 'event', collection: events.sorted, layout: 'list_item', cached: true
13
13
  - else
14
- = render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
15
- = render Primer::BlankslateComponent.new(title: t(:'.no_matching_events'), icon: 'calendar', hidden: true,
16
- data: { 'filter-empty-state': true })
14
+ = render Primer::Beta::Blankslate.new do |blankslate|
15
+ - blankslate.visual_icon(icon: 'calendar')
16
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_events'))
17
+ = render Primer::Beta::Blankslate.new(data: { 'filter-empty-state': true }) do |blankslate|
18
+ - blankslate.visual_icon(icon: 'calendar')
19
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_matching_events'))
@@ -24,6 +24,9 @@
24
24
  locals: { conference: @conference }, cached: -> presentation { [presentation, presentation.presenters] }
25
25
  = paginate @presentations.sorted, views_prefix: 'spina/conferences/primer_theme/conferences'
26
26
  - else
27
- = render Primer::BlankslateComponent.new(title: t(:'.no_presentations'), icon: 'mortar-board')
28
- = render Primer::BlankslateComponent.new(title: t(:'.no_matching_presentations'), icon: 'mortar-board', hidden: true,
29
- data: { 'filter-empty-state': true })
27
+ = render Primer::Beta::Blankslate.new do |blankslate|
28
+ - blankslate.visual_icon(icon: 'mortar-board')
29
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_presentations'))
30
+ = render Primer::Beta::Blankslate.new(data: { 'filter-empty-state': true }) do |blankslate|
31
+ - blankslate.visual_icon(icon: 'mortar-board')
32
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_matching_presentations'))
@@ -18,6 +18,9 @@
18
18
  = render partial: 'conference', collection: @conferences, layout: 'list_item',
19
19
  cached: -> conference { [conference, conference.institutions, conference.institutions.collect(&:logo)] }
20
20
  - else
21
- = render Primer::BlankslateComponent.new(title: t(:'.no_conferences'), icon: 'mortar-board')
22
- = render Primer::BlankslateComponent.new(title: t(:'.no_matching_conferences'), icon: 'mortar-board', hidden: true,
23
- data: { 'filter-empty-state': true })
21
+ = render Primer::Beta::Blankslate.new do |blankslate|
22
+ - blankslate.visual_icon(icon: 'mortar-board')
23
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_conferences'))
24
+ = render Primer::Beta::Blankslate.new(data: { 'filter-empty-state': true }) do |blankslate|
25
+ - blankslate.visual_icon(icon: 'mortar-board')
26
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_matching_conferences'))
@@ -25,7 +25,9 @@
25
25
  - if @conference.content(:text).present?
26
26
  = render(Primer::Markdown.new(my: 4)) { @conference.content.html(:text).to_s }
27
27
  - else
28
- = render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
28
+ = render Primer::Beta::Blankslate.new(my: 4) do |blankslate|
29
+ - blankslate.visual_icon(icon: 'info')
30
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_information'))
29
31
  - when 'presentations'
30
32
  - cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
31
33
  = render partial: 'presentations'
@@ -33,5 +35,7 @@
33
35
  - cache [@conference.events, @tab] do
34
36
  = render partial: 'events', locals: { events: @conference.events }
35
37
  - else
36
- = render Primer::BlankslateComponent.new(title: t('.no_tab'), description: t('.tab_does_not_exist', tab: @tab), icon: 'x-circle',
37
- my: 4)
38
+ = render Primer::Beta::Blankslate.new(my: 4) do |blankslate|
39
+ - blankslate.visual_icon(icon: 'x-circle')
40
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_tab'))
41
+ - blankslate.description { t('.tab_does_not_exist', tab: @tab) }
@@ -6,5 +6,7 @@
6
6
  - if @authors.any?
7
7
  %ul= render partial: 'author', collection: @authors, layout: 'list_item', cached: true
8
8
  - else
9
- = render Primer::BlankslateComponent.new(title: t(:'.no_authors'), icon: 'mortar-board')
9
+ = render Primer::Beta::Blankslate.new do |blankslate|
10
+ - blankslate.visual_icon(icon: 'mortar-board')
11
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_authors'))
10
12
  = render 'journal_navigation'
@@ -15,6 +15,8 @@
15
15
  - if @author.articles.any?
16
16
  %ul= render partial: 'spina/conferences/primer_theme/journal/issues/article', collection: @author.articles.sorted_asc, layout: 'list_item', cached: true
17
17
  - else
18
- = render Primer::BlankslateComponent.new(title: t(:'.no_articles'), icon: 'mortar-board')
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'))
19
21
 
20
22
  = render 'journal_navigation'
@@ -26,7 +26,9 @@
26
26
  - if @issues.any?
27
27
  %ul= render partial: 'issue', collection: @issues, layout: 'list_item', cached: true
28
28
  - else
29
- = 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'))
30
32
 
31
33
  - if @journal.has_content?(:issn) && !@journal.content(:issn).empty?
32
34
  = render(Primer::BoxComponent.new(mt: 4)) do
@@ -19,7 +19,9 @@
19
19
  - if @articles.any?
20
20
  %ul= render partial: 'article', collection: @articles.sorted_asc, layout: 'list_item', cached: true
21
21
  - else
22
- = render Primer::BlankslateComponent.new(title: t(:'.no_articles'), icon: 'mortar-board')
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'))
23
25
 
24
26
  = render(Primer::BorderBoxComponent.new(ml: [nil, nil, nil, 4], col: [nil, nil, nil, 4])) do |sidebar|
25
27
  - sidebar.body do
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '1.0.0.rc3'
6
+ VERSION = '1.0.0.rc4'
7
7
  end
8
8
  end
9
9
  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: 1.0.0.rc3
4
+ version: 1.0.0.rc4
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: 2022-02-01 00:00:00.000000000 Z
12
+ date: 2022-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: babel-transpiler
@@ -143,14 +143,14 @@ dependencies:
143
143
  requirements:
144
144
  - - '='
145
145
  - !ruby/object:Gem::Version
146
- version: 1.0.0.rc2
146
+ version: 1.0.0.rc3
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - '='
152
152
  - !ruby/object:Gem::Version
153
- version: 1.0.0.rc2
153
+ version: 1.0.0.rc3
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: capybara
156
156
  requirement: !ruby/object:Gem::Requirement