Monotone Arbeit nervt!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

298 lines
11 KiB

3 years ago
1 year ago
3 years ago
1 year ago
3 years ago
  1. <!DOCTYPE html>
  2. <html lang="it">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <title>{{ "link_title"|tr(lang) }} – {{ "index_title"|tr(lang) }}</title>
  7. <meta name="robots" content="noindex" />
  8. <meta name="description" content="{{ "meta_description"|tr(lang) }}" />
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <link rel="icon" type="image/png" sizes="48x48" href="/assets/favicon.svg" />
  11. <link rel="stylesheet" href="/assets/index.css?v=1.0" />
  12. <link rel="stylesheet" href="/assets/cloud.css?v=1.0" />
  13. <link rel="stylesheet" href="/assets/digitalcourage.css" />
  14. <link rel="stylesheet" href="/assets/bootstrap.min.css" />
  15. <script type="text/javascript">
  16. window.onload = function () {
  17. // show link copy button if javascript is enabled
  18. document.getElementById("script-copy").style.display = "unset";
  19. let btn = document.getElementById("script-copy-btn");
  20. btn.style.cursor = "pointer";
  21. let lang = "{{ lang }}";
  22. document.getElementById('langs').value=lang;
  23. });
  24. btn.addEventListener('click', function() {
  25. var copyText = document.getElementById("link");
  26. /* Select the text field */
  27. copyText.select();
  28. copyText.setSelectionRange(0, 99999);
  29. document.execCommand("copy");
  30. btn.innerHTML = '{{ "link_copied"|tr(lang) }}';
  31. });
  32. function ValidateEmail(mail)
  33. {
  34. if (/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(mail))
  35. {
  36. return (true)
  37. }
  38. alert("Die eingegebene Mail Adresse ist ungültig. Sie können sich auch anmelden, ohne den Token zugeschickt zu bekommen.")
  39. return (false)
  40. }
  41. document.getElementById("email-register").style.display = "unset";
  42. let btn2 = document.getElementById("email-register-btn");
  43. btn2.style.cursor = "pointer";
  44. btn2.addEventListener('click', function() {
  45. var email = document.getElementById("email").value;
  46. var adtok = document.getElementById("link").value;
  47. console.log(email);
  48. var validation = ValidateEmail(email);
  49. /* var emailjsonstring = JSON.stringify(JSON.parse(document.getElementById('email'))); */
  50. if (validation == true)
  51. {
  52. var xhr1=new XMLHttpRequest();
  53. xhr1.open("POST",'link/email', true);
  54. xhr1.send(email + ',' + adtok + '\n');
  55. document.getElementById("email").value = "Die Email ist auf dem Weg";
  56. }
  57. });
  58. }
  59. function new_link(csrf) {
  60. var sel = document.getElementById('langs');
  61. let opt = getSelectedOption(sel);
  62. let lang = opt.value;
  63. document.getElementById('langs').value = lang;
  64. document.getElementById("link_lang").value = lang;
  65. document.getElementById('new_link').submit();
  66. document.getElementById('new_link_button').classList.add("hidden");
  67. document.getElementById('loading_ring').classList.remove("hidden");
  68. }
  69. function getSelectedOption(sel) {
  70. var opt;
  71. for ( var i = 0, len = sel.options.length; i < len; i++ ) {
  72. opt = sel.options[i];
  73. if ( opt.selected === true ) {
  74. break;
  75. }
  76. }
  77. return opt;
  78. }
  79. </script>
  80. <style>
  81. .break {
  82. flex-basis: 100%;
  83. height: 0;
  84. }
  85. .div_120 {
  86. flex-basis: 100%;
  87. height: 120px;
  88. }
  89. .div_45 {
  90. flex-basis: 100%;
  91. height: 45px;
  92. }
  93. .div_35 {
  94. flex-basis: 100%;
  95. height: 35px;
  96. }
  97. .div_25 {
  98. flex-basis: 100%;
  99. height: 25px;
  100. }
  101. .div_10 {
  102. flex-basis: 100%;
  103. height: 10px;
  104. }
  105. .grid-container {
  106. display: grid;
  107. grid-template-columns: auto auto;
  108. width: 725px;
  109. grid-gap: 25px;
  110. }
  111. .grid-container2 {
  112. display: grid;
  113. grid-template-columns: auto auto auto;
  114. width: 532px;
  115. grid-gap: 20px;
  116. }
  117. @media only screen and (max-width: 768px) {
  118. /* For mobile phones: */
  119. [class*="grid-container"] {
  120. grid-template-columns: auto;
  121. max-width: 100%;
  122. justify-content: center;
  123. }
  124. [class*="grid-container2"] {
  125. grid-template-columns: auto;
  126. max-width: 100%;
  127. justify-content: center;
  128. }
  129. [class*="item2"] {
  130. grid-template-columns: auto;
  131. max-width: 100%;
  132. align-items: center;
  133. }
  134. }
  135. .center {
  136. display: flex;
  137. justify-content: center;
  138. align-items: center;
  139. }
  140. .item1 {
  141. width: 350px;
  142. height: 200px;
  143. display: flex;
  144. justify-content: center;
  145. align-items: center;
  146. }
  147. .item2 {
  148. width: 350px;
  149. height: 200px;
  150. #display: flex;
  151. #justify-content: center;
  152. #align-items: center;
  153. }
  154. .h2 {
  155. font-size: 30pt;
  156. }
  157. p {
  158. font-size: 16pt;
  159. }
  160. .downDC {
  161. height: 90px;
  162. padding: 10px;
  163. }
  164. .c-img-shadow {
  165. height: 200px;
  166. max-width: 100%;
  167. box-shadow: 0 0 5px rgba(0, 0, 0, 0.18),0 5px 5px rgba(0, 0, 0, 0.18);
  168. border-radius: 2px;
  169. }
  170. </style>
  171. <body>
  172. <div class="container ombre">
  173. <header role="banner" class="clearfix">
  174. <form id="new_link" method="post" action="/link" class="hidden-print">
  175. <div class="input-group input-group-sm pull-right col-xs-12 col-sm-2 langs" style="margin-right: 8px">
  176. <select id="langs" name="lang" class="form-control" title="Select language" >
  177. <option lang="fr" value="fr">Fran&ccedil;ais</option>
  178. <option lang="en" selected value="en">English</option>
  179. <option lang="oc" value="oc">Occitan</option>
  180. <option lang="es" value="es">Espa&ntilde;ol</option>
  181. <option lang="de" value="de">Deutsch</option>
  182. <option lang="nl" value="nl">Dutch</option>
  183. <option lang="it" value="it">Italiano</option>
  184. <option lang="br" value="br">Brezhoneg</option>
  185. </select>
  186. <input id="link_lang" name="link_lang" type="text" class="hidden">
  187. <span class="input-group-btn">
  188. <a id="new_link_button" class="btn btn-default btn-sm language_button" title="Change language">OK</a>
  189. </span>
  190. </div>
  191. </form>
  192. <a href="https&colon;&sol;&sol;foorms&period;digitalcourage&period;de&sol;" title="Home - foorms" style="margin-left: 8px" >
  193. <img src="/assets/logo.svg" alt="foorms" class="" height="58vh" />
  194. </a>
  195. <h2 class="lead col-xs-12"></h2> <div class="trait col-xs-12" role="presentation"></div>
  196. </header>
  197. <main role="main">
  198. <center>
  199. <div class="has-text-centered">
  200. <br />
  201. <h2>{{ "link_title"|tr(lang) }}</h2>
  202. <div class="div_25"> </div>
  203. <p>{{ "link_desc1_1"|tr(lang)|safe }}</p>
  204. <div class="break"> </div>
  205. <p>{{ "link_desc1_2"|tr(lang)|safe }}</p>
  206. <div class="div_25"> </div>
  207. <div class="c-flex c-jumbo">
  208. <input id="link" class="ncstyle-input" type="text" style='font-size: 16px; text-align:center' size="80" readonly value="" />
  209. </div>
  210. <div class="div_35"> </div>
  211. <div id="script-copy">
  212. <div class="c-flex">
  213. <a id="script-copy-btn" class="ncstyle-button margin-bottom">{{ "link_copy"|tr(lang) }}</a>
  214. </div>
  215. </div>
  216. <div class="div_120"> </div>
  217. <p>{{ "link_desc2_1"|tr(lang)|safe }}</p>
  218. <div class="break"> </div>
  219. <p>{{ "link_desc2_2"|tr(lang)|safe }}</p>
  220. <div class="div_25"> </div>
  221. <div class="c-flex">
  222. <input id="email" class="ncstyle-input" style="text-align:center;" type="text" value="Send_Password_Link@invalid" />
  223. </div>
  224. <div class="div_35"> </div>
  225. <div id="email-register">
  226. <div class="c-flex">
  227. <a id="email-register-btn" class="ncstyle-button margin-bottom">{{ "link_mail"|tr(lang) }}</a>
  228. </div>
  229. <div class="div_120"> </div>
  230. </div>
  231. <p>{{ "link_desc3_1"|tr(lang) }}</p>
  232. <div class="break"></div>
  233. <p>{{ "link_desc3_2"|tr(lang) }}</p>
  234. <div class=div_35></div>
  235. </div>
  236. </div>
  237. <div class="div_120"></div>
  238. </center>
  239. <center>
  240. <div class="c-blue grid-container2">
  241. <a href="https://42l.fr/Rapport-technique" style="font-size:15px;" class="c-button" target="_blank">{{ "index_bottom_docs"|tr(lang) }}</a>
  242. <a href="https://git.42l.fr/neil/sncf" style="font-size:15px;" class="c-button" target="_blank">{{ "index_bottom_source"|tr(lang) }}</a>
  243. <a href="https://git.42l.fr/neil/sncf/src/branch/root/LICENSE" style="font-size:15px;" class="c-button" target="_blank">{{ "index_bottom_lic"|tr(lang) }}</a>
  244. </div>
  245. </center>
  246. <div class="div_10"></div>
  247. <div class="div_10"></div>
  248. <div class="div_10"></div>
  249. </main>
  250. </div> <!-- .container -->
  251. <div class="container ombre downDC" style="display:flex; align-items:center;">
  252. <h2 class="lead"><a target="_blank" href="https://digitalcourage.de/">Digitalcourage</a> | <a target="_blank" href="https://digitalcourage.de/newsletter">Newsletter</a> | <a target="_blank" href="https://digitalcourage.de/spenden">{{ "impressum_donations"|tr(lang)|safe }}</a> | <a target="_blank" href="https://digitalcourage.de/en">Impressum</a> | <a target="_blank" href="https://digitalcourage.de/en">{{ "impressum_privacy"|tr(lang)|safe }}</a> </h2>
  253. </div>
  254. </body>
  255. </html>