spina-conferences-primer_theme-fork 0.9.0 → 1.0.0.rc1

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/Rakefile +6 -0
  4. data/app/assets/builds/spina/conferences/primer_theme/application.css +25964 -0
  5. data/app/assets/config/spina_conferences_primer_theme_manifest.js +7 -4
  6. data/app/assets/javascripts/spina/conferences/primer_theme/application.js +6 -7
  7. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/application.js +10 -0
  8. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/index.js +5 -0
  9. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/{slideshow_controller.es6 → slideshow_controller.js} +4 -3
  10. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
  11. data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +2 -0
  12. data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +5 -2
  13. data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +7 -7
  14. data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +14 -13
  15. data/app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb +2 -1
  16. data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +5 -3
  17. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +2 -1
  18. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +23 -13
  19. data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +10 -2
  20. data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +3 -1
  21. data/app/models/spina/parts/conferences/primer_theme/checkbox.rb +6 -2
  22. data/app/models/spina/parts/conferences/primer_theme.rb +9 -3
  23. data/app/views/conferences_primer_theme/pages/about.html.haml +9 -9
  24. data/app/views/conferences_primer_theme/pages/committee.html.haml +10 -9
  25. data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +2 -2
  26. data/app/views/conferences_primer_theme/pages/events.html.haml +3 -3
  27. data/app/views/conferences_primer_theme/pages/homepage.html.haml +2 -2
  28. data/app/views/conferences_primer_theme/pages/information.html.haml +2 -2
  29. data/app/views/conferences_primer_theme/pages/periodical.html.haml +5 -5
  30. data/app/views/conferences_primer_theme/pages/show.html.haml +1 -1
  31. data/app/views/conferences_primer_theme/partials/_event.html.haml +1 -1
  32. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +2 -2
  33. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -14
  34. data/app/views/spina/application/_admin_bar.html.haml +7 -0
  35. data/app/views/spina/application/_alert.html.haml +4 -0
  36. data/app/views/spina/application/_analytics.html.erb +10 -0
  37. data/app/views/spina/application/{_footer_content.html.haml → _cookies_footer.html.haml} +1 -1
  38. data/app/views/spina/application/_footer.html.haml +20 -12
  39. data/app/views/spina/application/_google_site_verification.html.haml +1 -0
  40. data/app/views/spina/application/_text.html.haml +1 -1
  41. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +1 -1
  42. data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +4 -3
  43. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +1 -1
  44. data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +3 -3
  45. data/app/views/spina/conferences/primer_theme/blog/shared/_sidebar.html.haml +1 -1
  46. data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +3 -3
  47. data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +1 -1
  48. data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +1 -1
  49. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +3 -3
  50. data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +1 -1
  51. data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +3 -3
  52. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +5 -5
  53. data/app/views/spina/conferences/primer_theme/conferences/presentations/_abstract.html.haml +1 -1
  54. data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml +1 -1
  55. data/app/views/spina/conferences/primer_theme/conferences/presentations/show.html.haml +3 -3
  56. data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +2 -2
  57. data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +4 -4
  58. data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +15 -15
  59. data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +2 -2
  60. data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +3 -3
  61. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +2 -2
  62. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +3 -3
  63. data/config/initializers/importmap.rb +21 -0
  64. data/config/initializers/mime_types.rb +3 -1
  65. data/config/initializers/themes/conferences_primer_theme.rb +4 -2
  66. data/config/locales/en.yml +5 -2
  67. data/config/routes.rb +1 -1
  68. data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +1 -1
  69. data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +4 -17
  70. data/lib/spina/conferences/primer_theme/engine.rb +4 -0
  71. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  72. data/lib/spina/conferences/primer_theme.rb +10 -3
  73. metadata +55 -33
  74. data/app/views/spina/application/_current_conference_alert.html.haml +0 -4
@@ -8,23 +8,10 @@ module Spina
8
8
  # Custom builder using Primer breadcrumbs.
9
9
  class Builder < BreadcrumbsOnRails::Breadcrumbs::Builder
10
10
  def render
11
- @context.render ::Primer::BreadcrumbComponent.new(mb: 4) do |component|
12
- @context.safe_join(render_elements(component, @elements), "\n")
13
- end
14
- end
15
-
16
- private
17
-
18
- def render_elements(component, elements)
19
- elements.collect { |element| render_element(component, element) }
20
- end
21
-
22
- def render_element(component, element)
23
- url = compute_path(element)
24
- if @context.current_page? url
25
- component.item(selected: true, **element.options) { compute_name(element) }
26
- else
27
- component.item(href: compute_path(element), **element.options) { compute_name(element) }
11
+ @context.render ::Primer::Beta::Breadcrumbs.new(mb: 4) do |component|
12
+ @elements.each do |element|
13
+ component.item(href: compute_path(element), **element.options) { compute_name(element) }
14
+ end
28
15
  end
