Skip to content

Commit

Permalink
Add pul-assets gem and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Axa Mei Liauw committed Mar 16, 2016
1 parent eee9265 commit b272bf4
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# PUL Assets
gem 'pul-assets', :git => 'git@github.com:pulibrary/pul_assets.git', :branch => :master
# PUL Assets - Dependencies
gem 'modernizr-rails'
gem 'normalize-rails'
gem 'susy'
gem 'breakpoint'
gem 'bourbon'
gem 'jquery-tablesorter'

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
Expand Down
30 changes: 30 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ GIT
tophat
underscore-rails (~> 1.6)

GIT
remote: git@github.com:pulibrary/pul_assets.git
revision: 459643d50525811ea0e1adebee5f2a914df10229
branch: master
specs:
pul-assets (0.2.2)
bourbon (~> 4.2.6)
susy (~> 2.2.12)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -112,7 +121,13 @@ GEM
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
bootstrap_form (2.3.0)
bourbon (4.2.6)
sass (~> 3.4)
thor (~> 0.19)
breadcrumbs_on_rails (2.3.1)
breakpoint (2.7.0)
sass (~> 3.3)
sassy-maps (< 1.0.0)
builder (3.2.2)
bunny (2.2.2)
amq-protocol (>= 2.0.1)
Expand Down Expand Up @@ -247,6 +262,8 @@ GEM
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-tablesorter (1.20.5)
railties (>= 3.2, < 6)
json (1.8.3)
jwt (1.5.2)
kaminari (0.16.3)
Expand Down Expand Up @@ -276,6 +293,7 @@ GEM
mini_magick (4.3.6)
mini_portile2 (2.0.0)
minitest (5.8.3)
modernizr-rails (2.7.1)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
Expand All @@ -285,6 +303,7 @@ GEM
netrc (0.11.0)
nokogiri (1.6.7.1)
mini_portile2 (~> 2.0.0.rc2)
normalize-rails (3.0.3)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
Expand Down Expand Up @@ -411,6 +430,8 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassy-maps (0.4.0)
sass (~> 3.3)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
Expand Down Expand Up @@ -454,6 +475,8 @@ GEM
sshkit (1.8.1)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
susy (2.2.12)
sass (>= 3.3.0, < 3.5)
term-ansicolor (1.3.2)
tins (~> 1.0)
test_xml (0.1.7)
Expand Down Expand Up @@ -506,6 +529,8 @@ DEPENDENCIES
blacklight-gallery (>= 0.3.0)
blacklight-oembed
blacklight-spotlight!
bourbon
breakpoint
byebug
capistrano-passenger
capistrano-rails
Expand All @@ -522,11 +547,15 @@ DEPENDENCIES
jbuilder (~> 2.0)
jettywrapper (>= 2.0)
jquery-rails
jquery-tablesorter
modernizr-rails
normalize-rails
omniauth-cas
open_uri_redirections
pg
poltergeist
pry-rails
pul-assets!
rails (= 4.2.5)
rsolr (~> 1.0.6)
rspec-rails
Expand All @@ -540,6 +569,7 @@ DEPENDENCIES
social-share-button
spring
sqlite3
susy
turbolinks
uglifier (>= 1.3.0)
vcr
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
//= require turbolinks//
// Required by Blacklight
//= require blacklight/blacklight
//= require pul-assets

//= require_tree .
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@
*= require_tree .
*= require_self
*/

@import 'pul-assets';

@import 'utils/variables__bootstrap';

body {
margin-bottom: 0;
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/spotlight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
@import 'sir-trevor';
@import 'sir-trevor-icons';
@import 'bootstrap';
@import 'spotlight/spotlight';
@import 'spotlight/spotlight';
50 changes: 50 additions & 0 deletions app/views/layouts/spotlight/spotlight.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<!-- Mobile viewport optimization h5bp.com/ad -->
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width,initial-scale=1.0">

<!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading -->
<!--[if IEMobile]>
<meta http-equiv="cleartype" content="on">
<![endif]-->

<title><%= h(@page_title || application_name) %></title>
<link href="<%= current_exhibit ? spotlight.exhibit_opensearch_catalog_url(current_exhibit, format: 'xml') : main_app.opensearch_catalog_url(format: 'xml') %>" title="<%= application_name %>" type="application/opensearchdescription+xml" rel="search"/>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag :modernizr %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<%= content_for(:head) %>
<%= description %>
<%= twitter_card %>
<%= opengraph %>

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

</head>
<body class="<%= render_body_class %>">
<%= render partial: 'pul-assets/header_navbar' %>
<%= render partial: 'shared/masthead' %>
<%= content_for?(:header_content) ? yield(:header_content) : "" %>
<%= render partial: 'shared/ajax_modal' %>

<main id="main-content" role="main">
<div class="container">
<%= render partial: '/flash_msg', layout: 'shared/flash_messages' %>

<div class="row">
<%= content_for?(:content) ? yield(:content) : yield %>
</div>

<%= render :partial => 'shared/footer' %>
</body>
</html>
3 changes: 3 additions & 0 deletions app/views/shared/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<%= render 'pul-assets/footer' %>
<%= render 'shared/analytics' %>
33 changes: 33 additions & 0 deletions app/views/shared/_masthead.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<%= render 'spotlight/shared/report_a_problem' if show_contact_form? %>

<div class="masthead <%= 'image-masthead' if current_masthead %> <%= 'resource-masthead' if resource_masthead? %>">
<% if current_masthead %>
<span class='background-container' style="background-image: url('<%= image_path(current_masthead.image.cropped) %>')"></span>
<span class='background-container-gradient'></span>
<% end %>
<%= render 'shared/exhibit_navbar' if current_exhibit && resource_masthead? %>

<div class="container site-title-container">
<div class="site-title h1">
<% if content_for? :masthead %>
<%= content_for :masthead %>
<% elsif current_exhibit %>
<%= current_exhibit.title %>
<% if current_exhibit.subtitle.present? %>
<small><%= current_exhibit.subtitle %></small>
<% end %>
<% else %>
<%= application_name %>
<% if current_site.subtitle.present? %>
<small><%= current_site.subtitle %></small>
<% end %>
<% end %>
</div>
</div>

<%= render 'shared/exhibit_navbar' if current_exhibit && !resource_masthead? %>
</div>
</header>

<%= render 'shared/breadcrumbs' unless resource_masthead? %>
1 change: 0 additions & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ defaults: &defaults

development:
<<: *defaults
all_collection_manifest_url: "http://localhost:3000/iiif/collections"

test:
<<: *defaults
Expand Down

0 comments on commit b272bf4

Please sign in to comment.