spina-conferences-primer_theme 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/spina/conferences/primer_theme/_custom_variables.sass +0 -0
  3. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -0
  4. data/app/controllers/spina/conferences/primer_theme/conferences_controller.rb +10 -4
  5. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +6 -5
  6. data/app/views/conferences_primer_theme/pages/about.html.haml +1 -1
  7. data/app/views/conferences_primer_theme/pages/homepage.html.haml +5 -4
  8. data/app/views/layouts/spina/conferences/primer_theme/presentations.html.haml +1 -1
  9. data/app/views/spina/application/_footer_content.html.haml +1 -1
  10. data/app/views/spina/application/_mobile_navigation_item.html.haml +12 -0
  11. data/app/views/spina/application/_mobile_navigation_items.html.haml +3 -0
  12. data/app/views/spina/application/_navigation.html.haml +3 -3
  13. data/app/views/spina/application/_navigation_item.html.haml +11 -11
  14. data/app/views/spina/conferences/primer_theme/conferences/_event.html.haml +2 -1
  15. data/app/views/spina/conferences/primer_theme/conferences/_header.html.haml +3 -2
  16. data/app/views/spina/conferences/primer_theme/conferences/show.html.haml +2 -2
  17. data/app/views/spina/conferences/primer_theme/presentations/_abstract.html.haml +2 -1
  18. data/config/locales/en.yml +10 -0
  19. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  20. metadata +7 -10
  21. data/app/views/spina/application/_navigation_items.html.haml +0 -3
  22. data/app/views/spina/conferences/primer_theme/conferences/_conference.ics.erb +0 -1
  23. data/app/views/spina/conferences/primer_theme/conferences/_event.ics.erb +0 -1
  24. data/app/views/spina/conferences/primer_theme/conferences/_presentation.ics.erb +0 -1
  25. data/app/views/spina/conferences/primer_theme/conferences/index.ics.erb +0 -3
  26. data/app/views/spina/conferences/primer_theme/conferences/show.ics.erb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62666bdc7b0e62a032379e36423bcaa40f42abb02b6760b386ee8cfd168ed0d5
4
- data.tar.gz: 11fcc65db823cdbfdc02b908e3d8d9a57ee963d8c8ed13e6a2be30bf124c13be
3
+ metadata.gz: 3f9332dab27a0db7ba980280a95c67f5277362a85b5786bd552a4ff9337b5a6f
4
+ data.tar.gz: 6cb511d37aecdd415ffc56576562d92a65c4d4c848e4e60dfba8eb94449dd2c9
5
5
  SHA512:
6
- metadata.gz: e6c1f15ab5688680a43e5fe876928fa1b5dc9e7345468fca565aa13245e84ee8529f620d322edd2dce1b169921a0d313da8b07a0f1a07b09c99394f30e83717c
7
- data.tar.gz: 05aec9a6d349c73c01bfeff02a677339564b2d36720b79e34663facdfb602a845d877395992b2e8bb83560faaf63c3d3e7bb90e9d59d3f3c1e2b5710c925d6dd
6
+ metadata.gz: e3fa1e8800cf378145d9a136919fa22c780231717f9af981eb73e7c741176158cab2e0975b719f94535a70fff986bf80aa83f71c37f64c0ca828528e0dbb6983
7
+ data.tar.gz: 1ed5d9d97805e85b5a9580b7b26ebdf65c7406ba3756bbf59b9631810f5e5ceac5091c5b601a5e486ba0f6629a530a706a53fd352746113fea758700dcfa0812
@@ -3,6 +3,7 @@
3
3
  @import spina/conferences/primer_theme/custom
4
4
  @import "@primer/css"
5
5
  @import "@primer/octicons"
6
+ @import spina/conferences/primer_theme/custom_variables
6
7
 
7
8
  .admin
8
9
  @import "spina/admin_editing"
@@ -10,12 +10,18 @@ module Spina
10
10
 
11
11
  def index
12
12
  @conferences = Admin::Conferences::Conference.sorted.includes(institutions: [:logo])
13
- respond_to :html, :ics
13
+ respond_to do |format|
14
+ format.html
15
+ format.ics { render body: @conferences.to_ics }
16
+ end
14
17
  end
15
18
 
16
19
  def show
17
20
  add_breadcrumb @conference.name
18
- respond_to :html, :ics
21
+ respond_to do |format|
22
+ format.html
23
+ format.ics { render body: @conference.to_ics }
24
+ end
19
25
  end
20
26
 
21
27
  private
@@ -44,9 +50,9 @@ module Spina
44
50
 
45
51
  def set_presentations
46
52
  @presentations = if @presentation_type.present?
47
- @presentation_type.presentations.page(params[:page])
53
+ @presentation_type.presentations.page(params[:page]).per(15)
48
54
  else
