splash.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <!DOCTYPE html>
  2. <!--
  3. * Copyright (c) 2021, 2024, 5 Mode and other contributors
  4. * Released under the MIT license
  5. *
  6. * This file is part of SqueeJS.
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
  9. * and associated documentation files (the "Software"), to deal in the Software
  10. * without restriction, including without limitation the rights to use, copy, modify, merge, publish,
  11. * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
  12. * Software is furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included in all copies or
  15. * substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  18. * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  19. * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  20. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  22. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23. *
  24. * splash.html
  25. *
  26. * SqueeJS Doc and examples for the Splash functionalities.
  27. *
  28. * @author Daniele Bonini <my25mb@aol.com>
  29. * @copyrights (c) 2016, 2024, 5 Mode
  30. * @license https://opensource.org/licenses/MIT
  31. * -->
  32. <html>
  33. <head>
  34. <title>Splash: doc and examples.</title>
  35. <meta charset="UTF-8">
  36. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  37. <link rel="shortcut icon" href="favicon.ico" />
  38. <meta name="description" content="Welcome to Squeejs! Let everyone squeez its javascript code."/>
  39. <meta name="author" content="5 Mode"/>
  40. <meta name="robots" content="index,follow"/>
  41. <meta name="keywords" content="Squeejs,javascript,framework,squeejs.com,MIT,license,5 Mode"/>
  42. <script src="/js/common.js" type="text/javascript"></script>
  43. <script src="/js/squeejs.js?r=3445566" type="text/javascript"></script>
  44. <link href="/css/style.css?v=1631827555" type="text/css" rel="stylesheet">
  45. </head>
  46. <body style="border:0px solid lightgray; padding:20px; margin-right:20px;">
  47. <div id="content" style="max-width:1000px;">
  48. <a href="/"><img src="/res/logo.png" style="width:300px;background:#FFFFFF;border:1px solid gray;"></a><br>
  49. <br><br><br>
  50. <h2>SPLASH</h2>
  51. Here the Javascript code available to be inserted in your web page to implement a <i>splash screen</i>.<br>
  52. <br>
  53. Please check the <b>context</b> of implementation for each of the functions.<br>
  54. <br><br><br>
  55. <h2>Code:</h2>
  56. <pre>
  57. /**
  58. * SQJS.initAppWithSplash
  59. *
  60. * Init the web app to start with the Splash
  61. *
  62. * Context:
  63. * - Call this function in the load event (ie. by a window.AddEventListener) of the webpage
  64. *
  65. * @param {string} mainContainerId, the container ID for the webpage content
  66. * @param {string} title, the title of the splash screen
  67. * @param {string} logoURI, the logo to display in the splash screen
  68. * @param {string} BG, the background for the splash screen
  69. * @param {int} timeout, the splash screen timeout
  70. * @returns {void}
  71. *
  72. * This function is part of SqueeJS.
  73. */
  74. <b>function SQJS.initAppWithSplash(mainContainerId, title, logoURI, BG, timeout){};</b>
  75. /**
  76. * SQJS.initAppWithoutSplash
  77. *
  78. * Init the web app to start withOUT the Splash
  79. *
  80. * Context:
  81. * - Call this function in the load event (ie. by a window.AddEventListener) of the webpage
  82. *
  83. * @param {string} mainContainerId, the container ID for the webpage content
  84. * @returns {void}
  85. *
  86. * This function is part of SqueeJS.
  87. */
  88. <b>function SQJS.initAppWithoutSplash(mainContainerId){};</b>
  89. </pre>
  90. <br><br>
  91. <h2>Usage example:</h2>
  92. <pre style="background:lightyellow;width:100%;white-space: pre-wrap;">
  93. &lt;script&gt;
  94. window.addEventListener("load", function() {
  95. SQJS.initAppWithSplash("content", "SqueeJS", "/res/logo.png", "#FFFFFF", 2500);
  96. }, true);
  97. &lt;/script&gt;
  98. </pre>
  99. <div style="clear:both; margin:auto;">
  100. <br><br><br><br><br><br><br><br><br>
  101. </div>
  102. <div class="footer" style="float:right">
  103. <div id="footerCont">&nbsp;</div>
  104. <div id="footer"><span style="background:#FFFFFF;color:black;opacity:1.0;margin-right:10px;">&nbsp;&nbsp;<a href="https://5mode.com/dd.html">Disclaimer</a>&nbsp;&nbsp;A <a href="http://5mode.com">5 Mode</a> project and <a href="http://demo.5mode.com">WYSIWYG</a> system. MIT License.</span></div>
  105. </div>
  106. </div>
  107. <script>
  108. function setFooterPos() {
  109. if (document.getElementById("footerCont")) {
  110. tollerance = 12;
  111. footerContHeight = 35;
  112. footerHeight = 32;
  113. document.getElementById("footerCont").style.top = parseInt( getDocHeight2() - footerContHeight - tollerance ) + "px";
  114. document.getElementById("footer").style.top = parseInt( getDocHeight2() - footerHeight - tollerance) + "px";
  115. }
  116. }
  117. //setFooterPos();
  118. window.addEventListener("load", function() {
  119. SQJS.initAppWithSplash("content", "SqueeJS", "/res/logo.png", "#FFFFFF", 2500);
  120. setTimeout("setFooterPos()", 3500);
  121. }, true);
  122. </script>
  123. <!-- Yandex.Metrika counter -->
  124. <script type="text/javascript" >
  125. (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
  126. m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
  127. (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
  128. ym(90317440, "init", {
  129. clickmap:true,
  130. trackLinks:true,
  131. accurateTrackBounce:true
  132. });
  133. </script>
  134. <noscript><div><img src="https://mc.yandex.ru/watch/90317440" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  135. <!-- /Yandex.Metrika counter -->
  136. </body>
  137. </html>