Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theming newtheme #111

Merged
merged 13 commits into from
Jul 18, 2023
Empty file modified app/assets/images/atla-ir.png
100755 → 100644
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-wider.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 modified 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.
30 changes: 22 additions & 8 deletions app/assets/stylesheets/atla-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@ body {font-size:0.875em;}

img {max-width:100%;}

a#skip-to-content{padding:0;}

/* landing page for app */

/* 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 .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 {
body.splash-index.public-facing footer.navbar.navbar-inverse.site-footer{
border:0;
border-bottom:3px solid #258FCE;
}
Expand All @@ -32,7 +31,6 @@ body.splash-index span.institution_name {
}

/* in page content */

body.splash-index .home-logo {
margin-bottom:2em;
}
Expand Down Expand Up @@ -72,9 +70,19 @@ body.splash-index button.shared-search:hover{

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;}

/* across all tenants */
.proprietor-accounts .btn-primary a:visited {color:white!important;}

.public-facing .footer-link a, .public-facing .site-footer a {padding:1em;}
.public-facing .footer-link {
padding: 1em;
}

footer.navbar.navbar-inverse.site-footer {
border:0;
}

/* Work show metadata layout */
.works-show p.work_description {margin-top:1em;}
Expand Down Expand Up @@ -127,7 +135,7 @@ 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;
Expand All @@ -138,4 +146,10 @@ div.facets h3 {font-size: 1em;}
}
body.splash-index button.shared-search {margin: 2em 2px 4px 2px;}

