spina-conferences-primer_theme-fork 0.7.0 → 0.9.0

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.es6 +21 -1
  3. data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +22 -0
  4. data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +46 -0
  5. data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +88 -0
  6. data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +1 -1
  7. data/app/views/conferences_primer_theme/pages/homepage.html.haml +12 -30
  8. data/app/views/conferences_primer_theme/pages/periodical.html.haml +1 -1
  9. data/app/views/conferences_primer_theme/partials/_event.html.haml +2 -4
  10. data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +20 -0
  11. data/app/views/layouts/spina/conferences/primer_theme/blog/blog.html.haml +5 -0
  12. data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +1 -1
  13. data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +1 -1
  14. data/app/views/spina/application/_mobile_navigation_items.html.haml +1 -0
  15. data/app/views/spina/application/_navigation.html.haml +1 -0
  16. data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +12 -0
  17. data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +10 -0
  18. data/app/views/spina/conferences/primer_theme/blog/posts/archive.html.haml +5 -0
  19. data/app/views/spina/conferences/primer_theme/blog/posts/index.atom.builder +19 -0
  20. data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +11 -0
  21. data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +17 -0
  22. data/app/views/spina/conferences/primer_theme/blog/shared/_sidebar.html.haml +10 -0
  23. data/config/initializers/themes/conferences_primer_theme.rb +15 -2
  24. data/config/locales/en.yml +14 -2
  25. data/config/routes.rb +14 -0
  26. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  27. data/lib/spina/conferences/primer_theme.rb +1 -0
  28. metadata +29 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1adba13c5232efe37824da591809831d3dd78ed86ad7e992dc2d62ba0d6988e1
4
- data.tar.gz: e14fc95fa28bbb0e3fc6c8824c5ae98b066f4555f2b67318446264e1a88690dc
3
+ metadata.gz: 7638db04dabeb5edc3de27c831870439c78710521acbd1c46a99b2b5f2061d16
4
+ data.tar.gz: c759d3795b8bb2358d310e997198203a4ffda6f1a8f5bb9711df8b1f986b0dac
5
5
  SHA512:
6
- metadata.gz: de54af339ed49a2f380ebb45a22b112983414e82a5c0cc30dc5775df883de449473568eac267aa94df340108adf26746d37e54bd5b39970bfd6aef7fee7b3be1
7
- data.tar.gz: 71639bc4bdf2b4521acd7764c99e1c20f4b520362a2628a14705e43842f9e179c70b3d472a185992d701986891d718dd1f7a1063c8ac642f88244cacfadc9ffd
6
+ metadata.gz: 83268c1e40a1e9094ab995e472b5e49316c9b19a9a54bd48071dee0a7a6e86441c8a294fd5776e1d36c8527f73072109002850516f80d5ea2bc73acf59d6b852
7
+ data.tar.gz: f26deb07ceda524347c30b38b9de2d895ca7e22b5cbf6cf7c9b590dbde7743ae2a1e18d051858cb69ce3ef50cd228c30d3fb8c3050ef29ed644e7db94262a489
@@ -29,6 +29,26 @@ class SlideshowController extends Stimulus.Controller {
29
29
  this.showSlide()
30
30
  }
31
31
 
