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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -17
  3. data/app/assets/builds/spina/conferences/primer_theme/application.css +8 -0
  4. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +6 -0
  5. data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +1 -0
  6. data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +1 -0
  7. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +1 -0
  8. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +1 -1
  9. data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +5 -0
  10. data/app/views/conferences_primer_theme/pages/about.html.haml +9 -3
  11. data/app/views/conferences_primer_theme/pages/committee.html.haml +3 -1
  12. data/app/views/conferences_primer_theme/pages/events.html.haml +9 -3
  13. data/app/views/conferences_primer_theme/pages/homepage.html.haml +1 -1
  14. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +4 -4
  15. data/app/views/spina/application/_cookies.html.haml +8 -7
  16. data/app/views/spina/application/_cookies_footer.html.haml +15 -13
  17. data/app/views/spina/application/_footer.html.haml +2 -2
  18. data/app/views/spina/application/_navigation.html.haml +1 -1
  19. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +3 -1
  20. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +3 -1
  21. data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +6 -3
  22. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +6 -3
  23. data/app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml +6 -3
  24. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +32 -4
  25. data/app/views/spina/conferences/primer_theme/journal/authors/index.html.haml +3 -1
  26. data/app/views/spina/conferences/primer_theme/journal/authors/show.html.haml +3 -1
  27. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +3 -1
  28. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +3 -1
  29. data/config/locales/en.yml +5 -0
  30. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  31. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b41121814204870d40e05f0f24a4903d2a90065a6c4e22f0bb9f35fbfc5cc6d
4
- data.tar.gz: 407fa16213cc79508555b859dc426de75c632e19d1ddb8ab0f496fafb38132d6
3
+ metadata.gz: 368c56ce1c8e46990e158e126482ccfdb4cb642155137de454e392f069122253
4
+ data.tar.gz: 65f336153d9d62c27b31583b6279a38ce22dc0bd6c0d1483623b7c01a78fcad6
5
5
  SHA512:
6
- metadata.gz: b23678f53c4f7b7009dee49c4bf677067ac366498debf71db357c1013f75fc7aec1a1d328568f0c299ef64521545ebb09c3363841956fee86cdc0589efa5f01a
7
- data.tar.gz: 322fa3813cdd79f002781ce44ee5ae5fbb33e745a3e3f44efbfe679a835318c3643e60a540b8f059a029ca3ca02fbaf4cd24dbb20ef927d5cd5641cd6ea73bc0
6
+ metadata.gz: f520220033ab6a8f5513fbfab3da718d56cecddeb12c2530bec85c555dad46a2699433b3e5ecfb07790cc85a4a404a53f7031a05c61ba55e30a5be5fde911cf7
7
+ data.tar.gz: 52cb679bd54df86e7f71519da986cf87d1a7fc37c37bb8804aa8d6aa88c076b0ce65a459f5736683daddd3a278217457bc52cf6d5dc2d7819fc07270a0eb23c2
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).
@@ -25962,3 +25962,11 @@ address {
25962
25962
  width: 100%;
25963
25963
  height: 70vh;
25964
25964
  }
25965
+
25966
+ img {
25967
+ background-color: white !important;
25968
+ }
25969
+
25970
+ .breadcrumb-item {
25971
+ white-space: normal !important;
25972
+ }
@@ -42,3 +42,9 @@ address
42
42
  border: none
43
43
  width: 100%
44
44
  height: 70vh
45
+
46
+ img
47
+ background-color: white !important
48
+
49
+ .breadcrumb-item
50
+ white-space: normal !important
@@ -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'))
@@ -6,7 +6,7 @@
6
6
  - if content(:carousel).present?
7
7
  .height-full.d-flex.flex-column.flex-justify-between{data: { controller: :slideshow, slideshow_incrementer: 0, slideshow_advance: true, slideshow_delay: 20000} }
8
8
  - content(:carousel).each_with_index do |carousel_item, index|
9
- = render partial: 'conferences_primer_theme/partials/homepage_item', locals: { item: carousel_item }
9
+ = render partial: 'conferences_primer_theme/partials/homepage_item', locals: { item: carousel_item, index: index }
10
10
  - if content(:carousel).many?
11
11
  .container-lg.height-full.d-flex.flex-column-reverse.mb-8{ style: 'z-index: 5' }
12
12
  = render(Primer::ButtonGroup.new) do |component|
@@ -1,4 +1,4 @@
1
- %div{ data: { slideshow_target: 'slide' } }
1
+ %div{ data: { slideshow_target: 'slide' }, hidden: (index != 0) }
2
2
  - if item.content(:background_image).present?
3
3
  = render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false, style: 'z-index: 1') do
4
4
  = image_tag(main_app.url_for(item.content(:background_image).variant(resize_to_limit: [1680, 1680])),
@@ -9,11 +9,11 @@
9
9
  class: %w[width-full height-full])
