index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html>
  2. <head>
  3. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>Built with Processing and Processing.js</title>
  6. <link rel="icon" type="image/x-icon" href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAQAAVzABAEAjBQAaDwYAWjUGAGE6CQBrQQ0ATS8PAFhAJwBUQC8AbFI6AHVXPACBZk4A4NrWAPb19QAAAAAAAMmZmZmZmgAJIwAAAAAAcMIjPjA+PjAKpxIuMDMzMAm0Ii4zMzMACaIiLt3dMAAJtyIuIzPQAAm0Un5yM+IzKLRkfncy4iIotRF+dyLkIiq0QX53F+EiGrQUTkd34iIatEVu7u5iIVrBVVRBRFRVbAtGZGZla2uwAMu7u7u8vADAAwAAgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAADAAwAA" />
  7. <meta name="Generator" content="Processing" />
  8. <!-- - - - - - - - - - - - - - - - - - - - -
  9. +
  10. + Wondering how this works?
  11. +
  12. + Go to: http://processing.org/
  13. + and: http://processingjs.org/
  14. +
  15. + - - - - - - - - - - - - - - - - - - - - -->
  16. <style type="text/css">
  17. body {
  18. background-color: #333; color: #bbb; line-height: normal;
  19. font-family: Lucida Grande, Lucida Sans, Arial, Helvetica Neue, Verdana, Geneva, sans-serif;
  20. font-size: 11px; font-weight: normal; text-decoration: none;
  21. line-height: 1.5em;
  22. }
  23. a img {
  24. border: 0px solid transparent;
  25. }
  26. a, a:link, a:visited, a:active, a:hover {
  27. color: #cdcdcd; text-decoration: underline;
  28. }
  29. h1 {
  30. font-family: Arial, Helvetica Neue, Verdana, Geneva, sans-serif;
  31. width: 100%; letter-spacing: 0.1em;
  32. margin-bottom: 1em; font-size: 1.65em;
  33. }
  34. canvas {
  35. display: block;
  36. outline: 0px;
  37. margin-bottom: 1.5em;
  38. }
  39. #content {
  40. margin: 50px auto 0px auto; padding: 25px 25px 15px 25px;
  41. overflow: auto;
  42. border-left: 1px solid #444; border-top: 1px solid #444;
  43. border-right: 1px solid #333; border-bottom: 1px solid #333;
  44. background-color: #3d3d3d;
  45. text-align: center;
  46. }
  47. canvas {
  48. margin-left: auto;
  49. margin-right: auto;
  50. }
  51. #footer {
  52. text-align: center;
  53. }
  54. </style>
  55. <!--[if lt IE 9]>
  56. <script type="text/javascript">alert("Your browser does not support the canvas tag.");</script>
  57. <![endif]-->
  58. </head>
  59. <body>
  60. <div id="content">
  61. <h1 id="title"></h1>
  62. <div>
  63. <canvas>
  64. <p>Your browser does not support the canvas tag.</p>
  65. <!-- Note: you can put any alternative content here. -->
  66. </canvas>
  67. <noscript>
  68. <p>JavaScript is required to view the contents of this page.</p>
  69. </noscript>
  70. </div>
  71. <p id="description"></p>
  72. <p id="sources">Source code: <a href=""></a> </p>
  73. <p>
  74. Built with <a href="http://processing.org" title="Processing">Processing</a>
  75. and <a href="http://processingjs.org" title="Processing.js">Processing.js</a>
  76. </p>
  77. </div>
  78. <script>
  79. document.addEventListener("DOMContentLoaded", () => {
  80. let paramString = location.toString().split("?")[1];
  81. window.params = {};
  82. paramString.split("&").forEach(tokenString => {
  83. let parts = tokenString.split("=");
  84. window.params[parts[0]] = parts[1];
  85. });
  86. let contentElement = document.getElementById("content");
  87. contentElement.style.width = window.params['w'];
  88. contentElement.style.height = window.params['h'];
  89. let canvas = document.getElementsByTagName("canvas")[0];
  90. canvas.id = window.params['p'];
  91. canvas.setAttribute("data-processing-sources", "../files/" + window.params['p'] + ".pde");
  92. canvas.width = window.params['w'];
  93. canvas.height = window.params['h'];
  94. document.title = window.params['p'] + " : " + document.title;
  95. document.getElementById("title").innerHTML = window.params['p'];
  96. let sourceLinkElement = document.getElementById("sources")
  97. let linkElement = sourceLinkElement.getElementsByTagName("a")[0];
  98. linkElement.innerHTML = window.params['p'] + ".pde";
  99. linkElement.href = "../files/" + window.params['p'] + ".pde";
  100. });
  101. </script>
  102. <script src="../js/processing.js" type="text/javascript"></script>
  103. <script type="text/javascript">
  104. // convenience function to get the id attribute of generated sketch html element
  105. function getProcessingSketchId () { return window.params['p'];}
  106. </script>
  107. <div id="footer">
  108. <p>Contact: <a href="mailto:eyeofmidas@gmail.com">eyeofmidas@gmail.com</a></p>
  109. <script>
  110. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  111. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  112. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  113. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  114. ga('create', 'UA-50800317-1', 'eyeofmidas.com');
  115. ga('send', 'pageview');
  116. </script>
  117. </div>
  118. </body>
  119. </html>