Skip to content

Commit

Permalink
Merge pull request #316 from pulibrary/print_css
Browse files Browse the repository at this point in the history
Add print css and fix bookmark button in record view. Closes #315 and…
  • Loading branch information
tampakis committed Nov 2, 2015
2 parents 7542992 + d96871b commit 42c558b
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,6 @@ DEPENDENCIES
turbolinks
uglifier (>= 1.3.0)
yajl-ruby

BUNDLED WITH
1.10.4
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@
@import 'components/bookmark-all';

@import 'shame';
@import 'print';
108 changes: 108 additions & 0 deletions app/assets/stylesheets/print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
http://www.phpied.com/delay-loading-your-print-css/
========================================================================== */

@media print {
*,
*:before,
*:after,
*:first-letter,
*:first-line {
background: transparent !important;
color: #000 !important; /* Black prints faster:
http://www.sanbeiji.com/archives/953 */
box-shadow: none !important;
text-shadow: none !important;
}

a,
a:visited {
text-decoration: underline;
}

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

abbr[title]:after {
content: " (" attr(title) ")";
}

/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/

a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}

pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}

/*
* Printing Tables:
* http://css-discuss.incutio.com/wiki/Printing_Tables
*/

thead {
display: table-header-group;
}
tbody {
display: table-row-group;
}

tr,
img {
page-break-inside: avoid;
}

td {
padding: 0;
}

img {
max-width: 100% !important;
}

p,
h2,
h3 {
orphans: 3;
widows: 3;
}

h2,
h3 {
page-break-after: avoid;
}

header,
footer,
#facets,
.documents-list .col-md-2,
.search-widgets,
.pagination,
.pagination-search-widgets,
#sidebar {
display: none;
}
.document dt, h1 {
font-weight: bold;
font-size: 1.2em;
}
#librarian-classic-views, .availability {
padding: 1em;
}
.umlaut-section, .availability {
padding: 0;
margin: 0 0 1em;
}

}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/shame.scss
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ header .navbar-nav > li > a {
text-align: center;
margin-bottom: 5px;
label {
padding: 0;
padding: 6px 12px;
}
}

Expand Down

0 comments on commit 42c558b

Please sign in to comment.