spina-conferences-primer_theme-fork 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +33 -0
- data/Rakefile +36 -0
- data/app/assets/config/spina_conferences_primer_theme_manifest.js +9 -0
- data/app/assets/javascripts/spina/conferences/primer_theme/application.js +7 -0
- data/app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.es6 +68 -0
- data/app/assets/stylesheets/spina/conferences/primer_theme/_custom.sass +0 -0
- data/app/assets/stylesheets/spina/conferences/primer_theme/_custom_variables.sass +0 -0
- data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +44 -0
- data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +16 -0
- data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +72 -0
- data/app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb +42 -0
- data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +13 -0
- data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +69 -0
- data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +53 -0
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +36 -0
- data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +51 -0
- data/app/helpers/spina/conferences/primer_theme/navigations_helper.rb +24 -0
- data/app/views/conferences_primer_theme/pages/about.html.haml +92 -0
- data/app/views/conferences_primer_theme/pages/committee.html.haml +42 -0
- data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +9 -0
- data/app/views/conferences_primer_theme/pages/events.html.haml +59 -0
- data/app/views/conferences_primer_theme/pages/homepage.html.haml +34 -0
- data/app/views/conferences_primer_theme/pages/information.html.haml +5 -0
- data/app/views/conferences_primer_theme/pages/show.html.haml +2 -0
- data/app/views/layouts/conferences_primer_theme/application.html.haml +7 -0
- data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +40 -0
- data/app/views/layouts/spina/conferences/primer_theme/conferences/conferences.html.haml +5 -0
- data/app/views/layouts/spina/conferences/primer_theme/conferences/presentations.html.haml +6 -0
- data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +2 -0
- data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +2 -0
- data/app/views/spina/admin/layout_partables/texts/_form.html.haml +4 -0
- data/app/views/spina/application/_cookies.html.haml +7 -0
- data/app/views/spina/application/_current_conference_alert.html.haml +4 -0
- data/app/views/spina/application/_footer.html.haml +17 -0
- data/app/views/spina/application/_footer_content.html.haml +13 -0
- data/app/views/spina/application/_list_item.html.haml +1 -0
- data/app/views/spina/application/_logo.html.haml +1 -0
- data/app/views/spina/application/_mobile_navigation_item.html.haml +12 -0
- data/app/views/spina/application/_mobile_navigation_items.html.haml +4 -0
- data/app/views/spina/application/_navigation.html.haml +11 -0
- data/app/views/spina/application/_navigation_item.html.haml +11 -0
- data/app/views/spina/application/_text.html.haml +1 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_conference.html.haml +15 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml +12 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml +16 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml +47 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_institution.html.haml +5 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_institution_logo.html.haml +4 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml +15 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation_type.html.haml +5 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml +29 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml +10 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml +23 -0
- data/app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml +37 -0
- data/app/views/spina/conferences/primer_theme/conferences/kaminari/_gap.html.haml +2 -0
- data/app/views/spina/conferences/primer_theme/conferences/kaminari/_next_page.html.haml +9 -0
- data/app/views/spina/conferences/primer_theme/conferences/kaminari/_page.html.haml +10 -0
- data/app/views/spina/conferences/primer_theme/conferences/kaminari/_paginator.html.haml +17 -0
- data/app/views/spina/conferences/primer_theme/conferences/kaminari/_prev_page.html.haml +9 -0
- data/app/views/spina/conferences/primer_theme/conferences/presentations/_abstract.html.haml +2 -0
- data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachment.html.haml +5 -0
- data/app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml +5 -0
- data/app/views/spina/conferences/primer_theme/conferences/presentations/show.html.haml +18 -0
- data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +6 -0
- data/app/views/spina/conferences/primer_theme/journal/articles/_metadata.html.haml +36 -0
- data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +70 -0
- data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +15 -0
- data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +17 -0
- data/app/views/spina/conferences/primer_theme/journal/issues/_issue_cover.html.haml +6 -0
- data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +30 -0
- data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +27 -0
- data/config/initializers/assets.rb +13 -0
- data/config/initializers/mime_types.rb +1 -0
- data/config/initializers/primer.rb +3 -0
- data/config/initializers/themes/conferences_primer_theme.rb +237 -0
- data/config/locales/en.rb +16 -0
- data/config/locales/en.yml +198 -0
- data/config/routes.rb +17 -0
- data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +46 -0
- data/lib/spina/conferences/primer_theme.rb +17 -0
- data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +34 -0
- data/lib/spina/conferences/primer_theme/engine.rb +13 -0
- data/lib/spina/conferences/primer_theme/version.rb +9 -0
- data/lib/tasks/spina/conferences/primer_theme_tasks.rake +6 -0
- metadata +396 -0
@@ -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 }
|
@@ -0,0 +1,6 @@
|
|
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: @presentation.abstract.try(:to_plain_text), title: @presentation.name,
|
6
|
+
seo_title: @presentation.name }
|
@@ -0,0 +1,4 @@
|
|
1
|
+
= f.fields_for :layout_partable, f.object.layout_partable do |ff|
|
2
|
+
- object_id = (ff.object.persisted? ? ff.object.object_id : "new_association_#{ff.object.object_id}").to_s + "_content"
|
3
|
+
= ff.hidden_field :content, id: "#{object_id}_input", value: ff.object.content(fallback: false, default: nil)
|
4
|
+
%trix-editor.text-input.trix-content{ input: "#{object_id}_input" }
|
@@ -0,0 +1,7 @@
|
|
1
|
+
= render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |component|
|
2
|
+
- component.header do
|
3
|
+
= button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
|
4
|
+
class: %w[Box-btn-octicon btn-octicon float-right]) do
|
5
|
+
= render Primer::OcticonComponent.new('x')
|
6
|
+
.Box-title= t(:'.title')
|
7
|
+
= component.body { }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- cache [footer_navigation_items, current_account] do
|
2
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil], align_items: :center) do
|
3
|
+
= render Primer::FlexComponent.new(direction: [:column, :row, nil, nil], mb: [4, nil, 0, nil], flex: :auto) do
|
4
|
+
- cache footer_navigation_items do
|
5
|
+
%ul.list-style-none.flex-auto.mb-2.mb-sm-0.mr-sm-2
|
6
|
+
- footer_navigation_items.each do |item|
|
7
|
+
- cache item do
|
8
|
+
%li
|
9
|
+
= render Primer::ButtonComponent.new(tag: :a, href: item.materialized_path, variant: :small) { item.menu_title }
|
10
|
+
= render 'footer_content'
|
11
|
+
- if current_account.has_content? :github_url
|
12
|
+
= render Primer::ButtonComponent.new(tag: :a, href: current_account.content(:github_url), button_type: :outline, variant: :small,
|
13
|
+
display: :inline_block) do
|
14
|
+
= render Primer::OcticonComponent.new('mark-github')
|
15
|
+
= t :'.find_on_github'
|
16
|
+
= render(Primer::TextComponent.new(tag: :small, color: :text_secondary, mr: [nil, 2, nil, nil], font_size: 6, flex_grow: 0)) do
|
17
|
+
= t :'.copyright', name: current_account.name, year: Date.today.year
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= render Primer::DetailsComponent.new(overlay: :dark, reset: true, mb: [2, 0, nil, nil], mr: [nil, 2, nil, nil]) do |component|
|
2
|
+
= component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
|
3
|
+
= render Primer::OcticonComponent.new('info')
|
4
|
+
= t :'.cookies'
|
5
|
+
= component.body(tag: :'details-dialog') do
|
6
|
+
%include-fragment{ src: frontend_cookies_info_path, loading: :lazy }
|
7
|
+
= render Primer::BorderBoxComponent.new(classes: 'Box--overlay') do |box_component|
|
8
|
+
= box_component.body do
|
9
|
+
= button_tag(data: { 'close-dialog': true }, aria: { label: t(:'spina.close') }, type: 'button',
|
10
|
+
class: %w[Box-btn-octicon btn-octicon m-0 position-absolute right-0 top-0]) do
|
11
|
+
= render Primer::OcticonComponent.new('x')
|
12
|
+
= render Primer::BlankslateComponent.new(title: t('.loading')) do |blankslate_component|
|
13
|
+
= blankslate_component.spinner(size: :large)
|
@@ -0,0 +1 @@
|
|
1
|
+
%li.list-style-none.py-4.border-bottom= yield
|
@@ -0,0 +1 @@
|
|
1
|
+
= render Primer::OcticonComponent.new('home', mr: 2, height: 24)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.Header-item.mr-0.border-top.border-white-fade-15.flex-column.flex-items-stretch
|
2
|
+
- if navigation_item.has_children?
|
3
|
+
%details.details-reset
|
4
|
+
%summary.Header-link.py-2
|
5
|
+
= navigation_item.menu_title
|
6
|
+
= render Primer::OcticonComponent.new('chevron-down')
|
7
|
+
%ul.list-style-none
|
8
|
+
- navigation_item.children.each do |child|
|
9
|
+
%li= link_to child.menu_title, child.materialized_path, class: %w[d-block py-2 pl-3 border-top border-white-fade color-text-white]
|
10
|
+
- elsif navigation_item.is_root?
|
11
|
+
= link_to navigation_item.menu_title, navigation_item.materialized_path,
|
12
|
+
class: %w[Header-link py-2]
|
@@ -0,0 +1,4 @@
|
|
1
|
+
%nav.d-flex.flex-column.flex-self-stretch
|
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 'Journal', frontend_issues_path, class: %w[Header-link py-2 py-lg-0]
|
4
|
+
.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]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- cache main_navigation_items do
|
2
|
+
.Header.px-3.px-md-4.px-lg-5.flex-wrap.flex-lg-nowrap
|
3
|
+
.Header-item.mt-n1.mb-n1= link_to render('logo'), root_path, class: 'Header-link'
|
4
|
+
%details.details-reset.d-lg-none{ style: 'display: contents' }
|
5
|
+
%summary.Header-item.Header-link.btn-link
|
6
|
+
= render Primer::OcticonComponent.new('three-bars', height: 24)
|
7
|
+
.Header-item.Header-item--full.flex-column.width-full.flex-order-1.mr-0.mt-3
|
8
|
+
= render partial: 'mobile_navigation_items'
|
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 'Journal', frontend_issues_path, class: %w[Header-link]
|
11
|
+
.Header-item.d-none.d-lg-flex= link_to 'Conferences', frontend_conferences_path, class: %w[Header-link]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
.Header-item.position-relative.d-none.d-lg-flex
|
2
|
+
- if navigation_item.has_children? && navigation_item.children.regular_pages.in_menu.live.sorted.any?
|
3
|
+
%details.details-reset.details-overlay
|
4
|
+
%summary.Header-link{ role: 'button', aria: { haspopup: 'menu' } }
|
5
|
+
= navigation_item.menu_title
|
6
|
+
= render Primer::OcticonComponent.new('chevron-down')
|
7
|
+
%ul.dropdown-menu.dropdown-menu-sw
|
8
|
+
- navigation_item.children.regular_pages.in_menu.live.sorted.each do |child|
|
9
|
+
%li= link_to child.menu_title, child.materialized_path, class: 'dropdown-item'
|
10
|
+
- elsif navigation_item.is_root?
|
11
|
+
= link_to navigation_item.menu_title, navigation_item.materialized_path, class: %w[Header-link]
|
@@ -0,0 +1 @@
|
|
1
|
+
= render(Primer::MarkdownComponent.new) { text.html_safe }
|
@@ -0,0 +1,15 @@
|
|
1
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row_reverse, nil]) do
|
2
|
+
%ul.list-style-none.d-flex.flex-wrap.flex-md-justify-end.pl-md-2.pb-2.pb-md-0
|
3
|
+
= render partial: 'institution', collection: conference.institutions, cached: -> institution { [institution, institution.logo] }
|
4
|
+
= render Primer::FlexItemComponent.new(flex_auto: true) do
|
5
|
+
= render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { link_to conference.name, frontend_conference_path(conference) }
|
6
|
+
%ul.text-secondary.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
7
|
+
%li.mr-sm-3
|
8
|
+
= render Primer::OcticonComponent.new('calendar')
|
9
|
+
= t :'.dates_html', start_date: time_tag(conference.start_date, format: :date), finish_date: time_tag(conference.finish_date)
|
10
|
+
- if conference.institutions.any?
|
11
|
+
%li
|
12
|
+
= render Primer::OcticonComponent.new('location')
|
13
|
+
= render Primer::BaseComponent.new(tag: :address, display: :inline) do
|
14
|
+
= t :'.locations', institutions: conference.institutions.pluck(:name).to_sentence,
|
15
|
+
cities: conference.institutions.pluck(:city).uniq.to_sentence
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
|
2
|
+
= render Primer::FlexItemComponent.new(mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 4, nil]) do
|
3
|
+
= render Primer::TextComponent.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
|
4
|
+
= render Primer::OcticonComponent.new('clock', vertical_align: :baseline)
|
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::TextComponent.new(tag: :div, color: :text_secondary) do
|
7
|
+
= render Primer::OcticonComponent.new('location')
|
8
|
+
= render(Primer::BaseComponent.new(tag: :address, display: :inline)) { event.location }
|
9
|
+
= render Primer::FlexItemComponent.new(flex_auto: true, col: [nil, nil, 8, nil]) do
|
10
|
+
= render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { event.name }
|
11
|
+
= render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
|
12
|
+
= event.description
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- cache [events, @tab] do
|
2
|
+
= render Primer::BaseComponent.new(tag: :div, my: 4) do
|
3
|
+
- if events.any?
|
4
|
+
%filter-input{ aria: { owns: 'event_list' } }
|
5
|
+
.subnav.subnav-flush
|
6
|
+
.subnav-search.float-left.ml-0
|
7
|
+
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
8
|
+
= octicon 'search', class: 'subnav-search-icon'
|
9
|
+
%div{ id: 'event_list' }
|
10
|
+
- if events.any?
|
11
|
+
%ul{ data: { filter: { list: true } } }
|
12
|
+
= render partial: 'event', collection: events.sorted, layout: 'list_item', cached: true
|
13
|
+
- else
|
14
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
|
15
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_matching_events'), icon: 'calendar', hidden: true,
|
16
|
+
data: { 'filter-empty-state': true })
|
@@ -0,0 +1,47 @@
|
|
1
|
+
- cache [@conference, @conference.institutions] do
|
2
|
+
.container-lg.p-responsive.mb-4
|
3
|
+
= render(Primer::HeadingComponent.new( mb: [1, nil, 2, nil])) { @conference.name }
|
4
|
+
%ul.text-secondary.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
5
|
+
%li.mr-sm-3.mb-1
|
6
|
+
= render Primer::OcticonComponent.new('calendar')
|
7
|
+
= t :'.dates_html', start_date: time_tag(@conference.start_date, format: :date), finish_date: time_tag(@conference.finish_date)
|
8
|
+
- if @conference.institutions.any?
|
9
|
+
- cache @conference.institutions do
|
10
|
+
%li.mb-1
|
11
|
+
= render Primer::OcticonComponent.new('location')
|
12
|
+
= render Primer::BaseComponent.new(tag: :address, display: :inline) do
|
13
|
+
= t :'.locations', institutions: @conference.institutions.pluck(:name).to_sentence,
|
14
|
+
cities: @conference.institutions.pluck(:city).uniq.to_sentence
|
15
|
+
- if @conference.institutions.any?
|
16
|
+
%ul.list-style-none.d-flex.flex-wrap.mt-4
|
17
|
+
= render partial: 'institution', collection: @conference.institutions,
|
18
|
+
cached: -> institution { [institution, institution.logo] }
|
19
|
+
- if @conference.content(:sponsors).present?
|
20
|
+
= render Primer::SubheadComponent.new(spacious: true) do |component|
|
21
|
+
= component.heading(tag: :h2) { t :'.sponsors.title' }
|
22
|
+
= render Primer::FlexComponent.new(flex_wrap: true, ml: -2, mr: -2, mt: -2, mb: -2) do
|
23
|
+
- repeater @conference.content(:sponsors) do |sponsor|
|
24
|
+
= render Primer::FlexItemComponent.new(m: 2, vertical_align: :middle) do
|
25
|
+
- if sponsor.content(:logo).present?
|
26
|
+
= link_to sponsor.content(:website) do
|
27
|
+
= sponsor.content.image_tag(:logo, { resize_to_limit: [200, 60] }, draggable: false,
|
28
|
+
srcset: srcset(sponsor.content(:logo), variant: { resize_to_limit: [200, 60] }))
|
29
|
+
- else
|
30
|
+
= render(Primer::LinkComponent.new(href: sponsor.content(:website) || '')) { sponsor.content(:name) }
|
31
|
+
|
32
|
+
- if @conference.content(:gallery).present?
|
33
|
+
= render Primer::FlexComponent.new(flex_direction: :column, justify_content: :center, align_items: :center, mb: 4, position: :relative,
|
34
|
+
data: { controller: :slideshow, slideshow_incrementer: 0, slideshow_advance: true }) do
|
35
|
+
- @conference.content(:gallery).each_with_index do |image, index|
|
36
|
+
= @conference.content.image_tag(image, { resize_to_fill: [1680, 600] }, draggable: false, data: { 'slideshow-target': 'slide' },
|
37
|
+
srcset: srcset(image, variant: { resize_to_fill: [1680, 600] }), hidden: index != 0,
|
38
|
+
class: %w[width-fit])
|
39
|
+
.position-absolute.top-0.left-0.right-0.bottom-0.container-lg.p-responsive
|
40
|
+
- if @conference.content(:gallery).many?
|
41
|
+
.d-none.d-sm-flex.flex-justify-between.flex-items-center.height-full
|
42
|
+
= render Primer::ButtonComponent.new(data: { action: :'slideshow#previous' }) do
|
43
|
+
= render Primer::OcticonComponent.new('arrow-left')
|
44
|
+
= t(:'.gallery.previous')
|
45
|
+
= render Primer::ButtonComponent.new(data: { action: :'slideshow#next' }) do
|
46
|
+
= t(:'.gallery.next')
|
47
|
+
= render Primer::OcticonComponent.new('arrow-right')
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_institution_logo.html.haml
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
- cache institution_logo do
|
2
|
+
- if institution_logo.file.present?
|
3
|
+
= image_tag main_app.url_for(institution_logo.file.variant(resize_to_limit: [300, 60])), srcset: srcset(institution_logo.file,
|
4
|
+
variant: { resize_to_limit: [300, 60] }), alt_description: institution.name, draggable: false, class: 'p-1'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
|
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::TextComponent.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
|
4
|
+
= render Primer::OcticonComponent.new('clock', vertical_align: :baseline)
|
5
|
+
= time_tag presentation.start_datetime, format: :short
|
6
|
+
= render Primer::TextComponent.new(tag: :div, color: :text_secondary) do
|
7
|
+
= render Primer::OcticonComponent.new('location')
|
8
|
+
= render(Primer::BaseComponent.new(tag: :address, display: :inline)) { presentation.session.room_name }
|
9
|
+
= render Primer::BaseComponent.new(tag: :div, flex: :auto) do
|
10
|
+
= render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
|
11
|
+
= render(Primer::LinkComponent.new(href: frontend_conference_presentation_path(conference, presentation), data: { turbo_frame: '_top' })) { presentation.title }
|
12
|
+
= render Primer::TextComponent.new(tag: :div, color: :text_secondary) do
|
13
|
+
= render Primer::OcticonComponent.new(presentation.presenters.many? ? 'people' : 'person')
|
14
|
+
= render Primer::BaseComponent.new(tag: :address, display: :inline) do
|
15
|
+
= presentation.presenters.collect(&:full_name_and_institution).to_sentence
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentation_type.html.haml
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
%li
|
2
|
+
= link_to frontend_conference_path(presentation_type.conference, presentation_type: presentation_type.id, tab: 'presentations'),
|
3
|
+
class: 'filter-item', aria: { current: @presentation_type == presentation_type ? 'page' : nil } do
|
4
|
+
= presentation_type.name.pluralize
|
5
|
+
%span.count{ title: t(:'.results') }= presentation_type.presentations.count
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
- cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
|
2
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, nil, :row], my: 4) do
|
3
|
+
= render Primer::FlexItemComponent.new(pr: [nil, nil, nil, 4], mb: [4, nil, nil, 0], col: [12, nil, nil, 3]) do
|
4
|
+
%ul.filter-list
|
5
|
+
- cache [@conference.presentations, @presentation_type] do
|
6
|
+
%li
|
7
|
+
= link_to frontend_conference_path(@conference, tab: 'presentations'),
|
8
|
+
class: 'filter-item', aria: { current: ('page' if @presentation_type.blank?) } do
|
9
|
+
= t('.all_presentation_types')
|
10
|
+
%span.count{ title: t(:'.results') }= @conference.presentations.count
|
11
|
+
= render partial: 'presentation_type', collection: @conference.presentation_types.sorted,
|
12
|
+
cached: -> presentation_type { [presentation_type, @presentation_type] }
|
13
|
+
= render Primer::FlexItemComponent.new(col: [12, nil, nil, 9]) do
|
14
|
+
- if @presentations.any?
|
15
|
+
%filter-input{ aria: { owns: 'presentation_list' } }
|
16
|
+
.subnav.subnav-flush
|
17
|
+
.subnav-search.float-left.ml-0
|
18
|
+
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
19
|
+
= octicon 'search', class: 'subnav-search-icon'
|
20
|
+
%div{ id: 'presentation_list' }
|
21
|
+
- if @presentations.any?
|
22
|
+
%ul{ data: { filter: { list: true } } }
|
23
|
+
= render partial: 'presentation', collection: @presentations.sorted.reverse_order, layout: 'list_item',
|
24
|
+
locals: { conference: @conference }, cached: -> presentation { [presentation, presentation.presenters] }
|
25
|
+
= paginate @presentations.sorted, views_prefix: 'spina/conferences/primer_theme/conferences'
|
26
|
+
- else
|
27
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_presentations'), icon: 'mortar-board')
|
28
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_matching_presentations'), icon: 'mortar-board', hidden: true,
|
29
|
+
data: { 'filter-empty-state': true })
|
data/app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
= render Primer::FlashComponent.new(variant: :warning, full: true, icon: 'clock') do |component|
|
2
|
+
= render Primer::TextComponent.new(tag: :div, display: :inline) do
|
3
|
+
= t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
|
4
|
+
- if @conference.content(:submission_text).present?
|
5
|
+
= render(Primer::TextComponent.new(tag: :div, color: :text_secondary, display: :inline)) { @conference.content.html(:submission_text) }
|
6
|
+
- if @conference.content(:submission_url).present?
|
7
|
+
- component.action do
|
8
|
+
= render Primer::ButtonComponent.new(tag: :a, href: @conference.content.html(:submission_url), button_type: :primary,
|
9
|
+
variant: :small) do
|
10
|
+
= t :'.submit_abstract'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
= render Primer::FlexComponent.new(direction: [:column_reverse, nil, :row, nil]) do
|
2
|
+
= render Primer::FlexItemComponent.new(flex_auto: true, mb: [4, nil, 0, nil]) do
|
3
|
+
%filter-input{ aria: { owns: 'conference_list' } }
|
4
|
+
- if @conferences.any?
|
5
|
+
.subnav.subnav-flush
|
6
|
+
.subnav-search.float-left.ml-0
|
7
|
+
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
8
|
+
= render Primer::OcticonComponent.new('search', classes: 'subnav-search-icon')
|
9
|
+
= render Primer::FlexItemComponent.new(mb: [4, nil, 0, nil]) do
|
10
|
+
= render Primer::ButtonComponent.new(tag: :a, href: frontend_conferences_url(protocol: :webcal, format: :ics), button_type: :primary,
|
11
|
+
ml: [0, nil, 6, nil]) do
|
12
|
+
= render Primer::OcticonComponent.new('calendar')
|
13
|
+
= t(:'.subscribe')
|
14
|
+
|
15
|
+
%div{ id: 'conference_list' }
|
16
|
+
- if @conferences.any?
|
17
|
+
%ul{ data: { filter: { list: true } } }
|
18
|
+
= render partial: 'conference', collection: @conferences, layout: 'list_item',
|
19
|
+
cached: -> conference { [conference, conference.institutions, conference.institutions.collect(&:logo)] }
|
20
|
+
- else
|
21
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_conferences'), icon: 'mortar-board')
|
22
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_matching_conferences'), icon: 'mortar-board', hidden: true,
|
23
|
+
data: { 'filter-empty-state': true })
|
@@ -0,0 +1,37 @@
|
|
1
|
+
- if @conference.content(:submission_date).present? && @conference.content(:submission_date) >= Date.today
|
2
|
+
- content_for(:flash) { render 'submission_flash' }
|
3
|
+
|
4
|
+
- content_for(:header) { render 'header' }
|
5
|
+
|
6
|
+
= turbo_frame_tag 'conference_tabs' do
|
7
|
+
= render Primer::UnderlineNavComponent.new(label: t(:'.conference_navigation')) do |component|
|
8
|
+
- component.tab(href: frontend_conference_path(@conference, tab: 'information', presentation_type: @presentation_type&.id),
|
9
|
+
aria: { selected: (@tab == 'information').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
|
10
|
+
= t(:'.tabs.information')
|
11
|
+
- component.tab(href: frontend_conference_path(@conference, tab: 'presentations', presentation_type: @presentation_type&.id),
|
12
|
+
aria: { selected: (@tab == 'presentations').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
|
13
|
+
= t(:'.tabs.presentations')
|
14
|
+
- component.tab(href: frontend_conference_path(@conference, tab: 'events', presentation_type: @presentation_type&.id),
|
15
|
+
aria: { selected: (@tab == 'events').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
|
16
|
+
= t(:'.tabs.events')
|
17
|
+
- component.actions do
|
18
|
+
= render Primer::ButtonComponent.new(tag: :a, href: frontend_conference_url(@conference, protocol: :webcal, format: :ics),
|
19
|
+
button_type: :primary, variant: :small) do
|
20
|
+
= render Primer::OcticonComponent.new('calendar')
|
21
|
+
= t(:'.subscribe')
|
22
|
+
- case @tab
|
23
|
+
- when 'information'
|
24
|
+
- cache [@conference, @tab] do
|
25
|
+
- if @conference.content(:text).present?
|
26
|
+
= render(Primer::MarkdownComponent.new(my: 4)) { @conference.content.html(:text) }
|
27
|
+
- else
|
28
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
|
29
|
+
- when 'presentations'
|
30
|
+
- cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
|
31
|
+
= render partial: 'presentations'
|
32
|
+
- when 'events'
|
33
|
+
- cache [@conference.events, @tab] do
|
34
|
+
= render partial: 'events', locals: { events: @conference.events }
|
35
|
+
- else
|
36
|
+
= render Primer::BlankslateComponent.new(title: t('.no_tab'), description: t('.tab_does_not_exist', tab: @tab), icon: 'x-circle',
|
37
|
+
my: 4)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-# Link to the "Previous" page
|
2
|
+
-# - available local variables
|
3
|
+
-# url: url to the previous page
|
4
|
+
-# current_page: a page object for the currently displayed page
|
5
|
+
-# total_pages: total number of pages
|
6
|
+
-# per_page: number of items to fetch per page
|
7
|
+
-# remote: data-remote
|
8
|
+
= link_to_unless current_page.last?, t(:'.next'), url, rel: 'next', class: 'next_page', aria: { label: t('.next_page') } do
|
9
|
+
%span.next_page{ aria: { disabled: 'true' } }= t('.next')
|
@@ -0,0 +1,10 @@
|
|
1
|
+
-# Link showing page number
|
2
|
+
-# - available local variables
|
3
|
+
-# page: a page object for "this" page
|
4
|
+
-# url: url to this page
|
5
|
+
-# current_page: a page object for the currently displayed page
|
6
|
+
-# total_pages: total number of pages
|
7
|
+
-# per_page: number of items to fetch per page
|
8
|
+
-# remote: data-remote
|
9
|
+
= link_to_unless page.current?, page, url, aria: { label: t(:'.page', number: page) } do
|
10
|
+
%em{ aria: { current: 'page' } }= page
|
@@ -0,0 +1,17 @@
|
|
1
|
+
-# The container tag
|
2
|
+
-# - available local variables
|
3
|
+
-# current_page: a page object for the currently displayed page
|
4
|
+
-# total_pages: total number of pages
|
5
|
+
-# per_page: number of items to fetch per page
|
6
|
+
-# remote: data-remote
|
7
|
+
-# paginator: the paginator that renders the pagination tags inside
|
8
|
+
= paginator.render do
|
9
|
+
%nav.paginate-container{ aria: { label: 'Pagination' } }
|
10
|
+
.pagination
|
11
|
+
= prev_page_tag
|
12
|
+
- each_page do |page|
|
13
|
+
- if page.display_tag?
|
14
|
+
= page_tag page
|
15
|
+
- elsif !page.was_truncated?
|
16
|
+
= gap_tag
|
17
|
+
= next_page_tag
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-# Link to the "Previous" page
|
2
|
+
-# - available local variables
|
3
|
+
-# url: url to the previous page
|
4
|
+
-# current_page: a page object for the currently displayed page
|
5
|
+
-# total_pages: total number of pages
|
6
|
+
-# per_page: number of items to fetch per page
|
7
|
+
-# remote: data-remote
|
8
|
+
= link_to_unless current_page.first?, t(:'.previous'), url, rel: 'prev', class: 'previous_page', aria: { label: t('.previous_page') } do
|
9
|
+
%span.previous_page{ aria: { disabled: 'true' } }= t('.previous')
|
@@ -0,0 +1,5 @@
|
|
1
|
+
- cache [attachment, attachment.attachment] do
|
2
|
+
- unless attachment.attachment.blank?
|
3
|
+
= component.button(tag: :a, href: main_app.rails_blob_path(attachment.attachment.file, disposition: :attachment)) do
|
4
|
+
= render Primer::OcticonComponent.new('download')
|
5
|
+
= attachment.name
|