index.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>PPTXjs - Meshesha</title>
  7. <link rel="stylesheet" href="./css/pptxjs.css">
  8. <link rel="stylesheet" href="./css/nv.d3.min.css">
  9. <script type="text/javascript" src="./js/jquery-1.11.3.min.js"></script>
  10. <script type="text/javascript" src="./js/jszip.min.js"></script>
  11. <script type="text/javascript" src="./js/filereader.js"></script>
  12. <script type="text/javascript" src="./js/d3.min.js"></script>
  13. <script type="text/javascript" src="./js/nv.d3.min.js"></script>
  14. <script type="text/javascript" src="./js/pptxjs.js"></script>
  15. <script type="text/javascript" src="./js/divs2slides.js"></script>
  16. <script type="text/javascript" src="./js/jquery.fullscreen-min.js"></script>
  17. <script type="text/javascript">
  18. $(function() {
  19. var oldWidth, oldMargin ,isFullscreenMode=false;
  20. $("#fullscreen-btn").on("click", function(){
  21. if(!isFullscreenMode){
  22. oldWidth = $("#result .slide").css("width");
  23. oldMargin = $("#result .slide").css("margin");
  24. $("#result .slide").css({
  25. "width": "99%",
  26. "margin": "0 auto"
  27. })
  28. $("#result").toggleFullScreen();
  29. isFullscreenMode = true;
  30. }else{
  31. $("#result .slide").css({
  32. "width": oldWidth,
  33. "margin": oldMargin
  34. })
  35. $("#result").toggleFullScreen();
  36. isFullscreenMode = false;
  37. }
  38. });
  39. $(document).bind("fullscreenchange", function() {
  40. if(!$(document).fullScreen()){
  41. $("#result .slide").css({
  42. "width": oldWidth,
  43. "margin": oldMargin
  44. })
  45. }
  46. });
  47. });
  48. </script>
  49. <style>
  50. html, body { margin: 0; padding: 0; }
  51. #warper { margin-right: auto; margin-left: auto; width: 900px; }
  52. </style>
  53. </head>
  54. <body>
  55. <div id="warper">
  56. <input id="uploadFileInput" type="file" />
  57. <br><br>
  58. <div id="container">
  59. <input id="fullscreen-btn" type="button" value="Fullscreen" />
  60. <br>
  61. <div id="result"></div>
  62. </div>
  63. </div>
  64. <script>
  65. $("#result").pptxToHtml({
  66. pptxFileUrl: "Sample_12.pptx",
  67. fileInputId: "uploadFileInput",
  68. slideMode: false,
  69. keyBoardShortCut: false,
  70. slideModeConfig: { //on slide mode (slideMode: true)
  71. first: 1,
  72. nav: false, /** true,false : show or not nav buttons*/
  73. navTxtColor: "white", /** color */
  74. navNextTxt:"&#8250;", //">"
  75. navPrevTxt: "&#8249;", //"<"
  76. showPlayPauseBtn: false,/** true,false */
  77. keyBoardShortCut: false, /** true,false */
  78. showSlideNum: false, /** true,false */
  79. showTotalSlideNum: false, /** true,false */
  80. autoSlide: false, /** false or seconds (the pause time between slides) , F8 to active(keyBoardShortCut: true) */
  81. randomAutoSlide: false, /** true,false ,autoSlide:true */
  82. loop: false, /** true,false */
  83. background: "black", /** false or color*/
  84. transition: "default", /** transition type: "slid","fade","default","random" , to show transition efects :transitionTime > 0.5 */
  85. transitionTime: 1 /** transition time in seconds */
  86. }
  87. });
  88. </script>
  89. </body>
  90. </html>