From 1846982cf29ca8ecf723cae1afee10736783690b Mon Sep 17 00:00:00 2001 From: Christy Karpinski Date: Wed, 14 Jun 2023 10:54:34 -0500 Subject: [PATCH 01/11] set up shared search custom theme --- .../stylesheets/themes/shared_repository.scss | 80 +++++++++++++++++++ .../layouts/hyrax.html.erb | 25 +----- .../shared_repository/_controls.html.erb | 18 +++++ .../themes/shared_repository/_logo.html.erb | 10 +++ .../hyrax/homepage/_banner_section.html.erb | 52 ++++++++++++ .../layouts/homepage.html.erb | 8 ++ .../shared_repository/shared/_footer.html.erb | 32 ++++++++ .../shared_repository/splash/_index.html.erb | 21 +++++ config/environments/development.rb | 2 +- config/home_themes.yml | 9 ++- config/locales/de.yml | 2 +- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- config/locales/fr.yml | 2 +- config/locales/it.yml | 2 +- config/locales/pt-.yml | 2 +- config/locales/pt-BR.yml | 2 +- config/show_themes.yml | 8 +- 18 files changed, 244 insertions(+), 35 deletions(-) create mode 100644 app/assets/stylesheets/themes/shared_repository.scss create mode 100644 app/views/themes/shared_repository/_controls.html.erb create mode 100644 app/views/themes/shared_repository/_logo.html.erb create mode 100644 app/views/themes/shared_repository/hyrax/homepage/_banner_section.html.erb create mode 100644 app/views/themes/shared_repository/layouts/homepage.html.erb create mode 100644 app/views/themes/shared_repository/shared/_footer.html.erb create mode 100644 app/views/themes/shared_repository/splash/_index.html.erb diff --git a/app/assets/stylesheets/themes/shared_repository.scss b/app/assets/stylesheets/themes/shared_repository.scss new file mode 100644 index 00000000..e1cb8b11 --- /dev/null +++ b/app/assets/stylesheets/themes/shared_repository.scss @@ -0,0 +1,80 @@ +.shared_repository { + &.public-facing {font-family: Muli, Helvetica, Arial, sans-serif;} + &.public-facing h1, h2, h3, h4, h5, h6 {font-family: 'PT Serif', serif;} + img {max-width:100%;} + + &.public-facing .navbar-inverse { + background-color: #258FCE; + border-color: #258FCE; + } + &.public-facing .navbar-inverse .navbar-nav > li > a, &.public-facing .navbar-inverse .navbar-text, &.public-facing .navbar-inverse .navbar-brand { + color:white; + } + &.public-facing .navbar-inverse .navbar-nav .open .dropdown-menu > li > a, .navbar-inverse .navbar-nav .open .twitter-typeahead .tt-menu > li > a, .twitter-typeahead .navbar-inverse .navbar-nav .open .tt-menu > li > a, &.public-facing .dropdown-header {color:white;} + + &.public-facing .navbar-header #logo {visibility: hidden;} + .image-masthead .glyphicon {display:none;} + &.public-facing .navbar{margin-bottom:0} + &.public-facing .navbar + .navbar, .navbar + .image-masthead {margin-top:0;} + + /* banner area below top nav bar*/ + .banner-section-wrapper{margin-bottom:1em;} + .image-masthead .logo-section{padding:1em 0 1em 3em;} + .image-masthead{display:flex;align-items: flex-end;} + .image-masthead .navbar-nav{padding-left:2.2em;} + /* site nav bar */ + .image-masthead ul.nav.navbar-nav li {background-color:#258FCE;} + &.public-facing .image-masthead .navbar .active > a, &.public-facing .image-masthead .navbar .active > a:hover, &.public-facing .image-masthead .navbar .active > a:focus {background-color:#175E87;} + &.public-facing .image-masthead .navbar { background-color: rgba(0, 0, 0, 0);} + + .container.homepage-container h2{ + font-family: 'PT Serif'; + margin:1.55em 0 0 0; + color:#4d4e4e;/*313133*/ + font-size:1.5em; + text-align:center; + } + + .container.homepage-container .row {margin:0;} + + #search-form-header{ + max-width:600px; + margin: 2em auto 0 auto; + } + + button.btn.btn-default.dropdown-toggle {display:none;} + + .form-horizontal .control-label, body.splash-index button.btn.btn-default.dropdown-toggle{display:none;} + + #search-field-header { + padding: 25px 12px 20px 12px; + border-top: 2px solid #E3E3E3 !important; + border-bottom: 2px solid #E3E3E3 !important; + border-left: 2px solid #E3E3E3 !important; + border-right: 0px solid transparent !important; + } + + button#search-submit-header { + color: #575757; + background-color: #fff !important; + padding: 13px 12px 12px 12px; + border-top: 2px solid #E3E3E3 !important; + border-bottom: 2px solid #E3E3E3 !important; + border-right: 2px solid #E3E3E3 !important; + border-left: 0px solid transparent !important; + border-top-right-radius: 5px; + border-bottom-right-radius:5px; + } + + input::placeholder{font-size:1.5em;} + + .row.home-content {display:none;} + + &.public-facing.hyrax-pages #content-wrapper {max-width:800px;} + &.public-facing.hyrax-pages div#content_block_page.row {margin-left:1em;margin-right:1em;} + + &.public-facing .footer-link a, &.public-facing .site-footer a {color:white;padding:1em;} + + + +} diff --git a/app/views/themes/cultural_repository/layouts/hyrax.html.erb b/app/views/themes/cultural_repository/layouts/hyrax.html.erb index 889f1f02..5bf25bc8 100644 --- a/app/views/themes/cultural_repository/layouts/hyrax.html.erb +++ b/app/views/themes/cultural_repository/layouts/hyrax.html.erb @@ -15,31 +15,10 @@ <%= render '/masthead' %> <%= content_for(:navbar) %> <%= content_for(:precontainer_content) %> -
- <% if display_content_block? @home_text %> -
- <%= render '/flash_msg' %> -
- <% else %> -
- <%= render '/flash_msg' %> -
- <% end %> - <%= render_breadcrumbs builder: Hyrax::BootstrapBreadcrumbsBuilder %> - <% if content_for?(:page_header) %> -
-
- <%= yield(:page_header) %> -
-
- <% end %> - - <%= content_for?(:content) ? yield(:content) : yield %> - -
+ <%= render 'shared/footer' %> <%= render '/shared/select_work_type_modal', create_work_presenter: @presenter&.create_work_presenter if @presenter&.draw_select_work_modal? %> <%= render 'shared/ajax_modal' %> - \ No newline at end of file + diff --git a/app/views/themes/shared_repository/_controls.html.erb b/app/views/themes/shared_repository/_controls.html.erb new file mode 100644 index 00000000..065fa141 --- /dev/null +++ b/app/views/themes/shared_repository/_controls.html.erb @@ -0,0 +1,18 @@ +<% # OVERRIDE: %> + diff --git a/app/views/themes/shared_repository/_logo.html.erb b/app/views/themes/shared_repository/_logo.html.erb new file mode 100644 index 00000000..07b47464 --- /dev/null +++ b/app/views/themes/shared_repository/_logo.html.erb @@ -0,0 +1,10 @@ + <% if logo_image %> + + <% else %> + + <% end %> diff --git a/app/views/themes/shared_repository/hyrax/homepage/_banner_section.html.erb b/app/views/themes/shared_repository/hyrax/homepage/_banner_section.html.erb new file mode 100644 index 00000000..2b869bfd --- /dev/null +++ b/app/views/themes/shared_repository/hyrax/homepage/_banner_section.html.erb @@ -0,0 +1,52 @@ +<% if controller_name == 'homepage' || + controller_name == 'pages' || + controller_name == 'contact_form'%> + +<%end%> + + + +<% if controller_name == 'catalog' %> + +<%end%> diff --git a/app/views/themes/shared_repository/layouts/homepage.html.erb b/app/views/themes/shared_repository/layouts/homepage.html.erb new file mode 100644 index 00000000..2984781f --- /dev/null +++ b/app/views/themes/shared_repository/layouts/homepage.html.erb @@ -0,0 +1,8 @@ + +<% content_for(:navbar) do %> + +<%= render "hyrax/homepage/banner_section" if controller_name == 'pages'|| controller_name == 'contact_form' || controller_name == 'homepage' || controller_name == 'catalog' %> + +<% end %> + +<%= render template: 'layouts/hyrax' %> diff --git a/app/views/themes/shared_repository/shared/_footer.html.erb b/app/views/themes/shared_repository/shared/_footer.html.erb new file mode 100644 index 00000000..6d3bf81f --- /dev/null +++ b/app/views/themes/shared_repository/shared/_footer.html.erb @@ -0,0 +1,32 @@ + diff --git a/app/views/themes/shared_repository/splash/_index.html.erb b/app/views/themes/shared_repository/splash/_index.html.erb new file mode 100644 index 00000000..f2712adb --- /dev/null +++ b/app/views/themes/shared_repository/splash/_index.html.erb @@ -0,0 +1,21 @@ +