Merge pull request #863 from hackmdio/feature/slidePrint

Add Print icon to slide view
This commit is contained in:
Christoph (Sheogorath) Kern 2018-06-26 21:41:18 +02:00 committed by GitHub
commit c7745f6b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -266,4 +266,12 @@ Press `B` or `.` on your keyboard to pause the presentation. This is helpful whe
--- ---
## Print your Slides
Down below you can find a print icon<i class="fa fa-fw fa-print"></i>.
After you click on it, use the print function of your browser (either CTRL+P or cmd+P) to print the slides as PDF.
---
# The End # The End

View file

@ -14,6 +14,7 @@ window.lastchangetime = window.lastchangeui.time.attr('data-updatetime')
updateLastChange() updateLastChange()
const url = window.location.pathname const url = window.location.pathname
$('.ui-edit').attr('href', `${url}/edit`) $('.ui-edit').attr('href', `${url}/edit`)
$('.ui-print').attr('href', `${url}?print-pdf`)
$(document).ready(() => { $(document).ready(() => {
// tooltip // tooltip

View file

@ -69,7 +69,7 @@
&nbsp;<span class="text-uppercase ui-status-lastchange"></span> &nbsp;<span class="text-uppercase ui-status-lastchange"></span>
<span class="ui-lastchange text-uppercase" data-createtime="<%- createtime %>" data-updatetime="<%- updatetime %>"></span> <span class="ui-lastchange text-uppercase" data-createtime="<%- createtime %>" data-updatetime="<%- updatetime %>"></span>
</span> </span>
<span class="pull-right"><%- viewcount %> views <a href="#" class="ui-edit" title="Edit this note"><i class="fa fa-fw fa-pencil"></i></a></span> <span class="pull-right"><%- viewcount %> views <a href="#" class="ui-edit" title="Edit this note"><i class="fa fa-fw fa-pencil"></i></a><a class="ui-print" href="" title="Open print view"><i class="fa fa-fw fa-print"></i></a></span>
<br> <br>
<% if(ownerprofile && owner !== lastchangeuser) { %> <% if(ownerprofile && owner !== lastchangeuser) { %>
<span class="ui-owner"> <span class="ui-owner">