arclight 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 (153) hide show
  1. checksums.yaml +4 -4
  2. data/.all-contributorsrc +450 -0
  3. data/.babelrc +3 -0
  4. data/.codeclimate.yml +5 -0
  5. data/.eslintrc +3 -0
  6. data/.rubocop.yml +19 -0
  7. data/.rubocop_todo.yml +15 -135
  8. data/.travis.yml +2 -2
  9. data/CONTRIBUTORS.md +79 -0
  10. data/README.md +21 -24
  11. data/Rakefile +0 -1
  12. data/app/assets/images/blacklight/bookmark.svg +1 -0
  13. data/app/assets/images/blacklight/collection.svg +5 -0
  14. data/app/assets/images/blacklight/compact.svg +1 -25
  15. data/app/assets/images/blacklight/container.svg +5 -0
  16. data/app/assets/images/blacklight/ead.svg +1 -0
  17. data/app/assets/images/blacklight/file.svg +5 -0
  18. data/app/assets/images/blacklight/folder.svg +1 -0
  19. data/app/assets/images/blacklight/list.svg +1 -0
  20. data/app/assets/images/blacklight/minus.svg +1 -0
  21. data/app/assets/images/blacklight/online.svg +5 -0
  22. data/app/assets/images/blacklight/pdf.svg +1 -0
  23. data/app/assets/images/blacklight/plus.svg +1 -0
  24. data/app/assets/images/blacklight/repository.svg +1 -0
  25. data/app/assets/javascripts/arclight/arclight.js +1 -3
  26. data/app/assets/javascripts/arclight/collection_navigation.js +36 -53
  27. data/app/assets/javascripts/arclight/collection_scrollspy.js +1 -1
  28. data/app/assets/javascripts/arclight/context_navigation.js +374 -0
  29. data/app/assets/javascripts/arclight/truncator.js.erb +8 -2
  30. data/app/assets/stylesheets/arclight/application.scss +3 -1
  31. data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +23 -0
  32. data/app/assets/stylesheets/arclight/modules/context_navigation.scss +75 -0
  33. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +28 -35
  34. data/app/assets/stylesheets/arclight/modules/highlights.scss +2 -1
  35. data/app/assets/stylesheets/arclight/modules/layout.scss +128 -14
  36. data/app/assets/stylesheets/arclight/modules/mastheads.scss +27 -5
  37. data/app/assets/stylesheets/arclight/modules/repositories.scss +1 -5
  38. data/app/assets/stylesheets/arclight/modules/repository_card.scss +6 -7
  39. data/app/assets/stylesheets/arclight/modules/search_results.scss +145 -24
  40. data/app/assets/stylesheets/arclight/modules/show_collection.scss +38 -59
  41. data/app/assets/stylesheets/arclight/responsive.scss +13 -0
  42. data/app/assets/stylesheets/arclight/variables.scss +21 -1
  43. data/app/controllers/concerns/arclight/ead_format_helpers.rb +225 -0
  44. data/app/controllers/concerns/arclight/field_config_helpers.rb +23 -7
  45. data/app/factories/blacklight_field_configuration_factory.rb +1 -0
  46. data/app/helpers/arclight_helper.rb +197 -35
  47. data/app/models/arclight/document_downloads.rb +125 -0
  48. data/app/models/arclight/parent.rb +4 -2
  49. data/app/models/arclight/parents.rb +6 -4
  50. data/app/models/arclight/requests/aeon_external_request.rb +42 -0
  51. data/app/models/arclight/requests/aeon_web_ead.rb +47 -0
  52. data/app/models/arclight/requests/google_form.rb +2 -2
  53. data/app/models/concerns/arclight/catalog.rb +14 -2
  54. data/app/models/concerns/arclight/search_behavior.rb +27 -12
  55. data/app/models/concerns/arclight/solr_document.rb +29 -7
  56. data/app/views/arclight/_requests.html.erb +7 -0
  57. data/app/views/arclight/repositories/_in_person_repository.html.erb +1 -1
  58. data/app/views/arclight/repositories/_repository.html.erb +2 -2
  59. data/app/views/arclight/repositories/_repository_contact.html.erb +9 -0
  60. data/app/views/arclight/repositories/index.html.erb +3 -0
  61. data/app/views/arclight/repositories/show.html.erb +5 -4
  62. data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +9 -0
  63. data/app/views/arclight/requests/_aeon_web_ead.html.erb +7 -0
  64. data/app/views/arclight/requests/_google_form.html.erb +2 -1
  65. data/app/views/arclight/viewers/_oembed.html.erb +2 -1
  66. data/app/views/catalog/_access_contents.html.erb +15 -0
  67. data/app/views/catalog/_arclight_abstract_or_scope.html.erb +5 -0
  68. data/app/views/catalog/_arclight_bookmark_control.html.erb +38 -0
  69. data/app/views/catalog/_arclight_document_header_icon.html.erb +1 -0
  70. data/app/views/catalog/_arclight_index_compact_default.html.erb +18 -11
  71. data/app/views/catalog/_arclight_index_default.html.erb +45 -0
  72. data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +19 -0
  73. data/app/views/catalog/_arclight_index_group_document_default.html.erb +18 -0
  74. data/app/views/catalog/_arclight_online_content_indicator.html.erb +1 -3
  75. data/app/views/catalog/_collection_contents.html.erb +2 -10
  76. data/app/views/catalog/_collection_context.html.erb +15 -0
  77. data/app/views/catalog/_collection_context_nav.html.erb +12 -0
  78. data/app/views/catalog/_collection_online_contents.html.erb +3 -3
  79. data/app/views/catalog/_component_context.html.erb +5 -0
  80. data/app/views/catalog/_containers.html.erb +3 -0
  81. data/app/views/catalog/_context_sidebar.html.erb +2 -2
  82. data/app/views/catalog/_document_downloads.html.erb +14 -0
  83. data/app/views/catalog/_group.html.erb +21 -0
  84. data/app/views/catalog/_group_header_compact_default.html.erb +15 -0
  85. data/app/views/catalog/_group_header_default.html.erb +20 -0
  86. data/app/views/catalog/_group_toggle.html.erb +10 -0
  87. data/app/views/catalog/_home.html.erb +1 -1
  88. data/app/views/catalog/_index_breadcrumb_default.html.erb +5 -2
  89. data/app/views/catalog/_index_collection_context_default.html.erb +53 -0
  90. data/app/views/catalog/_index_header.html.erb +3 -3
  91. data/app/views/catalog/_index_online_contents_default.html.erb +1 -1
  92. data/app/views/catalog/_online_content_label.html.erb +5 -0
  93. data/app/views/catalog/_search_form.html.erb +34 -0
  94. data/app/views/catalog/_search_results.html.erb +1 -4
  95. data/app/views/catalog/_show_actions_box_default.html.erb +27 -0
  96. data/app/views/catalog/_show_breadcrumbs_default.html.erb +5 -20
  97. data/app/views/catalog/_show_collection.html.erb +42 -24
  98. data/app/views/catalog/_show_default.html.erb +63 -35
  99. data/app/views/catalog/_show_upper_metadata_default.html.erb +1 -1
  100. data/app/views/catalog/_sort_and_per_page.html.erb +8 -0
  101. data/app/views/catalog/_within_collection_dropdown.html.erb +26 -0
  102. data/app/views/shared/_breadcrumbs.html.erb +4 -4
  103. data/app/views/shared/_context_sidebar.html.erb +2 -2
  104. data/app/views/shared/_header_navbar.html.erb +13 -17
  105. data/app/views/shared/_show_breadcrumbs.html.erb +27 -0
  106. data/arclight.gemspec +5 -6
  107. data/config/i18n-tasks.yml +2 -1
  108. data/config/locales/arclight.en.yml +54 -21
  109. data/config/repositories.yml +0 -0
  110. data/lib/arclight/engine.rb +22 -12
  111. data/lib/arclight/hash_absolute_xpath.rb +11 -7
  112. data/lib/arclight/level_label.rb +46 -0
  113. data/lib/arclight/normalized_date.rb +2 -2
  114. data/lib/arclight/normalized_id.rb +1 -0
  115. data/lib/arclight/normalized_title.rb +1 -0
  116. data/lib/arclight/repository.rb +58 -5
  117. data/lib/arclight/traject/ead2_config.rb +178 -159
  118. data/lib/arclight/traject/nokogiri_namespaceless_reader.rb +22 -0
  119. data/lib/arclight/version.rb +1 -1
  120. data/lib/arclight/viewers/oembed.rb +1 -0
  121. data/lib/arclight/year_range.rb +9 -1
  122. data/lib/generators/arclight/install_generator.rb +5 -1
  123. data/lib/generators/arclight/templates/catalog_controller.rb +128 -100
  124. data/lib/generators/arclight/templates/config/downloads.yml +12 -0
  125. data/lib/generators/arclight/templates/config/repositories.yml +20 -2
  126. data/lib/generators/arclight/update_generator.rb +1 -1
  127. data/lib/tasks/index.rake +18 -20
  128. data/package.json +8 -1
  129. data/solr/conf/schema.xml +51 -292
  130. data/solr/conf/solrconfig.xml +40 -125
  131. data/tasks/arclight.rake +1 -0
  132. data/vendor/assets/javascripts/responsiveTruncator.js +2 -2
  133. metadata +71 -44
  134. data/app/assets/javascripts/arclight/collection_context.js +0 -18
  135. data/app/assets/javascripts/arclight/component_ancestors.js +0 -56
  136. data/app/assets/javascripts/arclight/search_results.js +0 -15
  137. data/app/assets/stylesheets/arclight/modules/sidebar.scss +0 -21
  138. data/app/views/catalog/_collection_count.html.erb +0 -7
  139. data/app/views/catalog/_collection_downloads.html.erb +0 -15
  140. data/app/views/catalog/_collection_overview.html.erb +0 -7
  141. data/app/views/catalog/_component_contents.html.erb +0 -16
  142. data/app/views/catalog/_component_overview.html.erb +0 -40
  143. data/app/views/catalog/_index_header_hierarchy_default.html.erb +0 -42
  144. data/app/views/catalog/_index_hierarchy_default.html.erb +0 -28
  145. data/app/views/catalog/_results_histogram.html.erb +0 -15
  146. data/app/views/catalog/_show_component_sidebar.html.erb +0 -12
  147. data/app/views/catalog/_show_sidebar.html.erb +0 -22
  148. data/lib/arclight/custom_component.rb +0 -99
  149. data/lib/arclight/custom_document.rb +0 -93
  150. data/lib/arclight/indexer.rb +0 -9
  151. data/lib/arclight/shared_indexing_behavior.rb +0 -97
  152. data/lib/arclight/shared_terminology_behavior.rb +0 -65
  153. data/lib/arclight/solr_ead_indexer_ext.rb +0 -155
