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.

142 lines
5.3 KiB

2 years ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <!-- Minima -->
  5. <!-- Hexo theme created by @adisaktijrs -->
  6. <!-- Basic Page Needs
  7. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  8. <meta charset="utf-8">
  9. <%
  10. if (!config.author) {
  11. config.author = ""
  12. }
  13. var title = title = config.title;
  14. if (is_archive()){
  15. title = 'All Posts - ' + config.author;
  16. } else if (is_post()){
  17. title = page.title;
  18. } else if (is_page()){
  19. title = page.title + ' - ' + config.author;
  20. } else if (is_tag()){
  21. title = 'Posts Related to ' + page.tag;
  22. }
  23. %>
  24. <title><%= title %></title>
  25. <% if (config.sitemap) { %>
  26. <link rel="sitemap" href="<%-config.url + config.sitemap.path %>" />
  27. <% } %>
  28. <link rel="canonical" href="<%= url.replace(/index\.html$/, '').replace(/index\.html$/, '') %>">
  29. <% if (is_page()){ %>
  30. <meta name="description" content="<%= page.description %>">
  31. <% } else if (page.content){ %>
  32. <meta name="description" content="<%= strip_html(page.content).replace(/\n/g, " ").replace(/^\s*/, '').replace(/\s*$/, '').substring(0, 150) %>">
  33. <% } else { %>
  34. <meta name="description" content="<%= config.description %>">
  35. <% } %>
  36. <% if (config.keywords) { %>
  37. <meta name="keywords" content="<%= config.keywords %>">
  38. <% } %>
  39. <meta name="author" content="<%- config.author %>">
  40. <% if (is_post() || is_page()) { %>
  41. <meta property="og:image" content="<%-config.url + page.thumbnail %>">
  42. <% } else { %>
  43. <meta property="og:image" content="<%-config.url + theme.thumbnail %>">
  44. <% } %>
  45. <meta property="og:site_name" content="<%= config.title %>" />
  46. <meta property="og:type" content="article" />
  47. <meta property="og:title" content="<%= title %>" />
  48. <% if (is_page()){ %>
  49. <meta property="og:description" content="<%= page.description %>">
  50. <% } else if (page.content){ %>
  51. <meta property="og:description" content="<%= strip_html(page.content).replace(/\n/g, " ").replace(/^\s*/, '').replace(/\s*$/, '').substring(0, 150) %>">
  52. <% } else { %>
  53. <meta property="og:description" content="<%= config.description %>">
  54. <% } %>
  55. <meta property="og:url" content="<%= url.replace(/index\.html$/, '').replace(/index\.html$/, '') %>" />
  56. <meta name="twitter:card" content="summary_large_image">
  57. <meta name="twitter:title" content="<%= title %>">
  58. <% if (is_page()){ %>
  59. <meta name="twitter:description" content="<%= page.description %>">
  60. <% } else if (page.content){ %>
  61. <meta name="twitter:description" content="<%= strip_html(page.content).replace(/\n/g, " ").replace(/^\s*/, '').replace(/\s*$/, '').substring(0, 150) %>">
  62. <% } else { %>
  63. <meta name="twitter:description" content="<%= config.description %>">
  64. <% } %>
  65. <% if (is_post() || is_page()) { %>
  66. <meta name="twitter:image" content="<%-config.url + page.thumbnail %>">
  67. <% } else { %>
  68. <meta name="twitter:image" content="<%-config.url + theme.thumbnail %>">
  69. <% } %>
  70. <meta name="twitter:url" content="<%= url.replace(/index\.html$/, '').replace(/index\.html$/, '') %>" />
  71. <!-- Mobile Specific Metas
  72. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  73. <meta name="viewport" content="width=device-width, initial-scale=1">
  74. <!-- Preload fonts
  75. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  76. <link rel="preload" href="../fonts/dm-serif-display-v4-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
  77. <link rel="preload" href="../fonts/inter-v2-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
  78. <!-- CSS
  79. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  80. <%- css('css/normalize.css') %>
  81. <%- css('css/skeleton.css') %>
  82. <%- css('css/custom.css') %>
  83. <%- css('css/prism-dark.css') %>
  84. <%- css('css/prism-line-numbers.css') %>
  85. <!-- User css -->
  86. <% if (theme.usercss) { %>
  87. <%- css(theme.usercss) %>
  88. <% } %>
  89. <!-- Favicon
  90. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  91. <link rel="icon" type="image/png" href="<%- theme.favicon %>">
  92. <!-- Custom Theme Color Style
  93. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  94. <%- partial('partial/tcolor') %>
  95. <!-- Google Analytics (With Privacy Settings On)
  96. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  97. <%- partial('partial/google_analytics') %>
  98. </head>
  99. <body>
  100. <div class="container">
  101. <div class="row">
  102. <div>
  103. <%- partial('partial/header') %>
  104. <div class="trans">
  105. <%- body %>
  106. <%- partial('partial/footer') %>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <script src="<%- theme.nanobar %>"></script>
  112. <script>
  113. var options = {
  114. classname: 'nanobar',
  115. id: 'myNanobar'
  116. };
  117. var nanobar = new Nanobar(options);
  118. nanobar.go(30);
  119. nanobar.go(76);
  120. nanobar.go(100);
  121. </script>
  122. </body>
  123. </html>