10
10
  .container-lg.p-responsive.position-relative.color-text-white.height-full{ style: 'z-index: 3'}
11
11
  = render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
12
- %div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
12
+ %div{ style: 'color: var(--color-scale-white); text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
13
13
  = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) do
14
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::Markdown.new(my: 4)) do
15
+ %div{ style: 'color: var(--color-scale-white); text-shadow: 0 1px 1px #010409bf, 0 1px 25px #010409bf;' }
16
+ = render(Primer::Markdown.new(my: 4, font_size: 3)) do
17
17
  = item.content.html(:description).to_s
18
18
  - if item.content(:url).present?
19
19
  = link_to t('.more_info'), item.content(:url),
@@ -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 }, hidden: 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 }, hidden: 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 }, hidden: true) do |blankslate|
25
+ - blankslate.visual_icon(icon: 'mortar-board')
26
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_matching_conferences'))
@@ -3,7 +3,7 @@
3
3
 
4
4
  - content_for(:header) { render 'header' }
5
5
 
6
- = turbo_frame_tag 'conference_tabs' do
6
+ = turbo_frame_tag 'conference_tabs', target: '_top' do
7
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
@@ -22,10 +22,36 @@
22
22
  - case @tab
23
23
  - when 'information'
24
24
  - cache [@conference, @tab] do
25
+ = render Primer::BoxComponent.new(mt: 4,
26
+ col: [12, nil, 5, nil],
27
+ float: [nil, nil, :right, nil],
28
+ border: true,
29
+ border_radius: 3,
30
+ p: 3) do
31
+ - if @conference.content(:documents).present?
32
+ = render Primer::SubheadComponent.new do |component|
33
+ = component.heading { t :'.documents.title' }
34
+ %ul
35
+ - repeater @conference.content(:documents) do |document|
36
+ %li.list-style-none.py-1.d-flex.flex-items-center
37
+ = render Primer::BoxComponent.new(flex: :auto) do
38
+ - if document.content(:name).present?
39
+ = document.content(:name)
40
+ - else
41
+ = t(:'.documents.no_name')
42
+ - if document.content(:attachment).present?
43
+ = render Primer::ButtonComponent.new(tag: :a, ml: 2, href: document.content.attachment_url(:attachment),
44
+ download: '') do
45
+ = render Primer::OcticonComponent.new('desktop-download')
46
+ = t(:'.documents.download')
47
+ - else
48
+ = render(Primer::Beta::Text.new(color: :muted, font_size: 6)) { t :'.documents.no_file' }
25
49
  - if @conference.content(:text).present?
26
50
  = render(Primer::Markdown.new(my: 4)) { @conference.content.html(:text).to_s }
27
51
  - else
28
- = render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
52
+ = render Primer::Beta::Blankslate.new(my: 4) do |blankslate|
53
+ - blankslate.visual_icon(icon: 'info')
54
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_information'))
29
55
  - when 'presentations'
30
56
  - cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
31
57
  = render partial: 'presentations'
@@ -33,5 +59,7 @@
33
59
  - cache [@conference.events, @tab] do
34
60
  = render partial: 'events', locals: { events: @conference.events }
35
61
  - else
36
- = render Primer::BlankslateComponent.new(title: t('.no_tab'), description: t('.tab_does_not_exist', tab: @tab), icon: 'x-circle',
37
- my: 4)
62
+ = render Primer::Beta::Blankslate.new(my: 4) do |blankslate|
63
+ - blankslate.visual_icon(icon: 'x-circle')
64
+ - blankslate.heading(tag: :h3).with_content(t(:'.no_tab'))
65
+ - 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
@@ -96,6 +96,11 @@ en:
96
96
  tab_does_not_exist: "The tab '%{tab}' does not exist."
97
97
  no_information: No information.
98
98
  conference_navigation: Conference content
99
+ documents:
100
+ title: Downloads
101
+ download: Download
102
+ no_file: No file uploaded.
103
+ no_name: Untitled
99
104
  presentations:
100
105
  all_presentation_types: All
101
106
  results: Results
@@ -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.rc6'
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.rc6
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-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: babel-transpiler
@@ -129,28 +129,28 @@ dependencies:
129
129
  requirements:
130
130
  - - '='
131
131
  - !ruby/object:Gem::Version
132
- version: 3.0.0.rc2
132
+ version: 3.0.0
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - '='
138
138
  - !ruby/object:Gem::Version
139
- version: 3.0.0.rc2
139
+ version: 3.0.0
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: spina-admin-journal
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - '='
144
+ - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: 1.0.0.rc2
146
+ version: '1.0'
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'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: capybara
156
156
  requirement: !ruby/object:Gem::Requirement