49
- @conference.presentations.page(params[:page])
55
+ @conference.presentations.page(params[:page]).per(15)
50
56
  end
51
57
  end
52
58
 
@@ -23,11 +23,12 @@ module Spina
23
23
  end
24
24
  end
25
25
 
26
- def calendar(name:, &block)
27
- # noinspection SpellCheckingInspection
28
- block ||= proc { '' }
29
- Icalendar::Calendar.new.tap { |calendar| calendar.x_wr_calname = name }
30
- .then(&:to_ical).then { |calendar| calendar.insert(calendar.index('END:VCALENDAR'), capture(&block)) }
26
+ def calendar(name:)
27
+ Icalendar::Calendar.new
28
+ .tap { |calendar| calendar.x_wr_calname = name }
29
+ .tap { |calendar| yield(calendar) }
30
+ .tap(&:publish)
31
+ .then(&:to_ical)
31
32
  end
32
33
  end
33
34
  end
@@ -60,7 +60,7 @@
60
60
  - else
61
61
  = render(Primer::TextComponent.new(tag: :div, font_size: 6, color: :text_secondary)) { t :'.documents.no_file' }
62
62
 
63
- = render Primer::SubheadComponent.new do |component|
63
+ = render Primer::SubheadComponent.new(mt: 4) do |component|
64
64
  = component.heading { t :'.partner_societies.title' }
65
65
  - if content(:partner_societies).present?
66
66
  %ul
@@ -2,7 +2,7 @@
2
2
  - cache [current_page, current_conference] do
3
3
  = render Primer::BoxComponent.new(position: :relative, style: 'height: 639px') do
4
4
  = render Primer::BoxComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false,
5
- style: 'background-color: var(--color-bg-backdrop)')
5
+ style: 'background-color: var(--color-scale-blue-9)')
6
6
  - if content(:gallery).present?
7
7
  = render Primer::FlexComponent.new(position: :absolute, top: false, left: false, right: false, bottom: false, style: 'z-index: 1',
8
8
  flex_direction: :column, justify_content: :center, align_items: :center,
@@ -12,9 +12,9 @@
12
12
  srcset: srcset(image, variant: { resize_to_limit: [1680, 1680] }),
13
13
  style: 'object-fit: cover; max-width: max-content; max-height: max-content',
14
14
  data: { slideshow_target: 'slide' }, class: %w[width-full height-full])
15
- .container-lg.p-responsive.position-relative.text-white.height-full{ style: 'z-index: 2' }
15
+ .container-lg.p-responsive.position-relative.color-text-white.height-full{ style: 'z-index: 2' }
16
16
  = render Primer::BoxComponent.new(py: [3, nil, nil, 6]) do
17
- .text-shadow-dark
17
+ %div{ style: 'text-shadow: 0 1px 1px #01040940, 0 1px 25px #010409bf;' }
18
18
  - if current_conference.present?
19
19
  = render(Primer::HeadingComponent.new(tag: :h1, classes: 'h000-mktg lh-condensed-ultra')) { current_conference.name }
20
20
  = render Primer::TextComponent.new(tag: :address, classes: 'f2-light') do
@@ -27,4 +27,5 @@
27
27
  - if current_conference.present? && current_conference.finish_date >= Date.today
28
28
  = link_to t('.more_info'), frontend_conference_path(current_conference),
29
29
  class: %w[btn-mktg btn-large-mktg btn-primary-mktg f3 mt-4]
30
- .text-shadow-dark= render(Primer::MarkdownComponent.new(my: 4)) { content(:text).try(:html_safe) }
30
+ %div{ style: 'text-shadow: 0 1px 1px rgba(var(--color-scale-black), 0.25), 0 1px 25px rgba(var(--color-scale-black), 0.75);' }
31
+ = render(Primer::MarkdownComponent.new(my: 4)) { content(:text).try(:html_safe) }
@@ -2,5 +2,5 @@
2
2
  = render_breadcrumbs(builder: Spina::Conferences::PrimerTheme::Breadcrumbs::Builder)
3
3
 
4
4
  = render template: 'layouts/spina/conferences/primer_theme/application',