/* across all tenants * /

/* banner area search bar */
.navbar.navbar-static-top .input-group {margin-bottom:0;}


}
226 changes: 226 additions & 0 deletions app/assets/stylesheets/themes/shared_repository.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
.shared_repository {

&.public-facing, &.public-facing p {font-family: Muli, Helvetica, Arial, sans-serif!important;}
&.public-facing h1, h2, h3, h4, h5, h6 {font-family: 'PT Serif', serif;}

img {max-width:100%;}

&.public-facing a {color:#E05C3F;}
&.public-facing a:hover, &.public-facing a:focus{color:#D43D1C;}
h3.panel-title.facet-field-heading a {color:#333333;}

div.facets h3 {font-size:1em;}

/*top admin nav bar*/
&.public-facing .navbar-inverse {
background-color: #fff;
border-color: #258FCE;
}

&.public-facing .navbar-static-top {border-width: 3px 0 0px}

&.public-facing nav.navbar.navbar-default.navbar-static-top{
border-width:0px;
margin-top:2em;
}

&.public-facing .navbar-inverse .navbar-nav > li > a, &.public-facing .navbar-inverse .navbar-text, &.public-facing .navbar-inverse .navbar-brand {color:#258FCE;}

&.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:#258FCE;}

.navbar-inverse .navbar-collapse, .navbar-inverse #facet-panel-collapse, .navbar-inverse .navbar-form{border-color: #175E87;}

ul#user_utility_links.nav.navbar-nav li {background-color:transparent;}

/* hide globe icon on linked logo*/
.image-masthead .glyphicon {display:none;}

&.public-facing #masthead #logo img {
max-height:125px;
padding-top:.5em;
padding-left:.3em;
}

&.public-facing .navbar{margin-bottom:0;}

&.public-facing .navbar + .navbar, .navbar + .image-masthead {margin-top:0;}

/* removing background banner image */
.image-masthead .background-container, .container.site-title-container {display:none;}
.image-masthead .background-container-gradient {background:none;}

/*hamburger menu*/
&.public-facing button.navbar-toggle.collapsed,&.public-facing .navbar-inverse .navbar-toggle, &.public-facing .navbar-inverse .facets-toggle {background-color:#258FCE;}

&.public-facing button.navbar-toggle.collapsed:hover{background-color:#175E87;}

&.public-facing .navbar-inverse .navbar-toggle {border-color: #175E87;}

&.public-facing .navbar-inverse .navbar-nav > .open > a, &.public-facing .navbar-inverse .navbar-nav > .open > a:hover, &.public-facing .navbar-inverse .navbar-nav > .open > a:focus{background-color: #258FCE;color:white;}

.navbar-inverse .navbar-nav .open .dropdown-menu .divider, .navbar-inverse .navbar-nav .open .twitter-typeahead .tt-menu .divider, .twitter-typeahead .navbar-inverse .navbar-nav .open .tt-menu .divider{background-color: #175E87;}

/* mobile stacked menu */
.navbar-nav {margin:0}

.image-masthead.row {margin-right:0;margin-left:0;}

.image-masthead .navbar .navbar-nav {margin-left:0;}

/* site nav bar on pages not catalog or login*/
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);}

/* catalog/login nav bar */
.navbar-default .navbar-nav li a {color:#eeeeee;text-transform: uppercase;}
.navbar-default {background-color:transparent;}

&.catalog nav.navbar.navbar-default.navbar-static-top, &.devise-sessions nav.navbar.navbar-default.navbar-static-top{
margin-bottom:2em;
border-bottom: 1px solid #e7e7e7;
}

&.catalog .navbar-nav, &.devise-sessions .navbar-nav {
padding-left:1em;
margin-block-end: 0;
}

&.devise-sessions .navbar-nav#user_utility_links {padding:0;}

/* homepage page content */
.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 bar */
&.hyrax-homepage #search-form-header{
max-width:600px;
margin: 2em auto 0 auto;
}
/* search bar on other pages */
.searchbar-right.navbar-right.col-sm-7 {
max-width: 600px;
}

button.btn.btn-default.dropdown-toggle {display:none;}

.form-horizontal .control-label, &.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;}

/* limit width for text in pages for better usability */
&.public-facing.hyrax-pages #content-wrapper, &.public-facing.hyrax-contact_form #content-wrapper {max-width:800px;}
/* adding space to text area for mobile view */
&.public-facing.hyrax-pages div#content_block_page.row {margin-left:1em;margin-right:1em;}

/* footer */
&.public-facing footer.navbar.navbar-inverse.site-footer{border:0;border-bottom:3px solid #258FCE}

/*contact page*/
&.public-facing .alert-info{
background-color:rgba(37,143,206, .3);
color:#333;
border-color:#258FCE;
}
&.public-facing .alert{margin-left:0;}

&.public-facing .btn.btn-primary, &.public-facing .btn-primary.facets-toggle, &.public-facing .field-controls .facets-toggle.add, .field-controls &.public-facing .facets-toggle.add, &.public-facing .field-controls .btn.add, .field-controls &.public-facing .btn.add, &.public-facing .field-controls td.toggle input.add[type=submit], .field-controls td.toggle &.public-facing input.add[type=submit], &.public-facing td.toggle .field-controls input.add[type=submit], td.toggle .field-controls &.public-facing input.add[type=submit], &.public-facing td.toggle input.btn-primary[type=submit], td.toggle &.public-facing input.btn-primary[type=submit], &.public-facing td.toggle input[type=submit].active, td.toggle &.public-facing input[type=submit].active{
background-color:#E05C3F;
border-color: #E05C3F;
}

&.hyrax-contact_form .btn.btn-primary{box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.3);}

/* splash */
&.public-facing.hyrax-homepage #masthead.navbar {margin-bottom:20px;}
&.hyrax-homepage .navbar-header{display:none;}

&.hyrax-homepage .home-logo {
margin-bottom:2em;
}

&.hyrax-homepage .right-side{
text-align:center;
}
&.hyrax-homepage h2{
font-family: 'PT Serif';
margin:3.5em 0 .5em 0;
color:#4d4e4e;
font-size:1.5em;
}
&.hyrax-homepage .splash-browse h2 {margin:2em 0 1em 0;}
&.hyrax-homepage #search-form-header {margin-top:1em;}
&.hyrax-homepage .text-right p{color:#258FCE;}

@media screen and (min-width:768px){

.dropdown-menu .divider, .twitter-typeahead .tt-menu .divider{
background-color: #e5e5e5;}

/* site nav bar on pages not catalog or login*/
.image-masthead .navbar-nav{
padding-left:1em;
padding-top: 2em;
}

.image-masthead.row {margin-right:-15px;margin-left:-15px;}

/* catalog/login nav bar */
&.catalog .navbar-nav, &.devise-sessions .navbar-nav {
padding-top:2em;
}
&.devise-sessions .navbar-nav#user_utility_links,&.catalog .navbar-nav#user_utility_links {padding:0;}

#search-form-header{
margin:0;
}

/* removing extra space to text area for larger view on pages */
&.public-facing.hyrax-pages div#content_block_page.row {margin-left:0em;margin-right:0em;}

&.public-facing .alert{width:83%;}

/* splash */
&.hyrax-homepage .left-side {
padding-left: 0px;
padding-right: 50px;
}
&.hyrax-homepage .right-side {
padding-left: 50px;
padding-right: 10px;
}

&.hyrax-homepage .splash-browse {padding-top:1em;}

}

}
1 change: 1 addition & 0 deletions app/views/layouts/hyrax.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<%= content_for(:head) %>
</head>
<% content_for(:extra_body_classes, 'public-facing') unless params[:controller].match(/^proprietor/) %>
<% content_for(:extra_body_classes, ' search-only') if current_account && current_account.search_only %>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check in the inspector in the rendered html that the search-only body class is being correctly applied on the search results page, because it might not be. I noticed you have a space in the string so it reads ' search-only' which may be incorrect.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So without that space it makes public-facing and search-only into public-facingsearch-only and all the css stops working.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put the debugger bit in this file and reloaded the search results page and then put controller_name and it said "catalog" so I think that means I have the right name for it.


<body class="<%= body_class %> <%= home_page_theme %> <%= search_results_theme %> <%= show_page_theme %>">
<%= render_gtm_body(request.original_url) %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<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'>
<div class = 'col-xs-6 col-md-4 footer-link'>
<%= link_to t(:'hyrax.pages.tabs.terms_page'), hyrax.terms_path %>
</div>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
<%= render '/shared/select_work_type_modal', create_work_presenter: @presenter&.create_work_presenter if @presenter&.draw_select_work_modal? %>
<%= render 'shared/ajax_modal' %>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<% if controller_name == 'pages' ||
controller_name == 'contact_form' ||
controller_name == 'catalog'
%>
<div class="banner-section-wrapper">
<div class="image-masthead row">
<div class= "col-xs-12 section-contrast">
<div class="row banner-section">
<div class="col-xs-12 controls-section">
<%= render '/controls' %>
</div>
</div>
</div>
</div>
</div>
<%end%>

<% if controller_name == 'homepage' %>
<%= render 'splash/index' %>
<%end%>
13 changes: 13 additions & 0 deletions app/views/themes/shared_repository/layouts/homepage.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<% # OVERRIDE Hyku 5.0.1 for Atla shared search theme %>
<% content_for(:navbar) do %>

<%= render "hyrax/homepage/banner_section" if controller_name == 'pages'|| controller_name == 'contact_form' || controller_name == 'catalog' %>

<% if controller_name == 'homepage' %>
<%= render 'splash/index' %>
<% end %>


<%end%>

<%= render template: 'layouts/hyrax' %>
36 changes: 36 additions & 0 deletions app/views/themes/shared_repository/splash/_index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

<div id="content-wrapper" class="container">
<section class="home-splash">
<div class="row grid-row">
<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-sm-6 right-side">
<h2>Search all repositories</h2>
<%= render partial: 'catalog/search_form'%>
<div class="splash-browse">
<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>
</div>
</div>
</div>
</section>
</div>
Loading
Loading