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.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/Rakefile +6 -0
- 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 +2 -0
- data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +5 -2
- data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +7 -7
- data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +14 -13
- data/app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb +2 -1
- data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +5 -3
- data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +2 -1
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +23 -13
- data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +10 -2
- data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +3 -1
- data/app/models/spina/parts/conferences/primer_theme/checkbox.rb +6 -2
- data/app/models/spina/parts/conferences/primer_theme.rb +9 -3
- data/app/views/conferences_primer_theme/pages/about.html.haml +9 -9
- data/app/views/conferences_primer_theme/pages/committee.html.haml +10 -9
- data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/events.html.haml +3 -3
- data/app/views/conferences_primer_theme/pages/homepage.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/information.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/periodical.html.haml +5 -5
- data/app/views/conferences_primer_theme/pages/show.html.haml +1 -1
- data/app/views/conferences_primer_theme/partials/_event.html.haml +1 -1
- data/app/views/conferences_primer_theme/partials/_homepage_item.html.haml +2 -2
- 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/application/_text.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/blog/categories/show.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/blog/posts/_post.html.haml +4 -3
- data/app/views/spina/conferences/primer_theme/blog/posts/index.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/blog/posts/show.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/blog/shared/_sidebar.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +5 -5
- data/app/views/spina/conferences/primer_theme/conferences/presentations/_abstract.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/presentations/show.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +4 -4
- data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +15 -15
- data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +3 -3
- data/config/initializers/importmap.rb +21 -0
- data/config/initializers/mime_types.rb +3 -1
- data/config/initializers/themes/conferences_primer_theme.rb +4 -2
- data/config/locales/en.yml +5 -2
- data/config/routes.rb +1 -1
- data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +1 -1
- data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +4 -17
- 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 -3
- metadata +55 -33
- 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
|
}
|
@@ -4,8 +4,10 @@ module Spina
|
|
4
4
|
module Conferences
|
5
5
|
module PrimerTheme
|
6
6
|
module Blog
|
7
|
+
# Base class from which controllers related to the blog plugin inherit
|
7
8
|
class ApplicationController < ::Spina::ApplicationController
|
8
9
|
include ::Spina::Frontend
|
10
|
+
|
9
11
|
def cookies_info
|
10
12
|
render partial: 'cookies'
|
11
13
|
end
|
@@ -6,12 +6,11 @@ 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
|
14
12
|
before_action :set_breadcrumb, only: :show
|
13
|
+
before_action :set_metadata
|
15
14
|
|
16
15
|
def show
|
17
16
|
add_breadcrumb t('.category', name: @category.name)
|
@@ -39,6 +38,10 @@ module Spina
|
|
39
38
|
def set_breadcrumb
|
40
39
|
add_breadcrumb 'Blog', frontend_blog_root_path
|
41
40
|
end
|
41
|
+
|
42
|
+
def set_metadata
|
43
|
+
@title = @category.name
|
44
|
+
end
|
42
45
|
end
|
43
46
|
end
|
44
47
|
end
|
@@ -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
|
@@ -17,6 +15,8 @@ module Spina
|
|
17
15
|
def index
|
18
16
|
@posts = @posts.unscope(where: :draft) if current_spina_user&.admin?
|
19
17
|
|
18
|
+
@title = t('.blog')
|
19
|
+
|
20
20
|
respond_to do |format|
|
21
21
|
format.atom
|
22
22
|
format.html { render layout: theme_layout }
|
@@ -34,9 +34,9 @@ module Spina
|
|
34
34
|
|
35
35
|
def archive
|
36
36
|
@posts = Spina::Admin::Conferences::Blog::Post.live
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
.where(published_at: start_date..end_date)
|
38
|
+
.order(published_at: :desc)
|
39
|
+
.page(params[:page])
|
40
40
|
|
41
41
|
render layout: theme_layout
|
42
42
|
end
|
@@ -61,7 +61,7 @@ module Spina
|
|
61
61
|
|
62
62
|
def find_posts
|
63
63
|
@posts = Spina::Admin::Conferences::Blog::Post.available.live.order(published_at: :desc)
|
64
|
-
|
64
|
+
.page(params[:page])
|
65
65
|
end
|
66
66
|
|
67
67
|
def try_redirect
|
@@ -78,7 +78,7 @@ module Spina
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def set_metadata
|
81
|
-
@title = @post.seo_title || @post.title
|
81
|
+
@title = @post.seo_title.presence || @post.title
|
82
82
|
@description = @post.description
|
83
83
|
end
|
84
84
|
end
|
@@ -6,7 +6,8 @@ module Spina
|
|
6
6
|
module Conferences
|
7
7
|
# User-facing controller for conferences, serving both html and ics
|
8
8
|
class ConferencesController < ApplicationController
|
9
|
-
before_action :set_conference, :set_tab, :set_presentation_type, :set_presentations, :set_breadcrumb,
|
9
|
+
before_action :set_conference, :set_tab, :set_presentation_type, :set_presentations, :set_breadcrumb,
|
10
|
+
only: :show
|
10
11
|
before_action :set_metadata
|
11
12
|
|
12
13
|
def index
|
@@ -30,7 +31,7 @@ module Spina
|
|
30
31
|
def set_conference
|
31
32
|
@conference = Admin::Conferences::Conference.includes(:events, :institutions,
|
32
33
|
presentation_types: [:translations],
|
33
|
-
presentations: [session: [:room], presenters: [:institution]])
|
34
|
+
presentations: [session: [:room], presenters: [:institution]]) # rubocop:disable Layout/LineLength
|
34
35
|
.find(params[:id])
|
35
36
|
@conference.view_context = view_context
|
36
37
|
rescue ActiveRecord::RecordNotFound
|
@@ -42,28 +43,28 @@ module Spina
|
|
42
43
|
end
|
43
44
|
|
44
45
|
def set_presentation_type
|
45
|
-
if params[:presentation_type].
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
46
|
+
return if params[:presentation_type].blank?
|
47
|
+
|
48
|
+
@presentation_type = @conference.presentation_types
|
49
|
+
.includes(presentations: [session: [:room], presenters: [:institution]])
|
50
|
+
.find(params[:presentation_type])
|
50
51
|
end
|
51
52
|
|
52
53
|
def set_presentations
|
53
54
|
@presentations = if @presentation_type.present?
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
@presentation_type.presentations.page(params[:page]).per(15)
|
56
|
+
else
|
57
|
+
@conference.presentations.page(params[:page]).per(15)
|
58
|
+
end
|
58
59
|
end
|
59
60
|
|
60
61
|
def set_breadcrumb
|
61
|
-
add_breadcrumb
|
62
|
+
add_breadcrumb Admin::Conferences::Conference.model_name.human.pluralize, frontend_conferences_path
|
62
63
|
end
|
63
64
|
|
64
65
|
def set_metadata
|
65
66
|
@title = @conference.present? ? @conference.name : Admin::Conferences::Conference.model_name.human(count: 0)
|
66
|
-
@description = @conference.present? && @conference.has_content?(:text) ? helpers.strip_tags(@conference.content(:text)) : ''
|
67
|
+
@description = @conference.present? && @conference.has_content?(:text) ? helpers.strip_tags(@conference.content(:text)) : '' # rubocop:disable Layout/LineLength
|
67
68
|
end
|
68
69
|
end
|
69
70
|
end
|
@@ -19,7 +19,8 @@ module Spina
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def set_presentation
|
22
|
-
@presentation = Admin::Conferences::Presentation.includes(:presenters,
|
22
|
+
@presentation = Admin::Conferences::Presentation.includes(:presenters,
|
23
|
+
attachments: [attachment_type: [:translations]])
|
23
24
|
.find(params[:id])
|
24
25
|
rescue ActiveRecord::RecordNotFound
|
25
26
|
send_file Rails.root.join('public/404.html'), type: 'text/html; charset=utf-8', status: 404
|
@@ -6,7 +6,8 @@ module Spina
|
|
6
6
|
module Journal
|
7
7
|
# User-facing controller for journal articles
|
8
8
|
class ArticlesController < ApplicationController
|
9
|
-
before_action :set_article, :set_issue, :set_journal, :set_licence, :set_breadcrumb, :set_metadata,
|
9
|
+
before_action :set_article, :set_issue, :set_journal, :set_licence, :set_breadcrumb, :set_metadata,
|
10
|
+
:require_admin_for_invisible_article
|
10
11
|
|
11
12
|
def show
|
12
13
|
respond_to do |format|
|
@@ -48,8 +49,9 @@ module Spina
|
|
48
49
|
|
49
50
|
add_breadcrumb @journal.name, frontend_issues_path
|
50
51
|
add_breadcrumb Admin::Journal::Issue.model_name.human.pluralize, frontend_issues_path
|
51
|
-
add_breadcrumb t('spina.conferences.primer_theme.journal.volume_issue', volume_number: @issue.volume.number,
|
52
|
-
|
52
|
+
add_breadcrumb t('spina.conferences.primer_theme.journal.volume_issue', volume_number: @issue.volume.number,
|
53
|
+
issue_number: @issue.number),
|
54
|
+
frontend_issue_path(@issue.id)
|
53
55
|
end
|
54
56
|
|
55
57
|
def set_metadata
|
@@ -22,7 +22,8 @@ module Spina
|
|
22
22
|
|
23
23
|
def show
|
24
24
|
@articles = current_spina_user.present? ? @issue.articles : @issue.articles.visible
|
25
|
-
add_breadcrumb t('spina.conferences.primer_theme.journal.volume_issue',
|
25
|
+
add_breadcrumb t('spina.conferences.primer_theme.journal.volume_issue',
|
26
|
+
volume_number: @issue.volume.number, issue_number: @issue.number)
|
26
27
|
end
|
27
28
|
|
28
29
|
private
|
@@ -9,34 +9,44 @@ module Spina
|
|
9
9
|
|
10
10
|
# Because the upper bound is exclusive a conference is current the day after it ends
|
11
11
|
def current_conference
|
12
|
-
Spina::Admin::Conferences::Conference.order(dates: :asc).find_by('upper(dates) >= ?',
|
12
|
+
Spina::Admin::Conferences::Conference.order(dates: :asc).find_by('upper(dates) >= ?', Time.zone.today)
|
13
13
|
end
|
14
14
|
|
15
15
|
def ancestors
|
16
16
|
return [] if current_page.blank?
|
17
17
|
|
18
|
-
render Primer::
|
18
|
+
render Primer::Beta::Breadcrumbs.new(mb: 4) do |component|
|
19
19
|
current_page.ancestors.each do |ancestor|
|
20
20
|
component.item(href: ancestor.materialized_path) { ancestor.menu_title }
|
21
21
|
end
|
22
|
-
component.item(
|
22
|
+
component.item(href: current_page.materialized_path) { current_page.menu_title }
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def calendar(name
|
26
|
+
def calendar(name:, &block)
|
27
27
|
Icalendar::Calendar.new
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
.tap { |calendar| calendar.x_wr_calname = name }
|
29
|
+
.tap(&block)
|
30
|
+
.tap(&:publish)
|
31
|
+
.then(&:to_ical)
|
32
32
|
end
|
33
33
|
|
34
34
|
def generate_datetime(date, time)
|
35
|
-
Time.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
Time.zone.local(date.year,
|
36
|
+
date.month,
|
37
|
+
date.day,
|
38
|
+
time.hour,
|
39
|
+
time.min)
|
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"
|
40
50
|
end
|
41
51
|
end
|
42
52
|
end
|
@@ -27,7 +27,9 @@ module Spina
|
|
27
27
|
DEFAULT_FACTORS = [1, 2, 3, 4].freeze
|
28
28
|
|
29
29
|
def variants_for(image, variant_options:, factors:)
|
30
|
-
factors.inject({})
|
30
|
+
factors.inject({}) do |srcset, factor|
|
31
|
+
srcset.update(variant_url(image, variant_options, factor) => "#{factor}x")
|
32
|
+
end
|
31
33
|
end
|
32
34
|
|
33
35
|
def variant_url(image, variant_options, factor)
|
@@ -39,7 +41,13 @@ module Spina
|
|
39
41
|
end
|
40
42
|
|
41
43
|
def resize_dimensions_for_key(key, factor, dimensions)
|
42
|
-
METHODS_TO_RESIZE.include?(key)
|
44
|
+
if METHODS_TO_RESIZE.include?(key)
|
45
|
+
dimensions.collect do |dimension|
|
46
|
+
resize_dimension(dimension, factor)
|
47
|
+
end
|
48
|
+
else
|
49
|
+
dimensions
|
50
|
+
end
|
43
51
|
end
|
44
52
|
|
45
53
|
def resize_dimension(dimension = 0, factor = 0)
|
@@ -16,7 +16,9 @@ module Spina
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def live_navigation_items(name)
|
19
|
-
::Spina::NavigationItem.joins(:navigation)
|
19
|
+
::Spina::NavigationItem.joins(:navigation)
|
20
|
+
.where(spina_navigations: { name: name })
|
21
|
+
.roots.regular_pages.in_menu.live.sorted
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
@@ -1,11 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Spina
|
2
4
|
module Parts
|
3
5
|
module Conferences
|
4
6
|
module PrimerTheme
|
7
|
+
# A simplistic checkbox part, e.g. to indicate whether an item should
|
8
|
+
# show or not.
|
5
9
|
class Checkbox < Spina::Parts::Base
|
6
10
|
# Booleans don't work nicely with Spina page parts, so we have this mess
|
7
|
-
CHECKED_VALUE =
|
8
|
-
UNCHECKED_VALUE =
|
11
|
+
CHECKED_VALUE = '1'
|
12
|
+
UNCHECKED_VALUE = '0'
|
9
13
|
|
10
14
|
attr_json :content, :string, default: UNCHECKED_VALUE
|
11
15
|
end
|
@@ -1,7 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Spina
|
2
|
-
module Parts
|
3
|
-
|
4
|
-
|
4
|
+
module Parts
|
5
|
+
module Conferences
|
6
|
+
module PrimerTheme # rubocop:disable Style/Documentation
|
7
|
+
def self.table_name_prefix
|
8
|
+
'spina_parts_conferences_primer_theme_'
|
9
|
+
end
|
10
|
+
end
|
5
11
|
end
|
6
12
|
end
|
7
13
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
- cache current_page do
|
2
|
-
= render(Primer::HeadingComponent.new) { current_page.title }
|
2
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
|
3
3
|
|
4
4
|
- if content(:text).present?
|
5
|
-
= render(Primer::
|
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::
|
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
|
@@ -41,7 +41,7 @@
|
|
41
41
|
= render Primer::OcticonComponent.new('desktop-download')
|
42
42
|
= t(:'.minutes.download')
|
43
43
|
- else
|
44
|
-
= render(Primer::
|
44
|
+
= render(Primer::Beta::Text.new(color: :muted, font_size: 6)) { t :'.minutes.no_file' }
|
45
45
|
- else
|
46
46
|
= render Primer::BlankslateComponent.new(title: t(:'.minutes.no_minutes'), icon: 'file')
|
47
47
|
|
@@ -52,13 +52,13 @@
|
|
52
52
|
%ul
|
53
53
|
- repeater :documents do |document|
|
54
54
|
%li.list-style-none.py-1.d-flex.flex-items-center
|
55
|
-
= render(Primer::
|
55
|
+
= render(Primer::Beta::Text.new(tag: :div, flex: :auto)) { document.content(:name).presence || t(:'.documents.no_name') }
|
56
56
|
- if document.content(:attachment).present?
|
57
57
|
= render Primer::ButtonComponent.new(tag: :a, ml: 2, href: document.content.attachment_url(:attachment), download: '') do
|
58
58
|
= render Primer::OcticonComponent.new('desktop-download')
|
59
59
|
= t :'.documents.download'
|
60
60
|
- else
|
61
|
-
= render(Primer::
|
61
|
+
= render(Primer::Beta::Text.new(tag: :div, font_size: 6, color: :muted)) { t :'.documents.no_file' }
|
62
62
|
|
63
63
|
= render Primer::SubheadComponent.new(mt: 4) do |component|
|
64
64
|
= component.heading { t :'.partner_societies.title' }
|
@@ -71,8 +71,8 @@
|
|
71
71
|
= render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
|
72
72
|
= render Primer::FlexComponent.new(flex_wrap: true, justify_content: :space_between) do
|
73
73
|
- if partner_society.content(:name).present?
|
74
|
-
= render(Primer::
|
75
|
-
= render Primer::
|
74
|
+
= render(Primer::Beta::Text.new(tag: :div)) { partner_society.content(:name) }
|
75
|
+
= render Primer::ButtonGroup.new(aria: { label: t(:'.partner_societies.contact_buttons') }) do |component|
|
76
76
|
- if partner_society.content(:website).present?
|
77
77
|
= component.button(tag: :a, href: partner_society.content(:website)) do
|
78
78
|
= render Primer::OcticonComponent.new('browser')
|
@@ -82,7 +82,7 @@
|
|
82
82
|
= render Primer::OcticonComponent.new('mail')
|
83
83
|
= t(:'.partner_societies.email')
|
84
84
|
- if partner_society.content(:description).present?
|
85
|
-
= render Primer::
|
85
|
+
= render Primer::Markdown.new(color: :muted) do
|
86
86
|
= partner_society.content(:description).try(:html_safe)
|
87
87
|
- if partner_society.content(:logo).present?
|
88
88
|
= partner_society.content.image_tag(:logo, { resize_to_limit: [200, 150] }, size: nil, draggable: false,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
- cache current_page do
|
2
|
-
= render(Primer::HeadingComponent.new) { current_page.title }
|
2
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
|
3
3
|
|
4
4
|
- if content(:text).present?
|
5
|
-
= render(Primer::
|
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
|
@@ -10,11 +10,12 @@
|
|
10
10
|
%li.list-style-none.py-4.border-bottom
|
11
11
|
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
|
12
12
|
- if committee_bio.content(:profile_picture).present?
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
-# TODO: create helper to replace this, because Primer::Beta::Avatar limits size to 80 sadly
|
14
|
+
%img.avatar.circle.mr-md-3.mb-3.mb-md-0.flex-shrink-0{src: committee_bio.content.image_url(:profile_picture, resize_to_fill: [150, 150]),
|
15
|
+
srcset: srcset_string(committee_bio.content(:profile_picture),
|
16
|
+
variant: { resize_to_fill: [150, 150] }),
|
17
|
+
draggable: false,
|
18
|
+
alt: committee_bio.content(:profile_picture).alt}
|
18
19
|
= render Primer::FlexItemComponent.new(flex_auto: true) do
|
19
20
|
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], mb: 1) do
|
20
21
|
= render Primer::BoxComponent.new do
|
@@ -26,7 +27,7 @@
|
|
26
27
|
= committee_bio.content(:name)
|
27
28
|
- if committee_bio.content(:institution).present?
|
28
29
|
= render(Primer::HeadingComponent.new(tag: :h4)) { committee_bio.content(:institution) }
|
29
|
-
= render Primer::
|
30
|
+
= render Primer::ButtonGroup.new(mt: [1, nil, 0, nil], ml: [nil, nil, 1, nil],
|
30
31
|
aria: { label: t(:'.contact_buttons') }) do |component|
|
31
32
|
- if committee_bio.content(:twitter_profile).present?
|
32
33
|
= component.button(tag: :a, href: committee_bio.content(:twitter_profile)) do
|
@@ -37,6 +38,6 @@
|
|
37
38
|
= render Primer::OcticonComponent.new('link-external')
|
38
39
|
= t(:'.facebook')
|
39
40
|
- if committee_bio.content(:bio).present?
|
40
|
-
= render(Primer::
|
41
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted)) { committee_bio.content.html(:bio).to_s }
|
41
42
|
- else
|
42
43
|
= render Primer::BlankslateComponent.new(title: t(:'.no_bios'), icon: 'file')
|
@@ -1,8 +1,8 @@
|
|
1
1
|
- cache current_page do
|
2
|
-
= render(Primer::HeadingComponent.new) { current_page.title }
|
2
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
|
3
3
|
|
4
4
|
- if content(:text).present?
|
5
|
-
= render(Primer::
|
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
|
@@ -1,8 +1,8 @@
|
|
1
1
|
- cache current_page do
|
2
|
-
= render(Primer::HeadingComponent.new) { current_page.title }
|
2
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
|
3
3
|
|
4
4
|
- if content(:text).present?
|
5
|
-
= render(Primer::
|
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?
|
@@ -8,8 +8,8 @@
|
|
8
8
|
- content(:carousel).each_with_index do |carousel_item, index|
|
9
9
|
= render partial: 'conferences_primer_theme/partials/homepage_item', locals: { item: carousel_item }
|
10
10
|
- if content(:carousel).many?
|
11
|
-
.container-lg.height-full.d-flex.flex-column-reverse.mb-8
|
12
|
-
= render(Primer::
|
11
|
+
.container-lg.height-full.d-flex.flex-column-reverse.mb-8{ style: 'z-index: 5' }
|
12
|
+
= render(Primer::ButtonGroup.new) do |component|
|
13
13
|
= component.button(data: { action: :'slideshow#previous' }) do
|
14
14
|
= render Primer::OcticonComponent.new('arrow-left')
|
15
15
|
= component.button(data: { action: :'slideshow#next' }) do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
- cache current_page do
|
2
|
-
= render(Primer::HeadingComponent.new) { current_page.title }
|
2
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
|
3
3
|
|
4
4
|
- if content(:text).present?
|
5
|
-
= render(Primer::
|
5
|
+
= render(Primer::Markdown.new(mt: 4)) { content.html(:text).to_s }
|
@@ -1,9 +1,9 @@
|
|
1
1
|
- cache current_page do
|
2
|
-
= render(Primer::HeadingComponent.new) { current_page.title }
|
2
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
|
3
3
|
|
4
4
|
- if content(:text).present?
|
5
|
-
= render(Primer::
|
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|
|
@@ -26,8 +26,8 @@
|
|
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::
|
30
|
-
= issue.content.html(:description)
|
29
|
+
= render Primer::Markdown.new(tag: :div, color: :muted) do
|
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
|
@@ -1,2 +1,2 @@
|
|
1
1
|
- cache current_page do
|
2
|
-
= render(Primer::HeadingComponent.new) { current_page.title }
|
2
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { current_page.title }
|
@@ -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::
|
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')
|
@@ -13,8 +13,8 @@
|
|
13
13
|
= render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) do
|
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
|
-
= render(Primer::
|
17
|
-
= item.content(:description).
|
16
|
+
= render(Primer::Markdown.new(my: 4)) do
|
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]
|