29
16
  end
30
17
  end
@@ -3,7 +3,11 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
+ # Registers the frontend controller and page parts with Spina.
6
7
  class Engine < ::Rails::Engine
8
+ initializer 'spina.conferences.primer_theme.importmap', before: 'importmap' do |app|
9
+ app.config.importmap.cache_sweepers << Engine.root.join('app/assets/javascripts')
10
+ end
7
11
 
8
12
  config.after_initialize do
9
13
  Spina::Part.register(Spina::Parts::Conferences::PrimerTheme::Checkbox)
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.9.0'
6
+ VERSION = '1.0.0.rc1'
7
7
  end
8
8
  end
9
9
  end
@@ -6,13 +6,20 @@ require 'spina/conferences/primer_theme/breadcrumbs/builder'
6
6
  require 'spina/admin/conferences'
7
7
  require 'spina/admin/journal'
8
8
  require 'spina/admin/conferences/blog'
9
- require 'octicons_helper'
10
9
  require 'view_component'
11
10
  require 'primer/view_components'
12
11
  require 'icalendar'
12
+ require 'cssbundling-rails'
13
13
 
14
14
  module Spina
15
- module PrimerTheme
16
- # Your code goes here...
15
+ module Conferences
16
+ # A Primer-based frontend theme for Spina.
17
+ module PrimerTheme
18
+ include ActiveSupport::Configurable
19
+
20
+ config_accessor :importmap
21
+
22
+ self.importmap = Importmap::Map.new
23
+ end
17
24
  end
18
25
  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.9.0
4
+ version: 1.0.0.rc1
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-11-08 00:00:00.000000000 Z
12
+ date: 2022-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: babel-transpiler
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0.7'
28
+ - !ruby/object:Gem::Dependency
29
+ name: cssbundling-rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: icalendar
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -59,84 +73,84 @@ dependencies:
59
73
  requirements:
60
74
  - - '='
61
75
  - !ruby/object:Gem::Version
62
- version: 0.0.37
76
+ version: 0.0.66
63
77
  type: :runtime
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
81
  - - '='
68
82
  - !ruby/object:Gem::Version
69
- version: 0.0.37
83
+ version: 0.0.66
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: rails
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
88
  - - "~>"
75
89
  - !ruby/object:Gem::Version
76
- version: '6.0'
90
+ version: '7.0'
77
91
  type: :runtime
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
95
  - - "~>"
82
96
  - !ruby/object:Gem::Version
83
- version: '6.0'
97
+ version: '7.0'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: spina
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
102
  - - "~>"
89
103
  - !ruby/object:Gem::Version
90
- version: 2.0.0
104
+ version: '2.8'
91
105
  type: :runtime
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
109
  - - "~>"
96
110
  - !ruby/object:Gem::Version
97
- version: 2.0.0
111
+ version: '2.8'
98
112
  - !ruby/object:Gem::Dependency
99
- name: spina-admin-conferences-fork
113
+ name: spina-admin-conferences-blog
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
- - - "~>"
116
+ - - '='
103
117
  - !ruby/object:Gem::Version
104
- version: 2.1.0
118
+ version: 0.3.1
105
119
  type: :runtime
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
- - - "~>"
123
+ - - '='
110
124
  - !ruby/object:Gem::Version
111
- version: 2.1.0
125
+ version: 0.3.1
112
126
  - !ruby/object:Gem::Dependency
113
- name: spina-admin-journal
127
+ name: spina-admin-conferences-fork
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
- - - "~>"
130
+ - - '='
117
131
  - !ruby/object:Gem::Version
118
- version: 0.6.0
132
+ version: 3.0.0.rc2
119
133
  type: :runtime
120
134
  prerelease: false
121
135
  version_requirements: !ruby/object:Gem::Requirement
122
136
  requirements:
123
- - - "~>"
137
+ - - '='
124
138
  - !ruby/object:Gem::Version
125
- version: 0.6.0
139
+ version: 3.0.0.rc2
126
140
  - !ruby/object:Gem::Dependency
127
- name: spina-admin-conferences-blog
141
+ name: spina-admin-journal
128
142
  requirement: !ruby/object:Gem::Requirement
129
143
  requirements:
130
- - - "~>"
144
+ - - '='
131
145
  - !ruby/object:Gem::Version
132
- version: 0.1.4
146
+ version: 1.0.0.rc2
133
147
  type: :runtime
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
- - - "~>"
151
+ - - '='
138
152
  - !ruby/object:Gem::Version
139
- version: 0.1.4
153
+ version: 1.0.0.rc2
140
154
  - !ruby/object:Gem::Dependency
141
155
  name: capybara
142
156
  requirement: !ruby/object:Gem::Requirement
