|
| 1 | +<% |
| 2 | +var pageTitle = page.title || config.subtitle || ''; |
| 3 | +if (is_archive()) pageTitle = 'Archives'; |
| 4 | +if (is_tag()) pageTitle = 'Tag: ' + page.tag; |
| 5 | +if (is_category()) pageTitle = 'Category: ' + page.category; |
| 6 | +if (is_month()) pageTitle += ': ' + page.month + '/' + page.year; |
| 7 | +if (is_year()) pageTitle += ': ' + page.year; |
| 8 | +pageTitle += ' | ' + config.title; |
| 9 | +%> |
| 10 | +<!DOCTYPE html> |
| 11 | +<html lang="<%=config.language%>"> |
| 12 | + <head> |
| 13 | + <meta charset="UTF-8" /> |
| 14 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 15 | + <title><%=pageTitle%></title> |
| 16 | + <link rel="stylesheet" href="<%= theme.highlight %>"> |
| 17 | + <link rel="stylesheet" href="/lightx.css"/> |
| 18 | + <link rel="manifest" href="/manifest.json" /> |
| 19 | + <link rel="apple-touch-icon" href="/icon512.png"> |
| 20 | + <meta name="theme-color" content="#ffffff"/> |
| 21 | + <% if(theme.analyticsTrackingID && (theme.analyticsTrackingID.trim() !== "")){%> |
| 22 | + <script async src="https://www.googletagmanager.com/gtag/js?id=<%- theme.analyticsTrackingID.trim() %>"></script> |
| 23 | + <script> |
| 24 | + window.dataLayer = window.dataLayer || []; |
| 25 | + function gtag(){dataLayer.push(arguments);} |
| 26 | + gtag('js', new Date()); |
| 27 | +
|
| 28 | + gtag('config', '<%- theme.analyticsTrackingID.trim() %>'); |
| 29 | + </script> |
| 30 | + <%}%> |
| 31 | + </head> |
| 32 | + <body> |
| 33 | + <script> |
| 34 | + if ('serviceWorker' in navigator) { |
| 35 | + window.addEventListener('load', function () { |
| 36 | + navigator.serviceWorker.register('/sw.js', {scope: '/'}) |
| 37 | + .then(function (registration) { |
| 38 | + // console.log('ServiceWorker registration successful with scope: ', registration.scope); |
| 39 | + }) |
| 40 | + .catch(function (err) { |
| 41 | + console.log('ServiceWorker registration failed: ', err); |
| 42 | + }); |
| 43 | + }); |
| 44 | + } |
| 45 | + </script> |
| 46 | + <div id="page-container"> |
| 47 | + <div id="content-wrap"> |
| 48 | + <div class="wrapper"> |
| 49 | + <div class="container"> |
| 50 | + <%-partial('partials/nav')%> |
| 51 | + <%- body %> |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + <div id="footer"> |
| 56 | + <div class="wrapper"> |
| 57 | + <div class="container"> |
| 58 | + <%-partial('partials/footer')%> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + </div> |
| 63 | + <% if(theme.disqus && (theme.disqus.trim() !== "")){%> |
| 64 | + <script id="dsq-count-scr" src="//<%= theme.disqus %>.disqus.com/count.js" async></script> |
| 65 | + <%}%> |
| 66 | + <% if(theme.busuanzi) {%> |
| 67 | + <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script> |
| 68 | + <%}%> |
| 69 | + <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/highlight.min.js"></script> |
| 70 | + <script> |
| 71 | + hljs.initHighlightingOnLoad(); |
| 72 | + </script> |
| 73 | + </body> |
| 74 | +</html> |
0 commit comments