Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #298 from ucsdlib/feature/home-page-update
Browse files Browse the repository at this point in the history
Feature/home page update
  • Loading branch information
VivianChu committed Apr 25, 2017
2 parents 4b09617 + 7f4df9b commit 7dc9e2c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 39 deletions.
39 changes: 16 additions & 23 deletions app/assets/stylesheets/home-page.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#home-container{font-family:'Archivo Narrow',sans-serif !important;font-weight:normal !important;}
#home-01,#home-02{width:100%;margin:0 auto;background-color:#333;}
#home-01{position:relative;height:640px;background-position:center center;background-size:cover;}
#home-02{background:#399dc8 url("../images/bg-grid.png") no-repeat center top;text-align:center;border-top:1px solid #1f556d;padding:20px;}
#home-02{background:#595c5f url("../images/bg-grid.png") no-repeat center top;text-align:center;border-top:1px solid rgba(255,255,255,0.5);padding:40px;}
#home-02,#home-02 a{color:#fff;}
#home-02 h2{margin:0;font-family:"Archivo Narrow";font-weight: normal;font-size:2em;color:rgba(255,255,255,0.75);line-height:normal;width:80%;margin:0 auto;}
#home-02 h2{margin:0;font-family:'Archivo Narrow',sans-serif;font-weight: normal;font-size:2em;color:rgba(255,255,255,0.75);line-height:normal;width:80%;margin:0 auto;}
#home-02 h3{margin:20px;font-weight: normal;font-size:1.9em;line-height:normal;}
#dc-logo{display:block;margin: 0 auto;padding-top:80px;}
#dc-search-box{padding-top:0px;margin:0;}
Expand All @@ -27,19 +27,16 @@
#bg-meta p{margin:0;text-shadow: 1px 2px 3px rgba(0,0,0,0.5);font-size:1em;line-height:normal;}
#bg-meta a{color:#fff;color:rgba(255,255,255,0.75);text-decoration:underline;transition: all 250ms ease-in-out;outline:none;}
#bg-meta a:hover{color:#fff;}
.category{display:inline-block;width:48%;vertical-align: top;}
.category a{display:block;width:240px;border-radius:240px;height:240px;margin:0 auto;box-shadow:0 0 3px rgba(0,0,0,0.5);transition:all 500ms ease-in-out;outline:none;border:1px solid #fff;}
.category a:hover{transform:scale(1.03) rotate(-2deg);}
.category img{display:block;}
.category p{font-size:1.25em;margin:20px 20%;line-height:normal;}
.cat-library{background:#f39d3d url("../images/logo-library.png") center center no-repeat;background-size:80%;}
.cat-rci{background:#f39d3d url("../images/logo-rdcp.png") center center no-repeat;background-size:80%;}
.invitation{font-family:"Archivo Narrow";font-weight: normal;;font-size:1em;color:rgba(255,255,255,0.75);line-height:normal;margin:1em auto;width:80%;}
.category{display: -webkit-flex;display: -ms-flexbox;display: flex;overflow: hidden;}
.category a{ flex: 1; margin:0; box-shadow:0 0 3px rgba(0,0,0,0.5);transition:all 250ms ease-in-out;outline:none;border:3px solid #fff;background:#f39d3d;text-align:left;text-decoration: none;padding:20px;text-shadow: 0 1px 1px rgba(171,93,6,0.75);}
.category a:hover{background:#E67A00;}
.category a:nth-child(1){margin-right:20px;}
.category a:nth-child(2){margin-left:20px;}
.category p{font-size:1.1em;margin:0;line-height:normal;}
.category h3{margin:0 0 5px 0!important;}
.visually-hidden{border:0 none;clip:rect(0px,0px,0px,0px);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}

.tagline{width:80%;margin:0 auto;}
.tagline p{text-align:center;color:#fff;color:rgba(255,255,255,0.75);padding:1.25em 0;margin:0;line-height:normal;font-size: 1.15em;}

/*LOCAL OVERRIDES*/
footer{margin-top:0;}
.alert{border-radius:0;margin:0;}
Expand All @@ -50,25 +47,21 @@ footer{margin-top:0;}
#home-01{height:800px;}
#dc-search-box fieldset,#browse-by{width:60%;}
}
@media (min-width: 1200px)
{
}
@media (min-width: 1200px){}
@media (max-width:640px)
{
#dc-logo{width:80%;padding-top:50px;}
#browse-by{font-size:95%;}
.category{width:100%;}
.category{flex-direction: column;}
.category a:nth-child(1){margin:0 0 20px 0;}
.category a:nth-child(2){margin-left:0;}
}
@media (max-width:480px)
{
#home-01{background-color:#666;position:relative;height:480px;}
#home-02 h2{font-size:1.25em;}
#home-02 h2,.invitation{width:100%;}
#home-02 h3{font-size:1.75em;margin:20px 0;}
.category p{font-size:1.15em;margin:20px 0;}
.category a{width:140px;border-radius:140px;height:140px;}
.cat-library, .cat-rci{background-size:66%,66%;}
.invitation{padding:0;}
#home-02 h2{width:100%;}
.category h3{font-size:1.75em!important;}
.category p{font-size:1em;}
#browse-by{text-align:center;}
#bg-meta p{font-size:0.75em;}
.tagline p{font-size:0.9em;}
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def parseJsonDate jsonString, sep

# render page titles for all application pages using Digital Library Collections prefix
def full_title(page_title)
base_title = 'Digital Collections | UC San Diego Library'
base_title = 'Library Digital Collections | UC San Diego Library'
if(page_title.blank?)
base_title
else
Expand Down
13 changes: 3 additions & 10 deletions app/views/dams_units/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@
<section id="bg-meta"><a id="bg-link"></a></section>
</section>


<section id="home-02">
<h2>The Digital Collections website gathers two categories of content managed by the UC&nbsp;San&nbsp;Diego&nbsp;Library</h2>
<div class="category">
<h3>UC San Diego Library<br>Digital Collections</h3>
<%= link_to '<span class="visually-hidden">UC San Diego Library Digital Collections</span>'.html_safe, dams_unit_collections_path('dlp'), :class => 'cat-library' %>
<p>Digitized versions of selected collections covering topics such as art, film, music, history and anthropology</p>
</div>
<div class="category">
<h3><span>UC San Diego<br>Research Data Collections</h3>
<%= link_to '<span class="visually-hidden">UC San Diego Research Data Collections</span>'.html_safe, dams_unit_collections_path('rdcp'), :class => 'cat-rci' %>
<p>Research data generated by UC San Diego researchers</p>
<%= link_to '<h3>Library Collections</h3><p>Digitized versions of selected collections covering topics such as art, film, music, history and anthropology</p>'.html_safe, dams_unit_collections_path('dlp') %>
<%= link_to '<h3>Research Data Collections</h3><p>Research data generated by UC San Diego researchers</p>'.html_safe, dams_unit_collections_path('rdcp') %>
</div>
<p class="invitation">Currently totaling <%= number_with_delimiter(@count_resp.total_count) %> research data sets, images, documents, video and audio recordings. We continue to add items over time, and invite you to search or browse these collections for research or educational purposes.</p>
</section>
6 changes: 3 additions & 3 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<header>
<section class="container-fluid ucsd-head visible-desktop">
<a class="pull-right ucsd-head-logo" href="http://www.ucsd.edu"><%=image_tag "/images/logo-ucsd-header-xl.png", :alt => "UC San Diego" %></a>
<%= link_to 'Digital Collections', root_path, :class => 'brand' %>
<%= link_to 'Library Digital Collections', root_path, :class => 'brand' %>
</section>
<section class="navbar navbar-inverse">
<div class="navbar-inner">
Expand All @@ -12,7 +12,7 @@
<span class="icon-bar"></span>
</a>

<%= link_to 'Digital Collections', root_path, :class => 'brand hidden-desktop' %>
<%= link_to 'Library Digital Collections', root_path, :class => 'brand hidden-desktop' %>

<nav class="nav-collapse collapse">

Expand All @@ -21,7 +21,7 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">About <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><%= link_to 'Digital Collections', view_page_path('about') %></li>
<li><%= link_to 'Library Digital Collections', view_page_path('about') %></li>
<li><%= link_to 'Statistics', 'https://library.ucsd.edu/damsmanager/stats.do' %></li>
</ul>
</li>
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/homepage.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<%= render :partial => 'layouts/sitetrackings' if Rails.env.production? %>
<!-- HOME SPECIFIC -->
<meta name="dams_root" content="<%=root_path%>">
<script src="//libraries.ucsd.edu/assets/dams/home-page/js/bg-data.js"></script>
<link href='http://fonts.googleapis.com/css?family=Archivo+Narrow|Questrial' rel='stylesheet' type='text/css'>
<script src="https://library.ucsd.edu/assets/dams/home-page/js/bg-data.js"></script>
<link href='https://fonts.googleapis.com/css?family=Archivo+Narrow' rel='stylesheet' type='text/css'>
<%= javascript_include_tag "home-page" %>
<%= stylesheet_link_tag "home-page", :media => "all" %>
<!-- /HOME SPECIFIC -->
Expand Down
Binary file modified public/images/bg-grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7dc9e2c

Please sign in to comment.