Skip to content

Commit b532305

Browse files
authored
Merge branch 'main' into knapsack_inject_gems_v2
2 parents 6a29be9 + 4096fe9 commit b532305

File tree

141 files changed

+3444
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+3444
-545
lines changed

Gemfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ gem 'puma', '~> 5.6' # Use Puma as the app server
7979
gem 'rack-test', '0.7.0', group: %i[test] # rack-test >= 0.71 does not work with older Capybara versions (< 2.17). See #214 for more details
8080
gem 'rails-controller-testing', group: %i[test]
8181
gem 'rdf', '~> 3.2'
82+
gem 'redcarpet' # for Markdown constant
8283
gem 'redis-namespace', '~> 1.10' # Hyrax v5 relies on 1.5; but we'd like to have the #clear method so we need 1.10 or greater.
8384
gem 'redlock', '>= 0.1.2', '< 2.0' # lock redlock per https://github.com/samvera/hyrax/pull/5961
8485
gem 'riiif', '~> 2.0'
@@ -114,6 +115,23 @@ gem 'webmock', group: %i[test]
114115

115116
# This gem does nothing by default, but is instead a tool to ease developer flow
116117
# and place overrides, themes and deployment code.
117-
gem 'hyku_knapsack', github: 'samvera-labs/hyku_knapsack', branch: 'upstream_main'
118+
#
119+
# When you use a knapsack for Hyku development, which we recommend, you'll want to ensure that your
120+
# local knapsack repository has a `'required_for_knapsack_instances'` branch (which it should by
121+
# default). Due to some tomfoolery, of knapsack, the branch name
122+
# (e.g. `required_for_knapsack_instances`) must be checked out locally in the knapsack environment
123+
# that you use to build Docker.
124+
#
125+
# Why not use `main`? We need a stable SHA for building HykuKnapsack prime
126+
# (e.g. samvera-labs/hyku_knapsack). Why the stable SHA? Because when we bundle a knapsack, the
127+
# Hyku submodule uses the SHA of the locally checked out branch specified in the gem spec. Which
128+
# can create a chicken and egg issue; namely I need to update Hyku with a new SHA for Knapsack, but
129+
# to update Knapsack's submodule reference to Hyku, I need a new SHA for knapsack. Thus, I can never
130+
# use a "regular branch". Instead we need to use a separate more stable for Knapsack.
131+
#
132+
# Thus the hopefully descriptive `required_for_knapsack_instances`.
133+
#
134+
# tl;dr - Have a local `required_for_knapsack_instances` branch on your knapsack repository
135+
gem 'hyku_knapsack', github: 'samvera-labs/hyku_knapsack', branch: 'required_for_knapsack_instances'
118136

119137
# rubocop:enable Layout/LineLength

Gemfile.lock

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ GIT
9595

9696
GIT
9797
remote: https://github.com/samvera-labs/hyku_knapsack.git
98-
revision: 14f688b61afab9ee886f5f7fa26a76a37bced597
99-
branch: upstream_main
98+
revision: 5a7c54cace96881a3963ab2fd881ca6ea3f57372
99+
branch: required_for_knapsack_instances
100100
specs:
101101
hyku_knapsack (0.0.1)
102102
rails (>= 5.2.0)
@@ -1090,6 +1090,7 @@ GEM
10901090
rdf-xsd (3.3.0)
10911091
rdf (~> 3.3)
10921092
rexml (~> 3.2)
1093+
redcarpet (3.6.0)
10931094
redic (1.5.3)
10941095
hiredis
10951096
redis (4.8.1)
@@ -1469,6 +1470,7 @@ DEPENDENCIES
14691470
rails (~> 6.0)!
14701471
rails-controller-testing
14711472
rdf (~> 3.2)
1473+
redcarpet
14721474
redis-namespace (~> 1.10)
14731475
redlock (>= 0.1.2, < 2.0)
14741476
riiif (~> 2.0)

app/assets/javascripts/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//= require jquery.fontselect
1919
//= require jquery.dataTables
2020
//= require dataTables.bootstrap4
21+
//= require cropper.min
2122
//= require stat_slider
2223
//= require turbolinks
2324
//= require cocoon

app/assets/javascripts/cropper.min.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/javascripts/fabric.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/stylesheets/application.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*= require single_signon
2121
*= require blacklight_advanced_search
2222
*= require blacklight_range_limit
23+
*= require cropper.min
2324
*= require_self
2425
*= require hyku_knapsack/application
2526
*/

app/assets/stylesheets/cropper.min.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/stylesheets/hyku.scss

