Commit 01d65a8f authored by Robert Lyon's avatar Robert Lyon

Bug 692769: Print style sheet as part of sass styles

Adding a lib/_print.scss file containing an @media print clause
to do some basic styling of the site in print mode

This is based on the work of Kevin Rickis here
https://github.com/edictdev/print

behatnotneeded

Change-Id: I20cc1e526d28d2cf06b21bed927f3f0f2929edf6
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 17ef60df
@media print {
/* Hide urls that are printed next to links */
a[href]:after {
content: none !important;
}
/* But show that they were links */
a[href] {
text-decoration: underline;
}
/* Hide some structural parts of page */
#nav, .collection-nav, #collection-nav,
.site-messages, .sidebar {
display: none;
}
/* Hide the comment area */
.add-comment-container {
display: none;
}
/* Hide the submission form */
.submissionform {
display: none;
}
/* Hide any editing type links */
.detail-link,
.addcomment,
.remove-widgets {
display: none;
}
/* Hide the buttons */
.btn-group,
.btn-default,
.btn-primary {
display: none !important;
}
/* Hide the footer */
.footer {
display: none !important;
}
/* Hide the "How many hits" metadata */
.metadata {
display: none !important;
}
/* Hide the links to download videos and images */
.media-download{
display: none !important;
content: none !important;
}
/* Hide the file upload / create folder forms */
.fileupload, #createfolder, #downloadfolder {
display: none;
}
/* Allow things hidden by collapsed expanding areas to show */
.collapse {
display: block;
visibility: visible;
}
body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
@page {
size: A4;
margin: 0;
}
.page {
background: white;
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
.subpage {
padding: 1cm;
border: 5px red solid;
height: 256mm;
outline: 2cm #FFEAEA solid;
}
}
......@@ -97,6 +97,7 @@
@import "../lib/draggable";
@import "../lib/graph";
@import "../lib/elasticsearch";
@import "../lib/print";
// Keep these files last to override all other style sheets
@import "../custom";
......
......@@ -48,12 +48,18 @@
</a>
{/if}
{if $LOGGEDIN && !$userisowner}
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="icon icon-ellipsis-h icon-lg" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag="more..."}</span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li>
<a title="{str tag=print section=view}" id="print_link" href="#" onclick="window.print(); return false;">
<span class="icon icon-print left" role="presentation" aria-hidden="true"></span>
{str tag=print section=view}
</a>
</li>
{if $LOGGEDIN && !$userisowner}
<li>
<a id="toggle_watchlist_link" class="watchlist" href="">
{if $viewbeingwatched}
......@@ -71,8 +77,8 @@
{str tag=reportobjectionablematerial}
</a>
</li>
{/if}
</ul>
{/if}
</div>
<div class="with-heading text-small">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment