Skip to content

Commit

Permalink
Merge pull request #109 from scientist-softserv/theming-home
Browse files Browse the repository at this point in the history
Theming home
  • Loading branch information
summer-cook authored Jul 10, 2023
2 parents 006ff53 + 8da29a2 commit c4cf6fd
Show file tree
Hide file tree
Showing 15 changed files with 168 additions and 45 deletions.
Binary file added app/assets/images/atla-ir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/home-logos/ctschicago.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/home-logos/ost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/home-logos/rim_atla.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions app/assets/stylesheets/atla-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,74 @@ body {font-size:0.875em;}
img {max-width:100%;}


/* landing page for app */

/*top nav bar*/
body.splash-index.public-facing .navbar-inverse {
background-color: #fff;
border-color: #258FCE;
}
.navbar-static-top {border-width: 3px 0 0;}
body.splash-index.public-facing a,body.splash-index.public-facing .navbar-inverse .navbar-nav > li > a, body.splash-index.public-facing .navbar-inverse .navbar-text, body.splash-index.public-facing .navbar-inverse .navbar-brand {
color:#258FCE;
padding:1em;
}
a#skip-to-content{padding:0;}

footer.navbar.navbar-inverse.site-footer {
border:0;
border-bottom:3px solid #258FCE;
}

body.splash-index span.institution_name {
display: none;
}

/* in page content */

body.splash-index .home-logo {
margin-bottom:2em;
}

body.splash-index .right-side{
text-align:center;
}

body.splash-index.public-facing h2{
font-family: 'PT Serif';
margin:4.5em 0 1em 0;
color:#4d4e4e;
font-size:1.5em;
}

body.splash-index button.shared-search {
border: none;
color: white;
padding: 1em;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1em;
/*font-weight:700;*/
margin: 0 2px 1.25em 2px;
transition-duration: 0.4s;
cursor: pointer;
background-color:#E05C3F;/*#D43D1C*/
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.3);
border-radius:3px;
}

body.splash-index button.shared-search:hover{
background-color:#D43D1C;
border: 1px solid #E05C3F;
}

