index.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <!DOCTYPE html>
  2. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <meta name="style" content="day1"/>
  6. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  7. <!--
  8. Copyright 2021, 2024 5 Mode
  9. This file is part of SnipSwap.
  10. SnipSwap is free software: you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation, either version 3 of the License, or
  13. (at your option) any later version.
  14. SnipSwap is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. GNU General Public License for more details.
  18. You should have received a copy of the GNU General Public License
  19. along with SnipSwap. If not, see <https://www.gnu.org/licenses/>.
  20. -->
  21. <title>SwapCode: Swapping code like burgers..</title>
  22. <link rel="shortcut icon" href="Public/favicon.ico" />
  23. <meta name="description" content="Welcome to SnipSwap"/>
  24. <meta name="author" content="5 Mode"/>
  25. <meta name="keywords" content="SwapCode,snippet,code,swap.swapping,on,premise,solution"/>
  26. <script src="Public/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  27. <script src="Public/js/common.js" type="text/javascript"></script>
  28. <script src="Public/js/bootstrap.min.js" type="text/javascript"></script>
  29. <script src="Public/js/sha.js" type="text/javascript"></script>
  30. <link href="Public/css/bootstrap.min.css" type="text/css" rel="stylesheet">
  31. <link href="Public/css/style.css?v=163182756699" type="text/css" rel="stylesheet">
  32. <script>
  33. function showEncodedPassword() {
  34. if ($("#Password").val() === "") {
  35. $("#Password").addClass("emptyfield");
  36. return;
  37. }
  38. passw = encryptSha2( $("#Password").val() );
  39. msg = "Please set your new pasword in the config file with this value:";
  40. alert(msg + "\n\n" + passw);
  41. }
  42. function setOriginsPos() {
  43. h=parseInt(window.innerHeight);
  44. w=parseInt(window.innerWidth);
  45. mytop = parseInt(window.innerHeight - ($("#originsDisplay").height() + 60));
  46. $("#originsDisplay").css("top", mytop+"px");
  47. setTimeout("hideOrigins()",15000);
  48. }
  49. function hideOrigins() {
  50. $("#originsDisplay").css("visibility","hidden");
  51. }
  52. function hideTitle() {
  53. $("#myh1").hide("slow");
  54. }
  55. function startApp() {
  56. $("#HCsplash").css("display","none");
  57. //$("#HCsplash").hide("slow");
  58. //$("#originsDisplay").show();
  59. $(document.body).css("background","#ffffff");
  60. $("#frmHC").show();
  61. }
  62. function _startApp() {
  63. setTimeout("startApp()", 1000);
  64. }
  65. window.addEventListener("load", function() {
  66. $("#frmHC").hide();
  67. setTimeout("setOriginsPos()", 500);
  68. //Splash
  69. $("#HCsplash").show();
  70. }, true);
  71. window.addEventListener("load", function() {
  72. // Fisnished the Intro load the app..
  73. //document.getElementById("vplayer").onended=_startApp;
  74. setTimeout("_startApp()", 6000);
  75. });
  76. </script>
  77. </head>
  78. <body style="background:#0d0d0d;">
  79. <div id="HCsplash" style="padding-top: 40px; text-align:center;color:#d4b0dc;font-family:'Bungee Hairline';">
  80. <div id="myh1" style="position:relative; top:80px;"><H1>Swap Code</H1></div><br><br><br><br>
  81. <img src="Public/res/code.png" style="width:310px;">
  82. </div>
  83. <form id="frmHC" method="POST" target="_self" enctype="multipart/form-data" style="display:none;">
  84. <div class="header" style="margin-top:18px; margin-left:18px; background: #FFFFFF;">
  85. <a href="http://swapcode.5mode-foss.eu" target="_self" style="color:#000000; text-decoration: none;">&nbsp;<img src="Public/res/code.png" style="width:22px;">&nbsp;Swap Code</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://github.com/par7133/SwapCode" style="color:#000000;"><span style="color:#119fe2">on</span> github</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:code@gaox.io" style="color:#000000;"><span style="color:#119fe2">for</span> feedback</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:+39-378-0812391" style="font-size:13px;background-color:#15c60b;border:2px solid #15c60b;color:#000000;height:27px;text-decoration:none;">&nbsp;&nbsp;get support&nbsp;&nbsp;</a>
  86. </div>
  87. <br>
  88. <div style="clear:both; float:left; padding:8px; width:15%; height:780px; text-align:center; border-right: 1px solid lightgray;">
  89. <div style="padding-left:10px;text-align: left;">
  90. <a href="https://github.com/par7133/SwapCode/archive/refs/tags/v2.2.4.zip">Rel. 2.2.4 (zip)</a><br>
  91. <a href="https://github.com/par7133/SwapCode/archive/refs/tags/v2.2.4.tar.gz">Rel. 2.2.4 (tar.gz)</a><br>
  92. </div>
  93. <br><br>
  94. <img src="Public/res/SSgenius.png" alt="SS Genius" title="SS Genius" style="position:relative; left:+2px; width:90%; border: 1px dashed #EEEEEE;">
  95. <br><br>
  96. <div style="font-weight:900;color:blue;white-space:nowrap;">
  97. <a href="https://gaox.io/l/dona1" target="_blank">Donate!</a><br><br>
  98. <a href="https://hetzner.cloud/?ref=mw7jFDXrioJE" target="_blank">Cloud!</a><br>
  99. </div>
  100. <!--<a href="https://m.do.co/c/c85e9d7bd946" target="_blank"><img src="Public/res/digitalocean_logo.png" title="Digital Ocean" alt="digital ocean" style="position:relative; left:+6px; width:90%; border: 1px solid darkgray;"></a>-->
  101. &nbsp;<br><br><br>
  102. &nbsp;<input type="text" id="Password" name="Password" placeholder="password" style="font-size:10px; background:#393939; color:#ffffff; width: 90%; border-radius:3px;" value="" autocomplete="off"><br>
  103. &nbsp;<a href="#" onclick="showEncodedPassword();" style="position:relative; left:-2px; top:+5px; color:#000000; font-size:12px;">Hash Me!</a>
  104. <br><br><br>
  105. </div>
  106. <div style="float:left; width:85%;height:100%; padding:8px;padding-top:12px;">
  107. <div id="splash" style="border-radius:20px; position:relative; left:+3px; width:99%; background-color: #f0f8fb; padding: 20px; margin:auto; margin-bottom:8px;">
  108. <button type="button" class="close" aria-label="Close" onclick="close-Splash();" style="position:relative; left:-10px;">
  109. <span aria-hidden="true">&times;</span>
  110. </button>
  111. Hello and welcome to Swap Code!<br><br>
  112. Swap Code is a light, simple, "peer-to-peer" software on premise for swapping your snippets of code with others.<br><br>
  113. Swap Code is released under GPLv3 license, it is supplied AS-IS and we do not take any responsibility for its misusage.<br><br>
  114. First step, use the left side panel password field to create the hashed password to insert in the config file.<br><br>
  115. As you are going to run Swap Code in the PHP process context, using a limited web server or phpfpm user, you must follow some simple directives for an optimal first setup:<br>
  116. <ol>
  117. <li>Check the write permissions of your "data" (repo) folder in your web app private path; and set its path in the config file.</li>
  118. <li>Set the default Business Label, Link and Email of the stuff your are going to swap.</li>
  119. <li>Set the MAX_DFT_NEW_SNIP value stating the max number of snippet the app is going to initially create.</li>
  120. <li>In Public/js/cube-code.js, in mystart class method, check if you are using 'http' or 'https'.</li>
  121. </ol>
  122. <br>
  123. Feedback: <a href="mailto:code@gaox.io">code@gaox.io</a><br>
  124. <br>
  125. <b>Please note that version 2.0.5 &gt; is not compatible with previous versions.</b>
  126. <br><br><br><br><br><br><br>
  127. </div>
  128. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  129. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  130. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  131. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  132. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  133. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  134. </div>
  135. </form>
  136. <div id="originsDisplay" style="display:none;">
  137. <br>
  138. &nbsp;<span class="originLabel">Coding:</span>&nbsp;Italy<br>
  139. &nbsp;<span class="originLabel">Server:</span>&nbsp;United States&nbsp;<br>
  140. &nbsp;<span class="originLabel"><a href="http://metrica.yandex.com" class="bbb">Metrics</a>:</span>&nbsp;Russia&nbsp;<br>
  141. <br>
  142. </div>
  143. <div class="footer">
  144. <div id="footerCont">&nbsp;</div>
  145. <div id="footer"><span style="background:#E1E1E1;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. CC&nbsp;&nbsp;</span></div>
  146. </div>
  147. <script>
  148. function setFooterPos2() {
  149. if (document.getElementById("footerCont")) {
  150. //if ($("#Password").val() === "") {
  151. // tollerance = 48;
  152. // } else {
  153. // tollerance = 15;
  154. //}
  155. tollerance = 22;
  156. $("#footerCont").css("top", parseInt( window.innerHeight - $("#footerCont").height() - tollerance ) + "px");
  157. $("#footer").css("top", parseInt( window.innerHeight - $("#footer").height() - tollerance + 6) + "px");
  158. }
  159. }
  160. setFooterPos2();
  161. //window.addEventListener("load", function() {
  162. //
  163. // setTimeout("setFooterPos2()", 4000);
  164. //
  165. //}, true);
  166. </script>
  167. </body>
  168. </html>