index.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Lee Morgan</title>
  6. <link rel="stylesheet" href="/style">
  7. </head>
  8. <body>
  9. <div id="menu">
  10. <button id="projectsButton" class="active">
  11. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  12. <polyline points="16 18 22 12 16 6"></polyline>
  13. <polyline points="8 6 2 12 8 18"></polyline>
  14. </svg>
  15. <p>My Projects</p>
  16. </button>
  17. <button id="aboutButton">
  18. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  19. <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
  20. <circle cx="12" cy="7" r="4"></circle>
  21. </svg>
  22. <p>About Me</p>
  23. </button>
  24. <button id="writingButton">
  25. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  26. <path d="M12 19l7-7 3 3-7 7-3-3z"></path>
  27. <path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path>
  28. <path d="M2 2l7.586 7.586"></path>
  29. <circle cx="11" cy="11" r="2"></circle>
  30. </svg>
  31. <p>Blog</p>
  32. </button>
  33. <button id="linksButton">
  34. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  35. <rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
  36. <line x1="3" y1="9" x2="21" y2="9"></line>
  37. <line x1="9" y1="21" x2="9" y2="9"></line>
  38. </svg>
  39. <p>Fun Links</p>
  40. </button>
  41. <button id="travelButton">
  42. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  43. <circle cx="12" cy="12" r="10"></circle>
  44. <polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon>
  45. </svg>
  46. <p>Travel</p>
  47. </button>
  48. <button id="learnButton">
  49. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  50. <path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path>
  51. <path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path>
  52. </svg>
  53. <p>Learn</p>
  54. </button>
  55. </div>
  56. <div id="main">
  57. <div id="projects" class="cardContainer">
  58. <a class="card" href="https://thesubline.com">
  59. <h2>The Subline</h2>
  60. <img src="/images/subline" alt="The Subline">
  61. <p>A web application to assist restaurant owners in managing their inventories. Providing insights into usage, waste and other details through the use of data.</p>
  62. </a>
  63. <a class="card" href="https://budgeteer.money">
  64. <h2>Budgeteer</h2>
  65. <img src="/images/budgeteer" alt="Budgeteer">
  66. <p>A simple web application to help people to budget their money in a simple and approachable manner.</p>
  67. </a>
  68. <a class="card" href="markket.xyz">
  69. <h2>Local Markets</h2>
  70. <img src="/images/market" alt="Market">
  71. <p>A website for people to find farmers markets and vendors of local products in their area.</p>
  72. </a>
  73. <a class="card" href="/sudoku">
  74. <h2>Sudoku Solver</h2>
  75. <img src="/images/sudoku" alt="Sudoku">
  76. <p>Stuck on a particularly difficult game of sudoku? Enter any sudoku puzzle and have it solved immediately.</p>
  77. </a>
  78. <a class="card" href="/birthdayparadox">
  79. <h2>The Birthday Paradox</h2>
  80. <img src="/images/birthday" alt="Birthday Hat">
  81. <p>A demonstration of the counterintuitive birthday paradox.</p>
  82. </a>
  83. </div>
  84. <div id="about" style="display:none;">
  85. <h1>Ya, Ya, I'm working on it...</h1>
  86. </div>
  87. <div id="writing" class="cardContainer" style="display:none;"></div>
  88. <div id="links" class="cardContainer" style="display:none;">
  89. <a class="card" href="https://cs-online.club/en/servers">
  90. <h2>CS:GO in the browser</h2>
  91. <p>A website to play CS:GO in the browser with other people online.</p>
  92. </a>
  93. <a class="card" href="https://driveandlisten.herokuapp.com/">
  94. <h2>Drive and Listen</h2>
  95. <p>Pretend to be driving your car and listening to the radio. Watch cars driving down the road all over the world while listening to local radio stations.</p>
  96. </a>
  97. <a class="card" href="https://www.ekzhang.com/game-of-life">
  98. <h2>Conway's Game of Life</h2>
  99. <p>Play around and experiment with different situations in Conway's Game of Life</p>
  100. </a>
  101. <a class="card" href="https://librivox.org/">
  102. <h2>LibriVox</h2>
  103. <p>Free public domain audiobooks. Listen to books for free, or volunteer your time to read them for others to listen to</p>
  104. </a>
  105. <a class="card" href="https://rocketcrab.com/">
  106. <h2>rocketcrab.com</h2>
  107. <p>Party games right on your phone</p>
  108. </a>
  109. <a class="card" href="https://thetruesize.com/">
  110. <h2>The True Size of</h2>
  111. <p>The common Mercator projection map that we are used to distorts the real size of countries. This site will let you move and directly compare the real size of different countries to see how big they really are</p>
  112. </a>
  113. <a class="card" href="https://win95.ajf.me/">
  114. <h2>Windows 95</h2>
  115. <p>Use a virtual Windows 95 computer right in your browser</p>
  116. </a>
  117. <a class="card" href="https://pointerpointer.com/">
  118. <h2>Pointer Pointer</h2>
  119. <p>Point to your pointer</p>
  120. </a>
  121. <a class="card" href="https://pudding.cool/2020/12/judge-my-spotify">
  122. <h2>Judge My Spotify</h2>
  123. <p>Let an AI criticize your taste in music</p>
  124. </a>
  125. </div>
  126. <div id="travel" style="display:none">
  127. <template id="travelCard">
  128. <div class="card">
  129. <h1></h1>
  130. <img>
  131. </div>
  132. </template>
  133. <template id="backCard">
  134. <div class="card backCard">
  135. <h1>BACK</h1>
  136. <svg width="50" height="50" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  137. <polyline points="9 14 4 9 9 4"></polyline>
  138. <path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>
  139. </svg>
  140. </div>
  141. </template>
  142. </div>
  143. <div id="learn" class="cardContainer" style="display:none">
  144. <a class="card" href="/learn/web">
  145. <h2>Intro to Web Programming</h2>
  146. <img src="/images/netscape" alt="Netscape logo">
  147. </a>
  148. <a class="card" href="/learn/html">
  149. <h2>HTML</h2>
  150. <img src="/images/html5" alt="HTML 5">
  151. </a>
  152. </div>
  153. </div>
  154. <script>
  155. let buttons = document.getElementById("menu").children;
  156. let content = document.getElementById("main").children;
  157. for(let i = 0; i < buttons.length; i++){
  158. buttons[i].onclick = ()=>{
  159. for(let j = 0; j < buttons.length; j++){
  160. buttons[j].classList.remove("active");
  161. }
  162. buttons[i].classList.add("active");
  163. for(let j = 0; j < content.length; j++){
  164. content[j].style.display = "none";
  165. }
  166. let string = buttons[i].id.replace("Button", "");
  167. document.getElementById(string).style.display = "flex";
  168. };
  169. }
  170. fetch("/writing/directories")
  171. .then(response => response.json())
  172. .then((response)=>{
  173. let writing = document.getElementById("writing");
  174. let template = document.getElementById("backCard").content.children[0];
  175. let recurse = (currentArray, currentContainer)=>{
  176. for(let i = 0; i < currentArray.length; i++){
  177. let card = {};
  178. if(currentArray[i].contents[0].title === undefined){
  179. card = document.createElement("div");
  180. card.onclick = ()=>{
  181. currentContainer.style.display = "none";
  182. newContainer.style.display = "flex";
  183. };
  184. let name = document.createElement("h1");
  185. name.innerText = currentArray[i].name.toUpperCase();
  186. card.appendChild(name);
  187. }else{
  188. card = document.createElement("a");
  189. card.href = currentArray[i].contents[0].route;
  190. let title = document.createElement("h2");
  191. title.innerText = currentArray[i].contents[0].title;
  192. card.appendChild(title);
  193. let img = document.createElement("img");
  194. img.src = currentArray[i].contents[0].img;
  195. img.alt = `${currentArray[i].contents[0].title} image`;
  196. card.appendChild(img);
  197. }
  198. card.classList.add("card");
  199. currentContainer.appendChild(card);
  200. let newContainer = document.createElement("div");
  201. newContainer.classList.add("cardContainer");
  202. newContainer.style.display = "none";
  203. writing.appendChild(newContainer);
  204. let backCard = template.cloneNode(true);
  205. backCard.onclick = ()=>{
  206. newContainer.style.display = "none";
  207. currentContainer.style.display = "flex";
  208. }
  209. newContainer.appendChild(backCard);
  210. if(currentArray[i].contents[0].contents === undefined) continue;
  211. recurse(currentArray[i].contents, newContainer);
  212. }
  213. }
  214. let headContainer = document.createElement("div");
  215. headContainer.classList.add("cardContainer");
  216. headContainer.style.display = "flex";
  217. writing.appendChild(headContainer);
  218. recurse(response, headContainer);
  219. })
  220. .catch((err)=>{});
  221. fetch("/travel/directories")
  222. .then(response => response.json())
  223. .then((response)=>{
  224. let mainContainer = document.getElementById("travel");
  225. let template = document.getElementById("travelCard").content.children[0];
  226. let recurse = (contents, container, prevCard)=>{
  227. for(let i = 0; i < contents.length; i++){
  228. if(contents[i].name !== undefined){
  229. let finalFolder = true;
  230. for(let j = 0; j < contents[i].contents.length; j++){
  231. if(contents[i].contents[j].name !== undefined) finalFolder = false;
  232. }
  233. if(back !== undefined) container.appendChild(back);
  234. if(finalFolder === true){
  235. let card = document.createElement("a");
  236. card.classList.add("card");
  237. card.href = contents[i].route;
  238. container.appendChild(card);
  239. let h1 = document.createElement("h1");
  240. h1.innerText = contents[i].name.replaceAll("-", " ");
  241. card.appendChild(h1);
  242. let img = document.createElement("img");
  243. img.src = contents[i].contents[0].src;
  244. img.alt = contents[i].name;
  245. card.appendChild(img);
  246. }else{
  247. let newContainer = document.createElement("div");
  248. newContainer.classList.add("cardContainer");
  249. newContainer.style.display = "none";
  250. mainContainer.appendChild(newContainer);
  251. let card = template.cloneNode(true);
  252. card.children[0].innerText = contents[i].name.replaceAll("-", " ");
  253. card.children[1].alt = contents[i].name.replaceAll("-", " ");
  254. card.onclick = ()=>{
  255. container.style.display = "none";
  256. newContainer.style.display = "flex";
  257. }
  258. container.appendChild(card);
  259. recurse(contents[i].contents, newContainer, card);
  260. }
  261. }else{
  262. if(prevCard.children[1].src === ""){
  263. prevCard.children[1].src = contents[i].src;
  264. }
  265. }
  266. }
  267. }
  268. let headContainer = document.createElement("div");
  269. headContainer.classList.add("cardContainer");
  270. headContainer.style.display = "flex";
  271. mainContainer.appendChild(headContainer);
  272. recurse(response, headContainer);
  273. })
  274. .catch((err)=>{});
  275. </script>
  276. </body>
  277. </html>