spina-conferences-primer_theme 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/spina_conferences_primer_theme_manifest.js +1 -0
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +1 -1
- data/app/views/conferences_primer_theme/pages/about.html.haml +3 -0
- data/app/views/conferences_primer_theme/pages/events.html.haml +12 -0
- data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +1 -0
- data/app/views/spina/application/_mobile_navigation_item.html.haml +11 -2
- data/app/views/spina/application/_navigation_item.html.haml +12 -1
- data/app/views/spina/conferences/primer_theme/conferences/show.html.haml +2 -2
- data/app/views/spina/pages/_committee_bio.html.haml +8 -5
- data/app/views/spina/pages/_document.html.haml +15 -0
- data/app/views/spina/pages/_documents.html.haml +7 -0
- data/app/views/spina/pages/_event.html.haml +18 -0
- data/app/views/spina/pages/_events_list.html.haml +19 -0
- data/config/initializers/themes/conferences_primer_theme.rb +53 -1
- data/config/locales/en.rb +11 -0
- data/config/locales/en.yml +16 -0
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9944a8a75899d111879d10a63f4bfb35980d75169f3ebb41b410eec6eae3a2b9
|
4
|
+
data.tar.gz: 860e7c50cb148b3f51230f32beb0598065c4cc82a3eb8eabb0e329e4fc08ee73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 677fb690c14b5adea6013fc3b7ba650d3143492b562a132cda9dade57ef0383e5feed5fc568924f3f6defb88c6cd71aa378edfc54ca5e63a4d4c6a69c215300f
|
7
|
+
data.tar.gz: 263a34a87512b24300dab2cfc39459538910fb801709e427a695813626ada9f4e47873e98b1650e739a69dfb70b292037f3cd30d875f4b46c83714533ebb4710
|
@@ -18,7 +18,7 @@ module Spina
|
|
18
18
|
|
19
19
|
render Primer::BreadcrumbComponent.new(mb: 4) do |component|
|
20
20
|
current_page.ancestors.each do |ancestor|
|
21
|
-
component.slot(:item, href:
|
21
|
+
component.slot(:item, href: ancestor.materialized_path) { ancestor.menu_title }
|
22
22
|
end
|
23
23
|
component.slot(:item, selected: true) { current_page.menu_title }
|
24
24
|
end
|
@@ -13,6 +13,9 @@
|
|
13
13
|
- cache [partable_for(:minutes), content(:minutes)&.structure_items,
|
14
14
|
content(:minutes)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
15
15
|
.mt-4.col-12.col-md-6.float-md-left= render partial: 'minutes', object: content(:minutes)
|
16
|
+
- cache [partable_for(:documents), content(:documents)&.structure_items,
|
17
|
+
content(:documents)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
18
|
+
.mt-4.col-12.col-md-12.float-md-left= render partial: 'documents', object: content(:documents)
|
16
19
|
- cache [partable_for(:partner_societies), content(:partner_societies)&.structure_items,
|
17
20
|
content(:partner_societies)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
18
21
|
- if has_content?(:partner_societies) && content(:partner_societies).structure_items.any?
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- cache current_page do
|
2
|
+
%h1= current_page.title
|
3
|
+
|
4
|
+
- cache partable_for(:text) do
|
5
|
+
- if has_content? :text
|
6
|
+
.mt-4= render partial: 'text', object: content(:text)
|
7
|
+
- cache [partable_for(:events_list), content(:events_list)&.structure_items,
|
8
|
+
content(:events_list)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
9
|
+
- if has_content?(:events_list) && content(:events_list).structure_items.any?
|
10
|
+
.mt-2= render partial: 'events_list', object: content(:events_list)
|
11
|
+
- else
|
12
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
|
@@ -19,6 +19,7 @@
|
|
19
19
|
%script{ type: 'module', src: asset_path('@github/include-fragment-element/dist/index.js') }
|
20
20
|
%script{ type: 'module', src: asset_path('@github/tab-container-element/dist/index.js') }
|
21
21
|
%script{ type: 'module', src: asset_path('@github/filter-input-element/dist/index.js') }
|
22
|
+
%script{ type: 'module', src: asset_path('@github/details-menu-element/dist/index.js') }
|
22
23
|
= yield :head
|
23
24
|
%body
|
24
25
|
.admin= render 'spina/shared/admin_bar'
|
@@ -1,2 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
- if mobile_navigation_item.has_children?
|
2
|
+
%details.details-reset
|
3
|
+
%summary.btn-link.d-block.py-2.border-top.border-white-fade.text-white
|
4
|
+
= mobile_navigation_item.menu_title
|
5
|
+
= render Primer::OcticonComponent.new(icon: 'chevron-down')
|
6
|
+
%ul.list-style-none
|
7
|
+
- mobile_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 mobile_navigation_item.is_root?
|
10
|
+
= link_to mobile_navigation_item.menu_title, mobile_navigation_item.materialized_path,
|
11
|
+
class: %w[d-block py-2 border-top border-white-fade text-white]
|
@@ -1 +1,12 @@
|
|
1
|
-
|
1
|
+
- if navigation_item.has_children?
|
2
|
+
.Header-item.d-none.d-lg-flex
|
3
|
+
%details.dropdown.details-reset.details-overlay
|
4
|
+
%summary.Header-link
|
5
|
+
= navigation_item.menu_title
|
6
|
+
%span.dropdown-caret
|
7
|
+
%details-menu.dropdown-menu.dropdown-menu-se.mt-3{ role: 'menu' }
|
8
|
+
- navigation_item.children.each do |child|
|
9
|
+
%li= link_to child.menu_title, child.materialized_path, class: 'dropdown-item'
|
10
|
+
- elsif navigation_item.has_parent?
|
11
|
+
.Header-item.d-none.d-lg-flex
|
12
|
+
= link_to navigation_item.menu_title, navigation_item.materialized_path, class: 'Header-link'
|
@@ -5,11 +5,11 @@
|
|
5
5
|
- cache partable_for(:submission_url, parent: @conference) do
|
6
6
|
- if @conference.content(:submission_url).present?
|
7
7
|
= link_to t(:'.submit_abstract'), @conference.content(:submission_url),
|
8
|
-
class: %i[btn btn-
|
8
|
+
class: %i[btn btn-primary flash-action]
|
9
9
|
- cache partable_for(:submission_date, parent: @conference) do
|
10
10
|
%p
|
11
11
|
= octicon('clock')
|
12
|
-
= t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :
|
12
|
+
= t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
|
13
13
|
- cache partable_for(:submission_text, parent: @conference) do
|
14
14
|
- if @conference.content(:submission_text).present?
|
15
15
|
%p= @conference.content(:submission_text).html_safe
|
@@ -10,11 +10,14 @@
|
|
10
10
|
mb: [3, nil, 0, nil])
|
11
11
|
.flex-auto
|
12
12
|
.d-flex.flex-column.flex-md-row.mb-1
|
13
|
-
- cache partable_for(:name, :role, parent: committee_bio) do
|
14
|
-
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
- cache partable_for(:name, :role, :institution, parent: committee_bio) do
|
14
|
+
.flex-column
|
15
|
+
- if committee_bio.has_content?(:name) && committee_bio.has_content?(:role)
|
16
|
+
%h3.flex-auto= t :'.name_and_role', name: committee_bio.content(:name), role: committee_bio.content(:role)
|
17
|
+
- elsif committee_bio.has_content?(:name)
|
18
|
+
%h3.flex-auto= committee_bio.content(:name)
|
19
|
+
- if committee_bio.has_content?(:institution)
|
20
|
+
%h4.flex-auto= committee_bio.content(:institution)
|
18
21
|
.BtnGroup.mt-1.mt-md-0.ml-md-1{ aria: { label: t(:'.contact_buttons') } }
|
19
22
|
- cache partable_for(:twitter_profile, parent: committee_bio) do
|
20
23
|
- if committee_bio.has_content?(:twitter_profile)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- cache [document, document.structure_parts.collect(&:structure_partable)] do
|
2
|
+
%li.list-style-none.py-1.d-flex.flex-items-center
|
3
|
+
- cache partable_for(:name, parent: document) do
|
4
|
+
- if(document.has_content?(:name))
|
5
|
+
%h3.flex-auto= document.content(:name)
|
6
|
+
- else
|
7
|
+
%h3.flex-auto= t :'.no_name'
|
8
|
+
- cache partable_for(:attachment, parent: document) do
|
9
|
+
- if document.has_content?(:attachment) && document.content(:attachment).persisted?
|
10
|
+
= render Primer::ButtonComponent.new(tag: :a, ml: 2,
|
11
|
+
href: main_app.rails_blob_path(document.content(:attachment), disposition: :attachment)) do
|
12
|
+
= render Primer::OcticonComponent.new(icon: 'desktop-download')
|
13
|
+
= t(:'.download')
|
14
|
+
- else
|
15
|
+
.text-small.text-gray= t :'.no_file'
|
@@ -0,0 +1,7 @@
|
|
1
|
+
- if documents.present? && documents.structure_items.any?
|
2
|
+
= render Primer::SubheadComponent.new do |component|
|
3
|
+
= component.slot(:heading) { t :'.title' }
|
4
|
+
|
5
|
+
%ul{ class: dom_class(documents), id: dom_id(documents) }
|
6
|
+
= render partial: 'document', collection: documents.structure_items.sorted_by_structure,
|
7
|
+
cached: ->(document) { [document, document.structure_parts.collect(&:structure_partable)] }
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- cache [event, event.structure_parts.collect(&:structure_partable)] do
|
2
|
+
.d-flex.flex-column.flex-items-start
|
3
|
+
- cache partable_for(:name, parent: event) do
|
4
|
+
- if event.has_content?(:name)
|
5
|
+
%h3.flex-auto= event.content(:name)
|
6
|
+
- cache partable_for(:location, :start_time, parent: event) do
|
7
|
+
-# TODO: use 'format: :full' once edit-submission-flash is merged
|
8
|
+
%h4.flex-auto= t(:'.time_and_place', time: event.has_content?(:start_time) ? time_tag(event.content(:start_time), format: :short) : t('.time_tbc'),
|
9
|
+
place: event.has_content?(:location) ? event.content(:location) : t('.location_tbc')).try(:html_safe)
|
10
|
+
- cache partable_for(:description, parent: event) do
|
11
|
+
- if event.has_content?(:description)
|
12
|
+
.mt-1.text-gray-light= event.content(:description).try(:html_safe)
|
13
|
+
- cache partable_for(:url, parent: event) do
|
14
|
+
- if event.has_content?(:url)
|
15
|
+
.mt-2
|
16
|
+
= render Primer::ButtonComponent.new(tag: :a, href: event.content(:url)) do
|
17
|
+
= render Primer::OcticonComponent.new(icon: 'link-external')
|
18
|
+
= t :'.more_info'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
%div{ class: dom_class(events_list), id: dom_id(events_list) }
|
2
|
+
= render Primer::SubheadComponent.new(mt: 4) do |component|
|
3
|
+
= component.slot(:heading) { t :'.upcoming' }
|
4
|
+
- events_list.structure_items.sorted_by_structure.filter { |item| item.has_content?(:start_time) && item.content(:start_time) >= Time.now }.then do |events|
|
5
|
+
- if events.any?
|
6
|
+
%ul
|
7
|
+
= render partial: 'event', layout: 'list_item', cached: ->(event) { [event, event.structure_parts.collect(&:structure_partable)] },
|
8
|
+
collection: events
|
9
|
+
- else
|
10
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
|
11
|
+
= render Primer::SubheadComponent.new(mt: 4) do |component|
|
12
|
+
= component.slot(:heading) { t :'.past' }
|
13
|
+
- events_list.structure_items.sorted_by_structure.filter { |item| item.has_content?(:start_time) && item.content(:start_time) < Time.now }.then do |events|
|
14
|
+
- if events.any?
|
15
|
+
%ul
|
16
|
+
= render partial: 'event', layout: 'list_item', cached: ->(event) { [event, event.structure_parts.collect(&:structure_partable)] },
|
17
|
+
collection: events
|
18
|
+
- else
|
19
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_events'), icon: 'calendar')
|
@@ -36,6 +36,10 @@
|
|
36
36
|
name: 'minutes',
|
37
37
|
title: 'Minutes',
|
38
38
|
partable_type: 'Spina::Structure'
|
39
|
+
}, {
|
40
|
+
name: 'documents',
|
41
|
+
title: 'Documents',
|
42
|
+
partable_type: 'Spina::Structure'
|
39
43
|
}, {
|
40
44
|
name: 'contact',
|
41
45
|
title: 'Contact',
|
@@ -68,6 +72,10 @@
|
|
68
72
|
name: 'sponsors',
|
69
73
|
title: 'Sponsors',
|
70
74
|
partable_type: 'Spina::Structure'
|
75
|
+
}, {
|
76
|
+
name: 'events_list',
|
77
|
+
title: 'Events',
|
78
|
+
partable_type: 'Spina::Structure'
|
71
79
|
}]
|
72
80
|
|
73
81
|
theme.layout_parts = [{
|
@@ -114,6 +122,17 @@
|
|
114
122
|
title: 'Attachment',
|
115
123
|
partable_type: 'Spina::Attachment'
|
116
124
|
}]
|
125
|
+
}, {
|
126
|
+
name: 'documents',
|
127
|
+
structure_parts: [{
|
128
|
+
name: 'name',
|
129
|
+
title: 'Name',
|
130
|
+
partable_type: 'Spina::Line'
|
131
|
+
}, {
|
132
|
+
name: 'attachment',
|
133
|
+
title: 'Attachment',
|
134
|
+
partable_type: 'Spina::Attachment'
|
135
|
+
}]
|
117
136
|
}, {
|
118
137
|
name: 'socials',
|
119
138
|
structure_parts: [{
|
@@ -158,6 +177,10 @@
|
|
158
177
|
name: 'name',
|
159
178
|
title: 'Name',
|
160
179
|
partable_type: 'Spina::Line'
|
180
|
+
}, {
|
181
|
+
name: 'institution',
|
182
|
+
title: 'Institution',
|
183
|
+
partable_type: 'Spina::Line'
|
161
184
|
}, {
|
162
185
|
name: 'role',
|
163
186
|
title: 'Role',
|
@@ -194,6 +217,30 @@
|
|
194
217
|
title: 'Website',
|
195
218
|
partable_type: 'Spina::Admin::Conferences::UrlPart'
|
196
219
|
}]
|
220
|
+
}, {
|
221
|
+
name: 'events_list',
|
222
|
+
title: 'Events',
|
223
|
+
structure_parts: [{
|
224
|
+
name: 'name',
|
225
|
+
title: 'Name',
|
226
|
+
partable_type: 'Spina::Line'
|
227
|
+
}, {
|
228
|
+
name: 'start_time',
|
229
|
+
title: 'Time',
|
230
|
+
partable_type: 'Spina::Admin::Conferences::TimePart'
|
231
|
+
}, {
|
232
|
+
name: 'location',
|
233
|
+
title: 'Location',
|
234
|
+
partable_type: 'Spina::Line'
|
235
|
+
}, {
|
236
|
+
name: 'description',
|
237
|
+
title: 'Description',
|
238
|
+
partable_type: 'Spina::Text'
|
239
|
+
}, {
|
240
|
+
name: 'url',
|
241
|
+
title: 'Link',
|
242
|
+
partable_type: 'Spina::Admin::Conferences::UrlPart'
|
243
|
+
}]
|
197
244
|
}]
|
198
245
|
|
199
246
|
theme.view_templates = [{
|
@@ -214,7 +261,12 @@
|
|
214
261
|
name: 'about',
|
215
262
|
title: 'About',
|
216
263
|
description: 'Contains information about the society',
|
217
|
-
page_parts: %w[text constitution minutes partner_societies contact]
|
264
|
+
page_parts: %w[text constitution minutes documents partner_societies contact]
|
265
|
+
}, {
|
266
|
+
name: 'events',
|
267
|
+
title: 'Events',
|
268
|
+
description: 'Contains details of past and upcoming events',
|
269
|
+
page_parts: %w[text events_list]
|
218
270
|
}, {
|
219
271
|
name: 'show',
|
220
272
|
title: 'Blank',
|
data/config/locales/en.yml
CHANGED
@@ -82,6 +82,11 @@ en:
|
|
82
82
|
download: Download
|
83
83
|
no_file: No file uploaded.
|
84
84
|
no_date: No date specified.
|
85
|
+
documents:
|
86
|
+
title: Documents
|
87
|
+
download: Download
|
88
|
+
no_file: No file uploaded.
|
89
|
+
no_name: No name.
|
85
90
|
partner_societies:
|
86
91
|
title: Partner societies
|
87
92
|
no_societies: No societies added.
|
@@ -89,6 +94,17 @@ en:
|
|
89
94
|
website: Website
|
90
95
|
email: Email
|
91
96
|
contact_buttons: Contact buttons
|
97
|
+
events:
|
98
|
+
no_events: No events.
|
99
|
+
events_list:
|
100
|
+
upcoming: Upcoming events
|
101
|
+
past: Past events
|
102
|
+
no_events: No events.
|
103
|
+
event:
|
104
|
+
time_and_place: "%{place}, %{time}"
|
105
|
+
time_tbc: Time TBC
|
106
|
+
location_tbc: Location TBC
|
107
|
+
more_info: More information
|
92
108
|
|
93
109
|
conferences:
|
94
110
|
primer_theme:
|
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.1.
|
4
|
+
version: 0.1.10
|
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: 2020-
|
11
|
+
date: 2020-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|
@@ -303,6 +303,7 @@ files:
|
|
303
303
|
- app/helpers/spina/conferences/primer_theme/navigations_helper.rb
|
304
304
|
- app/views/conferences_primer_theme/pages/about.html.haml
|
305
305
|
- app/views/conferences_primer_theme/pages/committee.html.haml
|
306
|
+
- app/views/conferences_primer_theme/pages/events.html.haml
|
306
307
|
- app/views/conferences_primer_theme/pages/homepage.html.haml
|
307
308
|
- app/views/conferences_primer_theme/pages/information.html.haml
|
308
309
|
- app/views/conferences_primer_theme/pages/show.html.haml
|
@@ -347,6 +348,10 @@ files:
|
|
347
348
|
- app/views/spina/pages/_committee_bios.html.haml
|
348
349
|
- app/views/spina/pages/_constitution.html.haml
|
349
350
|
- app/views/spina/pages/_contact.html.haml
|
351
|
+
- app/views/spina/pages/_document.html.haml
|
352
|
+
- app/views/spina/pages/_documents.html.haml
|
353
|
+
- app/views/spina/pages/_event.html.haml
|
354
|
+
- app/views/spina/pages/_events_list.html.haml
|
350
355
|
- app/views/spina/pages/_homepage_content.html.haml
|
351
356
|
- app/views/spina/pages/_jumbotron.html.haml
|
352
357
|
- app/views/spina/pages/_minutes.html.haml
|
@@ -355,6 +360,7 @@ files:
|
|
355
360
|
- app/views/spina/pages/_partner_society.html.haml
|
356
361
|
- config/initializers/assets.rb
|
357
362
|
- config/initializers/themes/conferences_primer_theme.rb
|
363
|
+
- config/locales/en.rb
|
358
364
|
- config/locales/en.yml
|
359
365
|
- config/routes.rb
|
360
366
|
- lib/spina/conferences/primer_theme.rb
|