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.

68 lines
2.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
  1. <div class="row">
  2. <div class="two columns" style="max-width: 50px">
  3. <h1 class="mt-2 mode">
  4. <div onclick=setDarkMode(true) id="darkBtn"><%= theme.switch_dark %></div>
  5. <div onclick=setDarkMode(false) id="lightBtn" class=hidden><%= theme.switch_light %></div>
  6. <script >
  7. if (localStorage.getItem('preferredTheme') == 'dark') {
  8. setDarkMode(true)
  9. }
  10. function setDarkMode(isDark) {
  11. var darkBtn = document.getElementById('darkBtn')
  12. var lightBtn = document.getElementById('lightBtn')
  13. if (isDark) {
  14. lightBtn.style.display = "block"
  15. darkBtn.style.display = "none"
  16. localStorage.setItem('preferredTheme', 'dark');
  17. } else {
  18. lightBtn.style.display = "none"
  19. darkBtn.style.display = "block"
  20. localStorage.removeItem('preferredTheme');
  21. }
  22. document.body.classList.toggle("darkmode");
  23. }
  24. </script>
  25. </h1>
  26. </div>
  27. <div class="six columns ml-1">
  28. <h1 class="mt-2">
  29. <div onclick=navigateHome()>Hello World.</div>
  30. <script >
  31. function navigateHome() {
  32. window.location.replace('https://tim.kicker.dev');
  33. }
  34. </script>
  35. </h1>
  36. </div>
  37. <!--
  38. <div class="six columns ml-1">
  39. <h1 class="mt-2">
  40. <a class="mt-2" href="<%= config.root %>">Hello World.</a>
  41. </h1>
  42. </div>
  43. -->
  44. <div class="twelve columns">
  45. <div class="row">
  46. <div class="nine columns left">
  47. <a href="<%= config.root %>">Home</a>
  48. <% for (name in theme.menu) { %>
  49. <% if (theme.menu[name]) { %>
  50. <a href="<%- url_for(theme.menu[name]) %>" class="ml"><%- name %></a>
  51. <% } %>
  52. <% } %>
  53. <% if (theme.email) { %>
  54. <% if (typeof obfuscate === "function") { %>
  55. <a href="mailto:<%- obfuscate(theme.email) %>" target="_blank" class="ml">Email</a>
  56. <% } else { %>
  57. <a href="mailto:<%= theme.email %>" target="_blank" class="ml">Email</a>
  58. <% } %>
  59. <% } %>
  60. </div>
  61. </div>
  62. <hr style="margin-bottom: 2.6rem">
  63. </div>
  64. </div>