Skip to content

Commit

Permalink
adds print stylesheets
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Aug 14, 2014
1 parent 25c581e commit 719115e
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 1 deletion.
10 changes: 10 additions & 0 deletions app/assets/stylesheets/print.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

@import 'print/bootstrap-variables';
@import 'sul-variables';
@import 'searchworks-mixins';
@import 'blacklight';
@import 'searchworks';
@import 'font-awesome';
@import '_sul-icons-rails';
@import 'print/layout';
@import 'print/styles';
3 changes: 3 additions & 0 deletions app/assets/stylesheets/print/bootstrap-variables.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Bootstrap variables for print sheets

$font-size-base: 12px;
9 changes: 9 additions & 0 deletions app/assets/stylesheets/print/layout.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.record-panels.col-md-4{
@extend .col-xs-4;
}
.record-sections.col-md-8{
@extend .col-xs-8;
}
#content.col-sm-7.col-md-8 {
@extend .col-xs-12;
}
91 changes: 91 additions & 0 deletions app/assets/stylesheets/print/styles.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
.print-header {
padding-left: 10px;
padding-right: 10px;
text-align: right;
h1 {
font-size: floor(($font-size-base * 1.6))
}
h2 {
border: none;
font-size: floor(($font-size-base * 1.4))
}
}

.breadcrumb.row {
float: left;
}

#appliedParams {
float:left;
}

.search_num_of_results {
margin-top: -45px;
}

// Do not display these elements
.navbar, #topnav, #search-navbar-container, #facets, #sortAndPerPage, .record-toolbar, a.remove, .index-document-functions, footer, #sul-footer-container, #global-footer, .additional-results, .pagination, .record-side-nav, .library-location-heading img, .record-browse-nearby, .tech-details a, a.btn, .gallery-buttons, .preview-button-container, .google-preview {
display: none !important;
}
a[href]:after {
content: "";
}

h3.index_title {
a[href]:after {
content: " (" attr(href) ")";
}
}

a, a:visited {
text-decoration: none; border-bottom: none;
}
#documents .document, #documents .brief-document, #documents .gallery-document {
border: 0;
border-bottom: 1px solid #ddd; margin: 0;
}
.gallery .gallery-document {
height: 350px;
}
.callnumber-bar {
font-weight: normal; font-size: 1.1em;
}
#appliedParams {
padding: 0;
}
.constraint-value {
border: 0;
}
.accordion-section .snippet {
display: none;
}
.accordion-section .details {
display: block !important; border: 0;
}
.details dl {
margin-bottom: 0;
}
.accordion-section a.header {
text-align: left; padding-left: 0; font-weight: bold;
}
.accordion-section a.header i {
display: none;
}
.panel-library-location .library-location-heading-text {
padding-left: 0;
}
.document h1 {
margin-top: 0; padding-top: 0;
}
.record-sections .section {
padding-bottom: 0;
}
.panel-heading {
padding-left: 0;
}
#masthead {
border: none;
}
#su-content {
padding-bottom: 0!important;
}
3 changes: 2 additions & 1 deletion app/views/layouts/searchworks.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<%= opensearch_description_tag application_name, opensearch_catalog_path(:format => 'xml', :only_path => false) %>
<%= favicon_link_tag asset_path('favicon.ico') %>
<%= stylesheet_link_tag "application", media: "all" %>
<%= stylesheet_link_tag 'print', media: 'print' %>
<link href="https://www.stanford.edu/su-identity/css/su-identity.css" rel="stylesheet">
<%= stylesheet_link_tag "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" %>
<%= javascript_include_tag "application" %>
Expand Down Expand Up @@ -45,7 +46,7 @@
<%= render_masthead_partial %>

<%= render partial: 'shared/ajax_modal' %>

<%= render 'shared/print_header' %>
<section id="main-container" role="main" data-analytics-id="<%= Settings.GOOGLE_ANALYTICS_ID %>">
<%= render :partial=>'/flash_msg', layout: 'shared/flash_messages' %>

Expand Down
4 changes: 4 additions & 0 deletions app/views/shared/_print_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class='visible-print print-header pull-right'>
<h1>SearchWorks Catalog</h1>
<h2>Stanford University Libraries</h2>
</div>
1 change: 1 addition & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rails.application.config.assets.precompile += %w( print.css )

0 comments on commit 719115e

Please sign in to comment.