@@ -1,5 +1,5 @@
1
1
  .al-homepage-masthead.jumbotron {
2
- border-bottom: $result-item-border-styling;
2
+ border-bottom: $default-border-styling;
3
3
  padding: ($spacer * 2) $spacer $spacer;
4
4
 
5
5
  .navbar-nav {
@@ -39,8 +39,30 @@
39
39
  }
40
40
  }
41
41
 
42
+
43
+ .navbar-search {
44
+ // Undo some of Blacklight's extending of column classes.
45
+ .search-query-form {
46
+ flex-basis: auto !important;
47
+ max-width: 100% !important;
48
+ }
49
+ }
50
+
51
+ .within-collection-dropdown {
52
+ min-width: 0;
53
+
54
+ @include media-breakpoint-up(sm) {
55
+ width: 50% !important;
56
+ }
57
+
58
+ @include media-breakpoint-up(lg) {
59
+ min-width: 0;
60
+ }
61
+ }
62
+
42
63
  .al-masthead {
43
- h1 {
64
+ h1, .h1 {
65
+ display: block;
44
66
  font-size: $h2-font-size;
45
67
  margin: 0;
46
68
  padding: ($spacer * 1.5) ($spacer / 2);
@@ -56,8 +78,8 @@
56
78
  }
57
79
 
58
80
  + .navbar-search {
59
- border-bottom: $result-item-border-styling;
60
- border-top: $result-item-border-styling;
81
+ border-bottom: $default-border-styling;
82
+ border-top: $default-border-styling;
61
83
  margin-bottom: ($spacer / 2);
62
84
 
63
85
  a {
@@ -70,7 +92,7 @@
70
92
 
71
93
  .navbar-toggler {
72
94
  background-color: $white;
73
- border: $result-item-border-styling;
95
+ border: $default-border-styling;
74
96
  }
75
97
 
76
98
  .navbar-toggler-icon {
@@ -2,10 +2,6 @@
2
2
  .al-repository-show-header {
3
3
  margin-bottom: ($spacer / 2);
4
4
  margin-top: ($spacer * 2);
5
-
6
- h3 {
7
- font-size: $h4-font-size;
8
- }
9
5
  }
10
6
 
11
7
  .al-repository-collections{
@@ -17,7 +13,7 @@
17
13
  }
18
14
 
19
15
  .al-document-title-bar {
20
- border-top: $result-item-border-styling;
16
+ border-top: $default-border-styling;
21
17
  margin-bottom: $spacer;
22
18
  padding-top: ($spacer / 2);
23
19
 
@@ -1,6 +1,6 @@
1
1
  .al-repository {
2
2
  background-color: $gray-200;
3
- border: $result-item-border-styling;
3
+ border: $default-border-styling;
4
4
  margin-bottom: $spacer;
5
5
 
6
6
  .al-repository-information {
@@ -11,15 +11,14 @@
11
11
  padding-left: 0;
12
12
  }
13
13
 
14
- h2 {
15
- font-size: $h5-font-size;
16
- margin-bottom: $spacer;
17
- }
18
-
19
14
  address {
20
15
  margin-bottom: 0;
21
16
  }
22
17
 
18
+ .repo-name {
19
+ margin-bottom: $spacer;
20
+ }
21
+
23
22
  .al-repository-contact,
24
23
  .al-repository-extra-collection-count {
25
24
  font-weight: 300;
@@ -34,7 +33,7 @@
34
33
  padding-left: $spacer * 2;
35
34
 
36
35
  @media (min-width: 992px) {
37
- border-left: $result-item-border-styling;
36
+ border-left: $default-border-styling;
38
37
  }
39
38
  }
40
39
 
@@ -1,12 +1,11 @@
1
- .documents-list {
2
- .badge {
3
- float: right;
4
- }
1
+ .documents-list,
2
+ .documents-online_contents {
3
+ margin-bottom: $spacer;
5
4
 
6
5
  // Result item header
7
6
  .al-document-title-bar {
8
7
  background-color: $gray-200;
9
- border: $result-item-border-styling;
8
+ border: $default-border-styling;
10
9
  font-size: $font-size-sm;
11
10
  margin: 0 (-$result-item-body-padding - 1px) 0.5rem;
12
11
  padding: 3px $result-item-body-padding;
@@ -14,18 +13,23 @@
14
13
 
15
14
  // Result item body
16
15
  article.document {
17
- border-bottom: 0;
18
- border-left: $result-item-border-styling;
19
- border-right: $result-item-border-styling;
20
- margin-bottom: $spacer * 2;
21
- padding: 0 $result-item-body-padding;
22
-
23
- .documentHeader {
24
- padding-top: 0.4rem;
16
+ border-bottom: $default-border-styling;
17
+ margin-top: 0;
18
+ padding: $spacer 0;
19
+
20
+ &:first-child {
21
+ padding-top: 0;
25
22
  }
26
23
 
27
24
  .document-title-heading {
28
25
  font-size: $h5-font-size;
26
+ .al-document-extent {
27
+ @include extent-badge;
28
+ }
29
+ }
30
+
31
+ form.bookmark-toggle.col-auto {
32
+ padding-right: 0;
29
33
  }
30
34
 
31
35
  .breadcrumb-links,
@@ -34,6 +38,84 @@
34
38
  .al-document-abstract-or-scope {
35
39
  font-size: $font-size-sm;
36
40
  }
41
+
42
+ .al-document-abstract-or-scope {
43
+ margin-bottom: $spacer * .5;
44
+ max-width: 45em;
45
+ }
46
+ }
47
+ }
48
+
49
+ article.document {
50
+ .blacklight-icons svg {
51
+ fill: $secondary;
52
+ }
53
+ .blacklight-icons.al-online-content-icon svg {
54
+ fill: $green;
55
+ }
56
+ div.breadcrumb-links,
57
+ div.al-document-abstract-or-scope,
58
+ div.al-document-creator {
59
+ margin-top: ($spacer * .5);
60
+ }
61
+ }
62
+
63
+ .documents-compact {
64
+ h3 {
65
+ font-size: $h5-font-size;
66
+ }
67
+ }
68
+
69
+ .al-grouped-results {
70
+ .breadcrumb-links {
71
+ font-size: $font-size-sm;
72
+ }
73
+
74
+ .al-document-abstract-or-scope {
75
+ margin-bottom: 0;
76
+ margin-top: $spacer * .75;
77
+ max-width: 45em;
78
+ }
79
+ .al-grouped-repository {
80
+ font-size: $font-size-sm;
81
+ margin-bottom: $spacer * .75;
82
+ }
83
+ .al-grouped-title-bar {
84
+ background-color: $gray-200;
85
+ padding: $result-item-body-padding;
86
+
87
+ h3 {
88
+ display: inline;
89
+ font-size: $h4-font-size;
90
+ }
91
+ }
92
+ .grouped-documents {
93
+ margin: $result-item-body-padding 0;
94
+ h4 {
95
+ font-size: $h5-font-size;
96
+ }
97
+
98
+ .al-grouped-more {
99
+ border-bottom: $default-border-styling;
100
+ padding: ($spacer * .5) 0;
101
+ }
102
+
103
+ .document {
104
+ border-bottom: $default-border-styling;
105
+ margin-top: 0;
106
+ padding: $spacer 0;
107
+
108
+ &:last-child {
109
+ border-bottom: 0;
110
+ }
111
+ }
112
+ }
113
+
114
+ .al-document-extent {
115
+ @include extent-badge;
116
+ background-color: $gray-100;
117
+ border-color: $gray-400;
118
+ color: $gray-700;
37
119
  }
38
120
  }
39
121
 
@@ -46,15 +128,6 @@
46
128
  }
47
129
  }
48
130
 
49
- .documents-hierarchy {
50
- .al-number-of-children-badge {
51
- background-color: #eee;
52
- border: 1px solid #ccc;
53
- color: $gray-600;
54
- vertical-align: top;
55
- }
56
- }
57
-
58
131
  .al-data-range-histogram {
59
132
  margin-bottom: $spacer;
60
133
  }
@@ -69,11 +142,59 @@
69
142
  margin-bottom: $spacer;
70
143
 
71
144
  .document {
72
- border-bottom: $result-item-border-styling;
145
+ border-bottom: $default-border-styling;
73
146
  padding: $spacer 0;
74
147
 
75
148
  &:first-child {
76
- border-top: $result-item-border-styling;
149
+ padding-top: 0;
77
150
  }
78
151
  }
79
152
  }
153
+
154
+ .index-document-functions {
155
+ display: flex;
156
+ }
157
+
158
+ .al-document-container.text-muted {
159
+ color: $gray-600 !important;
160
+ }
161
+
162
+ .col-no-left-padding {
163
+ padding-left: 0 !important;
164
+ }
165
+
166
+ .col-no-right-padding {
167
+ padding-right: 0 !important;
168
+ }
169
+
170
+ .breadcrumb .media .col, h1.media .col {
171
+ flex-basis: auto;
172
+ }
173
+
174
+ .breadcrumb .media svg, h1.media svg {
175
+ fill: $gray-600;
176
+ }
177
+
178
+ .breadcrumb-links a {
179
+ border-bottom: 1px dashed $gray-600;
180
+ color: $body-color;
181
+
182
+ &:hover,
183
+ &:active {
184
+ border-color: inherit;
185
+ border-bottom-style: solid;
186
+ text-decoration: none;
187
+ }
188
+ }
189
+
190
+ .breadcrumb-links .col {
191
+ flex-basis: auto;
192
+ }
193
+
194
+ .btn-outline-secondary svg {
195
+ fill: $gray-600;
196
+ }
197
+
198
+ .btn-outline-secondary:not(:disabled):not(.disabled).active svg, .btn-outline-secondary:hover svg {
199
+ fill: $white;
200
+ }
@@ -1,86 +1,65 @@
1
- // Sidebar
1
+ // Collection context
2
2
  .al-sticky-sidebar {
3
3
  position: sticky;
4
4
  top: 0;
5
+ }
5
6
 
6
- // Separate first-level divs in sidebar
7
- > div {
8
- margin-bottom: $spacer;
9
- }
7
+ .al-show-sub-heading {
8
+ font-size: $h6-font-size;
9
+ text-transform: uppercase;
10
10
 
11
- .card-header h3 {
12
- font-size: $h6-font-size;
13
- font-weight: $font-weight-normal;
11
+ + dl > dt {
12
+ font-size: $font-size-sm;
13
+ margin-top: 4px;
14
+ text-transform: uppercase;
14
15
  }
16
+ }
15
17
 
16
- // Sidebar sections
17
- dt {
18
- color: $gray-700;
18
+ .al-collection-actions-menu {
19
+ float: right;
20
+ }
21
+
22
+ .al-online-content-icon .blacklight-icons svg {
23
+ fill: $green;
24
+ }
25
+
26
+ p.media .col {
27
+ flex: auto;
28
+ }
29
+ // Access tab
30
+ #access {
31
+ dl dt {
19
32
  font-size: $font-size-sm;
20
- font-weight: $font-weight-bold;
21
- margin-bottom: 3px;
22
- text-transform: uppercase;
23
33
  }
24
34
 
25
- dd {
35
+ dl dd {
26
36
  line-height: 1.4;
27
37
  margin-bottom: $spacer;
28
38
  }
29
39
 
30
- .al-in-person-repository-name,
31
- .al-in-person-repository-location {
32
- font-size: $font-size-sm;
33
- line-height: 1.25;
34
- }
35
-
36
- .al-in-person-repository-name img {
40
+ img {
37
41
  margin-bottom: $headings-margin-bottom;
38
42
  margin-right: $spacer;
39
- max-height: 65px;
40
- max-width: 65px;
43
+ max-height: 150px;
44
+ max-width: 150px;
41
45
  }
42
46
 
43
- .al-repository-contact-city_state_zip_country {
44
- margin-bottom: ($spacer / 2);
45
- }
46
- }
47
-
48
- // Collection header
49
- .al-show-header-section {
50
- border: $result-item-border-styling;
51
- margin-bottom: $spacer;
52
- padding: 0 $spacer;
53
-
54
- .al-document-title-bar {
55
- background-color: $gray-200;
56
- border-bottom: $result-item-border-styling;
47
+ .al-in-person-repository-name,
48
+ .al-in-person-repository-location,
49
+ .al-in-person-repository-contact {
57
50
  font-size: $font-size-sm;
58
- margin: 0 (-$spacer) $spacer;
59
- padding: 3px $result-item-body-padding;
60
- }
61
-
62
- .badge {
63
- float: right;
51
+ line-height: 1.25;
64
52
  }
65
53
 
66
- h1 {
67
- font-size: $h4-font-size;
68
- margin-bottom: $spacer;
54
+ .al-repository-contact-city_state_zip_country {
55
+ margin-bottom: ($spacer / 2);
69
56
  }
70
57
  }
71
58
 
72
- // Collection overview
73
- .al-show-sub-heading {
74
- font-size: $h6-font-size;
75
- text-transform: uppercase;
76
-
77
- + dl dt {
78
- font-size: $font-size-sm;
79
- margin-top: 4px;
80
- text-transform: uppercase;
81
- }
59
+ .al-digital-object.breadcrumb-item {
60
+ margin-bottom: ($spacer / 2);
82
61
  }
83
62
 
84
- .al-collection-actions-menu {
85
- float: right;
63
+ p.media.breadcrumb-item {
64
+ margin-bottom: ($spacer / 2);
86
65
  }