index.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Blockly X 幫助文檔</title>
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  7. <meta name="description" content="Description">
  8. <meta name="viewport"
  9. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  10. <!--<link rel="stylesheet" href="https://unpkg.com/docsify-themeable/dist/css/theme-simple.css">-->
  11. <link rel="stylesheet" href="vue.css">
  12. <meta name="theme-color" content="#2C4FCD">
  13. <link rel="apple-touch-icon" sizes="57x57" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-57x57.png">
  14. <link rel="apple-touch-icon" sizes="60x60" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-60x60.png">
  15. <link rel="apple-touch-icon" sizes="72x72" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-72x72.png">
  16. <link rel="apple-touch-icon" sizes="76x76" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-76x76.png">
  17. <link rel="apple-touch-icon" sizes="114x114" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-114x114.png">
  18. <link rel="apple-touch-icon" sizes="120x120" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-120x120.png">
  19. <link rel="apple-touch-icon" sizes="144x144" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-144x144.png">
  20. <link rel="apple-touch-icon" sizes="152x152" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-152x152.png">
  21. <link rel="apple-touch-icon" sizes="180x180" href="http://cocorobo.hk/cocoblockly/dev/img/apple-icon-180x180.png">
  22. <link rel="icon" type="image/png" sizes="192x192"
  23. href="http://cocorobo.hk/cocoblockly/dev/img/android-icon-192x192.png">
  24. <link rel="icon" type="image/png" sizes="32x32" href="http://cocorobo.hk/cocoblockly/dev/img/favicon-32x32.png">
  25. <link rel="icon" type="image/png" sizes="96x96" href="http://cocorobo.hk/cocoblockly/dev/img/favicon-96x96.png">
  26. <link rel="icon" type="image/png" sizes="16x16" href="http://cocorobo.hk/cocoblockly/dev/img/favicon-16x16.png">
  27. <link rel="manifest" href="http://cocorobo.hk/cocoblockly/dev/img/manifest.json">
  28. <meta name="msapplication-TileColor" content="#ffffff">
  29. <meta name="msapplication-TileImage" content="http://cocorobo.hk/cocoblockly/dev/img/ms-icon-144x144.png">
  30. <script type="text/javascript" src="colorpicker.js"></script>
  31. <link href="./lightbox.min.css" rel="stylesheet" />
  32. <style type="text/css">
  33. #picker {
  34. width: 200px;
  35. height: 200px
  36. }
  37. #slide {
  38. width: 30px;
  39. height: 200px
  40. }
  41. .headerInProgress {
  42. font-weight: bold;
  43. background-color: rgba(247, 114, 16, .9);
  44. color: white;
  45. padding: 16px 18px;
  46. margin-bottom: 40px;
  47. border-radius: 10px;
  48. border-left: 5px solid rgba(238, 91, 10, 1.0);
  49. }
  50. </style>
  51. </head>
  52. <body>
  53. <nav class="body-nav">
  54. <a href="#/" id="hk" class="active">繁</a>
  55. <a href="#/" id="cn">简</a>
  56. <!-- <a href="#/" id="aa">EN</a> -->
  57. </nav>
  58. <div id="app">Please wait...</div>
  59. <script>
  60. window.$docsify = {
  61. name: 'Blockly X Help',
  62. // repo: '',
  63. logo: './media/help-logo.png',
  64. themeColor: '#225dd5',
  65. homepage: 'index.md',
  66. auto2top: true,
  67. loadSidebar: true,
  68. loadSidebar: 'summary.md',
  69. maxLevel: 1,
  70. subMaxLevel: 1,
  71. // Search feature
  72. search: 'auto', // default
  73. search: [
  74. '/index.md',
  75. '/EX_01.md',
  76. '/EX_02.md',
  77. '/EX_03.md',
  78. ],
  79. // complete configuration parameters
  80. search: {
  81. maxAge: 86400000, // Expiration time, the default one day
  82. paths: 'auto', // or 'auto'
  83. placeholder: '點此處搜尋內容',
  84. // Localization
  85. placeholder: {
  86. '/': '點此處搜尋內容'
  87. },
  88. noData: '沒有搜尋到結果',
  89. // Localization
  90. noData: {
  91. '/': '沒有搜尋到結果'
  92. },
  93. // Headline depth, 1 - 6
  94. depth: 6
  95. },
  96. ga: 'UA-110081781-1'
  97. }
  98. </script>
  99. <script>
  100. var hash = window.location.hash;
  101. if (window.addEventListener) {
  102. window.addEventListener("hashchange", myFunction, false);
  103. } else if (window.attachEvent) {
  104. window.attachEvent("hashchange", myFunction);
  105. }
  106. // window.onhashchange(function () {
  107. // console.log(myFunction())
  108. // })
  109. function myFunction() {
  110. hash = window.location.hash;
  111. setTimeout(() => { imgload(); }, 500)
  112. }
  113. document.getElementById('hk').onclick = function () {
  114. window.location.href = "../hant/";
  115. }
  116. document.getElementById('cn').onclick = function () {
  117. window.location.href = "../hans/";
  118. }
  119. </script>
  120. <!-- docsify -->
  121. <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/docsify/4.9.4/docsify.min.js"></script>
  122. <script src="https://cdnjs.cloudflare.com/ajax/libs/docsify/4.9.4/plugins/search.min.js"></script> -->
  123. <script src="docsify.min.js"></script>
  124. <script src="search.min.js"></script>
  125. <!-- docsify-themeable -->
  126. <!-- <script src="//unpkg.com/docsify-themeable"></script>-->
  127. <script type="text/javascript" src="lightbox-plus-jquery.min.js"></script>
  128. <script>
  129. window.onload = imgload = function () {
  130. let imgs = document.getElementsByTagName('img')
  131. for (let i = 0; i < imgs.length - 1; i++) {
  132. imgs[i].onclick = function () {
  133. let parent = imgs[i].parentNode;
  134. let num = 0
  135. for (let j = 0; j < parent.children.length; j++) {
  136. let parentStr = decodeURI(parent.children[j] && parent.children[j].src) || '';
  137. let imgSrc = imgs[i].src
  138. if ((parentStr && parentStr.slice(parentStr.lastIndexOf('/') + 1, parentStr.lastIndexOf('.'))) === imgSrc.slice(imgSrc.lastIndexOf('/') + 1, imgSrc.lastIndexOf('.'))) {
  139. num = j;
  140. console.log(num)
  141. }
  142. }
  143. if (parent.tagName !== "A") {
  144. imgs[i].style.marginRight = 5 + 'px';
  145. let A = document.createElement('a')
  146. A.href = imgs[i].src;
  147. A.setAttribute('data-lightbox', imgs[i].src);
  148. A.appendChild(imgs[i]);
  149. parent.insertBefore(A, parent.children[num]);
  150. A.addEventListener('click', function () { })
  151. }
  152. }
  153. }
  154. }
  155. </script>
  156. </body>
  157. </html>