@@ -227,14 +241,14 @@ dependencies:
227
241
  requirements:
228
242
  - - "~>"
229
243
  - !ruby/object:Gem::Version
230
- version: '3.142'
244
+ version: '4.1'
231
245
  type: :development
232
246
  prerelease: false
233
247
  version_requirements: !ruby/object:Gem::Requirement
234
248
  requirements:
235
249
  - - "~>"
236
250
  - !ruby/object:Gem::Version
237
- version: '3.142'
251
+ version: '4.1'
238
252
  - !ruby/object:Gem::Dependency
239
253
  name: simplecov
240
254
  requirement: !ruby/object:Gem::Requirement
@@ -283,14 +297,14 @@ dependencies:
283
297
  requirements:
284
298
  - - "~>"
285
299
  - !ruby/object:Gem::Version
286
- version: '4.4'
300
+ version: '5.0'
287
301
  type: :development
288
302
  prerelease: false
289
303
  version_requirements: !ruby/object:Gem::Requirement
290
304
  requirements:
291
305
  - - "~>"
292
306
  - !ruby/object:Gem::Version
293
- version: '4.4'
307
+ version: '5.0'
294
308
  description: Frontend for Spina::Admin::Conferences plugin, based on Primer.
295
309
  email:
296
310
  - j.malcic@me.com
@@ -302,9 +316,12 @@ files:
302
316
  - MIT-LICENSE
303
317
  - README.md
304
318
  - Rakefile
319
+ - app/assets/builds/spina/conferences/primer_theme/application.css
305
320
  - app/assets/config/spina_conferences_primer_theme_manifest.js
306
321
  - app/assets/javascripts/spina/conferences/primer_theme/application.js
307
- - app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.es6
322
+ - app/assets/javascripts/spina/conferences/primer_theme/controllers/application.js
323
+ - app/assets/javascripts/spina/conferences/primer_theme/controllers/index.js
324
+ - app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.js
308
325
  - app/assets/stylesheets/spina/conferences/primer_theme/_custom.sass
309
326
  - app/assets/stylesheets/spina/conferences/primer_theme/_custom_variables.sass
310
327
  - app/assets/stylesheets/spina/conferences/primer_theme/application.sass
@@ -341,10 +358,13 @@ files:
341
358
  - app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml
342
359
  - app/views/spina/admin/layout_partables/texts/_form.html.haml
343
360
  - app/views/spina/admin/parts/conferences/primer_theme/checkboxes/_form.html.haml
361
+ - app/views/spina/application/_admin_bar.html.haml
362
+ - app/views/spina/application/_alert.html.haml
363
+ - app/views/spina/application/_analytics.html.erb
344
364
  - app/views/spina/application/_cookies.html.haml
345
- - app/views/spina/application/_current_conference_alert.html.haml
365
+ - app/views/spina/application/_cookies_footer.html.haml
346
366
  - app/views/spina/application/_footer.html.haml
347
- - app/views/spina/application/_footer_content.html.haml
367
+ - app/views/spina/application/_google_site_verification.html.haml
348
368
  - app/views/spina/application/_list_item.html.haml
349
369
  - app/views/spina/application/_logo.html.haml
350
370
  - app/views/spina/application/_mobile_navigation_item.html.haml
@@ -389,6 +409,7 @@ files:
389
409
  - app/views/spina/conferences/primer_theme/journal/issues/index.html.haml
390
410
  - app/views/spina/conferences/primer_theme/journal/issues/show.html.haml
391
411
  - config/initializers/assets.rb
412
+ - config/initializers/importmap.rb
392
413
  - config/initializers/mime_types.rb
393
414
  - config/initializers/primer.rb
394
415
  - config/initializers/themes/conferences_primer_theme.rb
@@ -405,7 +426,8 @@ files:
405
426
  homepage:
406
427
  licenses:
407
428
  - MIT
408
- metadata: {}
429
+ metadata:
430
+ rubygems_mfa_required: 'true'
409
431
  post_install_message:
410
432
  rdoc_options: []
411
433
  require_paths:
@@ -417,9 +439,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
417
439
  version: '2.7'
418
440
  required_rubygems_version: !ruby/object:Gem::Requirement
419
441
  requirements:
420
- - - ">="
442
+ - - ">"
421
443
  - !ruby/object:Gem::Version
422
- version: '0'
444
+ version: 1.3.1
423
445
  requirements: []
424
446
  rubygems_version: 3.1.6
425
447
  signing_key:
@@ -1,4 +0,0 @@
1
- - content_for :flash do
2
- - cache current_account do
3
- - if current_account.has_content? :current_conference_alert
4
- = render(Primer::FlashComponent.new(full: true, variant: :warning)) { current_account.content(:current_conference_alert).html_safe }