Commit a7fb3dffac9cdb0c92ade7245a1a65c624cefaa8
1 parent
40db629428
Exists in
master
+ On renomme Wize_Print_Template.html avec l'extension tpl pour qu'il
n'apparaisse pas dans la liste des exports possibles. + On remplace le Wize_Print.html original par un message indiquant d'éxécuter wize.rb -i + correction du wize.rb pour tenir compte du changement de nom du template print
Showing 4 changed files with 9 additions and 69 deletions Side-by-side Diff
templates/html/Wize_Print.html
| ... | ... | @@ -2,78 +2,18 @@ |
| 2 | 2 | <html> |
| 3 | 3 | <head> |
| 4 | 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 | - <title>[% title %]</title> | |
| 5 | + <title>Need install</title> | |
| 6 | 6 | <meta name='Generator' content='[% generator.name %]'> |
| 7 | - <!-- ATTENTION Le template Print ne supporte pas les ressources, | |
| 8 | - Il faut mettre des chemins absolus sur les fichiers :( --> | |
| 9 | - <link rel="stylesheet" | |
| 10 | - href="file:////home/daniau/.local/share/zim/templates/html/print-common/zim-variables.css" > | |
| 11 | - <link rel="stylesheet" | |
| 12 | - href="file:////home/daniau/.local/share/zim/templates/html/common/zim-style.css" > | |
| 13 | - <link rel="stylesheet" | |
| 14 | - href="file:////home/daniau/.local/share/zim/templates/html/common/zim-table-style.css" > | |
| 15 | - <link rel="stylesheet" | |
| 16 | - href="file:////home/daniau/.local/share/zim/templates/html/common/zim-special.css" > | |
| 17 | - <link rel="stylesheet" | |
| 18 | - href="file:////home/daniau/.local/share/zim/templates/html/common/zim-hljs.css" > | |
| 19 | - <style type='text/css'> | |
| 20 | - | |
| 7 | + <style> | |
| 21 | 8 | * { font-family: serif } |
| 22 | - | |
| 23 | - /* Centre les images mais elles sont coupées aux sauts de page à l'impression */ | |
| 24 | - /*img { | |
| 25 | - display: block; | |
| 26 | - margin-left: auto; | |
| 27 | - margin-right: auto; | |
| 28 | - }*/ | |
| 29 | - | |
| 30 | 9 | </style> |
| 31 | - | |
| 32 | - <!-- Themes clair : | |
| 33 | - atom-one-light.css, vs.css | |
| 34 | - Themes sombres : | |
| 35 | - agate.css, vs2015.css, atom-one-dark.css | |
| 36 | - Demo live : https://highlightjs.org/static/demo/ --> | |
| 37 | - <link rel="stylesheet" | |
| 38 | - href="file:////home/daniau/.local/share/zim/templates/html/common/hljs/styles/atom-one-light-wb.css" > | |
| 39 | - | |
| 40 | - <!-- hljs --> | |
| 41 | - <script src="file:////home/daniau/.local/share/zim/templates/html/common/hljs/highlight.pack.js"></script> | |
| 42 | - | |
| 43 | - <script src="file:////home/daniau/.local/share/zim/templates/html/print-common/notice.js"></script> | |
| 44 | - | |
| 45 | - <script> | |
| 46 | - function testLogo() { | |
| 47 | - logo=document.getElementById("logoImgId"); | |
| 48 | - logodiv=document.getElementById("logoDivId"); | |
| 49 | - if (logo.naturalHeight == 0) { | |
| 50 | - logodiv.setAttribute("style","display:none;"); | |
| 51 | - } | |
| 52 | - } | |
| 53 | - </script> | |
| 54 | 10 | </head> |
| 55 | -<body onload="testLogo()"> | |
| 56 | - | |
| 57 | -[% options.empty_lines = "default" %] | |
| 58 | - | |
| 59 | -<!-- Wiki content --> | |
| 60 | - | |
| 61 | -<div id="logoDivId" style="float:right"> | |
| 62 | -<img id="logoImgId" src="file:////home/daniau/.local/share/zim/templates/html/print-common/logo.png" alt=' '> | |
| 63 | -</div> | |
| 64 | - | |
| 65 | - | |
| 66 | -[% FOR page IN pages %] | |
| 67 | - [% page.content %] | |
| 68 | -[% END %] | |
| 69 | - | |
| 70 | -<!-- End wiki content --> | |
| 71 | - | |
| 72 | -<div id="foot-notice" class="notice"></div> | |
| 73 | - | |
| 74 | -<script src="file:////home/daniau/.local/share/zim/templates/html/common/go-hljs.js"></script> | |
| 75 | -<script>printNotice()</script> | |
| 76 | - | |
| 11 | +<body> | |
| 12 | + <h1>Need install</h1> | |
| 13 | + <p>You need to run first (better quit zim before)</p> | |
| 14 | + <pre> | |
| 15 | + wize.rb -i | |
| 16 | + </pre> | |
| 77 | 17 | </body> |
| 78 | 18 | |
| 79 | 19 | </html> |
templates/html/Wize_Print_Template.html
| 1 | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| 2 | -<html> | |
| 3 | -<head> | |
| 4 | - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| 5 | - <title>[% title %]</title> | |
| 6 | - <meta name='Generator' content='[% generator.name %]'> | |
| 7 | - <!-- ATTENTION Le template Print ne supporte pas les ressources, | |
| 8 | - Il faut mettre des chemins absolus sur les fichiers :( --> | |
| 9 | - <link rel="stylesheet" | |
| 10 | - href="file:///%%HOME%%/.local/share/zim/templates/html/print-common/zim-variables.css" > | |
| 11 | - <link rel="stylesheet" | |
| 12 | - href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-style.css" > | |
| 13 | - <link rel="stylesheet" | |
| 14 | - href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-table-style.css" > | |
| 15 | - <link rel="stylesheet" | |
| 16 | - href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-special.css" > | |
| 17 | - <link rel="stylesheet" | |
| 18 | - href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-hljs.css" > | |
| 19 | - <style type='text/css'> | |
| 20 | - | |
| 21 | - * { font-family: serif } | |
| 22 | - | |
| 23 | - /* Centre les images mais elles sont coupées aux sauts de page à l'impression */ | |
| 24 | - /*img { | |
| 25 | - display: block; | |
| 26 | - margin-left: auto; | |
| 27 | - margin-right: auto; | |
| 28 | - }*/ | |
| 29 | - | |
| 30 | - </style> | |
| 31 | - | |
| 32 | - <!-- Themes clair : | |
| 33 | - atom-one-light.css, vs.css | |
| 34 | - Themes sombres : | |
| 35 | - agate.css, vs2015.css, atom-one-dark.css | |
| 36 | - Demo live : https://highlightjs.org/static/demo/ --> | |
| 37 | - <link rel="stylesheet" | |
| 38 | - href="file:///%%HOME%%/.local/share/zim/templates/html/common/hljs/styles/atom-one-light-wb.css" > | |
| 39 | - | |
| 40 | - <!-- hljs --> | |
| 41 | - <script src="file:///%%HOME%%/.local/share/zim/templates/html/common/hljs/highlight.pack.js"></script> | |
| 42 | - | |
| 43 | - <script src="file:///%%HOME%%/.local/share/zim/templates/html/print-common/notice.js"></script> | |
| 44 | - | |
| 45 | - <script> | |
| 46 | - function testLogo() { | |
| 47 | - logo=document.getElementById("logoImgId"); | |
| 48 | - logodiv=document.getElementById("logoDivId"); | |
| 49 | - if (logo.naturalHeight == 0) { | |
| 50 | - logodiv.setAttribute("style","display:none;"); | |
| 51 | - } | |
| 52 | - } | |
| 53 | - </script> | |
| 54 | -</head> | |
| 55 | -<body onload="testLogo()"> | |
| 56 | - | |
| 57 | -[% options.empty_lines = "default" %] | |
| 58 | - | |
| 59 | -<!-- Wiki content --> | |
| 60 | - | |
| 61 | -<div id="logoDivId" style="float:right"> | |
| 62 | -<img id="logoImgId" src="file:///%%HOME%%/.local/share/zim/templates/html/print-common/logo.png" alt=' '> | |
| 63 | -</div> | |
| 64 | - | |
| 65 | - | |
| 66 | -[% FOR page IN pages %] | |
| 67 | - [% page.content %] | |
| 68 | -[% END %] | |
| 69 | - | |
| 70 | -<!-- End wiki content --> | |
| 71 | - | |
| 72 | -<div id="foot-notice" class="notice"></div> | |
| 73 | - | |
| 74 | -<script src="file:///%%HOME%%/.local/share/zim/templates/html/common/go-hljs.js"></script> | |
| 75 | -<script>printNotice()</script> | |
| 76 | - | |
| 77 | -</body> | |
| 78 | - | |
| 79 | -</html> |
templates/html/Wize_Print_Template.tpl
| 1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| 2 | +<html> | |
| 3 | +<head> | |
| 4 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| 5 | + <title>[% title %]</title> | |
| 6 | + <meta name='Generator' content='[% generator.name %]'> | |
| 7 | + <!-- ATTENTION Le template Print ne supporte pas les ressources, | |
| 8 | + Il faut mettre des chemins absolus sur les fichiers :( --> | |
| 9 | + <link rel="stylesheet" | |
| 10 | + href="file:///%%HOME%%/.local/share/zim/templates/html/print-common/zim-variables.css" > | |
| 11 | + <link rel="stylesheet" | |
| 12 | + href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-style.css" > | |
| 13 | + <link rel="stylesheet" | |
| 14 | + href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-table-style.css" > | |
| 15 | + <link rel="stylesheet" | |
| 16 | + href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-special.css" > | |
| 17 | + <link rel="stylesheet" | |
| 18 | + href="file:///%%HOME%%/.local/share/zim/templates/html/common/zim-hljs.css" > | |
| 19 | + <style type='text/css'> | |
| 20 | + | |
| 21 | + * { font-family: serif } | |
| 22 | + | |
| 23 | + /* Centre les images mais elles sont coupées aux sauts de page à l'impression */ | |
| 24 | + /*img { | |
| 25 | + display: block; | |
| 26 | + margin-left: auto; | |
| 27 | + margin-right: auto; | |
| 28 | + }*/ | |
| 29 | + | |
| 30 | + </style> | |
| 31 | + | |
| 32 | + <!-- Themes clair : | |
| 33 | + atom-one-light.css, vs.css | |
| 34 | + Themes sombres : | |
| 35 | + agate.css, vs2015.css, atom-one-dark.css | |
| 36 | + Demo live : https://highlightjs.org/static/demo/ --> | |
| 37 | + <link rel="stylesheet" | |
| 38 | + href="file:///%%HOME%%/.local/share/zim/templates/html/common/hljs/styles/atom-one-light-wb.css" > | |
| 39 | + | |
| 40 | + <!-- hljs --> | |
| 41 | + <script src="file:///%%HOME%%/.local/share/zim/templates/html/common/hljs/highlight.pack.js"></script> | |
| 42 | + | |
| 43 | + <script src="file:///%%HOME%%/.local/share/zim/templates/html/print-common/notice.js"></script> | |
| 44 | + | |
| 45 | + <script> | |
| 46 | + function testLogo() { | |
| 47 | + logo=document.getElementById("logoImgId"); | |
| 48 | + logodiv=document.getElementById("logoDivId"); | |
| 49 | + if (logo.naturalHeight == 0) { | |
| 50 | + logodiv.setAttribute("style","display:none;"); | |
| 51 | + } | |
| 52 | + } | |
| 53 | + </script> | |
| 54 | +</head> | |
| 55 | +<body onload="testLogo()"> | |
| 56 | + | |
| 57 | +[% options.empty_lines = "default" %] | |
| 58 | + | |
| 59 | +<!-- Wiki content --> | |
| 60 | + | |
| 61 | +<div id="logoDivId" style="float:right"> | |
| 62 | +<img id="logoImgId" src="file:///%%HOME%%/.local/share/zim/templates/html/print-common/logo.png" alt=' '> | |
| 63 | +</div> | |
| 64 | + | |
| 65 | + | |
| 66 | +[% FOR page IN pages %] | |
| 67 | + [% page.content %] | |
| 68 | +[% END %] | |
| 69 | + | |
| 70 | +<!-- End wiki content --> | |
| 71 | + | |
| 72 | +<div id="foot-notice" class="notice"></div> | |
| 73 | + | |
| 74 | +<script src="file:///%%HOME%%/.local/share/zim/templates/html/common/go-hljs.js"></script> | |
| 75 | +<script>printNotice()</script> | |
| 76 | + | |
| 77 | +</body> | |
| 78 | + | |
| 79 | +</html> |
wize.rb
| ... | ... | @@ -121,7 +121,7 @@ |
| 121 | 121 | def installWize |
| 122 | 122 | Dir.chdir($zimHtmlTemplateDir) |
| 123 | 123 | begin |
| 124 | - printTemplate = File.new("Wize_Print_Template.html", "r") | |
| 124 | + printTemplate = File.new("Wize_Print_Template.tpl", "r") | |
| 125 | 125 | rescue |
| 126 | 126 | puts "cannot open print file for reading" |
| 127 | 127 | exit |