5
- locals: { author: current_account.name, description: strip_tags(@presentation.abstract), title: @presentation.name,
5
+ locals: { author: current_account.name, description: @presentation.abstract.to_plain_text, title: @presentation.name,
6
6
  seo_title: @presentation.name }
@@ -1,5 +1,5 @@
1
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' }) do
2
+ = component.summary(button_type: :outline, variant: :small, aria: { haspopup: 'dialog' }, type: nil) do
3
3
  = render Primer::OcticonComponent.new('info')
4
4
  = t :'.cookies'
5
5
  = component.body(tag: :'details-dialog') do
@@ -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,3 @@
1
+ %nav.d-flex.flex-column.flex-self-stretch
2
+ = render partial: 'mobile_navigation_item', collection: main_navigation_items, cached: true, as: :navigation_item
3
+ .Header-item.mr-0.border-top.border-white-fade-15= link_to 'Conferences', frontend_conferences_url, class: %w[Header-link py-2 py-lg-0]
@@ -5,6 +5,6 @@
5
5
  %button.Header-link.btn-link{ type: 'button' }
6
6
  = render Primer::OcticonComponent.new('three-bars', height: 24)
7
7
  .Header-item.Header-item--full.flex-column.width-full.flex-order-1.mr-0.mt-3
8
- = render partial: 'navigation_items'
9
- .Header-item.Header-item--full.flex-row.width-full.d-none.d-lg-flex
10
- = render partial: 'navigation_items'
8
+ = render partial: 'mobile_navigation_items'
9
+ = render partial: 'navigation_item', collection: main_navigation_items, cached: true
10
+ .Header-item.d-none.d-lg-flex= link_to 'Conferences', frontend_conferences_url, class: %w[Header-link]
@@ -1,11 +1,11 @@
1
- - if navigation_item.has_children?
2
- %details.details-reset
3
- %summary.btn-link.d-block.py-2.border-top.border-white-fade.text-white
4
- = navigation_item.menu_title
5
- = render Primer::OcticonComponent.new('chevron-down')
6
- %ul.list-style-none
7
- - navigation_item.children.each do |child|
8
- %li= link_to child.menu_title, child.materialized_path, class: %w[d-block py-2 pl-3 border-top border-white-fade text-white]
9
- - elsif navigation_item.is_root?
10
- = link_to navigation_item.menu_title, navigation_item.materialized_path,
11
- class: %w[Header-link mt-lg-n3 mb-lg-n3 py-2 py-lg-3 mr-0 mr-lg-3 border-top border-lg-top-0 border-white-fade-15]
1
+ .Header-item.position-relative.d-none.d-lg-flex
2
+ - if navigation_item.has_children?
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.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]
@@ -8,4 +8,5 @@
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::TextComponent.new(tag: :div, color: :text_secondary)) { event.description.try(:html_safe) }
11
+ = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
12
+ = event.description
@@ -30,11 +30,12 @@
30
30
  = render(Primer::LinkComponent.new(href: sponsor.content(:website) || '')) { sponsor.content(:name) }
31
31
 
32
32
  - if @conference.content(:gallery).present?
33
- .mb-4.position-relative{ data: { controller: :slideshow, slideshow: { incrementer: 0, advance: true } } }
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
34
35
  - @conference.content(:gallery).each_with_index do |image, index|
35
36
  = @conference.content.image_tag(image, { resize_to_fill: [1680, 600] }, draggable: false, data: { 'slideshow-target': 'slide' },
36
37
  srcset: srcset(image, variant: { resize_to_fill: [1680, 600] }), hidden: index != 0,
37
- class: %w[d-block mx-auto])
38
+ class: %w[width-fit])
38
39
  .position-absolute.top-0.left-0.right-0.bottom-0.container-lg.p-responsive
39
40
  - if @conference.content(:gallery).many?
40
41
  .d-none.d-sm-flex.flex-justify-between.flex-items-center.height-full
@@ -4,12 +4,12 @@
4
4
  - content_for(:header) { render 'header' }
5
5
 
6
6
  = turbo_frame_tag 'conference_tabs' do
