Merge pull request #160 from nicofrand/dev

Add a print stylesheet
This commit is contained in:
Nicolas Lœuillet 2013-08-23 08:32:03 -07:00
commit e93c7c9c46
2 changed files with 20 additions and 0 deletions

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="./tpl/css/style.css" media="all">
<link rel="stylesheet" href="./tpl/css/style-{{ constant('THEME') }}.css" media="all" title="{{ constant('THEME') }} theme">
<link rel="stylesheet" href="./tpl/css/messages.css" media="all">
<link rel="stylesheet" href="./tpl/css/print.css" media="print">
<link href='//fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<script src="./tpl/js/jquery-2.0.3.min.js"></script>
<script type="text/javascript">$(document).ready(function(){$("body").prepend('<a href="#top" class="top_link" title="{% trans "back to top" %}"><img src="./tpl/img/{{ constant("THEME") }}/backtotop.png" alt={% trans "back to top" %}"/></a>');$(".top_link").css({position:"fixed",right:"15px",bottom:"15px",display:"none",padding:"20px",background:"#ccc","-moz-border-radius":"40px","-webkit-border-radius":"40px","border-radius":"40px",opacity:"0.9","z-index":"2000"});$(window).scroll(function(){posScroll=$(document).scrollTop();if(posScroll>=400)$(".top_link").fadeIn(600);else $(".top_link").fadeOut(600)})})</script>

19
tpl/css/print.css Normal file
View File

@ -0,0 +1,19 @@
body > header,
body > footer,
a.top_link,
div.tools,
header div
{
display: none !important;
}
article
{
border: none !important;
}
div.vieworiginal a::after
{
margin-left: 5px;
content: "("attr(href)")";
}