diff options
author | Sheogorath | 2018-06-24 23:50:19 +0200 |
---|---|---|
committer | Sheogorath | 2018-06-24 23:50:38 +0200 |
commit | 04d16e4d6efa771ece8770c726beca29b9d2ca61 (patch) | |
tree | ee0ddaf62383f71262afadd4f44e6c4fcddf5305 /public | |
parent | d87505d5836ea1bad60c0e2c2a8aa25b9b4e1590 (diff) |
Add Print icon to slide view
It redirects the user to the print view of the document. I claim that
people should either be smart enough to use ctrl+P or ask someone who
knows how to print a webpage. I don't want to babysit our users.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to '')
-rw-r--r-- | public/docs/slide-example.md | 8 | ||||
-rw-r--r-- | public/js/slide.js | 1 | ||||
-rw-r--r-- | public/views/slide.ejs | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/public/docs/slide-example.md b/public/docs/slide-example.md index e2e024b1..411f31d4 100644 --- a/public/docs/slide-example.md +++ b/public/docs/slide-example.md @@ -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 diff --git a/public/js/slide.js b/public/js/slide.js index 59a352ec..1eb8dfd4 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -14,6 +14,7 @@ window.lastchangetime = window.lastchangeui.time.attr('data-updatetime') updateLastChange() const url = window.location.pathname $('.ui-edit').attr('href', `${url}/edit`) +$('.ui-print').attr('href', `${url}?print-pdf`) $(document).ready(() => { // tooltip diff --git a/public/views/slide.ejs b/public/views/slide.ejs index 7b9ae29d..d9be51f9 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -69,7 +69,7 @@ <span class="text-uppercase ui-status-lastchange"></span> <span class="ui-lastchange text-uppercase" data-createtime="<%- createtime %>" data-updatetime="<%- updatetime %>"></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> <% if(ownerprofile && owner !== lastchangeuser) { %> <span class="ui-owner"> |