layout.html.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <!DOCTYPE html>
  3. <html lang="<?php echo blog_language();?>" class="__variable_space scroll-smooth dark">
  4. <head>
  5. <?php echo head_contents();?>
  6. <?php echo $metatags;?>
  7. <link rel="stylesheet" href="<?php echo theme_path();?>css/typography.css" data-precedence="next" />
  8. <link rel="stylesheet" href="<?php echo theme_path();?>css/tailwind.css" data-precedence="next" />
  9. <link rel="stylesheet" href="<?php echo theme_path();?>css/style.css" data-precedence="next" />
  10. <link rel="stylesheet" href="<?php echo theme_path();?>css/highlight.js.min.css" data-precedence="next" />
  11. </head>
  12. <body class="bg-white pl-[calc(100vw-100%)] text-black antialiased dark:bg-gray-950 dark:text-white">
  13. <?php if (facebook()) { echo facebook(); } ?>
  14. <?php if (login()) { toolbar(); } ?>
  15. <section class="mx-auto max-w-3xl px-4 sm:px-6 xl:max-w-5xl xl:px-0">
  16. <div class="flex h-screen flex-col justify-between font-sans">
  17. <header class="flex items-center justify-between py-10">
  18. <div>
  19. <a aria-label="<?php echo blog_title();?>" href="<?php echo site_url();?>">
  20. <div class="flex items-center justify-between">
  21. <div class="mr-3">
  22. <img width="45" src="<?php echo theme_path();?>logo.png" alt="<?php echo blog_title();?>"/>
  23. </div>
  24. <div class="hidden h-6 text-2xl font-semibold sm:block"><?php echo blog_title();?></div>
  25. </div>
  26. </a>
  27. </div>
  28. <div class="flex items-center space-x-4 leading-5 sm:space-x-6">
  29. <?php echo menu('nav-top');?>
  30. <button aria-label="Search" class="search-open">
  31. <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-6 w-6 text-gray-900 dark:text-gray-100">
  32. <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"></path>
  33. </svg>
  34. </button>
  35. <button aria-label="Toggle Menu" class="sm:hidden menu-open" id="menu-toggle">
  36. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="h-8 w-8 text-gray-900 dark:text-gray-100">
  37. <path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path>
  38. </svg>
  39. </button>
  40. <div class="menu-mobile" role="dialog" tabindex="-1">
  41. <div class="fixed inset-0 z-60 bg-black/25"></div>
  42. <div class="fixed left-0 top-0 z-70 h-full w-full bg-white opacity-95 duration-300 dark:bg-gray-950 dark:opacity-[0.98]">
  43. <nav class="mt-8 flex h-full basis-0 flex-col items-start overflow-y-auto pl-12 pt-2 text-left">
  44. <?php echo menu('nav-mobile');?>
  45. </nav>
  46. <button class="fixed right-4 top-7 z-80 h-16 w-16 p-4 text-gray-900 hover:text-primary-500 dark:text-gray-100 dark:hover:text-primary-400 menu-close" aria-label="Toggle Menu">
  47. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
  48. <path
  49. fill-rule="evenodd"
  50. d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
  51. clip-rule="evenodd"
  52. ></path>
  53. </svg>
  54. </button>
  55. </div>
  56. </div>
  57. </div>
  58. </header>
  59. <main class="mb-auto">
  60. <?php if (is_index() || isset($is_profile)) {?>
  61. <div class="divide-y divide-gray-200 dark:divide-gray-700">
  62. <?php echo content();?>
  63. </div>
  64. <?php } else {?>
  65. <?php echo content();?>
  66. <?php } ?>
  67. </main>
  68. <footer>
  69. <div class="mt-16 flex flex-col items-center">
  70. <div class="mb-3 flex space-x-4">
  71. <?php echo social();?>
  72. </div>
  73. <div class="mb-2 flex space-x-2 text-sm text-gray-500 dark:text-gray-400">
  74. <div><?php echo copyright();?></div>
  75. </div>
  76. <div class="mb-8 text-sm text-gray-500 dark:text-gray-400">Design by <a style="te" target="_blank" rel="nofollow" href="https://www.timlrx.com/">Timlrx</a></div>
  77. </div>
  78. </footer>
  79. </div>
  80. </section>
  81. <div style="position: fixed; align-items: flex-start; justify-content: center; width: 100%; inset: 0px; padding: 14vh 16px 16px;" class="z-50 bg-gray-300/50 p-4 backdrop-blur backdrop-filter dark:bg-black/50 search-form">
  82. <div style="opacity: 1; transform: scale(0.99); pointer-events: auto;" class="w-full max-w-xl">
  83. <div>
  84. <div class="overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 dark:border-gray-800 dark:bg-gray-900">
  85. <div class="flex items-center space-x-4 p-4">
  86. <span class="block w-5">
  87. <svg class="text-gray-400 dark:text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
  88. </span>
  89. <form role="search" class="w-full"><input name="search" class="h-8 w-full bg-transparent text-gray-600 placeholder-gray-400 focus:outline-none dark:text-gray-200 dark:placeholder-gray-500" autocomplete="off" role="combobox" spellcheck="false" aria-expanded="true" aria-controls="kbar-listbox" aria-activedescendant="kbar-listbox-item-1" placeholder="<?php echo i18n('type_to_search');?>" value=""></form>
  90. <button class="z-80 h-16 w-16 p-4 text-gray-900 hover:text-primary-500 dark:text-gray-100 dark:hover:text-primary-400 search-close" aria-label="Toggle Menu">
  91. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
  92. <path
  93. fill-rule="evenodd"
  94. d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
  95. clip-rule="evenodd"
  96. ></path>
  97. </svg>
  98. </button>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="fixed bottom-8 right-8 hidden flex-col gap-3" id="scroll-up">
  105. <button aria-label="Scroll To Top" class="rounded-full bg-gray-200 p-2 text-gray-500 transition-all hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600">
  106. <a href="#"><svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
  107. <path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
  108. </svg></a>
  109. </button>
  110. </div>
  111. <script>
  112. var mybutton = document.getElementById("scroll-up");
  113. window.onscroll = function () {
  114. if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) {
  115. mybutton.style.display = "flex";
  116. mybutton.style.opacity = "1";
  117. } else {
  118. mybutton.style.display = "none";
  119. mybutton.style.opacity = "0";
  120. }
  121. };
  122. </script>
  123. <script src="<?php echo theme_path();?>js/functions.js"></script>
  124. <script src="<?php echo theme_path();?>js/highlight.min.js"></script>
  125. <script>hljs.highlightAll();</script>
  126. <?php if (analytics()): ?><?php echo analytics() ?><?php endif; ?>
  127. </body>
  128. </html>