layout.html.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. </head>
  11. <body class="bg-white pl-[calc(100vw-100%)] text-black antialiased dark:bg-gray-950 dark:text-white">
  12. <?php if (facebook()) { echo facebook(); } ?>
  13. <?php if (login()) { toolbar(); } ?>
  14. <section class="mx-auto max-w-3xl px-4 sm:px-6 xl:max-w-5xl xl:px-0">
  15. <div class="flex h-screen flex-col justify-between font-sans">
  16. <header class="flex items-center justify-between py-10">
  17. <div>
  18. <a aria-label="<?php echo blog_title();?>" href="<?php echo site_url();?>">
  19. <div class="flex items-center justify-between">
  20. <div class="mr-3">
  21. <img width="45" src="<?php echo theme_path();?>logo.png" alt="<?php echo blog_title();?>"/>
  22. </div>
  23. <div class="hidden h-6 text-2xl font-semibold sm:block"><?php echo blog_title();?></div>
  24. </div>
  25. </a>
  26. </div>
  27. <div class="flex items-center space-x-4 leading-5 sm:space-x-6">
  28. <?php echo menu('nav-top');?>
  29. <button aria-label="Search" class="search-open">
  30. <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">
  31. <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>
  32. </svg>
  33. </button>
  34. <button aria-label="Toggle Menu" class="sm:hidden menu-open" id="menu-toggle">
  35. <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">
  36. <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>
  37. </svg>
  38. </button>
  39. <div class="menu-mobile" role="dialog" tabindex="-1">
  40. <div class="fixed inset-0 z-60 bg-black/25"></div>
  41. <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]">
  42. <nav class="mt-8 flex h-full basis-0 flex-col items-start overflow-y-auto pl-12 pt-2 text-left">
  43. <?php echo menu('nav-mobile');?>
  44. </nav>
  45. <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">
  46. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
  47. <path
  48. fill-rule="evenodd"
  49. 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"
  50. clip-rule="evenodd"
  51. ></path>
  52. </svg>
  53. </button>
  54. </div>
  55. </div>
  56. </div>
  57. </header>
  58. <main class="mb-auto">
  59. <?php if (is_index() || isset($is_profile)) {?>
  60. <div class="divide-y divide-gray-200 dark:divide-gray-700">
  61. <?php echo content();?>
  62. </div>
  63. <?php } else {?>
  64. <?php echo content();?>
  65. <?php } ?>
  66. </main>
  67. <footer>
  68. <div class="mt-16 flex flex-col items-center">
  69. <div class="mb-3 flex space-x-4">
  70. <?php echo social();?>
  71. </div>
  72. <div class="mb-2 flex space-x-2 text-sm text-gray-500 dark:text-gray-400">
  73. <div><?php echo copyright();?></div>
  74. </div>
  75. <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>
  76. </div>
  77. </footer>
  78. </div>
  79. </section>
  80. <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">
  81. <div style="opacity: 1; transform: scale(0.99); pointer-events: auto;" class="w-full max-w-xl">
  82. <div>
  83. <div class="overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 dark:border-gray-800 dark:bg-gray-900">
  84. <div class="flex items-center space-x-4 p-4">
  85. <span class="block w-5">
  86. <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>
  87. </span>
  88. <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>
  89. <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">
  90. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
  91. <path
  92. fill-rule="evenodd"
  93. 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"
  94. clip-rule="evenodd"
  95. ></path>
  96. </svg>
  97. </button>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="fixed bottom-8 right-8 hidden flex-col gap-3" id="scroll-up">
  104. <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">
  105. <a href="#"><svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
  106. <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>
  107. </svg></a>
  108. </button>
  109. </div>
  110. <script>
  111. var mybutton = document.getElementById("scroll-up");
  112. window.onscroll = function () {
  113. if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) {
  114. mybutton.style.display = "flex";
  115. mybutton.style.opacity = "1";
  116. } else {
  117. mybutton.style.display = "none";
  118. mybutton.style.opacity = "0";
  119. }
  120. };
  121. </script>
  122. <script src="<?php echo theme_path();?>js/functions.js"></script>
  123. <?php if (analytics()): ?><?php echo analytics() ?><?php endif; ?>
  124. </body>
  125. </html>