From 9830c2c19b467c2cbaeab722503fc69b1796bf4e Mon Sep 17 00:00:00 2001 From: Erica Titkemeyer Date: Fri, 4 Oct 2024 12:38:35 -0400 Subject: [PATCH 1/7] Update exhibit.rb adds option for video embedding in def cover --- app/models/exhibit.rb | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/app/models/exhibit.rb b/app/models/exhibit.rb index 223fc8ebb9..6e70e80b04 100644 --- a/app/models/exhibit.rb +++ b/app/models/exhibit.rb @@ -295,21 +295,45 @@ def uri %(/exhibits/#{path}) end - def cover - @cover ||= begin - img = Nokogiri::HTML(cover_html).css('img').first +def cover + @cover ||= begin + doc = Nokogiri::HTML(cover_html) + img = doc.css('img').first + # Assuming video URLs are wrapped in `` + video = doc.css('a.video-url').first + if img %( -
- +
-
#{title}
-
).html_safe + ).html_safe + elsif video + %( +
+
+
+ +
+
+ #{title} +
+
+
).html_safe + else + %( +
+
+
+ #{title} +
+
+
).html_safe end end +end def authors @authors ||= From 0c43216b89b408b4b0bce3b42fab401868407f36 Mon Sep 17 00:00:00 2001 From: Erica Titkemeyer Date: Fri, 4 Oct 2024 12:48:03 -0400 Subject: [PATCH 2/7] Update exhibits.css.scss def .exhibit-cover-video --- app/assets/stylesheets/globals/exhibits.css.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/assets/stylesheets/globals/exhibits.css.scss b/app/assets/stylesheets/globals/exhibits.css.scss index 22853b830f..1051ceb1a5 100644 --- a/app/assets/stylesheets/globals/exhibits.css.scss +++ b/app/assets/stylesheets/globals/exhibits.css.scss @@ -13,6 +13,19 @@ } } +.exhibit-cover-video { + position: relative; + padding-bottom: 56.25%; /* 16:9 aspect ratio */ + height: 0; + overflow: hidden; + iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} .exhibit-interior-color-section h3 { display: block; width: 100vw; From d1386ec4cab8436bf5c873b3e0ab82943a7df8e5 Mon Sep 17 00:00:00 2001 From: Erica Titkemeyer Date: Fri, 4 Oct 2024 12:51:29 -0400 Subject: [PATCH 3/7] Update civil-rights.md switched out image for vimeo video --- app/views/exhibits/civil-rights.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/exhibits/civil-rights.md b/app/views/exhibits/civil-rights.md index e671cdd137..1390f2da11 100644 --- a/app/views/exhibits/civil-rights.md +++ b/app/views/exhibits/civil-rights.md @@ -64,7 +64,7 @@ NAEB began operations in 1934 from a precursor organization that had been formed 3Jack Gould, “Radio: Aural Picture of Racial Crisis,” *New York Times*, June 10, 1963. ## Cover - Black and White photograph from the March on Washington for Jobs and Freedom + ## Gallery From e259e08cd94516311914d38ada753a88deb04d83 Mon Sep 17 00:00:00 2001 From: fog Date: Wed, 9 Oct 2024 15:10:50 -0400 Subject: [PATCH 4/7] 'add civil rights iframe to civil rights exhibit' --- app/assets/stylesheets/globals/exhibits.css.scss | 12 +++++++++++- app/models/exhibit.rb | 14 -------------- app/views/exhibits/_gallery_player.html.erb | 2 +- app/views/exhibits/black-power.md | 5 +---- app/views/exhibits/civil-rights.md | 11 +++++------ 5 files changed, 18 insertions(+), 26 deletions(-) diff --git a/app/assets/stylesheets/globals/exhibits.css.scss b/app/assets/stylesheets/globals/exhibits.css.scss index 1051ceb1a5..ea59d05e37 100644 --- a/app/assets/stylesheets/globals/exhibits.css.scss +++ b/app/assets/stylesheets/globals/exhibits.css.scss @@ -38,13 +38,23 @@ height: 97vh; } -#exhibit-main iframe.exhibit-small-iframe, #collection-main iframe.exhibit-small-iframe { +#exhibit-main iframe.exhibit-small-iframe, #collection-main iframe.exhibit-small-iframe, #exgal-main iframe.exhibit-small-iframe { width: 100%; height: auto; min-height: auto; aspect-ratio: 16 / 9; } +#exgal-main iframe.exhibit-small-iframe { + margin-top: 2vh; +} + +#exgal-modal-viewer iframe.exhibit-small-iframe { + width: 100%; + min-height: 68vh; + height: 68vh; +} + #exhibit-main iframe.exhibit-small-iframe.four-three, #collection-main iframe.exhibit-small-iframe.four-three { aspect-ratio: 4 / 3; } diff --git a/app/models/exhibit.rb b/app/models/exhibit.rb index 6e70e80b04..f88822a728 100644 --- a/app/models/exhibit.rb +++ b/app/models/exhibit.rb @@ -299,8 +299,6 @@ def cover @cover ||= begin doc = Nokogiri::HTML(cover_html) img = doc.css('img').first - # Assuming video URLs are wrapped in `` - video = doc.css('a.video-url').first if img %(
@@ -310,18 +308,6 @@ def cover
).html_safe - elsif video - %( -
-
-
- -
-
- #{title} -
-
-
).html_safe else %(
diff --git a/app/views/exhibits/_gallery_player.html.erb b/app/views/exhibits/_gallery_player.html.erb index 5967928075..20eb031f9f 100644 --- a/app/views/exhibits/_gallery_player.html.erb +++ b/app/views/exhibits/_gallery_player.html.erb @@ -35,7 +35,7 @@ <% elsif media_info[:type] == 'iframe' %>
- +
<% end %> diff --git a/app/views/exhibits/black-power.md b/app/views/exhibits/black-power.md index b24f4cfadf..1908c95af3 100644 --- a/app/views/exhibits/black-power.md +++ b/app/views/exhibits/black-power.md @@ -55,10 +55,7 @@ Since Stokely Carmichael had called for Black Power during his June 16, 1966, sp #### Next: [Black Journal](/exhibits/black-power/black-journal) ## Cover - - - -
*Black Journal* hosts William Greaves and Lou House.
Hosts William Greaves and Lou House of *Black Journal*.
+Hosts William Greaves and Lou House of *Black Journal*. ## Gallery diff --git a/app/views/exhibits/civil-rights.md b/app/views/exhibits/civil-rights.md index 1390f2da11..ecb2f64ed2 100644 --- a/app/views/exhibits/civil-rights.md +++ b/app/views/exhibits/civil-rights.md @@ -64,15 +64,14 @@ NAEB began operations in 1934 from a precursor organization that had been formed
3Jack Gould, “Radio: Aural Picture of Racial Crisis,” *New York Times*, June 10, 1963. ## Cover - + Black and White photograph from the March on Washington for Jobs and Freedom ## Gallery -- image - Black and White photograph from the March on Washington for Jobs and Freedom - Warren K. Leffler, photographer. Participants in the March on Washington for Jobs and Freedom, August 28, 1963. - Courtesy of U.S. News & World Report Magazine Photograph Collection, Prints and Photographs Division, Library of Congress. - +- iframe + + + Voices from the Southern Civil Rights Movement ## Records [](/cpb-aacip-28-kw57d2qp45) From bc5ff45a5f4e840280ec28fa6253d823c987282e Mon Sep 17 00:00:00 2001 From: Erica Titkemeyer Date: Wed, 9 Oct 2024 17:08:36 -0400 Subject: [PATCH 5/7] Update exhibit.rb removed my def cover changes --- app/models/exhibit.rb | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/app/models/exhibit.rb b/app/models/exhibit.rb index f88822a728..f917eac5a7 100644 --- a/app/models/exhibit.rb +++ b/app/models/exhibit.rb @@ -295,31 +295,21 @@ def uri %(/exhibits/#{path}) end -def cover - @cover ||= begin - doc = Nokogiri::HTML(cover_html) - img = doc.css('img').first - if img + def cover + @cover ||= begin + img = Nokogiri::HTML(cover_html).css('img').first %( -
-
-
- #{title} -
-
-
).html_safe - else - %( -
+
+
+
#{title}
-
).html_safe + ).html_safe end end -end def authors @authors ||= From 065540962e634c1b244f96e66c941a976cb07bbd Mon Sep 17 00:00:00 2001 From: Erica Titkemeyer Date: Wed, 9 Oct 2024 17:11:05 -0400 Subject: [PATCH 6/7] Update exhibits.css.scss --- app/assets/stylesheets/globals/exhibits.css.scss | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/app/assets/stylesheets/globals/exhibits.css.scss b/app/assets/stylesheets/globals/exhibits.css.scss index ea59d05e37..f778146309 100644 --- a/app/assets/stylesheets/globals/exhibits.css.scss +++ b/app/assets/stylesheets/globals/exhibits.css.scss @@ -13,19 +13,6 @@ } } -.exhibit-cover-video { - position: relative; - padding-bottom: 56.25%; /* 16:9 aspect ratio */ - height: 0; - overflow: hidden; - iframe { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - } -} .exhibit-interior-color-section h3 { display: block; width: 100vw; From fa4112d8def1fcaff62b008afae65d151e42b39d Mon Sep 17 00:00:00 2001 From: Erica Titkemeyer Date: Wed, 9 Oct 2024 17:25:06 -0400 Subject: [PATCH 7/7] Update black-power.md reverting black-power cover to see if that is the fix for failed tests --- app/views/exhibits/black-power.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/exhibits/black-power.md b/app/views/exhibits/black-power.md index 1908c95af3..b24f4cfadf 100644 --- a/app/views/exhibits/black-power.md +++ b/app/views/exhibits/black-power.md @@ -55,7 +55,10 @@ Since Stokely Carmichael had called for Black Power during his June 16, 1966, sp #### Next: [Black Journal](/exhibits/black-power/black-journal) ## Cover -Hosts William Greaves and Lou House of *Black Journal*. + + + +
*Black Journal* hosts William Greaves and Lou House.
Hosts William Greaves and Lou House of *Black Journal*.
## Gallery