32
+ /**
33
+ * Returns the delay between slide transitions.
34
+ * @private
35
+ * @return {Number} The value for the delay.
36
+ */
37
+ get delay() {
38
+ return this.data.has('delay')
39
+ ? Number.parseInt(this.data.get('delay'))
40
+ : 10000
41
+ }
42
+
43
+ /**
44
+ * Sets the delay between slide transitions.
45
+ * @private
46
+ * @param value {Number} The new value for the delay.
47
+ */
48
+ set delay(value) {
49
+ this.data.set('delay', value.toString())
50
+ }
51
+
32
52
  /**
33
53
  * Hook to start advancing the slides if necessary.
34
54
  * @private
@@ -36,7 +56,7 @@ class SlideshowController extends Stimulus.Controller {
36
56
  connect() {
37
57
  this.showSlide()
38
58
  if (this.data.has('advance')) {
39
- setInterval(() => this.next(), 10000)
59
+ setInterval(() => this.next(), this.delay)
40
60
  }
41
61
  }
42
62
 
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spina
4
+ module Conferences
5
+ module PrimerTheme
6
+ module Blog
7
+ class ApplicationController < ::Spina::ApplicationController
8
+ include ::Spina::Frontend
9
+ def cookies_info
10
+ render partial: 'cookies'
11
+ end
12
+
13
+ protected
14
+
15
+ def theme_layout
16
+ 'layouts/spina/conferences/primer_theme/blog/blog'
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spina
4
+ module Conferences
5
+ module PrimerTheme
6
+ module Blog
7
+ # Spina::Blog::CategoriesController
8
+ class CategoriesController < ApplicationController
9
+ include ::Spina::Frontend
10
+
11
+ before_action :page
12
+ before_action :category
13
+ before_action :posts
14
+ before_action :set_breadcrumb, only: :show
15
+
16
+ def show
17
+ add_breadcrumb t('.category', name: @category.name)
18
+ render layout: theme_layout
19
+ end
20
+
21
+ private
22
+
23
+ def category
24
+ @category = Spina::Admin::Conferences::Blog::Category.friendly.find params[:id]
25
+ end
26
+
27
+ def posts
28
+ @posts = @category.posts.available.live.order(published_at: :desc)
29
+ .page(params[:page])
30
+ end
31
+
32
+ def page
33
+ @page = Spina::Page.find_or_create_by name: 'blog' do |page|
34
+ page.link_url = '/blog'
35
+ page.deletable = false
36
+ end
37
+ end
38
+
39
+ def set_breadcrumb
40
+ add_breadcrumb 'Blog', frontend_blog_root_path
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spina
4
+ module Conferences
5
+ module PrimerTheme
6
+ module Blog
7
+ # Spina::Blog::PostsController
8
+ class PostsController < ApplicationController
9
+ include ::Spina::Frontend
10
+
11
+ before_action :find_posts, only: [:index]
12
+ before_action :current_spina_user_can_view_page?
13
+ before_action :set_breadcrumb, only: :show
14
+
15
+ decorates_assigned :posts, :post
16
+
17
+ def index
18
+ @posts = @posts.unscope(where: :draft) if current_spina_user&.admin?
19
+
20
+ respond_to do |format|
21
+ format.atom
22
+ format.html { render layout: theme_layout }
23
+ end
24
+ end
25
+
26
+ def show
27
+ @post = Spina::Admin::Conferences::Blog::Post.friendly.find params[:id]
28
+ set_metadata
29
+ add_breadcrumb @post.title
30
+ render layout: theme_layout
31
+ rescue ActiveRecord::RecordNotFound
32
+ try_redirect
33
+ end
34
+
35
+ def archive
36
+ @posts = Spina::Admin::Conferences::Blog::Post.live
37
+ .where(published_at: start_date..end_date)
38
+ .order(published_at: :desc)
39
+ .page(params[:page])
40
+
41
+ render layout: theme_layout
42
+ end
43
+
44
+ private
45
+
46
+ def start_date
47
+ Time.zone.local(params[:year].to_i, (params[:month] || 1).to_i)
48
+ end
49
+
50
+ def end_date
51
+ start_date.end_of_year
52
+ end
53
+
54
+ def page
55
+ @page ||= Spina::Page.find_or_create_by name: 'blog' do |page|
56
+ page.title = 'Blog'
57
+ page.link_url = '/blog'
58
+ page.deletable = false
59
+ end
60
+ end
61
+
62
+ def find_posts
63
+ @posts = Spina::Admin::Conferences::Blog::Post.available.live.order(published_at: :desc)
64
+ .page(params[:page])
65
+ end
66
+
67
+ def try_redirect
68
+ rule = RewriteRule.find_by!(old_path: "/blog/posts/#{params[:id]}")
69
+ redirect_to rule.new_path, status: :moved_permanently
70
+ end
71
+
72
+ def current_spina_user_can_view_page?
73
+ raise ActiveRecord::RecordNotFound unless current_spina_user.present? || page.live?
74
+ end
75
+
76
+ def set_breadcrumb
77
+ add_breadcrumb 'Blog', frontend_blog_root_path
78
+ end
79
+
80
+ def set_metadata
81
+ @title = @post.seo_title || @post.title
82
+ @description = @post.description
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -58,7 +58,7 @@ module Spina
58
58
  end
59
59
 
60
60
  def set_breadcrumb
61
- add_breadcrumb Admin::Conferences::Conference.model_name.human.pluralize, frontend_conferences_path
61
+ add_breadcrumb 'Blog', frontend_conferences_path
62
62
  end
63
63
 
64
64
  def set_metadata
@@ -2,33 +2,15 @@
2
2
  - cache [current_page, current_conference] do
3
3
  = render Primer::BoxComponent.new(position: :relative, style: 'height: 639px') do
4
4
  = render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false,
5
- style: 'background-color: var(--color-scale-blue-9)')
6
- - if content(:gallery).present?
7
- = render Primer::FlexComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false, style: 'z-index: 1',
8
- flex_direction: :column, justify_content: :center, align_items: :center,
9
- data: { controller: :slideshow, slideshow_incrementer: 0, slideshow_advance: true }) do
10
- - content(:gallery).each_with_index do |image, index|
11
- = content.image_tag(image, { resize_to_limit: [1680, 1680] }, draggable: false, hidden: index != 0,
12
- srcset: srcset(image, variant: { resize_to_limit: [1680, 1680] }),
13
- style: 'object-fit: cover; max-width: max-content; max-height: max-content',
14
- data: { slideshow_target: 'slide' }, class: %w[width-full height-full])
15
- .container-lg.p-responsive.position-relative.color-text-white.height-full{ style: 'z-index: 2' }
16
- = render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
17
- %div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
18
- - if current_conference.present?
19
- = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { current_conference.name }
20
- = render Primer::TextComponent.new(tag: :address, classes: 'f2-light') do
21
- = current_conference.institutions.collect(&:name).to_sentence
22
- = render(Primer::TextComponent.new(tag: :time, classes: 'f2-light')) do
23
- = t :'.dates_html', start_date: time_tag(current_conference.start_date, format: :day_and_month),
24
- finish_date: time_tag(current_conference.finish_date, format: :day_and_month)
25
- - else
26
- = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { Spina::Account.first.name }
27
- - if current_conference.present? && current_conference.finish_date >= Date.today
28
- = link_to t('.more_info'), frontend_conference_path(current_conference),
29
- class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
30
- - else
31
- = link_to t('.more_info'), Spina::Page.find_by(name: 'about').materialized_path,
32
- class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
33
- %div{ style: 'text-shadow: 0 1px 1px rgba(var(--color-scale-black), 0.25), 0 1px 25px rgba(var(--color-scale-black), 0.75);' }
34
- = render(Primer::MarkdownComponent.new(my: 4)) { content(:text).try(:html_safe) }
5
+ style: 'background-color: #057fab; z-index: 0')
6
+ - if content(:carousel).present?
7
+ .height-full.d-flex.flex-column.flex-justify-between{data: { controller: :slideshow, slideshow_incrementer: 0, slideshow_advance: true, slideshow_delay: 20000} }
8
+ - content(:carousel).each_with_index do |carousel_item, index|
9
+ = render partial: 'conferences_primer_theme/partials/homepage_item', locals: { item: carousel_item }
10
+ - if content(:carousel).many?
11
+ .container-lg.height-full.d-flex.flex-column-reverse.mb-8
12
+ = render(Primer::ButtonGroupComponent.new) do |component|
13
+ = component.button(data: { action: :'slideshow#previous' }) do
14
+ = render Primer::OcticonComponent.new('arrow-left')
15
+ = component.button(data: { action: :'slideshow#next' }) do
16
+ = render Primer::OcticonComponent.new('arrow-right')
@@ -26,7 +26,7 @@
26
26
  = render Primer::HeadingComponent.new(tag: :h4) do
27
27
  = time_tag issue.content(:date), format: :long_ordinal
28
28
  - if issue.content(:description).present?
29
- = render Primer::TextComponent.new(tag: :div, color: :text_secondary) do
29
+ = render Primer::MarkdownComponent.new(tag: :div, color: :text_secondary) do
30
30
  = issue.content.html(:description)
31
31
  = render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
32
32
  - if issue.content(:url).present?
@@ -18,12 +18,10 @@
18
18
  = time_tag(generate_datetime(event.content(:start_date), event.content(:start_time)), format: :ordinal_datetime_with_year)
19
19
  - else
20
20
  = time_tag(event.content(:start_date), format: :long_ordinal)
21
- - else
22
- = t '.time_tbc'
23
21
  = render Primer::HeadingComponent.new(tag: :h5, flex: :auto) do
24
- = event.content(:location).presence || t('.location_tbc')
22
+ = event.content(:location).presence
25
23
  - if event.content(:description).present?
26
- = render(Primer::TextComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
24
+ = render(Primer::MarkdownComponent.new(mt: 1, color: :text_secondary)) { event.content.html(:description) }
27
25
  - if event.content(:url).present?
28
26
  = render Primer::ButtonComponent.new(tag: :a, href: event.content(:url), mt: 2) do
29
27
  = render Primer::OcticonComponent.new('link-external')
@@ -0,0 +1,20 @@
1
+ %div{ data: { slideshow_target: 'slide' } }
2
+ - if item.content(:background_image).present?
3
+ = render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false, style: 'z-index: 1') do
4
+ = image_tag(main_app.url_for(item.content(:background_image).variant(resize_to_limit: [1680, 1680])),
5
+ draggable: false,
6
+ srcset: srcset(item.content(:background_image),
7
+ variant: { resize_to_limit: [1680, 1680] }),
8
+ style: 'object-fit: cover;',
9
+ class: %w[width-full height-full])
10
+ .container-lg.p-responsive.position-relative.color-text-white.height-full{ style: 'z-index: 3'}
11
+ = render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
12
+ %div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
13
+ = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) do
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::MarkdownComponent.new(my: 4)) do
17
+ = item.content(:description).html_safe
18
+ - if item.content(:url).present?
19
+ = link_to t('.more_info'), item.content(:url),
20
+ class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
@@ -0,0 +1,5 @@
1
+ - content_for :breadcrumbs do
2
+ = render_breadcrumbs(builder: Spina::Conferences::PrimerTheme::Breadcrumbs::Builder)
3
+
4
+ = render template: 'layouts/spina/conferences/primer_theme/application',
5
+ locals: { author: current_account.name, description: @description, title: @title, seo_title: @title }
@@ -1,2 +1,2 @@
1
1
  = render template: 'layouts/spina/conferences/primer_theme/application',
2
- locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: true }
2
+ locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: false }
@@ -1,2 +1,2 @@
1
1
  = render template: 'layouts/spina/conferences/primer_theme/application',
2
- locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: true }
2
+ locals: { author: current_account.name, description: @description, title: @title, seo_title: @title, hide_alert: false }
@@ -1,4 +1,5 @@
1
1
  %nav.d-flex.flex-column.flex-self-stretch
2
2
  = render partial: 'mobile_navigation_item', collection: main_navigation_items, as: :navigation_item, cache: -> navigation_item { [navigation_item, navigation_item.children] }
3
+ .Header-item.mr-0.border-top.border-white-fade-15= link_to 'Blog', frontend_blog_root_path, class: %w[Header-link py-2 py-lg-0]
3
4
  .Header-item.mr-0.border-top.border-white-fade-15= link_to 'Journal', frontend_issues_path, class: %w[Header-link py-2 py-lg-0]
4
5
  .Header-item.mr-0.border-top.border-white-fade-15= link_to 'Conferences', frontend_conferences_path, class: %w[Header-link py-2 py-lg-0]
@@ -7,5 +7,6 @@
7
7
  .Header-item.Header-item--full.flex-column.width-full.flex-order-1.mr-0.mt-3
8
8
  = render partial: 'mobile_navigation_items'
9
9
  = render partial: 'navigation_item', collection: main_navigation_items, cache: -> navigation_item { [navigation_item, navigation_item.children] }
10
+ .Header-item.d-none.d-lg-flex= link_to 'Blog', frontend_blog_root_path, class: %w[Header-link]
10
11
  .Header-item.d-none.d-lg-flex= link_to 'Journal', frontend_issues_path, class: %w[Header-link]
11
12
  .Header-item.d-none.d-lg-flex= link_to 'Conferences', frontend_conferences_path, class: %w[Header-link]
@@ -0,0 +1,12 @@
1
+ = render(Primer::HeadingComponent.new) do
2
+ Blog
3
+ = render(Primer::HeadingComponent.new(tag: :h2)) do
4
+ = t '.category', name: @category.name
5
+
6
+ = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
7
+ = render(Primer::FlexItemComponent.new(flex_auto: true)) do
8
+ - if @posts.any?
9
+ %ul= render collection: @posts, partial: 'spina/conferences/primer_theme/blog/posts/post', layout: 'list_item', cached: true
10
+ - else
11
+ = render Primer::BlankslateComponent.new(title: t(:'.no_posts'), icon: 'mortar-board')
12
+ = render 'spina/conferences/primer_theme/blog/shared/sidebar'
@@ -0,0 +1,10 @@
1
+ -#%li{class: dom_class(post), id: dom_id(post)}
2
+
3
+ = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) do
4
+ = link_to post.title, frontend_blog_post_path(post)
5
+ = render(Primer::HeadingComponent.new(tag: :h4)) do
6
+ = time_tag post.published_at, format: :ordinal_datetime_with_year
7
+ = render(Primer::MarkdownComponent.new(color: :text_secondary)) do
8
+ = post.excerpt.html_safe
9
+ = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
10
+ = t '.category_html', name: link_to(post.category.name, frontend_blog_category_path(post.category))
@@ -0,0 +1,5 @@
1
+ %h1
2
+ Blog Archive
3
+ %small= formatted_date(params[:year], params[:month])
4
+
5
+ %ul.posts= render @posts
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ atom_feed language: 'en-GB', url: spina.frontend_blog_root_url do |feed|
4
+ feed.title('Blog')
5
+ feed.updated(@posts[0].created_at) unless @posts.empty?
6
+
7
+ @posts.each do |post|
8
+ feed.entry(post, published: post.published_at, url: spina.frontend_blog_post_url(post)) do |entry|
9
+ entry.title(post.title)
10
+ entry.content(post.content, type: 'html')
11
+
12
+ if post.user
13
+ entry.author do |author|
14
+ author.name(post.user.name)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ = render(Primer::HeadingComponent.new) do
2
+ Blog
3
+
4
+ = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
5
+ = render(Primer::FlexItemComponent.new(flex_auto: true)) do
6
+ - if @posts.any?
7
+ %ul= render collection: @posts, partial: 'post', layout: 'list_item', cached: true
8
+ - else
9
+ = render Primer::BlankslateComponent.new(title: t(:'.no_posts'), icon: 'mortar-board')
10
+ = render 'spina/conferences/primer_theme/blog/shared/sidebar'
11
+
@@ -0,0 +1,17 @@
1
+ = render(Primer::HeadingComponent.new) do
2
+ = @post.title
3
+
4
+ %ul.list-style-none.d-flex.flex-column.flex-sm-row.my-2
5
+ = render(Primer::FlexComponent.new(tag: :li, mr: 4, align_items: :center)) do
6
+ = render(Primer::FlexItemComponent.new(mr: 2)) do
7
+ = render(Primer::OcticonComponent.new('person'))
8
+ = render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
9
+ = render(Primer::TextComponent.new(tag: :div, font_weight: :bold)) { @post.user.name }
10
+
11
+ - if @post.image
12
+ = image_tag main_app.url_for(@post.image.file)
13
+
14
+ = render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
15
+ = render(Primer::FlexItemComponent.new(flex_auto: true)) do
16
+ = render(Primer::MarkdownComponent.new(tag: :article)) do
17
+ = @post.content.html_safe
@@ -0,0 +1,10 @@
1
+ = render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 15vw;')) do |sidebar|
2
+ - sidebar.header do
3
+ = render(Primer::HeadingComponent.new(tag: :h3)) do
4
+ = t '.categories'
5
+ - sidebar.row do
6
+ = render(Primer::MarkdownComponent.new(tag: :div, font_weight: :bold)) do
7
+ %ul
8
+ - Spina::Admin::Conferences::Blog::Category.all.each do |cat|
9
+ %li= link_to cat.name, frontend_blog_category_path(cat)
10
+
@@ -211,12 +211,25 @@
211
211
  title: 'Periodical Issues',
212
212
  part_type: 'Spina::Parts::Repeater',
213
213
  parts: %w[name date description cover_img attachment url]
214
+ }, {
215
+ name: 'title',
216
+ title: 'Title',
217
+ part_type: 'Spina::Parts::Line'
218
+ }, {
219
+ name: 'background_image',
220
+ title: 'Background Image',
221
+ part_type: 'Spina::Parts::Image'
222
+ }, {
223
+ name: 'carousel',
224
+ title: 'Carousel',
225
+ part_type: 'Spina::Parts::Repeater',
226
+ parts: %w[title description url background_image]
214
227
  }]
215
228
 
216
229
  theme.view_templates = [{
217
230
  name: 'homepage',
218
231
  title: 'Homepage',
219
- parts: %w[gallery text]
232
+ parts: %w[carousel text]
220
233
  }, {
221
234
  name: 'information',
222
235
  title: 'Information',
@@ -275,5 +288,5 @@
275
288
  label: 'Footer'
276
289
  }]
277
290
 
278
- theme.plugins = %w[conferences journal]
291
+ theme.plugins = %w[conferences journal conferences-blog]
279
292
  end
@@ -84,9 +84,9 @@ en:
84
84
  partials:
85
85
  event:
86
86
  dates_html: "%{start_date} – %{finish_date}"
87
- time_tbc: Time TBC
88
- location_tbc: Location TBC
89
87
  more_info: More information
88
+ homepage_item:
89
+ more_info: Find out more
90
90
 
91
91
 
92
92
  spina:
@@ -190,6 +190,18 @@ en:
190
190
  issue: Issue
191
191
  draft: THIS ARTICLE IS A DRAFT
192
192
  licence_logo: Licence logo
193
+ blog:
194
+ posts:
195
+ post:
196
+ category_html: "Category: %{name}"
197
+ categories:
198
+ show:
199
+ category: "Category: %{name}"
200
+ shared:
201
+ siebar:
202
+ categories: Categories
203
+
204
+
193
205
 
194
206
  languages:
195
207
  en-GB: British English
data/config/routes.rb CHANGED
@@ -14,4 +14,18 @@ Spina::Engine.routes.draw do
14
14
  resources :articles, only: %i[show]
15
15
  end
16
16
  end
17
+
18
+ namespace :frontend, as: 'frontend_blog', path: 'blog', module: 'conferences/primer_theme/blog' do
19
+ root to: 'posts#index'
20
+
21
+ get ':id', to: 'posts#show', as: :post
22
+
23
+ # Redirects for old sites that used the old blog path
24
+ get 'posts/', to: redirect('/blog'), as: :old_index
25
+ get 'posts/:id', to: redirect('/blog/%{id}'), as: :old_post
26
+
27
+ get 'feed.atom', to: 'posts#index', as: :rss_feed, defaults: { format: :atom }
28
+ get 'categories/:id', to: 'categories#show', as: :category
29
+ get 'archive/:year(/:month)', to: 'posts#archive', as: :archive_posts
30
+ end
17
31
  end
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.7.0'
6
+ VERSION = '0.9.0'
7
7
  end
8
8
  end
9
9
  end
@@ -5,6 +5,7 @@ require 'spina/conferences/primer_theme/engine'
5
5
  require 'spina/conferences/primer_theme/breadcrumbs/builder'
6
6
  require 'spina/admin/conferences'
7
7
  require 'spina/admin/journal'
8
+ require 'spina/admin/conferences/blog'
8
9
  require 'octicons_helper'
9
10
  require 'view_component'
10
11
  require 'primer/view_components'
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.7.0
4
+ version: 0.9.0
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-09-07 00:00:00.000000000 Z
12
+ date: 2021-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: babel-transpiler
@@ -96,7 +96,7 @@ dependencies:
96
96
  - !ruby/object:Gem::Version
97
97
  version: 2.0.0
98
98
  - !ruby/object:Gem::Dependency
99
- name: spina-admin-conferences
99
+ name: spina-admin-conferences-fork
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: 0.6.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: spina-admin-conferences-blog
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: 0.1.4
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: 0.1.4
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: capybara
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -294,6 +308,9 @@ files:
294
308
  - app/assets/stylesheets/spina/conferences/primer_theme/_custom.sass
295
309
  - app/assets/stylesheets/spina/conferences/primer_theme/_custom_variables.sass
296
310
  - app/assets/stylesheets/spina/conferences/primer_theme/application.sass
311
+ - app/controllers/spina/conferences/primer_theme/blog/application_controller.rb
312
+ - app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb
313
+ - app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb
297
314
  - app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb
298
315
  - app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb
299
316
  - app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb
@@ -314,8 +331,10 @@ files:
314
331
  - app/views/conferences_primer_theme/pages/periodical.html.haml
315
332
  - app/views/conferences_primer_theme/pages/show.html.haml
316
333
  - app/views/conferences_primer_theme/partials/_event.html.haml
334
+ - app/views/conferences_primer_theme/partials/_homepage_item.html.haml
317
335
  - app/views/layouts/conferences_primer_theme/application.html.haml
318
336
  - app/views/layouts/spina/conferences/primer_theme/application.html.haml
337
+ - app/views/layouts/spina/conferences/primer_theme/blog/blog.html.haml
319
338
  - app/views/layouts/spina/conferences/primer_theme/conferences/conferences.html.haml
320
339
  - app/views/layouts/spina/conferences/primer_theme/conferences/presentations.html.haml
321
340
  - app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml
@@ -333,6 +352,13 @@ files:
333
352
  - app/views/spina/application/_navigation.html.haml
334
353
  - app/views/spina/application/_navigation_item.html.haml
335
354
  - app/views/spina/application/_text.html.haml
355
+ - app/views/spina/conferences/primer_theme/blog/categories/show.html.haml
356
+ - app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml
357
+ - app/views/spina/conferences/primer_theme/blog/posts/archive.html.haml
358
+ - app/views/spina/conferences/primer_theme/blog/posts/index.atom.builder
359
+ - app/views/spina/conferences/primer_theme/blog/posts/index.html.haml
360
+ - app/views/spina/conferences/primer_theme/blog/posts/show.html.haml
361
+ - app/views/spina/conferences/primer_theme/blog/shared/_sidebar.html.haml
336
362
  - app/views/spina/conferences/primer_theme/conferences/conferences/_conference.html.haml
337
363
  - app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml
338
364
  - app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml