spina-conferences-primer_theme-fork 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/Rakefile +6 -0
- data/app/controllers/spina/conferences/primer_theme/blog/application_controller.rb +1 -0
- data/app/controllers/spina/conferences/primer_theme/blog/categories_controller.rb +1 -1
- data/app/controllers/spina/conferences/primer_theme/blog/posts_controller.rb +5 -5
- 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 +13 -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 +2 -2
- data/app/views/conferences_primer_theme/pages/homepage.html.haml +1 -1
- data/app/views/conferences_primer_theme/pages/information.html.haml +2 -2
- data/app/views/conferences_primer_theme/pages/periodical.html.haml +3 -3
- 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 +1 -1
- data/app/views/spina/application/_footer.html.haml +1 -1
- 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 +2 -2
- 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 +2 -2
- 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/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/mime_types.rb +3 -1
- data/config/locales/en.yml +2 -1
- 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 +1 -1
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- data/lib/spina/conferences/primer_theme.rb +1 -2
- metadata +19 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce68bf02784663a0e354ca369154d20f4599eae01c0910be10c57d6d330afba3
|
4
|
+
data.tar.gz: fe44d6649b68188d82fdd843b0a55d44b32bde8f89752513a152f61fd074ea2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 193634c447d2d784f51be6787991e3754d178bc78998de0a4c0dfd4171eeb5ad669fc1a13e7ac02fd2d288a254611213d6b72949360d547855c63e59707fca93
|
7
|
+
data.tar.gz: d337742e09e81dab12073e1a49a844e3d66612769e5bd7d9cb152beccfba1f3f629909bdc39ce8871fadfbd440e044c1ea2a9399e65e31e64b8965af0d15d7df
|
data/README.md
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
# PrimerTheme
|
2
|
-
A plugin for `Spina` that provides a frontend for `Spina::Admin::Conferences` using components from `Primer::ViewComponents`.
|
1
|
+
# PrimerTheme: frontend for Spina
|
3
2
|
|
4
|
-
|
3
|
+
![Rails tests](https://github.com/louis-vs/spina-conferences-primer_theme-fork/workflows/Verify/badge.svg?branch=master&event=push)
|
4
|
+
[![codecov](https://codecov.io/gh/louis-vs/spina-conferences-primer_theme-fork/branch/master/graph/badge.svg?token=9TZ9QGGLAH)](https://codecov.io/gh/louis-vs/spina-conferences-primer_theme-fork)
|
5
|
+
[![CodeFactor](https://www.codefactor.io/repository/github/louis-vs/spina-conferences-primer_theme-fork/badge)](https://www.codefactor.io/repository/github/louis-vs/spina-conferences-primer_theme-fork)
|
6
|
+
[![Inline docs](http://inch-ci.org/github/louis-vs/spina-conferences-primer_theme-fork.svg?branch=master)](http://inch-ci.org/github/louis-vs/spina-conferences-primer_theme-fork)
|
7
|
+
|
8
|
+
A plugin for `Spina` that provides a frontend for `Spina::Admin::Conferences`, `Spina::Admin::Journal`, and `Spina::Admin::Conferences::Blog` using components from `Primer::ViewComponents`.
|
9
|
+
|
10
|
+
This fork provides an updated version of the plugin, as the main repo is currently badly outdated.
|
5
11
|
|
6
12
|
## Usage
|
7
|
-
See the
|
13
|
+
See the READMEs for the conference plugin, the journal plugin, and the bog plugin, respectively, for more information on what kind of content this frontend allows you to create and how to do so within the admin interface. Also make sure to ensure compilation of the assets for this gem by adding the following line to your
|
8
14
|
`manifest.js` file.
|
9
15
|
|
10
16
|
```js
|
data/Rakefile
CHANGED
@@ -36,9 +36,9 @@ module Spina
|
|
36
36
|
|
37
37
|
def archive
|
38
38
|
@posts = Spina::Admin::Conferences::Blog::Post.live
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
.where(published_at: start_date..end_date)
|
40
|
+
.order(published_at: :desc)
|
41
|
+
.page(params[:page])
|
42
42
|
|
43
43
|
render layout: theme_layout
|
44
44
|
end
|
@@ -63,7 +63,7 @@ module Spina
|
|
63
63
|
|
64
64
|
def find_posts
|
65
65
|
@posts = Spina::Admin::Conferences::Blog::Post.available.live.order(published_at: :desc)
|
66
|
-
|
66
|
+
.page(params[:page])
|
67
67
|
end
|
68
68
|
|
69
69
|
def try_redirect
|
@@ -80,7 +80,7 @@ module Spina
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def set_metadata
|
83
|
-
@title = @post.seo_title.
|
83
|
+
@title = @post.seo_title.presence || @post.title
|
84
84
|
@description = @post.description
|
85
85
|
end
|
86
86
|
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,34 @@ 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
40
|
end
|
41
41
|
end
|
42
42
|
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) }
|
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) }
|
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) }
|
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) }
|
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) }
|
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) }
|
6
6
|
|
7
7
|
- if content(:events_list).present?
|
8
8
|
= render Primer::SubheadComponent.new(mt: 4) do |component|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
= render partial: 'conferences_primer_theme/partials/homepage_item', locals: { item: carousel_item }
|
10
10
|
- if content(:carousel).many?
|
11
11
|
.container-lg.height-full.d-flex.flex-column-reverse.mb-8{ style: 'z-index: 5' }
|
12
|
-
= render(Primer::
|
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) }
|
@@ -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) }
|
6
6
|
|
7
7
|
- if content(:periodical_issues).present?
|
8
8
|
%ul.mt-4
|
@@ -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::
|
29
|
+
= render Primer::Markdown.new(tag: :div, color: :muted) 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?
|
@@ -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) }
|
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,7 +13,7 @@
|
|
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::
|
16
|
+
= render(Primer::Markdown.new(my: 4)) do
|
17
17
|
= item.content(:description).html_safe
|
18
18
|
- if item.content(:url).present?
|
19
19
|
= link_to t('.more_info'), item.content(:url),
|
@@ -13,5 +13,5 @@
|
|
13
13
|
display: :inline_block) do
|
14
14
|
= render Primer::OcticonComponent.new('mark-github')
|
15
15
|
= t :'.find_on_github'
|
16
|
-
= render(Primer::
|
16
|
+
= render(Primer::Beta::Text.new(tag: :small, color: :muted, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
|
17
17
|
= t :'.copyright', name: current_account.name, year: Date.today.year
|
@@ -1 +1 @@
|
|
1
|
-
= render(Primer::
|
1
|
+
= render(Primer::Markdown.new) { text.html_safe }
|
@@ -4,7 +4,7 @@
|
|
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::
|
7
|
+
= render(Primer::Markdown.new(color: :muted)) do
|
8
8
|
= post.excerpt.html_safe
|
9
|
-
= render(Primer::
|
9
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
|
10
10
|
= t '.category_html', name: link_to(post.category.name, frontend_blog_category_path(post.category))
|
@@ -1,4 +1,4 @@
|
|
1
|
-
= render(Primer::HeadingComponent.new) do
|
1
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) do
|
2
2
|
= @post.title
|
3
3
|
|
4
4
|
%ul.list-style-none.d-flex.flex-column.flex-sm-row.my-2
|
@@ -6,12 +6,12 @@
|
|
6
6
|
= render(Primer::FlexItemComponent.new(mr: 2)) do
|
7
7
|
= render(Primer::OcticonComponent.new('person'))
|
8
8
|
= render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
|
9
|
-
= render(Primer::
|
9
|
+
= render(Primer::Beta::Text.new(tag: :div, font_weight: :bold)) { @post.user.name }
|
10
10
|
|
11
11
|
- if @post.image
|
12
12
|
= image_tag main_app.url_for(@post.image.file)
|
13
13
|
|
14
14
|
= render(Primer::FlexComponent.new(flex: :auto, direction: [:column, nil, :row, nil])) do
|
15
15
|
= render(Primer::FlexItemComponent.new(flex_auto: true)) do
|
16
|
-
= render(Primer::
|
16
|
+
= render(Primer::Markdown.new(tag: :article)) do
|
17
17
|
= @post.content.html_safe
|
@@ -3,7 +3,7 @@
|
|
3
3
|
= render(Primer::HeadingComponent.new(tag: :h3)) do
|
4
4
|
= t '.categories'
|
5
5
|
- sidebar.row do
|
6
|
-
= render(Primer::
|
6
|
+
= render(Primer::Markdown.new(tag: :div, font_weight: :bold)) do
|
7
7
|
%ul
|
8
8
|
- Spina::Admin::Conferences::Blog::Category.all.each do |cat|
|
9
9
|
%li= link_to cat.name, frontend_blog_category_path(cat)
|
@@ -1,12 +1,12 @@
|
|
1
1
|
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
|
2
2
|
= render Primer::FlexItemComponent.new(mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 4, nil]) do
|
3
|
-
= render Primer::
|
3
|
+
= render Primer::Beta::Text.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
|
4
4
|
= render Primer::OcticonComponent.new('clock', vertical_align: :baseline)
|
5
5
|
= t :'.times_html', start_time: time_tag(event.start_time, format: :short), finish_time: time_tag(event.finish_time, format: :time)
|
6
|
-
= render Primer::
|
6
|
+
= render Primer::Beta::Text.new(tag: :div, color: :muted) do
|
7
7
|
= render Primer::OcticonComponent.new('location')
|
8
8
|
= render(Primer::BaseComponent.new(tag: :address, display: :inline)) { event.location }
|
9
9
|
= render Primer::FlexItemComponent.new(flex_auto: true, col: [nil, nil, 8, nil]) do
|
10
10
|
= render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { event.name }
|
11
|
-
= render(Primer::
|
11
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
|
12
12
|
= event.description
|
@@ -5,7 +5,7 @@
|
|
5
5
|
.subnav.subnav-flush
|
6
6
|
.subnav-search.float-left.ml-0
|
7
7
|
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
8
|
-
=
|
8
|
+
= render Primer::OcticonComponent.new('search', class: 'subnav-search-icon')
|
9
9
|
%div{ id: 'event_list' }
|
10
10
|
- if events.any?
|
11
11
|
%ul{ data: { filter: { list: true } } }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- cache [@conference, @conference.institutions] do
|
2
2
|
.container-lg.p-responsive.mb-4
|
3
|
-
= render(Primer::HeadingComponent.new( mb: [1, nil, 2, nil])) { @conference.name }
|
3
|
+
= render(Primer::HeadingComponent.new(tag: :h1, mb: [1, nil, 2, nil])) { @conference.name }
|
4
4
|
%ul.text-secondary.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
5
5
|
%li.mr-sm-3.mb-1
|
6
6
|
= render Primer::OcticonComponent.new('calendar')
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
|
2
2
|
= render Primer::BaseComponent.new(tag: :div, flex_shrink: 0, mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 3, nil]) do
|
3
|
-
= render Primer::
|
3
|
+
= render Primer::Beta::Text.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
|
4
4
|
= render Primer::OcticonComponent.new('clock', vertical_align: :baseline)
|
5
5
|
= time_tag presentation.start_datetime, format: :short
|
6
|
-
= render Primer::
|
6
|
+
= render Primer::Beta::Text.new(tag: :div, color: :muted) do
|
7
7
|
= render Primer::OcticonComponent.new('location')
|
8
8
|
= render(Primer::BaseComponent.new(tag: :address, display: :inline)) { presentation.session.room_name }
|
9
9
|
= render Primer::BaseComponent.new(tag: :div, flex: :auto) do
|
10
10
|
= render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
|
11
11
|
= render(Primer::LinkComponent.new(href: frontend_conference_presentation_path(conference, presentation), data: { turbo_frame: '_top' })) { presentation.title }
|
12
|
-
= render Primer::
|
12
|
+
= render Primer::Beta::Text.new(tag: :div, color: :muted) do
|
13
13
|
= render Primer::OcticonComponent.new(presentation.presenters.many? ? 'people' : 'person')
|
14
14
|
= render Primer::BaseComponent.new(tag: :address, display: :inline) do
|
15
15
|
= presentation.presenters.collect(&:full_name_and_institution).to_sentence
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
.subnav.subnav-flush
|
17
17
|
.subnav-search.float-left.ml-0
|
18
18
|
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
19
|
-
=
|
19
|
+
= render Primer::OcticonComponent.new('search', class: 'subnav-search-icon')
|
20
20
|
%div{ id: 'presentation_list' }
|
21
21
|
- if @presentations.any?
|
22
22
|
%ul{ data: { filter: { list: true } } }
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
= render Primer::FlashComponent.new(variant: :warning, full: true, icon: 'clock') do |component|
|
2
|
-
= render Primer::
|
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::
|
5
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, display: :inline)) { @conference.content.html(:submission_text) }
|
6
6
|
- if @conference.content(:submission_url).present?
|
7
7
|
- component.action do
|
8
8
|
= render Primer::ButtonComponent.new(tag: :a, href: @conference.content.html(:submission_url), button_type: :primary,
|
@@ -4,15 +4,15 @@
|
|
4
4
|
- content_for(:header) { render 'header' }
|
5
5
|
|
6
6
|
= turbo_frame_tag 'conference_tabs' do
|
7
|
-
= render Primer::
|
7
|
+
= render Primer::Alpha::UnderlineNav.new(tag: :div, label: t(:'.conference_navigation')) do |component|
|
8
8
|
- component.tab(href: frontend_conference_path(@conference, tab: 'information', presentation_type: @presentation_type&.id),
|
9
|
-
|
9
|
+
selected: (@tab == 'information'), id: 'information') do
|
10
10
|
= t(:'.tabs.information')
|
11
11
|
- component.tab(href: frontend_conference_path(@conference, tab: 'presentations', presentation_type: @presentation_type&.id),
|
12
|
-
|
12
|
+
selected: (@tab == 'presentations'), id: 'presentations') do
|
13
13
|
= t(:'.tabs.presentations')
|
14
14
|
- component.tab(href: frontend_conference_path(@conference, tab: 'events', presentation_type: @presentation_type&.id),
|
15
|
-
|
15
|
+
selected: (@tab == 'events'), id: 'events') do
|
16
16
|
= t(:'.tabs.events')
|
17
17
|
- component.actions do
|
18
18
|
= render Primer::ButtonComponent.new(tag: :a, href: frontend_conference_url(@conference, protocol: :webcal, format: :ics),
|
@@ -23,7 +23,7 @@
|
|
23
23
|
- when 'information'
|
24
24
|
- cache [@conference, @tab] do
|
25
25
|
- if @conference.content(:text).present?
|
26
|
-
= render(Primer::
|
26
|
+
= render(Primer::Markdown.new(my: 4)) { @conference.content.html(:text) }
|
27
27
|
- else
|
28
28
|
= render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
|
29
29
|
- when 'presentations'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
= render(Primer::
|
1
|
+
= render(Primer::Markdown.new(my: 4)) do
|
2
2
|
= abstract
|
data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
- cache [attachments, attachments.collect(&:attachment)] do
|
2
2
|
- if attachments.any?
|
3
|
-
= render Primer::
|
3
|
+
= render Primer::ButtonGroup.new(mt: 1) do |component|
|
4
4
|
= render partial: 'attachment', collection: attachments, cached: -> attachment { [attachment, attachment.attachment] },
|
5
5
|
locals: { component: component }
|
@@ -1,17 +1,17 @@
|
|
1
1
|
- cache [@presentation, @presentation.presenters, @presentation.attachments.collect(&:attachment)] do
|
2
2
|
- cache [@presentation, @presentation.presenters] do
|
3
|
-
= render(Primer::HeadingComponent.new(mb: [1, nil, 2, nil])) { @presentation.title }
|
3
|
+
= render(Primer::HeadingComponent.new(tag: :h1, mb: [1, nil, 2, nil])) { @presentation.title }
|
4
4
|
%ul.text-secondary-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
5
5
|
%li.mr-sm-3.mb-1
|
6
6
|
= render Primer::OcticonComponent.new(@presentation.presenters.many? ? 'people' : 'person')
|
7
|
-
= render Primer::
|
7
|
+
= render Primer::Beta::Text.new(tag: :address, display: :inline) do
|
8
8
|
= @presentation.presenters.collect(&:full_name_and_institution).to_sentence
|
9
9
|
%li.mr-sm-3.mb-1
|
10
10
|
= render Primer::OcticonComponent.new('clock')
|
11
11
|
= time_tag @presentation.start_datetime, format: :short
|
12
12
|
%li.mb-1
|
13
13
|
= render Primer::OcticonComponent.new('location')
|
14
|
-
= render Primer::
|
14
|
+
= render Primer::Beta::Text.new(tag: :address, display: :inline) do
|
15
15
|
= t :'.room_and_institution', room: @presentation.session.room_name, institution: @presentation.room.institution.name
|
16
16
|
|
17
17
|
= render partial: 'attachments', object: @presentation.attachments
|
@@ -2,5 +2,5 @@
|
|
2
2
|
= render(Primer::FlexItemComponent.new(mr: 2)) do
|
3
3
|
= render(Primer::OcticonComponent.new('person'))
|
4
4
|
= render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
|
5
|
-
= render(Primer::
|
6
|
-
= render(Primer::
|
5
|
+
= render(Primer::Beta::Text.new(tag: :div, font_weight: :bold)) { authorship.affiliation.name }
|
6
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted)) { authorship.affiliation.institution.name }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- cache [@article, @article.authorships, @article.affiliations, @article.content(:abstract), @article.issue, @article.issue.volume, @article.issue.content(:cover_img)] do
|
2
2
|
= render partial: 'metadata'
|
3
3
|
|
4
|
-
= render(Primer::HeadingComponent.new) { @article.title }
|
4
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { @article.title }
|
5
5
|
|
6
6
|
= render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
|
7
7
|
= render(Primer::FlexItemComponent.new(flex_auto: true, mr: [nil, nil, 4, nil])) do
|
@@ -11,12 +11,12 @@
|
|
11
11
|
= render(Primer::FlexItemComponent.new(mr: 2)) do
|
12
12
|
= render(Primer::OcticonComponent.new('person'))
|
13
13
|
= render(Primer::FlexComponent.new(tag: :address, direction: :column)) do
|
14
|
-
= render(Primer::
|
15
|
-
= render(Primer::
|
14
|
+
= render(Primer::Beta::Text.new(tag: :div, font_weight: :bold)) { affiliation.name }
|
15
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted)) { affiliation.institution.name }
|
16
16
|
|
17
17
|
- if @article.has_content?(:abstract)
|
18
18
|
= render(Primer::HeadingComponent.new(tag: :h2, mt: 4, font_size: 3)) { t '.abstract' }
|
19
|
-
= render(Primer::
|
19
|
+
= render(Primer::Markdown.new) { @article.content.html(:abstract) }
|
20
20
|
|
21
21
|
= render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 20vw')) do |sidebar|
|
22
22
|
- sidebar.body do
|
@@ -29,28 +29,28 @@
|
|
29
29
|
= render Primer::OcticonComponent.new('download')
|
30
30
|
= t '.download'
|
31
31
|
- component.row do
|
32
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
33
|
-
= render(Primer::
|
32
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.published' }
|
33
|
+
= render(Primer::Beta::Text.new) do
|
34
34
|
= time_tag @article.issue.date, format: :long
|
35
35
|
- component.row do
|
36
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
37
|
-
= render(Primer::
|
36
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.issue' }
|
37
|
+
= render(Primer::Beta::Text.new) do
|
38
38
|
= link_to t('spina.conferences.primer_theme.journal.volume_issue',
|
39
39
|
volume_number: @article.issue.volume.number,
|
40
40
|
issue_number: @article.issue.number), frontend_issue_path(@article.issue)
|
41
41
|
- unless @article.doi.blank?
|
42
42
|
- component.row do
|
43
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
44
|
-
= render(Primer::
|
43
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.doi' }
|
44
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 1)) do
|
45
45
|
= link_to nil, @article.doi
|
46
46
|
- unless @article.url.blank?
|
47
47
|
- component.row do
|
48
|
-
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :
|
49
|
-
= render(Primer::
|
48
|
+
= render(Primer::HeadingComponent.new(tag: :h2, font_size: 4, color: :muted)) { t '.url' }
|
49
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 1)) do
|
50
50
|
= link_to nil, @article.url
|
51
51
|
- component.row do
|
52
52
|
= render(Primer::FlexComponent.new(direction: :column)) do
|
53
|
-
= render(Primer::
|
53
|
+
= render(Primer::Beta::Text.new(mb: 2)) do
|
54
54
|
Copyright © #{@article.issue.date.year} #{@article.affiliations.collect(&:name).to_sentence}
|
55
55
|
- unless @licence.nil?
|
56
56
|
- cache [@licence, @licence.content(:logo), @licence.content(:url)] do
|
@@ -63,8 +63,8 @@
|
|
63
63
|
class: 'py-1'
|
64
64
|
- unless @licence.nil?
|
65
65
|
- cache [@licence, @licence.content(:text)] do
|
66
|
-
= @licence.has_content?(:text) && render(Primer::
|
66
|
+
= @licence.has_content?(:text) && render(Primer::Beta::Text.new(mt: 1)) { @licence.content(:text) }
|
67
67
|
|
68
68
|
- if @article.draft?
|
69
69
|
- component.row do
|
70
|
-
= render(Primer::
|
70
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :danger, font_weight: :bold)) { t '.draft' }
|
@@ -2,12 +2,12 @@
|
|
2
2
|
= render(Primer::FlexItemComponent.new(flex_auto: true)) do
|
3
3
|
= render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) do
|
4
4
|
= link_to article.title, frontend_issue_article_path(article.issue, article)
|
5
|
-
= render(Primer::
|
5
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
|
6
6
|
= render(Primer::OcticonComponent.new(article.affiliations.many? ? 'people' : 'person'))
|
7
7
|
= render(Primer::BaseComponent.new(tag: :address, display: :inline)) do
|
8
8
|
= article.authorships.sorted_within_article.collect { |authorship| authorship.affiliation.name }.to_sentence
|
9
9
|
- unless article.doi.blank?
|
10
|
-
= render(Primer::
|
10
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted)) do
|
11
11
|
= link_to nil, article.doi
|
12
12
|
- if article.has_content?(:attachment)
|
13
13
|
= render(Primer::ButtonComponent.new(tag: :a, href: frontend_issue_article_path(article.issue, article, format: :pdf), mt: 2, download: '')) do
|
@@ -8,10 +8,10 @@
|
|
8
8
|
volume_number: issue.volume.number,
|
9
9
|
issue_number: issue.number), frontend_issue_path(issue)
|
10
10
|
- unless issue.title.blank?
|
11
|
-
= render(Primer::HeadingComponent.new(tag: :h4, color: :
|
11
|
+
= render(Primer::HeadingComponent.new(tag: :h4, color: :muted, mb: 1)) do
|
12
12
|
= issue.title
|
13
|
-
= render(Primer::
|
13
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, font_weight: :bold)) do
|
14
14
|
= time_tag issue.date, format: :long
|
15
15
|
- if issue.has_content?(:description)
|
16
|
-
= render(Primer::
|
16
|
+
= render(Primer::Beta::Text.new(tag: :div, color: :muted, mt: 2)) do
|
17
17
|
= issue.content.html(:description)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
= render(Primer::FlexComponent.new(direction: [:column, nil, :row, nil])) do
|
2
2
|
= render(Primer::FlexComponent.new(direction: :column, flex: :auto)) do
|
3
|
-
= render(Primer::HeadingComponent.new) { @journal.name }
|
3
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) { @journal.name }
|
4
4
|
- if @journal.has_content? :description
|
5
|
-
= render(Primer::
|
5
|
+
= render(Primer::Markdown.new(my: 4)) { @journal.content.html(:description) }
|
6
6
|
= render(Primer::BorderBoxComponent.new(ml: [nil, nil, 4, nil], style: 'min-width: 15vw;')) do |sidebar|
|
7
7
|
- if @journal.has_content? :logo
|
8
8
|
- sidebar.header(bg: :primary) do
|
@@ -1,18 +1,18 @@
|
|
1
1
|
- cache [@issue, @issue.volume, @issue.articles, @issue.content(:cover_img), @issue.content(:description)] do
|
2
2
|
- cache [@issue, @issue.volume] do
|
3
|
-
= render(Primer::HeadingComponent.new) do
|
3
|
+
= render(Primer::HeadingComponent.new(tag: :h1)) do
|
4
4
|
= t('spina.conferences.primer_theme.journal.volume_issue',
|
5
5
|
volume_number: @issue.volume.number,
|
6
6
|
issue_number: @issue.number)
|
7
7
|
|
8
8
|
- unless @issue.title.blank?
|
9
|
-
= render(Primer::HeadingComponent.new(tag: :h2, color: :
|
9
|
+
= render(Primer::HeadingComponent.new(tag: :h2, color: :muted, mb: 2)) { @issue.title }
|
10
10
|
|
11
11
|
- if @issue.has_content?(:cover_img)
|
12
12
|
= render partial: 'issue_cover', locals: { issue: @issue, cover_img: @issue.content(:cover_img), size: [300, 600] }
|
13
13
|
|
14
14
|
- if @issue.has_content?(:description)
|
15
|
-
= render(Primer::
|
15
|
+
= render(Primer::Markdown.new(my: 4)) do
|
16
16
|
= @issue.content.html(:description)
|
17
17
|
|
18
18
|
- if @issue.has_content?(:attachment)
|
data/config/locales/en.yml
CHANGED
@@ -194,13 +194,14 @@ en:
|
|
194
194
|
posts:
|
195
195
|
index:
|
196
196
|
blog: Blog
|
197
|
+
no_posts: There are no posts.
|
197
198
|
post:
|
198
199
|
category_html: "Category: %{name}"
|
199
200
|
categories:
|
200
201
|
show:
|
201
202
|
category: "Category: %{name}"
|
202
203
|
shared:
|
203
|
-
|
204
|
+
sidebar:
|
204
205
|
categories: Categories
|
205
206
|
|
206
207
|
|
data/config/routes.rb
CHANGED
@@ -22,7 +22,7 @@ Spina::Engine.routes.draw do
|
|
22
22
|
|
23
23
|
# Redirects for old sites that used the old blog path
|
24
24
|
get 'posts/', to: redirect('/blog'), as: :old_index
|
25
|
-
get 'posts/:id', to: redirect('/blog/%{id}'), as: :old_post
|
25
|
+
get 'posts/:id', to: redirect('/blog/%{id}'), as: :old_post # rubocop:disable Style/FormatStringToken
|
26
26
|
|
27
27
|
get 'feed.atom', to: 'posts#index', as: :rss_feed, defaults: { format: :atom }
|
28
28
|
get 'categories/:id', to: 'categories#show', as: :category
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class ChangeCurrentConferenceAlertToText < ActiveRecord::Migration[6.0]
|
3
|
+
class ChangeCurrentConferenceAlertToText < ActiveRecord::Migration[6.0] # :nodoc:
|
4
4
|
def up
|
5
5
|
Spina::LayoutPart.where(name: 'current_conference_alert', layout_partable_type: 'Spina::Line').each do |layout_part|
|
6
6
|
if layout_part.partable.present?
|
@@ -8,23 +8,10 @@ module Spina
|
|
8
8
|
# Custom builder using Primer breadcrumbs.
|
9
9
|
class Builder < BreadcrumbsOnRails::Breadcrumbs::Builder
|
10
10
|
def render
|
11
|
-
@context.render ::Primer::
|
12
|
-
@
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
def render_elements(component, elements)
|
19
|
-
elements.collect { |element| render_element(component, element) }
|
20
|
-
end
|
21
|
-
|
22
|
-
def render_element(component, element)
|
23
|
-
url = compute_path(element)
|
24
|
-
if @context.current_page? url
|
25
|
-
component.item(selected: true, **element.options) { compute_name(element) }
|
26
|
-
else
|
27
|
-
component.item(href: compute_path(element), **element.options) { compute_name(element) }
|
11
|
+
@context.render ::Primer::Beta::Breadcrumbs.new(mb: 4) do |component|
|
12
|
+
@elements.each do |element|
|
13
|
+
component.item(href: compute_path(element), **element.options) { compute_name(element) }
|
14
|
+
end
|
28
15
|
end
|
29
16
|
end
|
30
17
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
module Spina
|
4
4
|
module Conferences
|
5
5
|
module PrimerTheme
|
6
|
+
# Registers the frontend controller and page parts with Spina.
|
6
7
|
class Engine < ::Rails::Engine
|
7
|
-
|
8
8
|
config.after_initialize do
|
9
9
|
Spina::Part.register(Spina::Parts::Conferences::PrimerTheme::Checkbox)
|
10
10
|
end
|
@@ -6,13 +6,12 @@ require 'spina/conferences/primer_theme/breadcrumbs/builder'
|
|
6
6
|
require 'spina/admin/conferences'
|
7
7
|
require 'spina/admin/journal'
|
8
8
|
require 'spina/admin/conferences/blog'
|
9
|
-
require 'octicons_helper'
|
10
9
|
require 'view_component'
|
11
10
|
require 'primer/view_components'
|
12
11
|
require 'icalendar'
|
13
12
|
|
14
13
|
module Spina
|
14
|
+
# A Primer-based frontend theme for Spina.
|
15
15
|
module PrimerTheme
|
16
|
-
# Your code goes here...
|
17
16
|
end
|
18
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spina-conferences-primer_theme-fork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.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:
|
12
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: babel-transpiler
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - '='
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.0.
|
62
|
+
version: 0.0.66
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.0.
|
69
|
+
version: 0.0.66
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rails
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,47 +96,47 @@ 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-blog
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
104
|
+
version: 0.1.4
|
105
105
|
type: :runtime
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
111
|
+
version: 0.1.4
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name: spina-admin-
|
113
|
+
name: spina-admin-conferences-fork
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: 2.1.0
|
119
119
|
type: :runtime
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: 2.1.0
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name: spina-admin-
|
127
|
+
name: spina-admin-journal
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.
|
132
|
+
version: 0.6.0
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 0.
|
139
|
+
version: 0.6.0
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: capybara
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -227,14 +227,14 @@ dependencies:
|
|
227
227
|
requirements:
|
228
228
|
- - "~>"
|
229
229
|
- !ruby/object:Gem::Version
|
230
|
-
version: '
|
230
|
+
version: '4.1'
|
231
231
|
type: :development
|
232
232
|
prerelease: false
|
233
233
|
version_requirements: !ruby/object:Gem::Requirement
|
234
234
|
requirements:
|
235
235
|
- - "~>"
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version: '
|
237
|
+
version: '4.1'
|
238
238
|
- !ruby/object:Gem::Dependency
|
239
239
|
name: simplecov
|
240
240
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,14 +283,14 @@ dependencies:
|
|
283
283
|
requirements:
|
284
284
|
- - "~>"
|
285
285
|
- !ruby/object:Gem::Version
|
286
|
-
version: '
|
286
|
+
version: '5.0'
|
287
287
|
type: :development
|
288
288
|
prerelease: false
|
289
289
|
version_requirements: !ruby/object:Gem::Requirement
|
290
290
|
requirements:
|
291
291
|
- - "~>"
|
292
292
|
- !ruby/object:Gem::Version
|
293
|
-
version: '
|
293
|
+
version: '5.0'
|
294
294
|
description: Frontend for Spina::Admin::Conferences plugin, based on Primer.
|
295
295
|
email:
|
296
296
|
- j.malcic@me.com
|
@@ -405,7 +405,8 @@ files:
|
|
405
405
|
homepage:
|
406
406
|
licenses:
|
407
407
|
- MIT
|
408
|
-
metadata:
|
408
|
+
metadata:
|
409
|
+
rubygems_mfa_required: 'true'
|
409
410
|
post_install_message:
|
410
411
|
rdoc_options: []
|
411
412
|
require_paths:
|