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.
- checksums.yaml +4 -4
- data/app/assets/builds/spina/conferences/primer_theme/application.css +25964 -0
- data/app/assets/config/spina_conferences_primer_theme_manifest.js +7 -4
- data/app/assets/javascripts/spina/conferences/primer_theme/application.js +6 -7
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/application.js +10 -0
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/index.js +5 -0
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/{slideshow_controller.es6 → slideshow_controller.js} +4 -3
- data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
- data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +1 -0
- data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +0 -2
- data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +0 -2
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +10 -0
- data/app/views/conferences_primer_theme/pages/about.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/committee.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +1 -1
- data/app/views/conferences_primer_theme/pages/events.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/information.html.haml +1 -1
- data/app/views/conferences_primer_theme/pages/periodical.html.haml +3 -3
- data/app/views/conferences_primer_theme/partials/_event.html.haml +1 -1
- data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +1 -1
- data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +7 -14
- data/app/views/spina/application/_admin_bar.html.haml +7 -0
- data/app/views/spina/application/_alert.html.haml +4 -0
- data/app/views/spina/application/_analytics.html.erb +10 -0
- data/app/views/spina/application/{_footer_content.html.haml → _cookies_footer.html.haml} +1 -1
- data/app/views/spina/application/_footer.html.haml +20 -12
- data/app/views/spina/application/_google_site_verification.html.haml +1 -0
- data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +3 -2
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +4 -4
- data/config/initializers/importmap.rb +21 -0
- data/config/initializers/themes/conferences_primer_theme.rb +4 -2
- data/config/locales/en.yml +1 -1
- data/lib/spina/conferences/primer_theme/engine.rb +4 -0
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- data/lib/spina/conferences/primer_theme.rb +10 -2
- metadata +44 -23
- data/app/views/spina/application/_current_conference_alert.html.haml +0 -4
@@ -1,9 +1,12 @@
|
|
1
|
-
//=
|
2
|
-
|
3
|
-
//=
|
4
|
-
//= link
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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'
|
@@ -1,5 +1,6 @@
|
|
1
|
-
|
2
|
-
|
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
|
}
|
@@ -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,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).
|
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 '
|
15
|
-
= render '
|
16
|
-
= stylesheet_link_tag 'spina/conferences/primer_theme/application', media: 'all', data: {
|
17
|
-
=
|
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 '
|
21
|
+
.admin= render 'admin_bar'
|
27
22
|
%header= render 'navigation'
|
28
23
|
- unless local_assigns[:hide_alert]
|
29
|
-
= render '
|
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,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
|
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::
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
= render
|
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
|
-
|
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
|
-
|
8
|
-
=
|
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))
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml
CHANGED
@@ -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.
|
6
|
-
%meta{ name: 'DC.Date.issued', scheme: 'ISO8601', content: @issue.date.
|
7
|
-
%meta{ name: 'DC.Date.modified', scheme: 'ISO8601', content: @issue.date.
|
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.
|
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[
|
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: '
|
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]
|
data/config/locales/en.yml
CHANGED
@@ -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
|
@@ -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
|
-
|
15
|
-
|
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
|