body.splash-index .text-right p{color:#258FCE;}

.proprietor-accounts .btn-primary a:visited {color:white!important;}
body.splash-index.public-facing a:hover, body.public-facing a:focus {color:#ffffff;text-decoration:underline;}


/* Work show metadata layout */
.works-show p.work_description {margin-top:1em;}
.works-show dl.work-show {margin-top: 1em;}
Expand Down Expand Up @@ -59,4 +127,15 @@ div.facets h3 {font-size: 1em;}

@media only screen and (min-width: 768px) {
.hyc-banner .hyc-title h1 {margin-bottom: 0em;}

body.splash-index .left-side {
padding-left: 0px;
padding-right: 50px;
}
body.splash-index .right-side {
padding-left: 50px;
padding-right: 10px;
}
body.splash-index button.shared-search {margin: 2em 2px 4px 2px;}

}
10 changes: 10 additions & 0 deletions app/helpers/accounts_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# frozen_string_literal: true

module AccountsHelper
def host_for(sub_domain)
# rubocop:disable Style/FormatStringToken
default_host = ENV.fetch('HYKU_DEFAULT_HOST', "%{tenant}.#{Account.admin_host}")
default_host.gsub('%{tenant}', sub_domain)
# rubocop:enable Style/FormatStringToken
end

def full_search_url
main_app.search_catalog_path
end
end
53 changes: 46 additions & 7 deletions app/views/shared/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,55 @@
<footer class="navbar navbar-inverse site-footer">
<div class="container-fluid">
<div class="navbar-text text-left">
<p><%= t('hyrax.footer.service_html') %></p>
<p>Hyku v<%= Hyku::VERSION %></p>
<!-- /begin nav links: OVERRIDE here to include nav links on bottom bar -->
<div class="row">
<%# BEGIN LINKS ONLY VISIBLE IN INDIVIDUAL TENANTS %>
<% if controller_name != 'splash'%>
<div class = 'col-xs-6 col-md-2 footer-link' <%= 'class=active' if current_page?(hyrax.root_path) %>>
<%= link_to t(:'hyrax.controls.home'), hyrax.root_path, aria: current_page?(hyrax.root_path) ? {current: 'page'} : nil %>
</div>
<div class = 'col-xs-6 col-md-2 footer-link' <%= 'class=active' if current_page?(hyrax.about_path) %>>
<%= link_to t(:'hyrax.controls.about'), hyrax.about_path, aria: current_page?(hyrax.about_path) ? {current: 'page'} : nil %>
</div>
<div class = 'col-xs-6 col-md-2 footer-link' <%= 'class=active' if current_page?(hyrax.contact_path) %>>
<%= link_to t(:'hyrax.controls.contact'), hyrax.contact_path, aria: current_page?(hyrax.contact_path) ? {current: 'page'} : nil %>
</div>
<div class = 'col-xs-6 col-md-2 footer-link' <%= 'class=active' if current_page?(hyrax.help_path) %>>
<%= link_to t(:'hyrax.controls.help'), hyrax.help_path, aria: current_page?(hyrax.help_path) ? {current: 'page'} : nil %>
</div>
<div class = 'col-xs-12 col-md-4 footer-link'>
<%= link_to t(:'hyrax.pages.tabs.terms_page'), hyrax.terms_path %>
</div>
<% end %>
<%# END LINKS ONLY VISIBLE IN INDIVIDUAL TENANTS %>
<%# BEGIN LINKS ONLY VISIBLE IN SPLASH CONTROLLER %>
<% if controller_name == 'splash' %>
<% if admin_host? && !user_signed_in? %>
<div class = 'col-xs-4 col-md-3 footer-link' >
<%= link_to t('hyku.footer.admin_login', default: [:'hyrax.toolbar.profile.login']), main_app.new_user_session_path %>
</div>
<% end %>
<div class = 'col-xs-4 col-md-3 footer-link'>
<%= link_to "//#{host_for('shared-search')}/about" do %>
About
<% end %>
</div>
<div class = 'col-xs-4 col-md-3 footer-link'>
<%= link_to "https://www.atla.com/about/contact-us/" do %>
Contact
<% end %>
</div>
<div class = 'col-xs-4 col-md-3 footer-link'>
<%= link_to "//#{host_for('shared-search')}/help" do %>
Help
<% end %>
</div>
<% end %>
<%# END LINKS ONLY VISIBLE IN SPLASH CONTROLLER %>
</div><!-- /.nav -->
</div>
<div class="navbar-right">
<div class="navbar-text text-right">
<p><%= t('hyrax.footer.copyright_html') %></p>
<p><%= t('hyrax.background_attribution_html') %></p>
<% if admin_host? && !user_signed_in? %>
<p><%= link_to t('hyku.footer.admin_login', default: [:'hyrax.toolbar.profile.login']), main_app.new_user_session_path %></p>
<% end %>
</div>
</div>
</div>
Expand Down
59 changes: 27 additions & 32 deletions app/views/splash/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,42 +1,37 @@
<% content_for :page_title, application_name %>
<% content_for(:container_class) { 'row' } %>
<section id="banner" class="jumbotron">
<div class="container">
<h1><%= application_name %></h1>
<p><%= t('application.tagline') %></p>
<p>
<% if !admin_only_tenant_creation? || can?(:manage, Account) %>
<%= link_to t('hyku.splash.account_signup'), account_sign_up_path, class: 'btn btn-lg btn-sign-up' %>
<% elsif !user_signed_in? %>
<%= link_to t('hyku.splash.account_login'), main_app.new_user_session_path, class: 'btn btn-lg btn-sign-up' %>
<% else %>
<%= t('hyku.splash.account_denied') %>
<% end %>
</p>
</div>
</section>

<section class="product-features">
<section class="home-splash">
<div class="row grid-row">
<div class="col-xs-12 col-sm-4 grid-item">
<h2 class="heading"><%= t('hyku.splash.left_heading') %></h2>
<p>
<%= t('hyku.splash.left_text') %>
</p>
<div class="col-sm-6 left-side">
<%= image_tag("atla-ir.png", class: "home-logo", alt: "Atla IR Shared Repository") %>
<p>The Atla Institutional Repository is a collaborative resource featuring the output of Atla Member Libraries and other partners, including faculty and student scholarly research in religion and theology, institutional records such as yearbooks and course catalogs, recordings of sermons and other lectures, and much more.</p>
<p>Visit one repository at a time or use the search box to find content from across all participating libraries’ repositories.</p>
</div>

<div class="col-xs-12 col-sm-4 grid-item">
<h2 class="heading"><%= t('hyku.splash.center_heading') %></h2>
<p>
<%= t('hyku.splash.center_text') %>
</p>
</div>
<div class="col-sm-6 right-side">

<div class="col-xs-12 col-sm-4 grid-item">
<h2 class="heading"><%= t('hyku.splash.right_heading') %></h2>
<p>
<%= t('hyku.splash.right_text') %>
</p>
<h2>Browse our partner repositories:</h2>
<div class="row home-logo-grid">
<div class="col-xs-6 col-sm-4">
<%= link_to "//#{host_for('rim')}" do %>
<%= image_tag("home-logos/rim_atla.png", class: "tenant-logo", alt: "RIM") %>
<% end %>
</div>
<div class="col-xs-6 col-sm-4">
<%= link_to "//#{host_for('ctschicago')}" do %>
<%= image_tag("home-logos/ctschicago.png", class: "tenant-logo", alt: "CTS") %>
<% end %>
</div>
<div class="col-xs-6 col-sm-4">
<%= link_to "//#{host_for('ost')}" do %>
<%= image_tag("home-logos/ost.png", class: "tenant-logo", alt: "OST") %>
<% end %>
</div>
</div>
<%= link_to "//#{host_for('shared-search')}/catalog" do %>
<button class="shared-search">Search All Repositories</button>
<% end %>
</div>
</div>
</section>
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ en:
title: Administration
work_types: Available Work Types
footer:
admin_login: Administrator login
admin_login: Admin
proprietor:
accounts:
nav: Accounts
Expand Down
2 changes: 1 addition & 1 deletion config/locales/hyrax.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ en:
year: "Year"

hyrax:
product_name: "Hyku"
product_name: "Atla IR"
product_twitter_handle: "@HydraInABox"
institution_name: "Institution"
institution_name_full: "Institution"
Expand Down
2 changes: 1 addition & 1 deletion config/locales/hyrax.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ es:
label_short: Mis trabajos
q:
label: Buscar %{application_name}
placeholder: Ingrese los términos de búsqueda
placeholder: Introduce términos de búsqueda
select_type:
description: Tipo de trabajo de uso general
name: Trabajo
Expand Down
2 changes: 1 addition & 1 deletion config/locales/hyrax.pt-.yml
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ pt-:
label_short: Meus trabalhos
q:
label: Pesquisar %{application_name}
placeholder: Digite os termos de pesquisa
placeholder: Entre os termos da pesquisas
select_type:
description: Tipo de trabalho de uso geral
name: Trabalhar
Expand Down
2 changes: 1 addition & 1 deletion config/locales/hyrax.pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ pt-BR:
label_short: Meus trabalhos
q:
label: Pesquisar %{application_name}
placeholder: Digite os termos de pesquisa
placeholder: Entre os termos da pesquisa
select_type:
description: Tipo de trabalho de uso geral
name: Trabalhos
Expand Down
Binary file modified public/favicon.ico
100644 → 100755
Binary file not shown.
2 changes: 1 addition & 1 deletion spec/features/splash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
expect(page).to have_link 'Login to get started', href: main_app.new_user_session_path(locale: 'en')

within 'footer' do
expect(page).to have_link 'Administrator login'
expect(page).to have_link 'Admin'
end

expect(page).to have_content("Hyku v#{Hyku::VERSION}")
Expand Down

0 comments on commit c4cf6fd

Please sign in to comment.