Source for https://f.0x52.eu
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.

main.hbs 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=512px" />
  6. <title>{{this.frontmatter.title}}</title>
  7. <link href="/assets/style.css" rel="stylesheet" type="text/css">
  8. <script>
  9. /*
  10. @licstart The following is the entire license notice for the
  11. JavaScript code in this page.
  12. Copyright (C) 2019 Foks
  13. The JavaScript code in this page is free software: you can
  14. redistribute it and/or modify it under the terms of the GNU
  15. General Public License (GNU GPL) as published by the Free Software
  16. Foundation, either version 3 of the License, or (at your option)
  17. any later version. The code is distributed WITHOUT ANY WARRANTY;
  18. without even the implied warranty of MERCHANTABILITY or FITNESS
  19. FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
  20. As additional permission under GNU GPL version 3 section 7, you
  21. may distribute non-source (e.g., minimized or compacted) forms of
  22. that code without the copy of the GNU GPL normally required by
  23. section 4, provided you include this license notice and a URL
  24. through which recipients can access the Corresponding Source.
  25. @licend The above is the entire license notice
  26. for the JavaScript code in this page.
  27. */
  28. </script>
  29. </head>
  30. <body>
  31. <div class="header">
  32. <div class="name">
  33. <img src="/assets/Foks_transparent.png" align="center">
  34. Foks
  35. </div><br>
  36. {{#each this.query.data.pages}}
  37. <a href="{{this.relativePath}}">{{this.frontmatter.title}}</a>
  38. {{/each}}
  39. </div>
  40. <div class="content">
  41. {{{body}}}
  42. {{> @partial-block}}
  43. </div>
  44. <div class="footer">
  45. it has been <span id="daysSince">approximately <b>{{#daysSince}}2019-03-08T21:25:11+00:00{{/daysSince}}</b> days</span> since last using frontend JavaScript on this site<br>
  46. This site is built with <a href="https://github.com/Gioni06/stasis-generator">Stasis</a>, a static site generator written in TypeScript.<br>
  47. The source can be found <a href="https://git.lain.haus/f0x/site">here</a>.
  48. </div>
  49. <script>
  50. // this is obviously a joke. My static site generator will update the html on compile,
  51. // but to get it updated you do need JS :P
  52. // Furthermore, not all JS is bad
  53. let daysSince = document.getElementById("daysSince")
  54. let since = new Date("2019-03-08T21:25:11+00:00")
  55. let now = new Date()
  56. let timediff = now.getTime() - since.getTime()
  57. let days = Math.ceil(timediff / (1000 * 60 * 60 * 24))
  58. let plural = days != 1 ? 'days' : 'day'
  59. daysSince.innerHTML = `<b>${days}</b> ${plural}`
  60. </script>
  61. </body>
  62. </html>