diff --git a/.rubocop.yml b/.rubocop.yml index 46f6944f4f..43c88a3fb7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,6 +10,7 @@ AllCops: - 'app/models/exhibit.rb' - 'app/helpers/snippet_helper.rb' - 'app/controllers/snippets_controller.rb' + - 'app/models/link_exhibit.rb' Metrics/ClassLength: Enabled: false diff --git a/app/assets/stylesheets/globals/exhibits.css.scss b/app/assets/stylesheets/globals/exhibits.css.scss index 09a382d10d..66827f130e 100644 --- a/app/assets/stylesheets/globals/exhibits.css.scss +++ b/app/assets/stylesheets/globals/exhibits.css.scss @@ -250,6 +250,13 @@ a.exhibit-color:hover { min-height: 3.1em; } +div.gallery-thumbnail a { + span:hover { + color: #fff; + text-decoration: underline; + } +} + .exhibit-header { background-size: cover; background-image: url("https://s3.amazonaws.com/americanarchive.org/exhibits/assets/exhibits_red_bar.png"); diff --git a/app/controllers/exhibits_controller.rb b/app/controllers/exhibits_controller.rb index b90f0c167a..cbd8a455dc 100644 --- a/app/controllers/exhibits_controller.rb +++ b/app/controllers/exhibits_controller.rb @@ -2,7 +2,8 @@ class ExhibitsController < OverrideController def index - @top_level_exhibits = Exhibit.all_top_level + story_map_exhibit = LinkExhibit.new(title: "Witnessing New Mexico: The New Mexico Public Media Digitization Project", external_url: "https://storymaps.arcgis.com/stories/39eecf9cbc484f36802799c4046ebd61", thumbnail_url: "https://s3.amazonaws.com/americanarchive.org/exhibits/nm_storymap_cover.png", new_tab: true) + @top_level_exhibits = Exhibit.all_top_level + [story_map_exhibit] @page_title = 'Exhibits' end diff --git a/app/models/exhibit.rb b/app/models/exhibit.rb index 3355aa2d44..76ef05228b 100644 --- a/app/models/exhibit.rb +++ b/app/models/exhibit.rb @@ -80,6 +80,14 @@ def config end end + def full_path + "/exhibits/" + path + end + + def new_tab + false + end + def meta_tags %( diff --git a/app/models/link_exhibit.rb b/app/models/link_exhibit.rb new file mode 100644 index 0000000000..06c7425243 --- /dev/null +++ b/app/models/link_exhibit.rb @@ -0,0 +1,17 @@ +class LinkExhibit + attr_reader :title + attr_reader :thumbnail_url + attr_reader :external_url + attr_reader :new_tab + + def initialize(title:, external_url:, thumbnail_url:, new_tab: false) + @title = title + @external_url = external_url + @thumbnail_url = thumbnail_url + @new_tab = new_tab + end + + def full_path + @external_url + end +end \ No newline at end of file diff --git a/app/views/exhibits/index.html.erb b/app/views/exhibits/index.html.erb index 40d72f69ea..168b738d77 100644 --- a/app/views/exhibits/index.html.erb +++ b/app/views/exhibits/index.html.erb @@ -1,18 +1,18 @@ <% content_for :main do %>