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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/builds/spina/conferences/primer_theme/application.css +25964 -0
  3. data/app/assets/config/spina_conferences_primer_theme_manifest.js +7 -4
  4. data/app/assets/javascripts/spina/conferences/primer_theme/application.js +6 -7
  5. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/application.js +10 -0
  6. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/index.js +5 -0
  7. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/{slideshow_controller.es6 → slideshow_controller.js} +4 -3
  8. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
  9. data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +1 -0
  10. data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +0 -2
  11. data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +0 -2
  12. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +10 -0
  13. data/app/views/conferences_primer_theme/pages/about.html.haml +2 -2
  14. data/app/views/conferences_primer_theme/pages/committee.html.haml +2 -2
  15. data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +1 -1
  16. data/app/views/conferences_primer_theme/pages/events.html.haml +2 -2
  17. data/app/views/conferences_primer_theme/pages/information.html.haml +1 -1
  18. data/app/views/conferences_primer_theme/pages/periodical.html.haml +3 -3
  19. data/app/views/conferences_primer_theme/partials/_event.html.haml +1 -1
  20. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +1 -1
  21. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -14
  22. data/app/views/spina/application/_admin_bar.html.haml +7 -0
  23. data/app/views/spina/application/_alert.html.haml +4 -0
  24. data/app/views/spina/application/_analytics.html.erb +10 -0
  25. data/app/views/spina/application/{_footer_content.html.haml → _cookies_footer.html.haml} +1 -1
  26. data/app/views/spina/application/_footer.html.haml +20 -12
  27. data/app/views/spina/application/_google_site_verification.html.haml +1 -0
  28. data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +3 -2
  29. data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +2 -2
  30. data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +1 -1
  31. data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +4 -4
  32. data/config/initializers/importmap.rb +21 -0
  33. data/config/initializers/themes/conferences_primer_theme.rb +4 -2
  34. data/config/locales/en.yml +1 -1
  35. data/lib/spina/conferences/primer_theme/engine.rb +4 -0
  36. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  37. data/lib/spina/conferences/primer_theme.rb +10 -2
  38. metadata +44 -23
  39. data/app/views/spina/application/_current_conference_alert.html.haml +0 -4
@@ -1,9 +1,12 @@
1
- //= link_directory ../stylesheets/spina/conferences/primer_theme .css
2
- //= link_directory ../javascripts/spina/conferences/primer_theme .js
3
- //= link spina_admin_conferences_manifest.js
4
- //= link spina_admin_journal_manifest.js
1
+ //= link spina/conferences/primer_theme/application.css
2
+
3
+ //= link_directory ../javascripts/spina/conferences/primer_theme/controllers .js
4
+ //= link spina/conferences/primer_theme/application.js
5
5
 
6
6
  //= link @github/details-dialog-element/dist/index.js
7
7
  //= link @github/include-fragment-element/dist/index.js
8
8
  //= link @github/filter-input-element/dist/index.js
9
9
  //= link @github/details-menu-element/dist/index.js