Lines changed: 126 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
// allows full width if tabs are turned off with feature flipper
2828
.home-content {
2929
display: flex;
30+
justify-content: normal;
31+
padding: 0 20px;
3032
}
3133
.home-tabs-left {
3234
min-width: 50%;
@@ -414,12 +416,23 @@ a.btn.btn-default.restore-default-color.with-color-hint {
414416
nav.navbar.navbar-default.navbar-static-top .container-fluid .row {
415417
margin-left: 0;
416418
margin-right: 0;
417-
418419
nav.navbar-nav.col-sm-5 {
419420
padding-right: 0;
420421
}
421422
}
422423

424+
//these styles modify the theming for the citations section
425+
div#collapse-citations {
426+
text-align: left;
427+
word-wrap: break-word;
428+
}
429+
430+
@media (min-width: 576px) {
431+
.citations-button .download-pdf-button {
432+
max-width: 300px;
433+
}
434+
}
435+
423436
body.public-facing {
424437
.btn {
425438
&.btn-primary,
@@ -498,3 +511,115 @@ body.public-facing {
498511
vertical-align: middle;
499512
width: 1.5em;
500513
}
514+
515+
// make sure constraints are on only one line, even with markdown
516+
span.constraint-value p, .facet-values p {
517+
display: inline-block;
518+
margin-bottom: 0;
519+
}
520+
521+
// make the facet counts appear at the end of the facet panel
522+
.facet-content .panel-body .facet-values p {
523+
display: flex;
524+
justify-content: space-between;
525+
}
526+
527+
// button to remove a filter should be red instead of white
528+
.remove.dropdown-toggle .glyphicon.glyphicon-remove {
529+
color: #c4302b;
530+
}
531+
532+
// style the analytics button to match citations button
533+
#stats {
534+
margin-top: 10px;
535+
@media (min-width: 576px) {
536+
max-width: 300px;
537+
}
538+
}
539+
540+
#download-pdf-button {
541+
margin: 10px 0 10px 0;
542+
}
543+
544+
.catalog_startOverLink {
545+
font-size: 1.15em;
546+
font-weight: bold;
547+
}
548+
549+
// collection show page styles
550+
551+
.space-between {
552+
justify-content: space-between;
553+
align-items: center;
554+
}
555+
556+
.hyc-banner {
557+
padding: 15px;
558+
.hyc-bugs .hyc-created-by, .hyc-bugs .hyc-last-updated, .hyc-title {
559+
padding: 0;
560+
}
561+
562+
.hyc-item-count {
563+
margin: 0;
564+
background: rgba(255, 255, 255, 0.75);
565+
padding: 10px;
566+
border-radius: 0.5em;
567+
color: #333;
568+
}
569+
570+
.hyc-bugs div, div {
571+
position: relative;
572+
}
573+
}
574+
575+
// these margin classes can be removed when Hyku is eventually updated to Bootstrap 4 upon upgrading to Hyrax 4.
576+
// These correspond directly to bootstrap 4 classes.
577+
578+
.mb-0 {
579+
margin-bottom: 0;
580+
}
581+
582+
.mt-5 {
583+
margin-top: 3em;
584+
}
585+
586+
.mt-2 {
587+
margin-top: 0.5em;
588+
}
589+
590+
.mb-2 {
591+
margin-bottom: .5em;
592+
}
593+
594+
.mb-5 {
595+
margin-bottom: 3em;
596+
}
597+
598+
.mx-3 {
599+
margin-right: 1em;
600+
margin-left: 1em;
601+
}
602+
603+
.ml-auto {
604+
margin-left: auto;
605+
}
606+
607+
.py-0 {
608+
padding-top: 0;
609+
padding-bottom: 0;
610+
}
611+
612+
.py-4 {
613+
padding-top: 2em;
614+
padding-bottom: 2em;
615+
}
616+
617+
.d-block {
618+
display: block;
619+
}
620+
621+
// hide iiif-print feature flipper
622+
623+
tr[data-feature="use-iiif-print"] {
624+
display: none;
625+
}

app/assets/stylesheets/hyrax.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
@import "viewer";
2020

2121
@import "themes/*";
22+
23+
// for catalog search result snippets
24+
.highlight {
25+
background: yellow;
26+
font-weight: 700;
27+
}

app/assets/stylesheets/viewer.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
.viewer {
66
height: 100%;
77
padding: 10px;
8-
iframe {
9-
// position: absolute;
10-
}
118
}
129

1310
#viewer-modal {
@@ -21,3 +18,8 @@
2118
margin-bottom: 10px;
2219
}
2320
}
21+
22+
.video-embed-viewer {
23+
aspect-ratio: 16 / 9;
24+
width: 100%;
25+
}

0 commit comments

Comments
 (0)