index.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <%
  2. var settings = require("ep_etherpad-lite/node/utils/Settings");
  3. %>
  4. <!doctype html>
  5. <html>
  6. <title><%=settings.title%></title>
  7. <script>
  8. /*
  9. |@licstart The following is the entire license notice for the
  10. JavaScript code in this page.|
  11. Copyright 2011 Peter Martischka, Primary Technology.
  12. Licensed under the Apache License, Version 2.0 (the "License");
  13. you may not use this file except in compliance with the License.
  14. You may obtain a copy of the License at
  15. http://www.apache.org/licenses/LICENSE-2.0
  16. Unless required by applicable law or agreed to in writing, software
  17. distributed under the License is distributed on an "AS IS" BASIS,
  18. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. See the License for the specific language governing permissions and
  20. limitations under the License.
  21. |@licend The above is the entire license notice
  22. for the JavaScript code in this page.|
  23. */
  24. </script>
  25. <meta charset="utf-8">
  26. <meta name="referrer" content="no-referrer">
  27. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
  28. <link rel="shortcut icon" href="<%=settings.favicon%>">
  29. <link rel="localizations" type="application/l10n+json" href="locales.json">
  30. <script type="text/javascript" src="static/js/html10n.js?v=<%=settings.randomVersionString%>"></script>
  31. <script type="text/javascript" src="static/js/l10n.js?v=<%=settings.randomVersionString%>"></script>
  32. <style>
  33. html, body {
  34. height: 100%;
  35. }
  36. body {
  37. margin: 0;
  38. color: #333;
  39. font: 14px helvetica, sans-serif;
  40. background: #ddd;
  41. background: -webkit-radial-gradient(circle,#aaa,#eee 60%) center fixed;
  42. background: -moz-radial-gradient(circle,#aaa,#eee 60%) center fixed;
  43. background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed;
  44. background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed;
  45. border-top: 8px solid rgba(51,51,51,.8);
  46. }
  47. #wrapper {
  48. border-top: 1px solid #999;
  49. margin-top: 160px;
  50. padding: 15px;
  51. background: #eee;
  52. background: -webkit-linear-gradient(#fff,#ccc);
  53. background: -moz-linear-gradient(#fff,#ccc);
  54. background: -ms-linear-gradient(#fff,#ccc);
  55. background: -o-linear-gradient(#fff,#ccc);
  56. box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
  57. }
  58. #inner {
  59. position:relative;
  60. max-width: 300px;
  61. margin: 0 auto;
  62. }
  63. #button {
  64. margin: 0 auto;
  65. text-align: center;
  66. font: 36px verdana,arial,sans-serif;
  67. width:300px;
  68. border:none;
  69. color: white;
  70. text-shadow: 0 -1px 0 rgba(0,0,0,.8);
  71. height: 70px;
  72. line-height: 70px;
  73. background: #555;
  74. background: -webkit-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
  75. background: -moz-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
  76. background: -ms-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
  77. background: -o-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
  78. box-shadow: inset 0 1px 3px rgba(0,0,0,0.9);
  79. }
  80. #button:hover {
  81. cursor: pointer;
  82. background: #666;
  83. background: -webkit-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
  84. background: -moz-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
  85. background: -ms-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
  86. background: -o-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
  87. }
  88. #button:active {
  89. box-shadow: inset 0 1px 12px rgba(0,0,0,0.9);
  90. background: #444;
  91. }
  92. #label {
  93. text-align: left;
  94. text-shadow: 0 1px 1px #fff;
  95. margin: 16px auto 0;
  96. display:block;
  97. }
  98. #padname{
  99. height:38px;
  100. max-width:280px;
  101. }
  102. form {
  103. height: 38px;
  104. background: #fff;
  105. border: 1px solid #bbb;
  106. border-radius: 3px;
  107. position: relative;
  108. }
  109. button, input {
  110. font-weight: bold;
  111. font-size: 15px;
  112. }
  113. input[type="text"] {
  114. border-radius: 3px;
  115. box-sizing: border-box;
  116. -moz-box-sizing: border-box;
  117. line-height:36px; /* IE8 hack */
  118. padding: 0px 45px 0 10px;
  119. *padding: 0; /* IE7 hack */
  120. width: 100%;
  121. height: 100%;
  122. outline: none;
  123. border: none;
  124. position: absolute;
  125. }
  126. button[type="submit"] {
  127. position: absolute;
  128. left:253px;
  129. width: 45px;
  130. height: 38px;
  131. }
  132. @media only screen and (min-device-width: 320px) and (max-device-width: 800px) {
  133. body {
  134. background: #bbb;
  135. background: -webkit-linear-gradient(#aaa,#eee 60%) center fixed;
  136. background: -moz-linear-gradient(#aaa,#eee 60%) center fixed;
  137. background: -ms-linear-gradient(#aaa,#eee 60%) center fixed;
  138. }
  139. #wrapper {
  140. margin-top: 0;
  141. }
  142. #inner {
  143. width: 95%;
  144. }
  145. #label {
  146. text-align: center;
  147. }
  148. }
  149. </style>
  150. <link href="static/skins/<%=encodeURI(settings.skinName)%>/index.css?v=<%=settings.randomVersionString%>" rel="stylesheet">
  151. <div id="wrapper">
  152. <% e.begin_block("indexWrapper"); %>
  153. <div id="inner">
  154. <button id="button" onclick="go2Random()" data-l10n-id="index.newPad"></button>
  155. <label id="label" for="padname" data-l10n-id="index.createOpenPad"></label>
  156. <form action="#" onsubmit="go2Name();return false;">
  157. <input type="text" id="padname" maxlength="50" autofocus x-webkit-speech>
  158. <button type="submit">OK</button>
  159. </form>
  160. </div>
  161. <% e.end_block(); %>
  162. <div id="text">
  163. <div cass="text_inner">
  164. Questo è un servizio etherpad ospitato dal progetto cisti.org.
  165. Etherpad è un software libero che permette la realizzazione collaborativa di documenti di testo.
  166. Su cisti non registriamo nessuna informazione su chi lo usa.<br/>
  167. </div>
  168. </div>
  169. <div id="logo_cisti">
  170. <a href="https://cisti.org/">
  171. <img src="static/skins/colibris/images/logo.png" alt="Cisti" ></img>
  172. </a>
  173. </div>
  174. <div class="onion">
  175. pad.ukdbebvetkn265rh5sfmmw53ka4dbhkfpqb7ufr3fu6ldlh6khleybid.onion
  176. </div>
  177. <script src="static/skins/<%=encodeURI(settings.skinName)%>/index.js?v=<%=settings.randomVersionString%>"></script>
  178. <script>
  179. // @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt
  180. function go2Name()
  181. {
  182. var padname = document.getElementById("padname").value;
  183. padname.length > 0 ? window.location = "p/" + encodeURIComponent(padname.trim()) : alert("Please enter a name")
  184. }
  185. function go2Random()
  186. {
  187. window.location = "p/" + randomPadName();
  188. }
  189. function randomPadName()
  190. {
  191. // the number of distinct chars (64) is chosen to ensure that
  192. // the selection will be uniform when using the PRNG below
  193. var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";
  194. // the length of the pad name is chosen to get 120-bit security:
  195. // log2(64^20) = 120
  196. var string_length = 20;
  197. // make room for 8-bit integer values that span from 0 to 255.
  198. var randomarray = new Uint8Array(string_length);
  199. // use browser's PRNG to generate a "unique" sequence
  200. var cryptoObj = window.crypto || window.msCrypto; // for IE 11
  201. cryptoObj.getRandomValues(randomarray);
  202. var randomstring = '';
  203. for (var i = 0; i < string_length; i++)
  204. {
  205. // instead of writing "Math.floor(randomarray[i]/256*64)"
  206. // we can save some cycles.
  207. var rnum = Math.floor(randomarray[i]/4);
  208. randomstring += chars.substring(rnum, rnum + 1);
  209. }
  210. return randomstring;
  211. }
  212. // start the custom js
  213. if (typeof customStart == "function") customStart();
  214. // @license-end
  215. </script>
  216. <div style="display:none"><a href="/javascript" data-jslicense="1">JavaScript license information</a></div>
  217. </html>