10
+
11
+ //= link spina_admin_conferences_manifest.js
12
+ //= link spina_admin_journal_manifest.js
@@ -1,7 +1,6 @@
1
- //= require stimulus
2
- //= require_directory ./controllers
3
-
4
- // eslint-disable-next-line no-undef
5
- const application = Stimulus.Application.start()
6
- // eslint-disable-next-line no-undef
7
- application.register('slideshow', SlideshowController)
1
+ import '@hotwired/turbo-rails'
2
+ import '@github/details-dialog-element'
3
+ import '@github/include-fragment-element'
4
+ import '@github/filter-input-element'
5
+ import '@github/details-menu-element'
6
+ import 'controllers'
@@ -0,0 +1,10 @@
1
+ import { Application } from '@hotwired/stimulus'
2
+
3
+ const application = Application.start()
4
+
5
+ // Configure Stimulus
6
+ application.warnings = true
7
+ application.debug = false
8
+ window.Stimulus = application
9
+
10
+ export { application }
@@ -0,0 +1,5 @@
1
+ import { application } from 'controllers/application'
2
+
3
+ // Eager load all Stimulus controllers
4
+ import { eagerLoadControllersFrom } from '@hotwired/stimulus-loading'
5
+ eagerLoadControllersFrom('controllers', application)
@@ -1,5 +1,6 @@
1
- // eslint-disable-next-line no-unused-vars,no-undef
2
- class SlideshowController extends Stimulus.Controller {
1
+ import { Controller } from '@hotwired/stimulus'
2
+
3
+ export default class SlideshowController extends Controller {
3
4
  static get targets() {
4
5
  return [
5
6
  /**
@@ -35,7 +36,7 @@ class SlideshowController extends Stimulus.Controller {
35
36
  * @return {Number} The value for the delay.
36
37
  */
37
38
  get delay() {
38
- return this.data.has('delay')
39
+ return this.data.has('delay')
39
40
  ? Number.parseInt(this.data.get('delay'))
40
41
  : 10000
41
42
  }
@@ -28,7 +28,7 @@
28
28
  font-display: swap
29
29
 
30
30
  .admin
31
- @import "spina/admin_editing"
31
+ //@import "spina/admin_editing"
32
32
  #admin_bar
33
33
  font-family: 'Metropolis', sans-serif
34
34
 
@@ -7,6 +7,7 @@ module Spina
7
7
  # Base class from which controllers related to the blog plugin inherit
8
8
  class ApplicationController < ::Spina::ApplicationController
9
9
  include ::Spina::Frontend
10
+
10
11
  def cookies_info
11
12
  render partial: 'cookies'
12
13
  end
@@ -6,8 +6,6 @@ module Spina
6
6
  module Blog
7
7
  # Spina::Blog::CategoriesController
8
8
  class CategoriesController < ApplicationController
9
- include ::Spina::Frontend
10
-
11
9
  before_action :page
12
10
  before_action :category
13
11
  before_action :posts
@@ -6,8 +6,6 @@ module Spina
6
6
  module Blog
7
7
  # Spina::Blog::PostsController
8
8
  class PostsController < ApplicationController
9
- include ::Spina::Frontend
10
-
11
9
  before_action :find_posts, only: [:index]
12
10
  before_action :current_spina_user_can_view_page?
13
11
  before_action :set_breadcrumb, only: :show
@@ -38,6 +38,16 @@ module Spina
38
38
  time.hour,
39
39
  time.min)
40
40
  end
41
+
42
+ def primer_theme_importmap_tags(entry_point = 'application', shim: true)
43
+ safe_join [
44
+ javascript_inline_importmap_tag(Spina::Conferences::PrimerTheme.config.importmap.to_json(resolver: self)),
45
+ javascript_importmap_module_preload_tags(Spina::Conferences::PrimerTheme.config.importmap),
46
+ (javascript_importmap_shim_nonce_configuration_tag if shim),
47
+ (javascript_importmap_shim_tag if shim),
48
+ javascript_import_module_tag(entry_point)
49
+ ], "\n"
50
+ end
41
51
  end
42
52
  end
43
53
  end
@@ -2,11 +2,11 @@
2
2
  = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::Markdown.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
6
  - if content(:contact).present?
7
7
  = render Primer::SubheadComponent.new(mt: 4) do |component|
8
8
  = component.heading { t :'.contact.title' }
9
- = render(Primer::Markdown.new) { content.html(:contact) }
9
+ = render(Primer::Markdown.new) { content.html(:contact).to_s }
10
10
 
11
11
  .clearfix.gutter
12
12
  = render Primer::BoxComponent.new(mt: 4, col: [12, nil, 6, nil], float: [nil, nil, :left, nil]) do
@@ -2,7 +2,7 @@
2
2
  = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::Markdown.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
6
 
7
7
  - if content(:committee_bios).present?
8
8
  %ul.mt-4
@@ -38,6 +38,6 @@
38
38
  = render Primer::OcticonComponent.new('link-external')
39
39
  = t(:'.facebook')
40
40
  - if committee_bio.content(:bio).present?
41
- = render(Primer::Beta::Text.new(tag: :div, color: :muted)) { committee_bio.content.html(:bio) }
41
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted)) { committee_bio.content.html(:bio).to_s }
42
42
  - else
43
43
  = render Primer::BlankslateComponent.new(title: t(:'.no_bios'), icon: 'file')
@@ -2,7 +2,7 @@
2
2
  = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::Markdown.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
6
 
7
7
  - if content(:embed_url).present?
8
8
  = render Primer::BoxComponent.new(mt: 4, col: 12) do
@@ -2,7 +2,7 @@
2
2
  = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::Markdown.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
6
 
7
7
  - if content(:events_list).present?
8
8
  = render Primer::SubheadComponent.new(mt: 4) do |component|
@@ -12,7 +12,7 @@
12
12
  - else
13
13
  = t :'.upcoming'
14
14
 
15
- - content(:events_list).filter do |event|
15
+ - content(:events_list).filter do |event|
16
16
  - (event.content(:start_date).blank? || event.content(:start_date) >= Date.today) && event.content(:is_archived) != Spina::Parts::Conferences::PrimerTheme::Checkbox::CHECKED_VALUE
17
17
  - end.then do |events|
18
18
  - if events.any?
@@ -2,4 +2,4 @@
2
2
  = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::Markdown.new(mt: 4)) { content.html(:text) }
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
@@ -2,8 +2,8 @@
2
2
  = render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