7
- = render Primer::UnderlineNavComponent.new(label: t(:'.conference_navigationcle')) do |component|
7
+ = render Primer::UnderlineNavComponent.new(label: t(:'.conference_navigation')) do |component|
8
8
  - component.tab(href: frontend_conference_url(@conference, tab: 'information', presentation_type: @presentation_type&.id),
9
9
  aria: { selected: (@tab == 'information').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
10
10
  = t(:'.tabs.information')
11
11
  - component.tab(href: frontend_conference_url(@conference, tab: 'presentations', presentation_type: @presentation_type&.id),
12
- saria: { selected: (@tab == 'presentations').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
12
+ aria: { selected: (@tab == 'presentations').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
13
13
  = t(:'.tabs.presentations')
14
14
  - component.tab(href: frontend_conference_url(@conference, tab: 'events', presentation_type: @presentation_type&.id),
15
15
  aria: { selected: (@tab == 'events').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
@@ -1 +1,2 @@
1
- = render(Primer::MarkdownComponent.new(my: 4)) { abstract.html_safe }
1
+ = render(Primer::MarkdownComponent.new(my: 4)) do
2
+ = abstract
@@ -150,6 +150,16 @@ en:
150
150
  show:
151
151
  room_and_institution: "%{room}, %{institution}"
152
152
 
153
+ kaminari:
154
+ next_page:
155
+ next: Next
156
+ next_page: Next page
157
+ prev_page:
158
+ previous: Previous
159
+ previous_page: Previous page
160
+ page:
161
+ page: Page %{number}
162
+
153
163
  languages:
154
164
  en-GB: British English
155
165
 
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.2.0'
6
+ VERSION = '0.3.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina-conferences-primer_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Malčić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-14 00:00:00.000000000 Z
11
+ date: 2021-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.0.0
103
+ version: 2.1.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.0.0
110
+ version: 2.1.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: capybara
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -290,6 +290,7 @@ files:
290
290
  - app/assets/javascripts/spina/conferences/primer_theme/application.js
291
291
  - app/assets/javascripts/spina/conferences/primer_theme/controllers/slideshow_controller.es6
292
292
  - app/assets/stylesheets/spina/conferences/primer_theme/_custom.sass
293
+ - app/assets/stylesheets/spina/conferences/primer_theme/_custom_variables.sass
293
294
  - app/assets/stylesheets/spina/conferences/primer_theme/application.sass
294
295
  - app/controllers/spina/conferences/primer_theme/application_controller.rb
295
296
  - app/controllers/spina/conferences/primer_theme/conferences_controller.rb
@@ -314,27 +315,23 @@ files:
314
315
  - app/views/spina/application/_footer_content.html.haml
315
316
  - app/views/spina/application/_list_item.html.haml
316
317
  - app/views/spina/application/_logo.html.haml
318
+ - app/views/spina/application/_mobile_navigation_item.html.haml
319
+ - app/views/spina/application/_mobile_navigation_items.html.haml
317
320
  - app/views/spina/application/_navigation.html.haml
318
321
  - app/views/spina/application/_navigation_item.html.haml
319
- - app/views/spina/application/_navigation_items.html.haml
320
322
  - app/views/spina/application/_text.html.haml
321
323
  - app/views/spina/conferences/primer_theme/conferences/_conference.html.haml
322
- - app/views/spina/conferences/primer_theme/conferences/_conference.ics.erb
323
324
  - app/views/spina/conferences/primer_theme/conferences/_event.html.haml
324
- - app/views/spina/conferences/primer_theme/conferences/_event.ics.erb
325
325
  - app/views/spina/conferences/primer_theme/conferences/_events.html.haml
326
326
  - app/views/spina/conferences/primer_theme/conferences/_header.html.haml
327
327
  - app/views/spina/conferences/primer_theme/conferences/_institution.html.haml
328
328
  - app/views/spina/conferences/primer_theme/conferences/_institution_logo.html.haml
329
329
  - app/views/spina/conferences/primer_theme/conferences/_presentation.html.haml
330
- - app/views/spina/conferences/primer_theme/conferences/_presentation.ics.erb
331
330
  - app/views/spina/conferences/primer_theme/conferences/_presentation_type.html.haml
332
331
  - app/views/spina/conferences/primer_theme/conferences/_presentations.html.haml
333
332
  - app/views/spina/conferences/primer_theme/conferences/_submission_flash.html.haml
334
333
  - app/views/spina/conferences/primer_theme/conferences/index.html.haml
335
- - app/views/spina/conferences/primer_theme/conferences/index.ics.erb
336
334
  - app/views/spina/conferences/primer_theme/conferences/show.html.haml
337
- - app/views/spina/conferences/primer_theme/conferences/show.ics.erb
338
335
  - app/views/spina/conferences/primer_theme/kaminari/_gap.html.haml
339
336
  - app/views/spina/conferences/primer_theme/kaminari/_next_page.html.haml
340
337
  - app/views/spina/conferences/primer_theme/kaminari/_page.html.haml
@@ -1,3 +0,0 @@
1
- %nav.d-flex.flex-column.flex-lg-row.flex-self-stretch.flex-lg-self-auto
2
- = render partial: 'navigation_item', collection: main_navigation_items, cached: true
3
- = link_to 'Conferences', frontend_conferences_url, class: %w[Header-link mt-lg-n3 mb-lg-n3 py-2 py-lg-3 mr-0 mr-lg-3 border-top border-lg-top-0 border-white-fade-15]
@@ -1 +0,0 @@
1
- <%= conference.to_event.to_ical -%>
@@ -1 +0,0 @@
1
- <%= event.to_event.to_ical -%>
@@ -1 +0,0 @@
1
- <%= presentation.to_event.to_ical -%>
@@ -1,3 +0,0 @@
1
- <%= calendar name: current_account.name do -%>
2
- <%= render partial: 'conference', collection: @conferences, cached: true -%>
3
- <% end %>
@@ -1,5 +0,0 @@
1
- <%= calendar name: @conference.name do -%>
2
- <%= render partial: 'conference', object: @conference, cached: true -%>
3
- <%= render partial: 'presentation', collection: @conference.presentations, cached: true -%>
4
- <%= render partial: 'event', collection: @conference.events, cached: true -%>
5
- <% end %>