Просмотр исходного кода

fix #96 Bug: all strings appear on presentation mode

Yuki Takei 8 лет назад
Родитель
Сommit
96b8f1e3da
2 измененных файлов с 8 добавлено и 0 удалено
  1. 1 0
      config/webpack.common.js
  2. 7 0
      resource/js/legacy/crowi-presentation.js

+ 1 - 0
config/webpack.common.js

@@ -100,6 +100,7 @@ module.exports = function (options) {
       new webpack.ProvidePlugin({
       new webpack.ProvidePlugin({
         jQuery: "jquery",
         jQuery: "jquery",
         $: "jquery",
         $: "jquery",
+        hljs: "reveal.js/plugin/highlight/highlight",
       }),
       }),
 
 
       // omit moment/locale/*.js
       // omit moment/locale/*.js

+ 7 - 0
resource/js/legacy/crowi-presentation.js

@@ -17,6 +17,9 @@ Reveal.initialize({
   center: true,
   center: true,
   transition: 'slide',
   transition: 'slide',
 
 
+  //// This specification method can't be used
+  ////   sice deleting symlink prevented `src` from being resolved -- 2017.06.15 Yuki Takei
+  //
   // Optional libraries used to extend on reveal.js
   // Optional libraries used to extend on reveal.js
   // dependencies: [
   // dependencies: [
   //   { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
   //   { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
@@ -35,6 +38,10 @@ require.ensure([], () => {
   require('reveal.js/plugin/highlight/highlight.js');
   require('reveal.js/plugin/highlight/highlight.js');
   require('reveal.js/plugin/zoom-js/zoom.js');
   require('reveal.js/plugin/zoom-js/zoom.js');
   require('reveal.js/plugin/notes/notes.js');
   require('reveal.js/plugin/notes/notes.js');
+
+  // fix https://github.com/weseek/crowi-plus/issues/96
+  Reveal.slide(0,0);
+  Reveal.sync();
 })
 })
 
 
 Reveal.addEventListener('ready', function(event) {
 Reveal.addEventListener('ready', function(event) {