Introduce and use print.css
This commit is contained in:
parent
c6073806de
commit
3e3ed87b18
17
app/assets/stylesheets/print.css
Normal file
17
app/assets/stylesheets/print.css
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@media print {
|
||||||
|
nav, input, button, .favNav {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@page {
|
||||||
|
size: A4;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
counter-reset: chapternum figurenum;
|
||||||
|
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-size: 11pt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -3,4 +3,6 @@
|
|||||||
<%= link_to 'Courses', favorites_courses_url %>
|
<%= link_to 'Courses', favorites_courses_url %>
|
||||||
<%= link_to 'Theses', favorites_theses_url %>
|
<%= link_to 'Theses', favorites_theses_url %>
|
||||||
<%= link_to 'Projects', favorites_projects_url %>
|
<%= link_to 'Projects', favorites_projects_url %>
|
||||||
|
|
||||||
|
<%= link_to "Print", '#', onclick: "print()" %>
|
||||||
</div>
|
</div>
|
||||||
@ -5,7 +5,9 @@
|
|||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= csp_meta_tag %>
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
|
||||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||||
|
<%= stylesheet_link_tag 'print', media: 'print' %>
|
||||||
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||||
|
|
||||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||||
@ -43,4 +45,5 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user