3
3
 
4
4
  - if content(:text).present?
5
- = render(Primer::Markdown.new(mt: 4)) { content.html(:text) }
6
-
5
+ = render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
6
+
7
7
  - if content(:periodical_issues).present?
8
8
  %ul.mt-4
9
9
  - repeater(:periodical_issues) do |issue|
@@ -27,7 +27,7 @@
27
27
  = time_tag issue.content(:date), format: :long_ordinal
28
28
  - if issue.content(:description).present?
29
29
  = render Primer::Markdown.new(tag: :div, color: :muted) do
30
- = issue.content.html(:description)
30
+ = issue.content.html(:description).to_s
31
31
  = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
32
32
  - if issue.content(:url).present?
33
33
  = render Primer::ButtonComponent.new(scheme: :primary, tag: :a, href: issue.content(:url), mt: 2, mr: 2) do
@@ -21,7 +21,7 @@
21
21
  = render Primer::HeadingComponent.new(tag: :h5, flex: :auto) do
22
22
  = event.content(:location).presence
23
23
  - if event.content(:description).present?
24
- = render(Primer::Markdown.new(mt: 1, color: :muted)) { event.content.html(:description) }
24
+ = render(Primer::Markdown.new(mt: 1, color: :muted)) { event.content.html(:description).to_s }
25
25
  - if event.content(:url).present?
26
26
  = render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
27
27
  = render Primer::OcticonComponent.new('link-external')
@@ -14,7 +14,7 @@
14
14
  = item.content(:title)
15
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
16
  = render(Primer::Markdown.new(my: 4)) do
17
- = item.content(:description).html_safe
17
+ = item.content.html(:description).to_s
18
18
  - if item.content(:url).present?
19
19
  = link_to t('.more_info'), item.content(:url),
20
20
  class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
@@ -11,22 +11,17 @@
11
11
  %base{ target: '_blank' }
12
12
  = csrf_meta_tags
13
13
  %title= t(:'.title', title: seo_title, suffix: current_account.name)
14
- = render 'spina/shared/google_site_verification'
15
- = render 'spina/shared/analytics'
16
- = stylesheet_link_tag 'spina/conferences/primer_theme/application', media: 'all', data: { turbolinks_track: true }
17
- = javascript_include_tag 'spina/conferences/primer_theme/application', data: { turbolinks_track: true }
18
- = javascript_include_tag 'turbo', type: 'module'
19
- %script{ type: 'module', src: asset_path('@github/details-dialog-element/dist/index.js') }
20
- %script{ type: 'module', src: asset_path('@github/include-fragment-element/dist/index.js') }
21
- %script{ type: 'module', src: asset_path('@github/filter-input-element/dist/index.js') }
22
- %script{ type: 'module', src: asset_path('@github/details-menu-element/dist/index.js') }
14
+ = render 'google_site_verification'
15
+ = render 'analytics'
16
+ = stylesheet_link_tag 'spina/conferences/primer_theme/application', media: 'all', data: { turbo_track: true }
17
+ = primer_theme_importmap_tags
23
18
  = yield :head
24
19
  %body
25
20
  - if current_spina_user.present?
26
- .admin= render 'spina/shared/admin_bar'
21
+ .admin= render 'admin_bar'
27
22
  %header= render 'navigation'
28
23
  - unless local_assigns[:hide_alert]
29
- = render 'current_conference_alert'
24
+ = render 'alert'
30
25
  - if content_for? :flash
31
26
  .flash-messages= yield :flash
32
27
  %main
@@ -35,6 +30,4 @@
35
30
  .container-lg.p-responsive.mt-4= yield :breadcrumbs
36
31
  = yield :header
37
32
  .container-lg.p-responsive.mt-4= yield
38
- %footer
39
- .container-lg.p-responsive.py-4= render 'footer'
40
- = render 'spina/shared/social'
33
+ %footer.footer.width-full.container-lg.p-responsive= render 'footer'
@@ -0,0 +1,7 @@
1
+ - if current_spina_user.present?
2
+ #admin_bar
3
+ = render Primer::BoxComponent.new(bg: :accent, p: 3, text_align: :right) do
4
+ = render Primer::LinkComponent.new(href: spina.admin_root_path, mr: 3, data: { turbo: false }, classes: 'btn') do
5
+ = t 'spina.edit_website'
6
+ = render Primer::LinkComponent.new(href: spina.admin_logout_path, classes: 'btn') do
7
+ = t 'spina.logout'
@@ -0,0 +1,4 @@
1
+ - content_for :flash do
2
+ - cache current_account do
3
+ - if current_account.has_content? :alert
4
+ = render(Primer::FlashComponent.new(full: true, variant: :warning)) { current_account.content(:alert).html_safe }
@@ -0,0 +1,10 @@
1
+ <script type="text/javascript">
2
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6
+
7
+ ga('create', '<%= current_account.google_analytics %>', 'auto');
8
+ ga('set', 'anonymizeIp', true);
9
+ ga('send', 'pageview');
10
+ </script>
@@ -1,4 +1,4 @@
1
- = render Primer::DetailsComponent.new(overlay: :dark, reset: true, mb: [2, 0, nil, nil], mr: [nil, 2, nil, nil]) do |component|
1
+ = render Primer::DetailsComponent.new(overlay: :dark, reset: true) do |component|
2
2
  = component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
3
3
  = render Primer::OcticonComponent.new('info')
4
4
  = t :'.cookies'
@@ -1,17 +1,25 @@
1
1
  - cache [footer_navigation_items, current_account] do
2
- = render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil], align_items: :center) do
3
- = render Primer::FlexComponent.new(direction: [:column, :row, nil, nil], mb: [4, nil, 0, nil], flex: :auto) do
4
- - cache footer_navigation_items do
5
- %ul.list-style-none.flex-auto.mb-2.mb-sm-0.mr-sm-2
6
- - footer_navigation_items.each do |item|
7
- - cache item do
8
- %li
9
- = render Primer::ButtonComponent.new(tag: :a, href: item.materialized_path, variant: :small) { item.menu_title }
10
- = render 'footer_content'
2
+ = render Primer::BoxComponent.new(position: :relative, display: :flex,
3
+ flex_wrap: :wrap,
4
+ direction: [:column_reverse, nil, :row, nil],
5
+ align_items: :center,
6
+ justify_content: :space_between,
7
+ mt: 6, pt: 6, pb: 2, mb: 6,
8
+ font_size: 6, color: :muted, border: :top, border_color: :muted) do
9
+ %div
10
+ = render(Primer::Beta::Text.new(tag: :span, color: :muted, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
11
+ = t :'.copyright', name: current_account.name, year: Date.today.year
12
+ - cache footer_navigation_items do
13
+ %ul.list-style-none.d-flex.flex-wrap.flex-1.flex-justify-center.flex-lg-justify-around.mb-2.mb-lg-0
14
+ - footer_navigation_items.each do |item|
15
+ - cache item do
16
+ %li.mr-3.mr-lg-0
17
+ = render Primer::LinkComponent.new(href: item.materialized_path) do
18
+ = item.menu_title
19
+ = render Primer::BoxComponent.new(display: :flex, mb: [2, nil, 0, nil]) do
20
+ = render 'cookies_footer'
11
21
  - if current_account.has_content? :github_url
12
22
  = render Primer::ButtonComponent.new(tag: :a, href: current_account.content(:github_url), button_type: :outline, variant: :small,
13
- display: :inline_block) do
23
+ display: :inline_block, ml: 2) do
14
24
  = render Primer::OcticonComponent.new('mark-github')
15
25
  = t :'.find_on_github'
16
- = render(Primer::Beta::Text.new(tag: :small, color: :muted, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
17
- = t :'.copyright', name: current_account.name, year: Date.today.year
@@ -0,0 +1 @@
1
+ %meta{ name: 'google-site-verification' , content: current_account.google_site_verification }
@@ -4,7 +4,8 @@
4
4
  = link_to post.title, frontend_blog_post_path(post)
5
5
  = render(Primer::HeadingComponent.new(tag: :h4)) do
6
6
  = time_tag post.published_at, format: :ordinal_datetime_with_year
7
- = render(Primer::Markdown.new(color: :muted)) do
8
- = post.excerpt.html_safe
7
+ - if post.excerpt.present?
8
+ = render(Primer::Markdown.new(color: :muted)) do
9
+ = post.excerpt.html_safe
9
10
  = render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
10
11
  = t '.category_html', name: link_to(post.category.name, frontend_blog_category_path(post.category))
@@ -2,9 +2,9 @@
2
2
  = render Primer::Beta::Text.new(tag: :div, display: :inline) do
3
3
  = t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
4
4
  - if @conference.content(:submission_text).present?
5
- = render(Primer::Beta::Text.new(tag: :div, color: :muted, display: :inline)) { @conference.content.html(:submission_text) }
5
+ = render(Primer::Beta::Text.new(tag: :div, color: :muted, display: :inline)) { @conference.content.html(:submission_text).to_s }
6
6
  - if @conference.content(:submission_url).present?
7
7
  - component.action do
8
- = render Primer::ButtonComponent.new(tag: :a, href: @conference.content.html(:submission_url), button_type: :primary,
8
+ = render Primer::ButtonComponent.new(tag: :a, href: @conference.content.html(:submission_url).to_s, button_type: :primary,
9
9
  variant: :small) do
10
10
  = t :'.submit_abstract'
@@ -23,7 +23,7 @@
23
23
  - when 'information'
24
24
  - cache [@conference, @tab] do
25
25
  - if @conference.content(:text).present?
26
- = render(Primer::Markdown.new(my: 4)) { @conference.content.html(:text) }
26
+ = render(Primer::Markdown.new(my: 4)) { @conference.content.html(:text).to_s }
27
27
  - else
28
28
  = render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
29
29
  - when 'presentations'
@@ -2,9 +2,9 @@
2
2
  %link{ rel: 'schema.DC', href: 'http://purl.org/dc/elements/1.1/' }
3
3
  - @article.authorships.sorted_within_article.each do |authorship|
4
4
  %meta{ name: 'DC.Creator.PersonalName', content: authorship.affiliation.name }
5
- %meta{ name: 'DC.Date.created', scheme: 'ISO8601', content: @issue.date.to_s(:iso8601) }
6
- %meta{ name: 'DC.Date.issued', scheme: 'ISO8601', content: @issue.date.to_s(:iso8601) }
7
- %meta{ name: 'DC.Date.modified', scheme: 'ISO8601', content: @issue.date.to_s(:iso8601) }
5
+ %meta{ name: 'DC.Date.created', scheme: 'ISO8601', content: @issue.date.to_formatted_s(:iso8601) }
6
+ %meta{ name: 'DC.Date.issued', scheme: 'ISO8601', content: @issue.date.to_formatted_s(:iso8601) }
7
+ %meta{ name: 'DC.Date.modified', scheme: 'ISO8601', content: @issue.date.to_formatted_s(:iso8601) }
8
8
  - if @article.has_content? :attachment
9
9
  %meta{ name: 'DC.Format', scheme: 'IMT', content: 'application/pdf' }
10
10
  %meta{ name: 'DC.Identifier', content: @article.id }
@@ -31,7 +31,7 @@
31
31
  %meta{ name: 'citation_author', content: authorship.affiliation.name }
32
32
  %meta{ name: 'citation_author_institution', content: authorship.affiliation.institution.name }
33
33
  %meta{ name: 'citation_language', content: 'en' }
34
- %meta{ name: 'citation_date', content: @issue.date.to_s(:iso8601).gsub('-', '/') }
34
+ %meta{ name: 'citation_date', content: @issue.date.to_formatted_s(:iso8601).gsub('-', '/') }
35
35
  %meta{ name: 'citation_volume', content: @issue.volume.number }
36
36
  %meta{ name: 'citation_issue', content: @issue.number }
37
37
  - if @article.has_content? :page_range
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ Spina::Conferences::PrimerTheme.config.importmap.draw do
4
+ # Stimulus & Turbo, as included with spina
5
+ pin '@hotwired/stimulus', to: 'stimulus.js'
6
+ pin '@hotwired/stimulus-loading', to: 'stimulus-loading.js'
7
+ pin '@hotwired/turbo-rails', to: 'turbo.js'
8
+
9
+ # GitHub Primer
10
+ pin '@github/details-dialog-element', to: '@github/details-dialog-element/dist/index.js'
11
+ pin '@github/include-fragment-element', to: '@github/include-fragment-element/dist/index.js'
12
+ pin '@github/filter-input-element', to: '@github/filter-input-element/dist/index.js'
13
+ pin '@github/details-menu-element', to: '@github/details-menu-element/dist/index.js'
14
+
15
+ # Frontend entrypoint
16
+ pin 'application', to: 'spina/conferences/primer_theme/application.js'
17
+
18
+ pin_all_from Spina::Conferences::PrimerTheme::Engine.root.join('app/assets/javascripts/spina/conferences/primer_theme/controllers'), # rubocop:disable Layout/LineLength
19
+ under: 'controllers',
20
+ to: 'spina/conferences/primer_theme/controllers'
21
+ end
@@ -4,7 +4,7 @@
4
4
  theme.name = 'conferences_primer_theme'
5
5
  theme.title = 'Conferences Primer theme'
6
6
 
7
- theme.layout_parts = %w[current_conference_alert]
7
+ theme.layout_parts = %w[alert github_url]
8
8
 
9
9
  theme.parts = [{
10
10
  name: 'text',
@@ -87,7 +87,7 @@
87
87
  part_type: 'Spina::Parts::Repeater',
88
88
  parts: %w[name start_date finish_date start_time application_deadline location is_archived description url]
89
89
  }, {
90
- name: 'current_conference_alert',
90
+ name: 'alert',
91
91
  title: 'Alert',
92
92
  part_type: 'Spina::Parts::Text'
93
93
  }, {
@@ -286,6 +286,8 @@
286
286
  }, {
287
287
  name: 'footer',
288
288
  label: 'Footer'
289
+ }, {
290
+ name: 'journal'
289
291
  }]
290
292
 
291
293
  theme.plugins = %w[conferences journal conferences-blog]
@@ -98,7 +98,7 @@ en:
98
98
  footer:
99
99
  copyright: © %{name} %{year}
100
100
  find_on_github: Find us on GitHub
101
- footer_content:
101
+ cookies_footer:
102
102
  cookies: About cookies
103
103
  loading: Loading…
104
104
 
@@ -5,6 +5,10 @@ module Spina
5
5
  module PrimerTheme
6
6
  # Registers the frontend controller and page parts with Spina.
7
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
11
+
8
12
  config.after_initialize do
9
13
  Spina::Part.register(Spina::Parts::Conferences::PrimerTheme::Checkbox)
10
14
  end
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.10.0'
6
+ VERSION = '1.0.0.rc1'
7
7
  end
8
8
  end
9
9
  end
@@ -9,9 +9,17 @@ require 'spina/admin/conferences/blog'
9
9
  require 'view_component'
10
10
  require 'primer/view_components'
11
11
  require 'icalendar'
12
+ require 'cssbundling-rails'
12
13
 
13
14
  module Spina
14
- # A Primer-based frontend theme for Spina.
15
- module PrimerTheme
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
16
24
  end
17
25
  end